luci-lua-runtime: fix build error with LTO
authorAnari Jalakas <anari.jalakas@gmail.com>
Mon, 11 Nov 2024 19:06:08 +0000 (21:06 +0200)
committerPaul Donald <newtwen+github@gmail.com>
Sun, 17 Nov 2024 22:23:42 +0000 (23:23 +0100)
Adding $(FPIC) parameter fixes building with CONFIG_USE_LTO enabled.

Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
modules/luci-lua-runtime/src/Makefile

index dcce33dc8cc0108b05f5441608b5f7a1b7822644..9dbaff4ee09181925031a5fbdd11875d3f13f03b 100644 (file)
@@ -13,7 +13,7 @@ clean:
        rm -f contrib/lemon parser.so plural_formula.c plural_formula.h *.o
 
 parser.so: template_parser.o template_utils.o template_lmo.o template_lualib.o plural_formula.o
-       $(CC) $(LDFLAGS) -shared -o $@ $^
+       $(CC) $(LDFLAGS) $(FPIC) -shared -o $@ $^
 
 version.lua:
        ./mkversion.sh $@ $(LUCI_VERSION) "$(LUCI_GITBRANCH)"