Yocto Jethro:如何选择Yocto默认编译器?使用gcc 4.9时,glibc在do_compile失败了

时间:2016-04-18 21:40:06

标签: gcc embedded-linux yocto openembedded

由于来自HEAD分支的旧Das u-boot还没有gcc 5,我打算使用gcc 4.8或4.9作为默认编译器而不是5.2。

GCC需要virtual / libc glibc-2.22。 glibc-2.22与5.2成功编译。不幸的是,它在do_compile失败了,错误为:ld: cannot find -lgcc,gcc为4.8和4.9

arm-poky-linux-gnueabi-gcc  -march=armv7-a -marm  -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/yocto/hio-jethro/build-hio/tmp/sysroots/hio-imx6dl-board-tcbootstrap   -nostdlib -nostartfiles -r -o /yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/elf/librtld.map.o '-Wl,-(' /yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/elf/dl-allobjs.os /yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/elf/librtld.mapT
/yocto/hio-jethro/build-hio/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi.gcc-cross-initial-arm/../../libexec/arm-poky-linux-gnueabi.gcc-cross-initial-arm/gcc/arm-poky-linux-gnueabi/5.2.0/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
make[2]: *** [/yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/build-arm-poky-linux-gnueabi/elf/librtld.map] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/git/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/yocto/hio-jethro/build-hio/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/glibc/2.22-r0/git'
make: *** [all] Error 2
ERROR: oe_runmake failed

我正在查看正确的错误吗?以及如何添加-lgcc

修改 我和Fido Branch一起检查了一切正常。我可能只需要用Fido&#39>替换gcc和glibc

1 个答案:

答案 0 :(得分:1)

你是怎么告诉它使用GCC 4的?路径仍然引用5.2.0,这表明您没有正确更改它。更改GCC版本的正确方法是设置GCCVERSION,即GCCVERSION="4.%"

jethro中的u-boot也支持gcc5,所以你为什么要使用旧版本?