aboutsummaryrefslogtreecommitdiffstats
path: root/src/so.mk
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-18 10:24:19 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-25 10:04:47 -0300
commitcddf20ff1e69c85715e65394388f4ce912c01789 (patch)
treebf99451d4f33afce9d71be136355807407b892f9 /src/so.mk
parentbuild: split misc flags from MANFLAGS (diff)
downloadfirejail-cddf20ff1e69c85715e65394388f4ce912c01789.tar.gz
firejail-cddf20ff1e69c85715e65394388f4ce912c01789.tar.zst
firejail-cddf20ff1e69c85715e65394388f4ce912c01789.zip
build: remove redundant LDFLAGS in so.mk
Changes: * Remove -fPIE, as it is mutually exclusive with -fPIC * Remove -pie, as it is intended for executables (with -fPIE / -fpie) * Remove duplicated `-z relro` Note: The files built by the affected recipe are identical with and without these changes when using gcc 13.1.1-1 on Artix Linux.
Diffstat (limited to 'src/so.mk')
-rw-r--r--src/so.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/so.mk b/src/so.mk
index ee5d94a0f..7a8d09e89 100644
--- a/src/so.mk
+++ b/src/so.mk
@@ -16,7 +16,7 @@ SO_CFLAGS = \
16 -fstack-protector-all -D_FORTIFY_SOURCE=2 \ 16 -fstack-protector-all -D_FORTIFY_SOURCE=2 \
17 -fPIC 17 -fPIC
18 18
19SO_LDFLAGS = -pie -fPIE -Wl,-z,relro -Wl,-z,now 19SO_LDFLAGS = -fPIC -Wl,-z,relro -Wl,-z,now
20 20
21.PHONY: all 21.PHONY: all
22all: $(TARGET) 22all: $(TARGET)
@@ -25,7 +25,7 @@ all: $(TARGET)
25 $(CC) $(SO_CFLAGS) $(CFLAGS) $(INCLUDE) -c $< -o $@ 25 $(CC) $(SO_CFLAGS) $(CFLAGS) $(INCLUDE) -c $< -o $@
26 26
27$(SO): $(OBJS) $(ROOT)/config.mk 27$(SO): $(OBJS) $(ROOT)/config.mk
28 $(CC) $(SO_LDFLAGS) -shared -fPIC -z relro $(LDFLAGS) -o $@ $(OBJS) -ldl 28 $(CC) $(SO_LDFLAGS) -shared $(LDFLAGS) -o $@ $(OBJS) -ldl
29 29
30.PHONY: clean 30.PHONY: clean
31clean:; rm -fr $(SO) $(CLEANFILES) 31clean:; rm -fr $(SO) $(CLEANFILES)