Bladeren bron

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
Guillem Jover 12 jaren geleden
bovenliggende
commit
1b2f6e01c8
3 gewijzigde bestanden met toevoegingen van 7 en 2 verwijderingen
  1. 3 0
      debian/changelog
  2. 2 2
      man/dpkg-buildflags.1
  3. 2 0
      scripts/Dpkg/Vendor/Debian.pm

+ 3 - 0
debian/changelog

@@ -67,6 +67,9 @@ dpkg (1.17.2) UNRELEASED; urgency=low
     Suggested by Harald Dunkel <harri@afaics.de>. Closes: #615813, #719418
   * Always check subprocess exit codes in Dpkg::Source::Package modules.
     Reported by Ian Jackson <ijackson@chiark.greenend.org.uk>.
+  * Add support for pie and stack-protector options to dpkg-buildflags FFLAGS,
+    and update the man page to mention FFLAGS are a subset of CFLAGS.
+    Closes: #726932
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 2 - 2
man/dpkg-buildflags.1

@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
 .
-.TH dpkg\-buildflags 1 "2013-03-28" "Debian Project" "dpkg suite"
+.TH dpkg\-buildflags 1 "2013-10-20" "Debian Project" "dpkg suite"
 .SH NAME
 dpkg\-buildflags \- returns build flags to use during package build
 .
@@ -173,7 +173,7 @@ Options for the C++ compiler. Same as \fBCFLAGS\fP.
 Options for the GNU Java compiler (gcj). A subset of \fBCFLAGS\fP.
 .TP
 .B FFLAGS
-Options for the Fortran compiler. Same as \fBCFLAGS\fP.
+Options for the Fortran compiler. A subset of \fBCFLAGS\fP.
 .TP
 .B LDFLAGS
 Options passed to the compiler when linking executables or shared

+ 2 - 0
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');
     }