简体   繁体   English

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

Because of old Das u-boot from HEAD branch that do not have gcc 5 yet, I am planning on using gcc 4.8 or 4.9 as a default compiler instead of 5.2. 由于HEAD分支的Das u-boot尚不具备gcc 5,因此我计划使用gcc 4.8或4.9作为默认编译器,而不是5.2。

GCC required virtual/libc glibc-2.22. GCC需要virtual / libc glibc-2.22。 glibc-2.22 complied successfully with 5.2. glibc-2.22已成功符合5.2。 Unfortunately, it failed at do_compile with the error: ld: cannot find -lgcc with gcc 4.8 and 4.9 不幸的是,它在do_compile失败并显示以下错误: ld: cannot find -lgcc带有gcc 4.8和4.9的ld: cannot find -lgcc

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

Am I looking at the right error? 我在寻找正确的错误吗? and How do I add -lgcc ? 以及如何添加-lgcc

Edit: I have checked with Fido Branch and everything is working fine. 编辑:我已经与Fido Branch进行了检查,并且一切正常。 I might just need replace gcc and glibc with Fido's 我可能只需要用Fido替换gcc和glibc

How did you tell it to use GCC 4? 您如何告诉它使用GCC 4? The paths are still referencing 5.2.0, which suggests that you didn't change it correctly. 这些路径仍引用5.2.0,这表明您没有正确更改它。 The correct way to change GCC version is to set GCCVERSION, ie GCCVERSION="4.%" . 更改GCC版本的正确方法是设置GCCVERSION,即GCCVERSION="4.%"

Also u-boot in jethro supports gcc5 just fine, so why are you using an old release? 另外,jethro中的u-boot也很好地支持gcc5,那么为什么要使用旧版本?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM