Skip to content

Commit

Permalink
scripts/bootstrap-prefix: some refinements for Darwin 9
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Groffen <[email protected]>
  • Loading branch information
grobian committed Jan 30, 2024
1 parent e0241cd commit 2f78608
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions scripts/bootstrap-prefix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,13 @@ configure_toolchain() {
*darwin*:1)
einfo "Triggering Darwin with GCC toolchain"
compiler_stage1+=" sys-apps/darwin-miscutils"
local ccvers="$(unset CHOST; /usr/bin/gcc --version 2>/dev/null)"
# check if we have gcc-4.2 available, else use plain gcc
# Darwin 9 comes with 4.2 but it isn't enabled by default
if [[ -e $(type -P gcc-4.2) ]] ; then
CC=gcc-4.2
CXX=g++-4.2
fi
local ccvers="$(unset CHOST; ${CC} --version 2>/dev/null)"
local isgcc=
case "${ccvers}" in
*"(GCC) 4.2.1 "*)
Expand Down Expand Up @@ -214,7 +220,7 @@ configure_toolchain() {
# https://bugs.gentoo.org/show_bug.cgi?id=538366
compiler_stage1="sys-apps/darwin-miscutils"
compiler_type="clang"
local ccvers="$(unset CHOST; /usr/bin/gcc --version 2>/dev/null)"
local ccvers="$(unset CHOST; ${CC} --version 2>/dev/null)"
local llvm_deps="dev-build/ninja"
case "${ccvers}" in
*"Apple clang version "*|*"Apple LLVM version "*)
Expand Down Expand Up @@ -1239,8 +1245,10 @@ bootstrap_zlib() {
}

bootstrap_libffi() {
# 3.0.8: last version to bootstrap on Darwin 9 x86
bootstrap_gnu libffi 3.3 || \
bootstrap_gnu libffi 3.2.1
bootstrap_gnu libffi 3.2.1 || \
bootstrap_gnu libffi 3.0.8
}

bootstrap_sed() {
Expand Down

0 comments on commit 2f78608

Please sign in to comment.