summaryrefslogtreecommitdiffhomepage
path: root/libs/luci-lib-nixio/src/Makefile
diff options
context:
space:
mode:
authorAnari Jalakas <anari.jalakas@gmail.com>2024-11-11 21:05:06 +0200
committerPaul Donald <newtwen+github@gmail.com>2024-11-17 23:23:42 +0100
commit44fbd008fb3fe03d9f05697ac650c0d907852962 (patch)
tree149039e6ceab20ec5f0fe9d9cd5f8d32109acc91 /libs/luci-lib-nixio/src/Makefile
parent5de203082ffad31ba70e2d332e4ee3495ec58b30 (diff)
luci-lib-nixio: fix build error with LTO
Adding $(FPIC) parameter fixes building with CONFIG_USE_LTO enabled. Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
Diffstat (limited to 'libs/luci-lib-nixio/src/Makefile')
-rw-r--r--libs/luci-lib-nixio/src/Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/luci-lib-nixio/src/Makefile b/libs/luci-lib-nixio/src/Makefile
index 893656c256..b506f3c09f 100644
--- a/libs/luci-lib-nixio/src/Makefile
+++ b/libs/luci-lib-nixio/src/Makefile
@@ -66,7 +66,7 @@ endif
%.o: %.c
- $(CC) $(CPPFLAGS) $(CFLAGS) $(NIXIO_CFLAGS) $(LUA_CFLAGS) $(FPIC) -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(NIXIO_CFLAGS) $(LUA_CFLAGS) $(FPIC) -c -o $@ $<
ifneq ($(NIXIO_TLS),)
tls-crypto.o: $(TLS_DEPENDS) tls-crypto.c
@@ -74,18 +74,18 @@ tls-crypto.o: $(TLS_DEPENDS) tls-crypto.c
tls-context.o: $(TLS_DEPENDS) tls-context.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(NIXIO_CFLAGS) $(LUA_CFLAGS) $(FPIC) $(TLS_CFLAGS) -c -o $@ tls-context.c
-
+
tls-socket.o: $(TLS_DEPENDS) tls-socket.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(NIXIO_CFLAGS) $(LUA_CFLAGS) $(FPIC) $(TLS_CFLAGS) -c -o $@ tls-socket.c
-
+
axtls-compat.o: libaxtls.a axtls-compat.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(NIXIO_CFLAGS) $(LUA_CFLAGS) $(FPIC) $(TLS_CFLAGS) -c -o $@ axtls-compat.c
mkdir -p dist
cp -pR axtls-root/* dist/
-endif
+endif
compile: $(NIXIO_OBJ)
- $(CC) $(LDFLAGS) $(SHLIB_FLAGS) -o $(NIXIO_SO) $(NIXIO_OBJ) $(NIXIO_LDFLAGS) $(NIXIO_LDFLAGS_POST)
+ $(CC) $(LDFLAGS) $(SHLIB_FLAGS) -o $(NIXIO_SO) $(NIXIO_OBJ) $(NIXIO_LDFLAGS) $(NIXIO_LDFLAGS_POST) $(FPIC)
mkdir -p dist/usr/lib/lua
cp $(NIXIO_SO) dist/usr/lib/lua/$(NIXIO_SO)