Package: dpkg-dev
Version: 1.16.15
Severity: wishlist
Tags: patch

The patch belows says all. That said I am not sure it's a good idea to
change that just before the freeze, I am mostly filling the bug now so
that I don't forget


>From 22d3992c534def0651a1d6423916b0371d927fce Mon Sep 17 00:00:00 2001
From: Aurelien Jarno <[email protected]>
Date: Wed, 1 Oct 2014 16:58:18 +0200
Subject: [PATCH] dpkg-buildflags: enable pie and stack-protector on mips/mipsel

    dpkg-buildflags: enable pie and stack-protector on mips/mipsel
    
    pie is disabled on mips and mipsel, according to the comments due to
    bug#526961. This bug has been fixed more than 4 years ago it's time
    to reenable pie support.
    
    Similarly strack-protector support has been added on mips and mipsel
    in gcc 4.6 so we can now enable it.
    
    Signed-off-by: Aurelien Jarno <[email protected]>

diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm
index 775f3ac..1bd5707 100644
--- a/scripts/Dpkg/Vendor/Debian.pm
+++ b/scripts/Dpkg/Vendor/Debian.pm
@@ -124,14 +124,14 @@ sub add_hardening_flags {
 
     # Mask features that are not available on certain architectures.
     if ($os !~ /^(?:linux|knetbsd|hurd)$/ or
-       $cpu =~ /^(?:hppa|mips|mipsel|avr32)$/) {
+       $cpu =~ /^(?:hppa|avr32)$/) {
        # Disabled on non-linux/knetbsd/hurd (see #430455 and #586215).
-       # Disabled on hppa, mips/mipsel (#532821), avr32
+       # Disabled on hppa, avr32
        #  (#574716).
        $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|hppa)$/ or $arch eq 'arm') {
+       # Stack protector disabled on ia64, alpha, hppa.
        #   "warning: -fstack-protector not supported for this target"
        # Stack protector disabled on arm (ok on armel).
        #   compiler supports it incorrectly (leads to SEGV)


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: mips (mips64)

Kernel: Linux 3.16-2-5kc-malta
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to