commit: 824b52a49f2d96a7b29341b720a6fc7062f0e885
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 24 19:06:58 2017 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Aug 24 19:06:58 2017 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=824b52a4
dev-lang/python: refine fix for Solaris, it is compiler specific iso OS release
Package-Manager: Portage-2.3.8-prefix, Repoman-2.3.3
dev-lang/python/python-2.7.12.ebuild | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dev-lang/python/python-2.7.12.ebuild
b/dev-lang/python/python-2.7.12.ebuild
index 783337ca67..3ee38dd690 100644
--- a/dev-lang/python/python-2.7.12.ebuild
+++ b/dev-lang/python/python-2.7.12.ebuild
@@ -127,10 +127,14 @@ src_prepare() {
sed -i -e 's/__APPLE__/__NO_MUCKING_AROUND__/g' Modules/readline.c ||
die
# On AIX, we've wrapped /usr/ccs/bin/nm to work around long TMPDIR.
sed -i -e "/^NM=.*nm$/s,^.*$,NM=$(tc-getNM)," Modules/makexp_aix || die
- # fix header standards conflicts on Solaris 11+
- if [[ ${CHOST} == *-solaris2.* && ${CHOST##*.} -ge 11 ]] ; then
- sed -i -e "/_XOPEN_SOURCE/s/500/600/" \
- Modules/_multiprocessing/multiprocessing.h || die
+ # fix header standards conflicts on Solaris
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # GCC5 switched the default from gnu89 to gnu11, a standards
+ # conflict arises from that, which can be solved by upgrading
+ # _XOPEN_SOURCE from 500 to 600, but since it is compiler
+ # version specific, just force the old standard onto the
+ # compiler. Python 3 properly detects this.
+ CC="$(tc-getCC) -std=gnu89"
fi
# Fix for cross-compiling.