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

Yocto Jethro: How to choose a Yocto Default Compiler? glibc failed at do_compile when use gcc 4.9

由于来自 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 with gcc 4.8 and 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 的

替换 gcc 和 glibc

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

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