arm-linux-gnueabi-gcc-4.6.3下载,构建arm-linux-gnu。。。⼀、准备⼯作
1、准备⽂件
binutils-2.22.tar.bz2
gcc-4.6.3.tar.bz2
长城的诗句glibc-2.14.
glibc-ports-2.14.
glibc-linuxthreads-2.5.tar.bz2
gdb-7.4.1.tar.bz2中国黑道排行榜
linux-2.6.38.8.tar.bz2
mpfr-3.1.1.tar.bz2
mpc-1.0.
gmp-5.1.0.tar.bz2
2、建⽴以下变量,⽅便稍候的输⼊
#vim ~/.bashrc
export TARGET=arm-linux-gnueabi
export PREFIX=/usr/local/arm-linux-gcc/4.6.3
export TARGET_PREFIX=$PREFIX/$TARGET
export PATH=$PATH:$PREFIX/bin
3、为宿主机安装mpfr、mpc、gmp
#tar -xvf gmp-5.1.0.tar.bz2
#cd gmp-5.1.0
#mkdir build帮派名字大全
#cd build
#../configure
#make all -j4
#make install
#tar -xvf mpfr-3.1.1.tar.bz2
# cd mpfr-3.1.1
#mkdir build
#cd build
#../configure
#make all -j4
#make install
#tar -xvf mpc-1.0.
#cd mpc-1.0.1关于荷花的诗句
#mkdir build
#cd build
#../configure
#make all -j4
#make install
4、复制linux-kernel-headers
#tar -xvf linux-2.6.38.8.tar.bz2
#cd linux-2.6.38.8
#make include/linux/version.h
CHK include/linux/version.h
UPD include/linux/version.h
#mkdir -p $TARGET_PREFIX/include
#cp -r ./include/linux/ $TARGET_PREFIX/include
包头美食#cp -r ./include/asm-generic/ $TARGET_PREFIX/include
#cp -r ./arch/arm/include/asm/ $TARGET_PREFIX/include
⼆、编译binutils
#tar -xvf binutils-2.22.tar.bz2
#cd binutils-2.22
#mkdir build
#cd build
#../configure --prefix=$PREFIX --target=$TARGET
#make all -j4
#make install
三、初步编译gcc(不带glibc⽀持)
#tar -xvf gcc-4.6.3.tar.bz2
重新解压mpfr-3.1.1.tar.bz2、mpc-1.0.、gmp-5.1.0.tar.bz2,并改名复制⾄gcc-4.6.3中#rm -rf mpfr-3.1.1 mpc-1.0.1 gmp-5.1.0
#tar -xvf gmp-5.1.0.tar.bz2
#mv gmp-5.1.0 gmp
#mv ./gmp ./gcc-4.6.3
#tar -xvf mpfr-3.1.1.tar.bz2
#mv mpfr-3.1.1 mpfr
#tar -xvf mpc-1.0.
#mv mpc-1.0.1 mpc
#mv ./mpc ./gcc-4.6.3
#cd gcc-4.6.3
#mkdir build
#cd build
#../configure --prefix=$PREFIX --target=$TARGET --without-headers --enable-languages=c --disable-threads --with-newlib --disable-shared --disable-libmudflap --disable-libssp --disable-decimal-float
#make all-gcc -j4
#make install-gcc
#make all-target-libgcc -j4
#make install-target-libgcc
四、编译glibc
#tar -xvf glibc-2.14.
#tar -xvf glibc-ports-2.14.
#mv glibc-ports-2.14.1 ports
#mv ./ports/ ./glibc-2.14.1
#tar -xvf glibc-linuxthreads-2.5.tar.bz2 --directory=./glibc-2.14.1
# cd glibc-2.14.1
# mkdir build
# cd build
# CC=$TARGET-gcc
# ln -s /usr/local/arm-linux-gcc/4.6.3/lib/gcc/arm-linux-gnueabi/4.6.3/libgcc.a /usr/local/arm-linux-
gcc/4.6.3/lib/gcc/arm-linux-gnueabi/4.6.3/libgcc_eh.a
创建config.cache配置⽂件
# vim config.cache
libc_cv_forced_unwind=yes
libc_cv_c_cleanup=yes
libc_cv_arm_tls=yes
# ../configure --host=$TARGET --target=$TARGET --prefix=$TARGET_PREFIX --enable-add-ons --disable-profile --cache-file=config.cache --with-binutils=$PREFIX/bin --with-headers=$TARGET_PREFIX/include
#make all -j4
#make install
五、重新编译gcc
# rm -rf *
# ../configure --prefix=$PREFIX --target=$TARGET --enable-shared --enable-languages=c,c++ # make all -j4
# make install
六、编译gdb
# tar -xvf gdb-7.4.1.tar.bz2
# ../configure --prefix=$PREFIX --target=$TARGET
# make all -j4
# make install
七、创建链接
# cd $PREFIX/bin
# ln -s arm-linux-gnueabi-addr2line arm-linux-addr2line
# ln -s arm-linux-gnueabi-ar arm-linux-ar
# ln -s arm-linux-gnueabi-as arm-linux-as
# ln -s arm-linux-gnueabi-c++ arm-linux-c++
# ln -s arm-linux-gnueabi-c++filt arm-linux-c++filt
# ln -s arm-linux-gnueabi-cpp arm-linux-cpp
# ln -s arm-linux-gnueabi-elfedit arm-linux-elfedit
# ln -s arm-linux-gnueabi-g++ arm-linux-g++
pep小学英语五年级下册期中试卷# ln -s arm-linux-gnueabi-gcc arm-linux-gcc
# ln -s arm-linux-gnueabi-gcc-4.6.3 arm-linux-gcc-4.6.3
# ln -s arm-linux-gnueabi-gcov arm-linux-gcov
# ln -s arm-linux-gnueabi-gdb arm-linux-gdb
# ln -s arm-linux-gnueabi-gdbtui arm-linux-gdbtui
# ln -s arm-linux-gnueabi-gprof arm-linux-gprof
# ln -s arm-linux-gnueabi-ld arm-linux-ld
# ln -s arm-linux-gnueabi-ld.bfd arm-linux-ld.bfd
# ln -s arm-linux-gnueabi-nm arm-linux-nm
# ln -s arm-linux-gnueabi-objcopy arm-linux-objcopy
# ln -s arm-linux-gnueabi-objdump arm-linux-objdump
# ln -s arm-linux-gnueabi-ranlib arm-linux-ranlib
# ln -s arm-linux-gnueabi-readelf arm-linux-readelf
# ln -s arm-linux-gnueabi-run arm-linux-run
# ln -s arm-linux-gnueabi-size arm-linux-size
# ln -s arm-linux-gnueabi-strings arm-linux-strings # ln -s arm-linux-gnueabi-strip arm-linux-strip
完成
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论