From cddf20ff1e69c85715e65394388f4ce912c01789 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sun, 18 Jun 2023 10:24:19 -0300 Subject: 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. --- src/so.mk | 4 ++-- 1 file 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 = \ -fstack-protector-all -D_FORTIFY_SOURCE=2 \ -fPIC -SO_LDFLAGS = -pie -fPIE -Wl,-z,relro -Wl,-z,now +SO_LDFLAGS = -fPIC -Wl,-z,relro -Wl,-z,now .PHONY: all all: $(TARGET) @@ -25,7 +25,7 @@ all: $(TARGET) $(CC) $(SO_CFLAGS) $(CFLAGS) $(INCLUDE) -c $< -o $@ $(SO): $(OBJS) $(ROOT)/config.mk - $(CC) $(SO_LDFLAGS) -shared -fPIC -z relro $(LDFLAGS) -o $@ $(OBJS) -ldl + $(CC) $(SO_LDFLAGS) -shared $(LDFLAGS) -o $@ $(OBJS) -ldl .PHONY: clean clean:; rm -fr $(SO) $(CLEANFILES) -- cgit v1.2.3-54-g00ecf