Setting GCC 4.2 as the default compiler on Mac OS X Leopard

前端 未结 6 1705
小蘑菇
小蘑菇 2020-11-29 18:53

I\'m sure there must be a way to do this. As you are probably aware the latest versions of Xcode (and in fact I think all versions of Xcode) on Leopard come with GCC 4.0.1 a

6条回答
  •  盖世英雄少女心
    2020-11-29 19:59

    Im my experience (limited), changing CC in .profile does not change Lion's (10.7.2) defaulting to i686-apple-darwin11-llvm-gcc-4.2. I wonder if this has anything to do with Apple's own sym linking: a partial: ls -la /usr/bin | grep .*gcc.* :

    lrwxr-xr-x     1 root   wheel        12 25 oct 19:31 cc -> llvm-gcc-4.2
    lrwxr-xr-x     1 root   wheel        12 25 oct 19:31 gcc -> llvm-gcc-4.2
    lrwxr-xr-x     1 root   admin        32 25 oct 19:31 llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
    

    I am wary about breaking these and adding my own to usr/bin/gcc-4.2 per Martin v. Löwis's answer.

提交回复
热议问题