luci-lib-jsonc: 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:03:50 +02:00
committed by Paul Donald
parent 82bde8c42d
commit 5de203082f

View File

@ -7,7 +7,7 @@ JSONC_LIB = jsonc.so
$(CC) $(CPPFLAGS) $(CFLAGS) $(LUA_CFLAGS) $(JSONC_CFLAGS) $(FPIC) -c -o $@ $<
compile: $(JSONC_OBJ)
$(CC) $(LDFLAGS) -shared -o $(JSONC_LIB) $(JSONC_OBJ) $(JSONC_LDFLAGS)
$(CC) $(LDFLAGS) -shared -o $(JSONC_LIB) $(JSONC_OBJ) $(JSONC_LDFLAGS) $(FPIC)
install: compile
mkdir -p $(DESTDIR)/usr/lib/lua/luci