diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-09-10 10:45:39 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2017-09-10 11:12:18 +0100 |
commit | 604495b43aa4a5b7aed2044b84ca0d88e600d1df (patch) | |
tree | a063e151d13077baa0e0cffd81b6417b4668d744 /eclass | |
parent | sys-libs/glibc: Fix part of the test build system, bug 623548 (diff) | |
download | gentoo-604495b43aa4a5b7aed2044b84ca0d88e600d1df.tar.gz gentoo-604495b43aa4a5b7aed2044b84ca0d88e600d1df.tar.bz2 gentoo-604495b43aa4a5b7aed2044b84ca0d88e600d1df.zip |
glibc: disable stack protector on ARCH=ppc
Currently gcc on powerpc32 generates invalid code for
__builtin_return_address(0) calls. Normally programs
don't do that but malloc() hooks in glibc do:
Bug: https://gcc.gnu.org/PR81996
Bug: https://bugs.gentoo.org/629054
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-glibc.eclass | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass index 33f27ccf46eb..98e394659cf8 100644 --- a/eclass/toolchain-glibc.eclass +++ b/eclass/toolchain-glibc.eclass @@ -795,7 +795,19 @@ glibc_do_configure() { fi if version_is_at_least 2.25 ; then - myconf+=( --enable-stack-protector=all ) + case ${CTARGET} in + powerpc-*) + # Currently gcc on powerpc32 generates invalid code for + # __builtin_return_address(0) calls. Normally programs + # don't do that but malloc hooks in glibc do: + # https://gcc.gnu.org/PR81996 + # https://bugs.gentoo.org/629054 + myconf+=( --enable-stack-protector=no ) + ;; + *) + myconf+=( --enable-stack-protector=all ) + ;; + esac fi if version_is_at_least 2.25 ; then |