localhost:hello chenzhen$ port search gcc
apple-gcc40 @5494 (lang)
Apple's version of gcc 4.0
apple-gcc42 @5666.3_14 (lang)
Apple's version of gcc 4.2
arm-aout-gcc @3.3.6 (cross, devel)
gcc cross-compilers for arm-aout, with newlib runtime library.
arm-elf-gcc @4.7.3 (cross, devel)
gcc cross-compilers for arm-elf, with newlib runtime library.
arm-elf-gcc3 @3.4.6_2 (cross, devel)
gcc 3.x cross-compilers for arm-elf, with newlib runtime library.
arm-none-eabi-gcc @4.7.3_1 (cross, devel)
The GNU compiler collection for arm-none-eabi
arm-none-linux-gnueabi-gcc @2005q3-2 (cross, devel)
gcc 3.x cross-compilers for arm-none-linux-gnueabi.
arm-rtems-gcc @4.2.3 (cross, devel)
gcc cross-compilers for arm-rtems, with newlib runtime library.
avr-gcc @4.9.1 (cross, devel)
The GNU compiler collection for avr
选中安装
1
localhost:hello chenzhen$ sudo port install gcc44
列出已有
1234567
localhost:hello chenzhen$ port select --list gcc
Available versions for gcc:
apple-gcc42
llvm-gcc42
mp-gcc44 (active)
mp-gcc48
none
选中需要的版本
1
localhost:hello chenzhen$ sudo port select --set gcc mp-gcc44