summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2017-07-18 10:04:00 +0200
committerMichael Haubenwallner <haubi@gentoo.org>2017-07-18 10:04:00 +0200
commit0400d5c9f6345a3e92b54f9591ca5210bcfe2646 (patch)
treeb5faf7aafc9c2281c629472e88380213b889efbb
parentapp-arch/unzip: cygwin needs generic target (diff)
downloadprefix-0400d5c9f6345a3e92b54f9591ca5210bcfe2646.tar.gz
prefix-0400d5c9f6345a3e92b54f9591ca5210bcfe2646.tar.bz2
prefix-0400d5c9f6345a3e92b54f9591ca5210bcfe2646.zip
bootstrap-prefix.sh: check if we really need <gcc-4.8 (#619542)
-rwxr-xr-xscripts/bootstrap-prefix.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 0ec03378cf..84efc84c57 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -162,10 +162,22 @@ configure_toolchain() {
# Cygwin patches come as .zip from github
compiler_stage1+=" app-arch/unzip sys-devel/gcc"
;;
+ *-darwin*)
+ # handled below
+ ;;
*)
# The host may not have a functioning c++ toolchain, so use a
# stage1 compiler that can build with C only.
- compiler_stage1+=" <sys-devel/gcc-4.8"
+ # But gcc-4.7 fails to build with gcc-5.4, so we check for
+ # >gcc-4.7, as anything newer provides c++ anyway (#619542).
+ eval $( (gcc -E - | grep compiler_stage1) <<-EOP
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7))
+ compiler_stage1+=" sys-devel/gcc"
+ #else
+ compiler_stage1+=" <sys-devel/gcc-4.8"
+ #endif
+ EOP
+ )
esac
# unfortunately, gmp needs c++, thus libcxx, so have to drag