#------------------------------------------------------------------------
# executable(...) configuration.
-@@ -1482,6 +1485,8 @@
+@@ -1482,6 +1485,9 @@
# -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
%debugcflags -O0 -g -Wall
-+%optldflags -Wl,--as-needed
-+%optcppflags %{nil}
++%debugcppflags %{nil}
++%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
++%optcppflags -D_FORTIFY_SOURCE=2
# Warning: those macros are overwritten by macros.build,
# left here for compatibility