2015-02-15 12:57:53 +01:00
|
|
|
From 423890b1db83fce87d1283293a3d207e8f18aff4 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Vladimir Smirnov <civil@gentoo.org>
|
|
|
|
Date: Mon, 19 May 2014 19:44:44 +0400
|
|
|
|
Subject: [PATCH] Don't force -fstack-protector on everyone
|
|
|
|
|
|
|
|
Bug-Gentoo: https://bugs.gentoo.org/348557
|
|
|
|
|
|
|
|
Patch-Name: gentoo/drop_fstack_protector.diff
|
|
|
|
|
|
|
|
Original by Torsten Veller, ported to perl 5.20
|
|
|
|
---
|
|
|
|
Configure | 24 ------------------------
|
|
|
|
1 file changed, 24 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/Configure b/Configure
|
|
|
|
index 293ef61..b221390 100755
|
|
|
|
--- Configure
|
|
|
|
+++ Configure
|
2015-06-16 15:14:40 +02:00
|
|
|
@@ -5423,19 +5423,6 @@
|
2015-02-15 12:57:53 +01:00
|
|
|
# is to add the flag to the flags passed to the compiler at link time,
|
|
|
|
# as that way the compiler can do the right implementation dependant
|
|
|
|
# thing. (NWC)
|
|
|
|
- case "$gccversion" in
|
2015-06-16 15:14:40 +02:00
|
|
|
- ?*) set stack-protector-strong -fstack-protector-strong
|
2015-02-15 12:57:53 +01:00
|
|
|
- eval $checkccflag
|
2015-06-16 15:14:40 +02:00
|
|
|
- case "$dflt" in
|
|
|
|
- *-fstack-protector-strong*) ;; # It got added.
|
|
|
|
- *) # Try the plain/older -fstack-protector.
|
|
|
|
- set stack-protector -fstack-protector
|
|
|
|
- eval $checkccflag
|
|
|
|
- ;;
|
|
|
|
- esac
|
2015-02-15 12:57:53 +01:00
|
|
|
- ;;
|
|
|
|
- esac
|
|
|
|
- ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$mips_type" in
|
2015-06-16 15:14:40 +02:00
|
|
|
@@ -5573,21 +5560,6 @@
|
2015-02-15 12:57:53 +01:00
|
|
|
;;
|
|
|
|
*) dflt="$ldflags";;
|
|
|
|
esac
|
|
|
|
-# See note above about -fstack-protector
|
|
|
|
-case "$ccflags" in
|
2015-06-16 15:14:40 +02:00
|
|
|
-*-fstack-protector-strong*)
|
|
|
|
- case "$dflt" in
|
|
|
|
- *-fstack-protector-strong*) ;; # Don't add it again
|
|
|
|
- *) dflt="$dflt -fstack-protector-strong" ;;
|
|
|
|
- esac
|
|
|
|
- ;;
|
2015-02-15 12:57:53 +01:00
|
|
|
-*-fstack-protector*)
|
|
|
|
- case "$dflt" in
|
|
|
|
- *-fstack-protector*) ;; # Don't add it again
|
|
|
|
- *) dflt="$dflt -fstack-protector" ;;
|
|
|
|
- esac
|
|
|
|
- ;;
|
|
|
|
-esac
|
|
|
|
|
|
|
|
: Try to guess additional flags to pick up local libraries.
|
|
|
|
for thislibdir in $libpth; do
|
2015-06-16 15:14:40 +02:00
|
|
|
@@ -8473,21 +8445,6 @@
|
2015-02-15 12:57:53 +01:00
|
|
|
''|' ') dflt='none' ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
- case "$ldflags" in
|
2015-06-16 15:14:40 +02:00
|
|
|
- *-fstack-protector-strong*)
|
|
|
|
- case "$dflt" in
|
|
|
|
- *-fstack-protector-strong*) ;; # Don't add it again
|
|
|
|
- *) dflt="$dflt -fstack-protector-strong" ;;
|
|
|
|
- esac
|
|
|
|
- ;;
|
2015-02-15 12:57:53 +01:00
|
|
|
- *-fstack-protector*)
|
|
|
|
- case "$dflt" in
|
|
|
|
- *-fstack-protector*) ;; # Don't add it again
|
|
|
|
- *) dflt="$dflt -fstack-protector" ;;
|
|
|
|
- esac
|
|
|
|
- ;;
|
|
|
|
- esac
|
|
|
|
-
|
|
|
|
rp="Any special flags to pass to $ld to create a dynamically loaded library?"
|
|
|
|
. ./myread
|
|
|
|
case "$ans" in
|