]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
macros: Add -Wl,--as-needed to LDFLAGS by default
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 12 Dec 2022 17:02:54 +0000 (17:02 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 12 Dec 2022 17:02:54 +0000 (17:02 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
macros/cflags.macro

index 430aeab559cdb8a6c32cb6d1f64024e64a059e4a..1175d95f1cd1e3b74f886152f87a5f510c65836d 100644 (file)
@@ -5,7 +5,7 @@ export CFLAGS = # empty
 export CXXFLAGS = %{CFLAGS}
 
 # Export LDFLAGS
-export LDFLAGS  = -Wl,-z,relro -Wl,-z,now
+export LDFLAGS  = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
 
 # Enable optimisation and compile in debugging information
 CFLAGS = -O2 -g