luci-lib-ip: fix build error with LTO

Adding $(FPIC) parameter fixes building with CONFIG_USE_LTO enabled.

Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
This commit is contained in:
Anari Jalakas 2024-11-11 21:00:46 +02:00 committed by Paul Donald
parent 42e2e404cf
commit 82bde8c42d

View File

@ -7,7 +7,7 @@ IP_LIB = ip.so
$(CC) $(CPPFLAGS) $(CFLAGS) $(LUA_CFLAGS) $(IP_CFLAGS) $(FPIC) -c -o $@ $<
compile: $(IP_OBJ)
$(CC) $(LDFLAGS) -shared -o $(IP_LIB) $(IP_OBJ) $(IP_LDFLAGS)
$(CC) $(LDFLAGS) -shared -o $(IP_LIB) $(IP_OBJ) $(IP_LDFLAGS) $(FPIC)
install: compile
mkdir -p $(DESTDIR)/usr/lib/lua/luci