Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#150 alternative fix for Xcode 4.2 on SL

closed-accepted
Max Horn
None
5
2011-10-24
2011-10-22
Jack Howarth
No

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
10.*)
case $compiler in
cc|gcc)
compiler="gcc-4.2"
;;
c++|g++)
compiler="g++-4.2"
;;
esac
;;
esac

...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.

Discussion

  • Jack Howarth
    Jack Howarth
    2011-10-22

    compiler_wrapper hack to avoid llvm-gcc under Xcode 4.2 on SL

     
  • Works for me on 10.6 with Xcode 3.2.6, too.

     
  • Max Horn
    Max Horn
    2011-10-24

    It's very annoying that our PkgVersion.pm replicates compiler_wrapper (resp. compiler_wrapper.in). This is something that should be fixed, and I added this to my personal TODO list on <https://github.com/fingolfin/fink/wiki/TODO> (everybody is welcome to work on that, though ;).

    In the meantime, the patch was merged and can be found on https://github.com/fink/fink/

    Thanks!

     
  • Max Horn
    Max Horn
    2011-10-24

    • assigned_to: nobody --> fingolfin
    • status: open --> closed-accepted