On Apr 19, 2012, at 02:59, Joshua Root wrote: > On 2012-4-19 09:04 , jeremyhu at macports.org wrote: >> Revision: 92109 >> https://trac.macports.org/changeset/92109 >> Author: jeremyhu at macports.org >> Date: 2012-04-18 16:04:31 -0700 (Wed, 18 Apr 2012) >> Log Message: >> ----------- >> Adjust compiler defaults on old OS versions >> >> Removes apple-gcc-4.0 from the list as it barely works. >> >> Moves the XCode 3.0/3.1 (Leopard) default to gcc-4.2 to make it more >> similar to better supported OS versions. >> >> Adds apple-gcc-4.2 as a first-choice fallback on Tiger. >> >> Adds macports-clang-3.0 to the fallbacks on Tiger and Leopard >> (although they are only well tested on Intel, so they are listed >> after apple-gcc-4.2) >> >> Modified Paths: >> -------------- >> trunk/base/src/port1.0/portconfigure.tcl >> >> Modified: trunk/base/src/port1.0/portconfigure.tcl >> =================================================================== >> --- trunk/base/src/port1.0/portconfigure.tcl 2012-04-18 22:54:55 UTC (rev >> 92108) >> +++ trunk/base/src/port1.0/portconfigure.tcl 2012-04-18 23:04:31 UTC (rev >> 92109) >> @@ -428,12 +428,12 @@ >> return {clang llvm-gcc-4.2 apple-gcc-4.2} >> } elseif {[vercmp $xcodeversion 4.0] >= 0} { >> return {llvm-gcc-4.2 clang gcc-4.2} >> - } elseif {[vercmp $xcodeversion 3.2] >= 0 && $macosx_deployment_target >> != "10.4"} { >> - return {gcc-4.2 clang llvm-gcc-4.2 gcc-4.0 apple-gcc-4.0} >> - } elseif {$macosx_deployment_target != "10.4"} { >> - return {gcc-4.0 gcc-4.2 llvm-gcc-4.2 gcc-3.3 apple-gcc-4.0} >> + } elseif {[vercmp $xcodeversion 3.2] >= 0} { >> + return {gcc-4.2 clang llvm-gcc-4.2 gcc-4.0} >> + } elseif {[vercmp $xcodeversion 3.0] >= 0} { >> + return {gcc-4.2 apple-gcc-4.2 macports-clang-3.0 gcc-4.0} >> } else { >> - return {gcc-4.0 gcc-3.3 apple-gcc-4.0} >> + return {gcc-4.0 apple-gcc-4.2 macports-clang-3.0 gcc-3.3} >> } >> } > > Is this going to work right for users targeting 10.4 from a later OS? > Some Xcode versions at least give you error messages about gcc-4.2 not > being compatible with the 10.4u SDK.
Setting the development target and setting the SDK are two separate issues. I'm able to target 10.4 just fine with gcc-4.2 on Leopard's Xcode 3.1.4 using either the system SDK or the 10.4u SDK: ~ $ xcodebuild -version Xcode 3.1.4 Component versions: DevToolsCore-1204.0; DevToolsSupport-1186.0 BuildVersion: 9M2809 ~ $ /usr/bin/gcc-4.2 --version i686-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ~ $ /usr/bin/gcc-4.2 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -mmacosx-version-min=10.4 nop.c ~ $ /usr/bin/gcc-4.2 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -mmacosx-version-min=10.4 nop.c -isysroot /Developer/SDKs/MacOSX10.4u.sdk _______________________________________________ macports-dev mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
