IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Mac下更新gcc版本

    五四陈科学院发表于 2015-03-04 14:51:29
    love 0

    以下内容由[五四陈科学院]提供

    • 用ports升级,比较容易。
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    
    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
    • 列出已有
    1
    2
    3
    4
    5
    6
    7
    
    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
    • 最后一步,重新开一个窗口,不要用现在这个。

    想快点找到作者也可以到Twitter上留言: @54chen
    或者你懒得带梯子上墙,请到新浪微博:@54chen


沪ICP备19023445号-2号
友情链接