diff options
| author | 2017-07-18 10:04:00 +0200 | |
|---|---|---|
| committer | 2017-07-18 10:04:00 +0200 | |
| commit | 0400d5c9f6345a3e92b54f9591ca5210bcfe2646 (patch) | |
| tree | b5faf7aafc9c2281c629472e88380213b889efbb | |
| parent | app-arch/unzip: cygwin needs generic target (diff) | |
| download | prefix-0400d5c9f6345a3e92b54f9591ca5210bcfe2646.tar.gz prefix-0400d5c9f6345a3e92b54f9591ca5210bcfe2646.tar.bz2 prefix-0400d5c9f6345a3e92b54f9591ca5210bcfe2646.zip | |
bootstrap-prefix.sh: check if we really need <gcc-4.8 (#619542)
| -rwxr-xr-x | scripts/bootstrap-prefix.sh | 14 |
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 |
