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

查看:1316
本文介绍了Yocto Jethro:如何选择Yocto默认编译器?当使用gcc 4.9时,glibc在do_compile失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

GCC需要虚拟/ libc glibc-2.22。 glibc-2.22已成功编译5.2。不幸的是,它在do_compile上失败,出现错误: ld:找不到-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'-W1, - )'-W1,-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-忒/集结HIO / TMP / sysroots / x86_64的林UX的/ usr /斌/臂狭小-Linux的gnueabi.gcc交初始臂/../../的libexec /臂狭小-Linux的gnueabi.gcc交初始臂/ GCC /掰poky-linux-gnueabi / 5.2.0 / ld:找不到-lgcc
collect2:error:ld返回1退出状态$ b $ 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]错误1
make [2 ]:***等待未完成的工作....
make [2]:离开目录`/ yocto / hio-jethro / build-hio / tmp / work / cortexa9hf-vfp-neon-poky-linux- gnueabi / glibc / 2.22-r0 / git / elf'
make [1]:*** [elf / subdir_lib]错误2
make [1]:离开目录`/ yocto / hio-jethro / build -hio / tmp / work / cortexa9hf-vfp-neon-poky-linux-gnueabi / glibc / 2.22-r0 / git'
make:*** [all]错误2
错误:oe_runmake失败

我在寻找正确的错误吗?如何添加 -lgcc



编辑:
I已与Fido分支进行了核对,一切工作正常。我可能只需要用Fido的gcc和glibc来替换gib和glibc就可以了。

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



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


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.

GCC required virtual/libc glibc-2.22. glibc-2.22 complied successfully with 5.2. Unfortunately, it failed at do_compile with the error: 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

Am I looking at the right error? and How do I add -lgcc?

Edit: I have checked with Fido Branch and everything is working fine. I might just need replace gcc and glibc with Fido's

解决方案

How did you tell it to use GCC 4? The paths are still referencing 5.2.0, which suggests that you didn't change it correctly. The correct way to change GCC version is to set GCCVERSION, ie GCCVERSION="4.%".

Also u-boot in jethro supports gcc5 just fine, so why are you using an old release?

这篇关于Yocto Jethro:如何选择Yocto默认编译器?当使用gcc 4.9时,glibc在do_compile失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆