summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch
blob: 14a05d291b6b04fbf214d7a305d081d3c40a37d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Some distributions (like opensuse421) supported by the project
comes with older gcc releases, -fstack-protector=strong is supported
by GCC>=4.9.

This causes a build failure when install perl-native from a sstate that
comes from a machine supporting -fstack-protector=strong [1].

So disable usage of this flag in perl-native builds, this patch could
be removed when all supported distros comes with GCC>=4.9.

[YOCTO #10338]

Upstream-Status: Inappropriate [configuration]

[1] http://errors.yoctoproject.org/Errors/Details/109589/

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 Configure | 54 ------------------------------------------------------
 1 file changed, 54 deletions(-)

diff --git a/Configure b/Configure
index efbdcfd..d5bd98c 100755
--- a/Configure
+++ b/Configure
@@ -5468,30 +5468,6 @@ default|recommended)
 		eval $checkccflag
 		;;
 	esac
-
-	# on x86_64 (at least) we require an extra library (libssp) in the
-	# link command line. This library is not named, so I infer that it is
-	# an implementation detail that may change. Hence the safest approach
-	# 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 "$osname" in
-	amigaos) ;; # -fstack-protector builds but doesn't work
-	*)	case "$gccversion" in
-		?*)	set stack-protector-strong -fstack-protector-strong
-			eval $checkccflag
-			case "$dflt" in
-			*-fstack-protector-strong*) ;; # It got added.
-			*) # Try the plain/older -fstack-protector.
-			   set stack-protector -fstack-protector
-			   eval $checkccflag
-			   ;;
-			esac
-			;;
-		esac
-		;;
-	esac
-	;;
 esac
 
 case "$mips_type" in
@@ -5634,21 +5610,6 @@ case "$ldflags" in
 	;;
 *) dflt="$ldflags";;
 esac
-# See note above about -fstack-protector
-case "$ccflags" in
-*-fstack-protector-strong*)
-	case "$dflt" in
-	*-fstack-protector-strong*) ;; # Don't add it again
-	*) dflt="$dflt -fstack-protector-strong" ;;
-	esac
-	;;
-*-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
@@ -8571,21 +8532,6 @@ EOM
 	    ''|' ') dflt='none' ;;
 	esac
 
-	case "$ldflags" in
-	    *-fstack-protector-strong*)
-		case "$dflt" in
-		    *-fstack-protector-strong*) ;; # Don't add it again
-		    *) dflt="$dflt -fstack-protector-strong" ;;
-		esac
-		;;
-	    *-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
-- 
2.1.4