Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | Some distributions (like opensuse421) supported by the project |
| 2 | comes with older gcc releases, -fstack-protector=strong is supported |
| 3 | by GCC>=4.9. |
| 4 | |
| 5 | This causes a build failure when install perl-native from a sstate that |
| 6 | comes from a machine supporting -fstack-protector=strong [1]. |
| 7 | |
| 8 | So disable usage of this flag in perl-native builds, this patch could |
| 9 | be removed when all supported distros comes with GCC>=4.9. |
| 10 | |
| 11 | [YOCTO #10338] |
| 12 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 13 | Upstream-Status: Inappropriate [configuration] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 14 | |
| 15 | [1] http://errors.yoctoproject.org/Errors/Details/109589/ |
| 16 | |
| 17 | Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> |
| 18 | --- |
| 19 | Configure | 54 ------------------------------------------------------ |
| 20 | 1 file changed, 54 deletions(-) |
| 21 | |
| 22 | diff --git a/Configure b/Configure |
| 23 | index efbdcfd..d5bd98c 100755 |
| 24 | --- a/Configure |
| 25 | +++ b/Configure |
| 26 | @@ -5468,30 +5468,6 @@ default|recommended) |
| 27 | eval $checkccflag |
| 28 | ;; |
| 29 | esac |
| 30 | - |
| 31 | - # on x86_64 (at least) we require an extra library (libssp) in the |
| 32 | - # link command line. This library is not named, so I infer that it is |
| 33 | - # an implementation detail that may change. Hence the safest approach |
| 34 | - # is to add the flag to the flags passed to the compiler at link time, |
| 35 | - # as that way the compiler can do the right implementation dependant |
| 36 | - # thing. (NWC) |
| 37 | - case "$osname" in |
| 38 | - amigaos) ;; # -fstack-protector builds but doesn't work |
| 39 | - *) case "$gccversion" in |
| 40 | - ?*) set stack-protector-strong -fstack-protector-strong |
| 41 | - eval $checkccflag |
| 42 | - case "$dflt" in |
| 43 | - *-fstack-protector-strong*) ;; # It got added. |
| 44 | - *) # Try the plain/older -fstack-protector. |
| 45 | - set stack-protector -fstack-protector |
| 46 | - eval $checkccflag |
| 47 | - ;; |
| 48 | - esac |
| 49 | - ;; |
| 50 | - esac |
| 51 | - ;; |
| 52 | - esac |
| 53 | - ;; |
| 54 | esac |
| 55 | |
| 56 | case "$mips_type" in |
| 57 | @@ -5634,21 +5610,6 @@ case "$ldflags" in |
| 58 | ;; |
| 59 | *) dflt="$ldflags";; |
| 60 | esac |
| 61 | -# See note above about -fstack-protector |
| 62 | -case "$ccflags" in |
| 63 | -*-fstack-protector-strong*) |
| 64 | - case "$dflt" in |
| 65 | - *-fstack-protector-strong*) ;; # Don't add it again |
| 66 | - *) dflt="$dflt -fstack-protector-strong" ;; |
| 67 | - esac |
| 68 | - ;; |
| 69 | -*-fstack-protector*) |
| 70 | - case "$dflt" in |
| 71 | - *-fstack-protector*) ;; # Don't add it again |
| 72 | - *) dflt="$dflt -fstack-protector" ;; |
| 73 | - esac |
| 74 | - ;; |
| 75 | -esac |
| 76 | |
| 77 | : Try to guess additional flags to pick up local libraries. |
| 78 | for thislibdir in $libpth; do |
| 79 | @@ -8571,21 +8532,6 @@ EOM |
| 80 | ''|' ') dflt='none' ;; |
| 81 | esac |
| 82 | |
| 83 | - case "$ldflags" in |
| 84 | - *-fstack-protector-strong*) |
| 85 | - case "$dflt" in |
| 86 | - *-fstack-protector-strong*) ;; # Don't add it again |
| 87 | - *) dflt="$dflt -fstack-protector-strong" ;; |
| 88 | - esac |
| 89 | - ;; |
| 90 | - *-fstack-protector*) |
| 91 | - case "$dflt" in |
| 92 | - *-fstack-protector*) ;; # Don't add it again |
| 93 | - *) dflt="$dflt -fstack-protector" ;; |
| 94 | - esac |
| 95 | - ;; |
| 96 | - esac |
| 97 | - |
| 98 | rp="Any special flags to pass to $ld to create a dynamically loaded library?" |
| 99 | . ./myread |
| 100 | case "$ans" in |
| 101 | -- |
| 102 | 2.1.4 |
| 103 | |