From 1b2f6e01c8c11f0adf04a3dee91ed9a6ac5dae5d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 20 Oct 2013 21:06:50 +0200 Subject: dpkg-buildflags: Add pie and stack-protector options to FFLAGS When enabled add those flags to the Fortran build flags. Update the man page to document that FFLAGS is a subset of CFLAGS. Closes: #726932 --- scripts/Dpkg/Vendor/Debian.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm index bf5c8aef4..e1a6b0cc0 100644 --- a/scripts/Dpkg/Vendor/Debian.pm +++ b/scripts/Dpkg/Vendor/Debian.pm @@ -150,6 +150,7 @@ sub add_hardening_flags { # PIE if ($use_feature{pie}) { $flags->append('CFLAGS', '-fPIE'); + $flags->append('FFLAGS', '-fPIE'); $flags->append('CXXFLAGS', '-fPIE'); $flags->append('GCJFLAGS', '-fPIE'); $flags->append('LDFLAGS', '-fPIE -pie'); @@ -158,6 +159,7 @@ sub add_hardening_flags { # Stack protector if ($use_feature{stackprotector}) { $flags->append('CFLAGS', '-fstack-protector --param=ssp-buffer-size=4'); + $flags->append('FFLAGS', '-fstack-protector --param=ssp-buffer-size=4'); $flags->append('CXXFLAGS', '-fstack-protector --param=ssp-buffer-size=4'); $flags->append('GCJFLAGS', '-fstack-protector --param=ssp-buffer-size=4'); } -- cgit v1.2.3