* [PATCH] perl-native: Remove usage of -fstack-protector=strong @ 2016-12-01 16:34 Aníbal Limón 2016-12-01 22:39 ` Khem Raj 0 siblings, 1 reply; 9+ messages in thread From: Aníbal Limón @ 2016-12-01 16:34 UTC (permalink / raw) To: openembedded-core 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] [1] http://errors.yoctoproject.org/Errors/Details/109589/ Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> --- meta/recipes-devtools/perl/perl-native_5.24.0.bb | 1 + ...emove-fstack-protector-strong-for-native-.patch | 103 +++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch diff --git a/meta/recipes-devtools/perl/perl-native_5.24.0.bb b/meta/recipes-devtools/perl/perl-native_5.24.0.bb index af2ad7b..b1f0179 100644 --- a/meta/recipes-devtools/perl/perl-native_5.24.0.bb +++ b/meta/recipes-devtools/perl/perl-native_5.24.0.bb @@ -11,6 +11,7 @@ SRC_URI += "\ file://debian/errno_ver.diff \ file://dynaloaderhack.patch \ file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \ + file://0001-Configure-Remove-fstack-protector-strong-for-native-.patch \ " SRC_URI[md5sum] = "59456ae4bd4b06cb6e57cb19a3b2d349" diff --git a/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch new file mode 100644 index 0000000..7391ac5 --- /dev/null +++ b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch @@ -0,0 +1,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 + -- 2.1.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong 2016-12-01 16:34 [PATCH] perl-native: Remove usage of -fstack-protector=strong Aníbal Limón @ 2016-12-01 22:39 ` Khem Raj 2016-12-01 22:46 ` Aníbal Limón 0 siblings, 1 reply; 9+ messages in thread From: Khem Raj @ 2016-12-01 22:39 UTC (permalink / raw) To: Aníbal Limón; +Cc: Patches and discussions about the oe-core layer On Thu, Dec 1, 2016 at 8:34 AM, Aníbal Limón <anibal.limon@linux.intel.com> wrote: > 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. Instead of disabling it. Can it be made detectable during configure. > > [YOCTO #10338] > > [1] http://errors.yoctoproject.org/Errors/Details/109589/ > > Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> > --- > meta/recipes-devtools/perl/perl-native_5.24.0.bb | 1 + > ...emove-fstack-protector-strong-for-native-.patch | 103 +++++++++++++++++++++ > 2 files changed, 104 insertions(+) > create mode 100644 meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch > > diff --git a/meta/recipes-devtools/perl/perl-native_5.24.0.bb b/meta/recipes-devtools/perl/perl-native_5.24.0.bb > index af2ad7b..b1f0179 100644 > --- a/meta/recipes-devtools/perl/perl-native_5.24.0.bb > +++ b/meta/recipes-devtools/perl/perl-native_5.24.0.bb > @@ -11,6 +11,7 @@ SRC_URI += "\ > file://debian/errno_ver.diff \ > file://dynaloaderhack.patch \ > file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \ > + file://0001-Configure-Remove-fstack-protector-strong-for-native-.patch \ > " > > SRC_URI[md5sum] = "59456ae4bd4b06cb6e57cb19a3b2d349" > diff --git a/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch > new file mode 100644 > index 0000000..7391ac5 > --- /dev/null > +++ b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch > @@ -0,0 +1,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 > + > -- > 2.1.4 > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong 2016-12-01 22:39 ` Khem Raj @ 2016-12-01 22:46 ` Aníbal Limón 2016-12-02 0:19 ` Khem Raj 0 siblings, 1 reply; 9+ messages in thread From: Aníbal Limón @ 2016-12-01 22:46 UTC (permalink / raw) To: Khem Raj; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 6758 bytes --] On 12/01/2016 04:39 PM, Khem Raj wrote: > On Thu, Dec 1, 2016 at 8:34 AM, Aníbal Limón > <anibal.limon@linux.intel.com> wrote: >> 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. > > > Instead of disabling it. Can it be made detectable during configure. The issue here is that comes from SSTATE mirror so the configure step isn't executed again when a other machine without -fstack-protector=strong download the sstate artifact was generate in other machine with -fstack-protector=strong support. This is only for native builds for target builds in enabled. We have similar patches for example in rpm, http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch Cheers, alimon > >> >> [YOCTO #10338] >> >> [1] http://errors.yoctoproject.org/Errors/Details/109589/ >> >> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> >> --- >> meta/recipes-devtools/perl/perl-native_5.24.0.bb | 1 + >> ...emove-fstack-protector-strong-for-native-.patch | 103 +++++++++++++++++++++ >> 2 files changed, 104 insertions(+) >> create mode 100644 meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch >> >> diff --git a/meta/recipes-devtools/perl/perl-native_5.24.0.bb b/meta/recipes-devtools/perl/perl-native_5.24.0.bb >> index af2ad7b..b1f0179 100644 >> --- a/meta/recipes-devtools/perl/perl-native_5.24.0.bb >> +++ b/meta/recipes-devtools/perl/perl-native_5.24.0.bb >> @@ -11,6 +11,7 @@ SRC_URI += "\ >> file://debian/errno_ver.diff \ >> file://dynaloaderhack.patch \ >> file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \ >> + file://0001-Configure-Remove-fstack-protector-strong-for-native-.patch \ >> " >> >> SRC_URI[md5sum] = "59456ae4bd4b06cb6e57cb19a3b2d349" >> diff --git a/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch >> new file mode 100644 >> index 0000000..7391ac5 >> --- /dev/null >> +++ b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch >> @@ -0,0 +1,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 >> + >> -- >> 2.1.4 >> >> -- >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.openembedded.org/mailman/listinfo/openembedded-core [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong 2016-12-01 22:46 ` Aníbal Limón @ 2016-12-02 0:19 ` Khem Raj 2016-12-08 17:00 ` Aníbal Limón 0 siblings, 1 reply; 9+ messages in thread From: Khem Raj @ 2016-12-02 0:19 UTC (permalink / raw) To: Aníbal Limón; +Cc: Patches and discussions about the oe-core layer On Thu, Dec 1, 2016 at 2:46 PM, Aníbal Limón <anibal.limon@linux.intel.com> wrote: > > > On 12/01/2016 04:39 PM, Khem Raj wrote: >> On Thu, Dec 1, 2016 at 8:34 AM, Aníbal Limón >> <anibal.limon@linux.intel.com> wrote: >>> 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. >> >> >> Instead of disabling it. Can it be made detectable during configure. > > The issue here is that comes from SSTATE mirror so the configure step > isn't executed again when a other machine without > -fstack-protector=strong download the sstate artifact was generate in > other machine with -fstack-protector=strong support. This is only for > native builds for target builds in enabled. > > We have similar patches for example in rpm, > > http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch > yeah I see, thanks, I guess we need to bring it down to lowest common denominator I guess. maybe we should start thinking about gcc-native > Cheers, > alimon > > >> >>> >>> [YOCTO #10338] >>> >>> [1] http://errors.yoctoproject.org/Errors/Details/109589/ >>> >>> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> >>> --- >>> meta/recipes-devtools/perl/perl-native_5.24.0.bb | 1 + >>> ...emove-fstack-protector-strong-for-native-.patch | 103 +++++++++++++++++++++ >>> 2 files changed, 104 insertions(+) >>> create mode 100644 meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch >>> >>> diff --git a/meta/recipes-devtools/perl/perl-native_5.24.0.bb b/meta/recipes-devtools/perl/perl-native_5.24.0.bb >>> index af2ad7b..b1f0179 100644 >>> --- a/meta/recipes-devtools/perl/perl-native_5.24.0.bb >>> +++ b/meta/recipes-devtools/perl/perl-native_5.24.0.bb >>> @@ -11,6 +11,7 @@ SRC_URI += "\ >>> file://debian/errno_ver.diff \ >>> file://dynaloaderhack.patch \ >>> file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \ >>> + file://0001-Configure-Remove-fstack-protector-strong-for-native-.patch \ >>> " >>> >>> SRC_URI[md5sum] = "59456ae4bd4b06cb6e57cb19a3b2d349" >>> diff --git a/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch >>> new file mode 100644 >>> index 0000000..7391ac5 >>> --- /dev/null >>> +++ b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch >>> @@ -0,0 +1,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 >>> + >>> -- >>> 2.1.4 >>> >>> -- >>> _______________________________________________ >>> Openembedded-core mailing list >>> Openembedded-core@lists.openembedded.org >>> http://lists.openembedded.org/mailman/listinfo/openembedded-core > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong 2016-12-02 0:19 ` Khem Raj @ 2016-12-08 17:00 ` Aníbal Limón 2016-12-08 19:16 ` Andre McCurdy 0 siblings, 1 reply; 9+ messages in thread From: Aníbal Limón @ 2016-12-08 17:00 UTC (permalink / raw) To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 7439 bytes --] ping, :D alimon On 12/01/2016 06:19 PM, Khem Raj wrote: > On Thu, Dec 1, 2016 at 2:46 PM, Aníbal Limón > <anibal.limon@linux.intel.com> wrote: >> >> >> On 12/01/2016 04:39 PM, Khem Raj wrote: >>> On Thu, Dec 1, 2016 at 8:34 AM, Aníbal Limón >>> <anibal.limon@linux.intel.com> wrote: >>>> 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. >>> >>> >>> Instead of disabling it. Can it be made detectable during configure. >> >> The issue here is that comes from SSTATE mirror so the configure step >> isn't executed again when a other machine without >> -fstack-protector=strong download the sstate artifact was generate in >> other machine with -fstack-protector=strong support. This is only for >> native builds for target builds in enabled. >> >> We have similar patches for example in rpm, >> >> http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch >> > > yeah I see, thanks, I guess we need to bring it down to lowest common > denominator I guess. > maybe we should start thinking about gcc-native > > >> Cheers, >> alimon >> >> >>> >>>> >>>> [YOCTO #10338] >>>> >>>> [1] http://errors.yoctoproject.org/Errors/Details/109589/ >>>> >>>> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> >>>> --- >>>> meta/recipes-devtools/perl/perl-native_5.24.0.bb | 1 + >>>> ...emove-fstack-protector-strong-for-native-.patch | 103 +++++++++++++++++++++ >>>> 2 files changed, 104 insertions(+) >>>> create mode 100644 meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch >>>> >>>> diff --git a/meta/recipes-devtools/perl/perl-native_5.24.0.bb b/meta/recipes-devtools/perl/perl-native_5.24.0.bb >>>> index af2ad7b..b1f0179 100644 >>>> --- a/meta/recipes-devtools/perl/perl-native_5.24.0.bb >>>> +++ b/meta/recipes-devtools/perl/perl-native_5.24.0.bb >>>> @@ -11,6 +11,7 @@ SRC_URI += "\ >>>> file://debian/errno_ver.diff \ >>>> file://dynaloaderhack.patch \ >>>> file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \ >>>> + file://0001-Configure-Remove-fstack-protector-strong-for-native-.patch \ >>>> " >>>> >>>> SRC_URI[md5sum] = "59456ae4bd4b06cb6e57cb19a3b2d349" >>>> diff --git a/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch >>>> new file mode 100644 >>>> index 0000000..7391ac5 >>>> --- /dev/null >>>> +++ b/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch >>>> @@ -0,0 +1,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 >>>> + >>>> -- >>>> 2.1.4 >>>> >>>> -- >>>> _______________________________________________ >>>> Openembedded-core mailing list >>>> Openembedded-core@lists.openembedded.org >>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core >> [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong 2016-12-08 17:00 ` Aníbal Limón @ 2016-12-08 19:16 ` Andre McCurdy 2016-12-08 20:35 ` Burton, Ross 0 siblings, 1 reply; 9+ messages in thread From: Andre McCurdy @ 2016-12-08 19:16 UTC (permalink / raw) To: Aníbal Limón; +Cc: Patches and discussions about the oe-core layer >>> On 12/01/2016 04:39 PM, Khem Raj wrote: >>>> On Thu, Dec 1, 2016 at 8:34 AM, Aníbal Limón >>>> <anibal.limon@linux.intel.com> wrote: >>>>> 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. >>>> >>>> Instead of disabling it. Can it be made detectable during configure. >>> >>> The issue here is that comes from SSTATE mirror so the configure step >>> isn't executed again when a other machine without >>> -fstack-protector=strong download the sstate artifact was generate in >>> other machine with -fstack-protector=strong support. This is only for >>> native builds for target builds in enabled. >>> >>> We have similar patches for example in rpm, >>> >>> http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch >> >> yeah I see, thanks, I guess we need to bring it down to lowest common >> denominator I guess. >> maybe we should start thinking about gcc-native >> Is it correct that native sstate from a host with gcc < 4.9 should be reused by a host with gcc >= 4.9 ? Doesn't the change in NATIVELSBSTRING prevent that from happening? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong 2016-12-08 19:16 ` Andre McCurdy @ 2016-12-08 20:35 ` Burton, Ross 2016-12-09 16:23 ` Aníbal Limón 0 siblings, 1 reply; 9+ messages in thread From: Burton, Ross @ 2016-12-08 20:35 UTC (permalink / raw) To: Andre McCurdy; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 408 bytes --] On 8 December 2016 at 19:16, Andre McCurdy <armccurdy@gmail.com> wrote: > Is it correct that native sstate from a host with gcc < 4.9 should be > reused by a host with gcc >= 4.9 ? > > Doesn't the change in NATIVELSBSTRING prevent that from happening? > Yes, we recently landed a change so that uninative is versioned by host GCC. Presumably that solves this problem in a different way? Ross [-- Attachment #2: Type: text/html, Size: 811 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong 2016-12-08 20:35 ` Burton, Ross @ 2016-12-09 16:23 ` Aníbal Limón 2016-12-09 20:10 ` Burton, Ross 0 siblings, 1 reply; 9+ messages in thread From: Aníbal Limón @ 2016-12-09 16:23 UTC (permalink / raw) To: Burton, Ross, Andre McCurdy Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 654 bytes --] On 12/08/2016 02:35 PM, Burton, Ross wrote: > On 8 December 2016 at 19:16, Andre McCurdy <armccurdy@gmail.com> wrote: > >> Is it correct that native sstate from a host with gcc < 4.9 should be >> reused by a host with gcc >= 4.9 ? >> >> Doesn't the change in NATIVELSBSTRING prevent that from happening? >> > > Yes, we recently landed a change so that uninative is versioned by host > GCC. Presumably that solves this problem in a different way? If the sstate generated is different from a host distro with gcc>=4.9 and gcc<4.9 will be work. Could you point me to the patch that makes this change? alimon > > Ross > [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] perl-native: Remove usage of -fstack-protector=strong 2016-12-09 16:23 ` Aníbal Limón @ 2016-12-09 20:10 ` Burton, Ross 0 siblings, 0 replies; 9+ messages in thread From: Burton, Ross @ 2016-12-09 20:10 UTC (permalink / raw) To: Aníbal Limón; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 917 bytes --] The patch is "uninative: rebuild uninative for gcc 4.8 and 4.9" but I forgot it didn't get merged as it broke eSDK. Ross On 9 December 2016 at 16:23, Aníbal Limón <anibal.limon@linux.intel.com> wrote: > > > On 12/08/2016 02:35 PM, Burton, Ross wrote: > > On 8 December 2016 at 19:16, Andre McCurdy <armccurdy@gmail.com> wrote: > > > >> Is it correct that native sstate from a host with gcc < 4.9 should be > >> reused by a host with gcc >= 4.9 ? > >> > >> Doesn't the change in NATIVELSBSTRING prevent that from happening? > >> > > > > Yes, we recently landed a change so that uninative is versioned by host > > GCC. Presumably that solves this problem in a different way? > > If the sstate generated is different from a host distro with gcc>=4.9 > and gcc<4.9 will be work. > > Could you point me to the patch that makes this change? > > alimon > > > > > Ross > > > > [-- Attachment #2: Type: text/html, Size: 1448 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-12-09 20:11 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-12-01 16:34 [PATCH] perl-native: Remove usage of -fstack-protector=strong Aníbal Limón 2016-12-01 22:39 ` Khem Raj 2016-12-01 22:46 ` Aníbal Limón 2016-12-02 0:19 ` Khem Raj 2016-12-08 17:00 ` Aníbal Limón 2016-12-08 19:16 ` Andre McCurdy 2016-12-08 20:35 ` Burton, Ross 2016-12-09 16:23 ` Aníbal Limón 2016-12-09 20:10 ` Burton, Ross
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox