Przeglądaj źródła

Dpkg::Vendor::Debian: Do not enable stack-protector on nios2

This gcc target does not support stack-protector.

Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Guillem Jover <guillem@debian.org>
Guillem Jover 10 lat temu
rodzic
commit
ba511d919e
2 zmienionych plików z 4 dodań i 2 usunięć
  1. 2 0
      debian/changelog
  2. 2 2
      scripts/Dpkg/Vendor/Debian.pm

+ 2 - 0
debian/changelog

@@ -19,6 +19,8 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
     dpkg git repository, copyright format URL and examples in man pages among
     others.
   * Clarify where to find the GPL-2 license in debian/copyright.
+  * Do not enable stack-protector on nios2 in Debian and derivatives (it is
+    not supported by gcc yet).
   * Perl modules:
     - Add new CTRL_REPO_RELEASE control block type to Dpkg::Control.
     - Add new CTRL_COPYRIGHT_HEADER, CTRL_COPYRIGHT_FILES and

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

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