Selaa lähdekoodia

dpkg-buildflags: Do not set -fstack-protector on arm64

The flag is not yet supported there.

Closes: #711936

[guillem@debian.org: Update comment. ]

Signed-off-by: Guillem Jover <guillem@debian.org>
Matthias Klose 13 vuotta sitten
vanhempi
commit
b8a0dbd784
2 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 3 0
      debian/changelog
  2. 2 2
      scripts/Dpkg/Vendor/Debian.pm

+ 3 - 0
debian/changelog

@@ -90,6 +90,9 @@ dpkg (1.17.0) UNRELEASED; urgency=low
     respect build time setting.
     respect build time setting.
   * Deprecate Dpkg lowercase and exported by default variables, replaced by
   * Deprecate Dpkg lowercase and exported by default variables, replaced by
     new unified uppercase non-exported by default ones.
     new unified uppercase non-exported by default ones.
+  * Do not set -fstack-protector in the default build flags on arm64 (it's
+    not yet supported). Thanks to Matthias Klose <doko@ubuntu.com>.
+    Closes: #711936
 
 
   [ Updated manpages translations ]
   [ Updated manpages translations ]
   * Fix incorrect translation of "fortify" in French manpage for dpkg-buildflags
   * Fix incorrect translation of "fortify" in French manpage for dpkg-buildflags

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

@@ -122,8 +122,8 @@ sub add_hardening_flags {
 	#  (#574716).
 	#  (#574716).
 	$use_feature{pie} = 0;
 	$use_feature{pie} = 0;
     }
     }
-    if ($cpu =~ /^(ia64|alpha|mips|mipsel|hppa)$/ or $arch eq 'arm') {
-	# Stack protector disabled on ia64, alpha, mips, mipsel, hppa.
+    if ($cpu =~ /^(ia64|alpha|mips|mipsel|hppa|arm64)$/ or $arch eq 'arm') {
+	# Stack protector disabled on ia64, alpha, arm64, mips, mipsel, hppa.
 	#   "warning: -fstack-protector not supported for this target"
 	#   "warning: -fstack-protector not supported for this target"
 	# Stack protector disabled on arm (ok on armel).
 	# Stack protector disabled on arm (ok on armel).
 	#   compiler supports it incorrectly (leads to SEGV)
 	#   compiler supports it incorrectly (leads to SEGV)