commit: 98ec2081186ec227a303ea48b7532646b5938271 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Tue May 28 12:21:01 2019 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Tue May 28 12:21:01 2019 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=98ec2081
scripts/bootstrap-prefix: fix bootstrap_python on Solaris 10 GCC 3.4.3 used by Solaris 10 doesn't quite grok the HUGE_VAL and isnan() bits (more exactly they lead to strange errors) so replace them with fallbacks. The final Python will obviously be compiled with a more recent compiler that handles said constructs just fine. confirmed not to break with i386-pc-solaris2.11/20190527, bootstrap in progress (beyond bootstrap_python running Portage now) for sparc-sun-solaris2.10. Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> scripts/bootstrap-prefix.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 224fbb5ba3..23b3ec412c 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -945,6 +945,18 @@ bootstrap_python() { patch -p0 < "${DISTDIR}"/python-3.6-02_all_disable_modules_and_ssl.patch fi + # Solaris' host compiler (if old -- 3.4.3) doesn't grok HUGE_VAL, + # and barfs on isnan() so patch it out + case ${CHOST} in + (*-solaris*) + sed -i \ + -e '/^#define Py_HUGE_VAL/s/HUGE_VAL$/(__builtin_huge_val())/' \ + -e '/defined HAVE_DECL_ISNAN/s/ISNAN/USE_FALLBACK/' \ + Include/pymath.h + ;; + esac + + case ${CHOST} in (*-*-cygwin*) # apply patches from cygwinports much like the ebuild does