您的位置 首页 芯闻

根据3c2410的linux2.6.22移植(3)

4、生成第一阶段gcc:$root@host:/home/arm/build-tools/#tarxvjfgcc-4.2.1.tar.bz2打补丁:$root@host:/home/arm/build

4、 生成第一阶段gcc: arm/build-tools/%23″>$root@host:/home/arm/build-tools/# tar xvjf gcc-4.2.1.tar.bz2
打补丁:
$root@host:/home/arm/build-tools/# cd gcc-4.2.1
$root@host:/home/arm/build-tools/gcc-4.2.1#
patch –Np1 –i /home/arm/build-tools/patch/gcc-4.2.1-*
$root@host:/home/arm/build-tools/ gcc-4.2.1# cd ..
$root@host:/home/arm/build-tools/# cd build-boot-gcc
$root@host:/home/arm/build-tools/build-boot-gcc#
../gcc-4.2.1/configure –target=${TARGET} –prefix=${PREFIX} –with-headers=${TARGET_PREFIX}/include
–with-newlib –enable-languages=c –disable-threads –disable-shared
$root@host:/home/arm/build-tools/build-boot-gcc # make all-gcc
$root@host:/home/arm/build-tools/build-boot-gcc # make install-gcc
在${PREFIX}/bin下会生成 arm-linux-最初的文件:
$root@host:/home/arm/build-tools/build-boot-gcc # ls ${PREFIX}/bin
5、 生成glibc库文件:
$root@host:/home/arm/build-tools/build-boot-gcc # cd ..
$root@host:/home/arm/build-tools# cd build-glibc
$root@host:/home/arm/build-tools/build-glibc# CC=arm-linux-gcc ../glibc-2.6.1/configure –host=$TARGET –prefix=”/usr”
–enable-add-ons –with-headers=${TARGET_PREFIX}/include
–cache-file=config.cache
这儿的config.cache与前面编译glibc头文件时的config.cache完全相同。
$root@host:/home/arm/build-tools/build-glibc# make
$root@host:/home/arm/build-tools/build-glibc#
make install_root=${TARGET_PREFIX} prefix=”” install
对libc.so作出修正:
$root@host:/home/arm/build-tools/build-glibc# cd ${TARGET_PREFIX}/lib
$root@host:/home/arm/tools/arm-linux/lib# cat libc.so

OUTPUT_FORMAT(elf32-littlearm)
GROUP ( /lib/libc.so.6 /lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.2 ) )
将GROUP这一行的内容改为:
GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.2 ) )
$root@host:/home/arm/tools/arm-linux/lib# cat libpthread.so

OUTPUT_FORMAT(elf32-littlearm)
GROUP ( /lib/libpthread.so.0 /lib/libpthread_nonshared.a )
将GROUP这一行的内容改为:
GROUP (libpthread.so.0 libpthread_nonshared.a )
6、 生成完好的编译东西:
$root@host:/home/arm/tools/arm-linux/lib# cd ${PRJROOT}/build-tools/build-gcc
$root@host:/home/arm/build-tools/build-gcc#
../gcc-4.2.1/configure –target=$TARGET –prefix=${PREFIX} –enable-shared
–enable-languages=c,c++ –with-threads=posix
$root@host:/home/arm/build-tools/build-glibc# make all
$root@host:/home/arm/build-tools/build-glibc# make in install

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/news/xinwen/264462.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部