Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/
Date: Tue, 28 May 2019 12:24:06
Message-Id: 1559046061.98ec2081186ec227a303ea48b7532646b5938271.grobian@gentoo
1 commit: 98ec2081186ec227a303ea48b7532646b5938271
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 28 12:21:01 2019 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Tue May 28 12:21:01 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=98ec2081
7
8 scripts/bootstrap-prefix: fix bootstrap_python on Solaris 10
9
10 GCC 3.4.3 used by Solaris 10 doesn't quite grok the HUGE_VAL and isnan()
11 bits (more exactly they lead to strange errors) so replace them with
12 fallbacks. The final Python will obviously be compiled with a more
13 recent compiler that handles said constructs just fine.
14
15 confirmed not to break with i386-pc-solaris2.11/20190527, bootstrap in
16 progress (beyond bootstrap_python running Portage now) for
17 sparc-sun-solaris2.10.
18
19 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
20
21 scripts/bootstrap-prefix.sh | 12 ++++++++++++
22 1 file changed, 12 insertions(+)
23
24 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
25 index 224fbb5ba3..23b3ec412c 100755
26 --- a/scripts/bootstrap-prefix.sh
27 +++ b/scripts/bootstrap-prefix.sh
28 @@ -945,6 +945,18 @@ bootstrap_python() {
29 patch -p0 < "${DISTDIR}"/python-3.6-02_all_disable_modules_and_ssl.patch
30 fi
31
32 + # Solaris' host compiler (if old -- 3.4.3) doesn't grok HUGE_VAL,
33 + # and barfs on isnan() so patch it out
34 + case ${CHOST} in
35 + (*-solaris*)
36 + sed -i \
37 + -e '/^#define Py_HUGE_VAL/s/HUGE_VAL$/(__builtin_huge_val())/' \
38 + -e '/defined HAVE_DECL_ISNAN/s/ISNAN/USE_FALLBACK/' \
39 + Include/pymath.h
40 + ;;
41 + esac
42 +
43 +
44 case ${CHOST} in
45 (*-*-cygwin*)
46 # apply patches from cygwinports much like the ebuild does