#149 default 10.6 fink to use clang when SL Xcode 4.2 is installe

closed-rejected
Max Horn
None
5
2011-10-28
2011-10-21
Jack Howarth
No

Currently fink is unprepared to deal with Xcode 4.2 under Snow Leopard because that release changes the default system compiler to llvm-gcc which we have avoided in Lion. For instance, currently gmp/gmp5 are miscompiled and none of the gcc4x packages can bootstrap the FSF gcc compilers. The best fix for this problem is to leverage the current package corrections made for clang compatibility in Lion. The attached fink_SL_xcode42.patch refactors the code in perlmod/Fink/PkgVersion.pm to...

1) use the path-prefix-clang on 10.6 when the system compiler at /usr/bin/gcc is detected to be a symlink to llvm-gcc-4.2.
2) add the arch support to path-prefix-clang to allow for both i386 and x86_64 fink 10.6 bootstraps against Xcode 4.2
(both have been tested without problems with the patch applied to fink 0.31.3).

The main type of info file change that will be required for using clang from Xcode 4.2 under SL will be to change the conditionals
for clang specific tweaks in info files from testing the darwin version to testing the fink system compiler instead. Thus...

if test "$darwin_vers" -ge 11 ; then

...needs to become...

if [ `gcc -v 2>&1 | grep -c clang` = "1" ]; then

Discussion

  • Jack Howarth
    Jack Howarth
    2011-10-21

    patch to enable path-prefix-clang when SL Xcode 4.2 is installed

     
    Attachments
  • Max Horn
    Max Horn
    2011-10-28

    We included your alternate patch, so closing this.

     
  • Max Horn
    Max Horn
    2011-10-28

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