ubuntu gcc安装

1 x86_64 gcc

  1 apt-get install build-essential

  如果报错:

  rm -rf /var/cache/apt/lists/

  然后再重新执行apt-get install bulid-essential 来安装gcc。

 

2 安装mips-linux交叉编译工具链。

  http://sourcery.mentor.com/public/gnu_toolchain/mips-sde-elf/

   

 

 

binutils:
../binutils-2.24/configure --target=mips-sde-elf --prefix=$DIR --disable-nls --disable-werror --disable-multilib --enable-shared

gmp:
./configure --prefix=$DIR

mpfr:
./configure --target=mips-sde-elf --prefix=$DIR --with-gmp=$DIR

mpc:
./configure --target=mips-sde-elf --prefix=$DIR --with-gmp=$DIR


gcc:
../gcc/configure --target=mips-sde-elf --prefix=$DIR \
--with-gmp=$DIR \
--with-mpfr=$DIR \
--with-mpc=$DIR \
--disable-static --disable-gtk-doc --disable-gtk-doc-html \
--disable-doc --diable-docs --disable-debug \
--with-xmlto=no --with-fop=no --disable-dependency-tracking \
--disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib \
--disable-libquadmath --disable-libsanitizer --disable-tls \
--disable-libmudflap --enable-threads --disable-decimal-float \
--disable-shared --without-header \
--disable-threads --with-newlib --disable-largefile \
--disable-nls --with-arch=mips32r2 --with-abi=32 \
--with-newlib


newlib:
../newlib-1.17.0/configure --target=$TARGET --prefix=$PREFIX \
--disable-newlib-supplied-syscalls --enable-interwork --enable-multilib \
--with-gnu-ld --with-gnu-as --disable-newlib-io-float --disable-werror


musl:
../newlib-1.17.0/configure --target=$TARGET --prefix=$PREFIX

posted @ 2016-10-07 13:19  JustRelax  阅读(416)  评论(0编辑  收藏  举报