Skip to content
Permalink
Browse files

Fix compiler selection on Leopard and Tiger

Rework of 7cf76ec.

Don't use macports-clang when targeting ppc, as it does not work for
that arch. Add macports-gcc for ppc instead. Drop gcc-3.3 on i386,
since it only works for ppc.
  • Loading branch information
jmroot committed Apr 10, 2018
1 parent d9be411 commit 15a4eeb3618d289b3d92093186b5f20a60e43ff0
Showing with 19 additions and 2 deletions.
  1. +19 −2 src/port1.0/portconfigure.tcl
@@ -522,15 +522,32 @@ proc portconfigure::get_compiler_fallback {} {

# Legacy cases
if {[vercmp $xcodeversion 4.0] < 0} {
set canonical_archs [get_canonical_archs]
if {[vercmp $xcodeversion 3.2] >= 0} {
if {[string match *10.4u* ${configure.sdkroot}]} {
return {gcc-4.0}
}
# No return here. 3.2.x with newer SDKs than 10.4u is handled below.
} elseif {[vercmp $xcodeversion 3.0] >= 0} {
return {gcc-4.2 apple-gcc-4.2 gcc-4.0 macports-clang-3.4 macports-clang-3.3}
if {"ppc" in $canonical_archs || "ppc64" in $canonical_archs} {
return {gcc-4.2 apple-gcc-4.2 gcc-4.0 macports-gcc-6 macports-gcc-7}
} else {
return {gcc-4.2 apple-gcc-4.2 gcc-4.0 macports-clang-3.4 macports-clang-3.3}
}
} else {
return {apple-gcc-4.2 gcc-4.0 gcc-3.3 macports-clang-3.3}
# Xcode 2.x (Tiger)
if {"ppc" in $canonical_archs || "ppc64" in $canonical_archs} {
if {"i386" in $canonical_archs} {
# universal
return {apple-gcc-4.2 gcc-4.0 macports-gcc-6 macports-gcc-7}
} else {
# ppc only
return {apple-gcc-4.2 gcc-4.0 gcc-3.3 macports-gcc-6 macports-gcc-7}
}
} else {
# i386 only
return {apple-gcc-4.2 gcc-4.0 macports-clang-3.3}
}
}
}

0 comments on commit 15a4eeb

Please sign in to comment.
You can’t perform that action at this time.