The attached patch implements the alternative fix for the system compiler change to llvm-gcc in Xcode 4.2 on SL. The patch adds...
# use Apple gcc-4.2 compilers on SL
case `uname -r` in
case $compiler in
...to the path-prefix-10.6 compiler_wrapper. The change has to exist in both compiler_wrapper.in and PkgVersion.pm since the initial compiler_wrapper created by PkgVersion.pm is overwritten by setup.sh using compiler_wrapper.in later in the fink bootstrap.
Benchmarks show the added conditional adds less than a 1ms to the script execution. Using other forms with sw_vers calls are twice as expensive or more than just using 'uname -f' and case statements.
Tested as applied to fink 0.31.3 on 10.6.8 with a bootstrap against Xcode 4.2. The resulting fink installation can build gmp5 without testsuite failings indicating that llvm-gcc-4.2 is properly replaced by gcc-4.2.