Explorar el Código

dpkg-buildflags: Set preprocessor option -D_FORTIFY_SOURCE=2 in CPPFLAGS

Instead of setting it in the CFLAGS and CXXFLAGS variables.

Closes: #642521, #643632
Guillem Jover hace 15 años
padre
commit
feac1f983c
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  1. 5 0
      debian/changelog
  2. 1 2
      scripts/Dpkg/Vendor/Debian.pm

+ 5 - 0
debian/changelog

@@ -1,5 +1,6 @@
 dpkg (1.16.1.1) UNRELEASED; urgency=low
 
+  [ Raphaël Hertzog ]
   * Fix dpkg-source to not ignore the automatic patch when checking
     for unrecorded changes.
   * Let dpkg-source --commit create debian/patches when required.
@@ -7,6 +8,10 @@ dpkg (1.16.1.1) UNRELEASED; urgency=low
   * Update dpkg-buildflags(1) to not include quotes in the examples
     setting DEB_BUILD_MAINT_OPTIONS.
 
+  [ Guillem Jover ]
+  * Change dpkg-buildflags to set preprocessor option -D_FORTIFY_SOURCE=2
+    in CPPFLAGS, instead of CFLAGS and CXXFLAGS. Closes: #642521, #643632
+
  -- Raphaël Hertzog <hertzog@debian.org>  Tue, 27 Sep 2011 08:15:51 +0200
 
 dpkg (1.16.1) unstable; urgency=low

+ 1 - 2
scripts/Dpkg/Vendor/Debian.pm

@@ -135,8 +135,7 @@ sub add_hardening_flags {
     }
     # Fortify
     if ($use_feature{"fortify"}) {
-	$flags->append("CFLAGS", "-D_FORTIFY_SOURCE=2");
-	$flags->append("CXXFLAGS", "-D_FORTIFY_SOURCE=2");
+	$flags->append("CPPFLAGS", "-D_FORTIFY_SOURCE=2");
     }
     # Format
     if ($use_feature{"format"}) {