【问题标题】:Toolchain configuration for softfp using yocto使用 yocto 的 softfp 工具链配置
【发布时间】:2016-05-26 18:35:28
【问题描述】:

我已经使用 yocto 为 IMX6 Sabersd 构建了图像,如下所示。

#curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
#repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.10.53-1.1.0_ga
#repo sync
#source setup-environment build
#bitbake core-image-minimal

在构建期间,它正在获取 gcc-4.8 源代码和用于 IMX6 的编译工具 chian。工具链使用硬浮点(使用“./arm-poky-linux-gnueabi-gcc -v”检查,输出有“--float-with=hard”),我的要求是工具链必须使用softfp。

这背后的原因是我使用了与 hardfp 不兼容的 3rd 方预构建库。因此,在编译期间,我遇到了如下所示的错误。

ld: error: *Executable* uses VFP register arguments,  *Library* does not
ld: failed to merge target specific data of file *Library*

您能否帮助我如何更改 yocto 中的配置以使用 softfp 编译工具链。

我找不到 yocto freescale 使用的是哪个版本,但我可以在“poky/meta/recipes-devtools/gcc/”下看到 gcc-4.8 接收方。

【问题讨论】:

    标签: yocto gcc4.8


    【解决方案1】:

    鉴于我不知道您使用的是什么核心处理器。

    你要修改的文件应该在poky/meta/conf/machine/include/

    您也可以在conf/local.conf 中添加类似的内容来覆盖:

    TARGET_CC_ARCH = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp"

    【讨论】:

    • 感谢您的回复。我尝试在 local.conf 中添加“TARGET_CC_ARCH”,但它失败并出现错误“pastebin.com/1Mg5pWur”,在检查配置日志时,观察到 autoconf 错误“pastebin.com/4c4EhHq6”。你能帮忙吗?
    • 尝试通过删除/build/tmp来清理整个构建
    • 在“TARGET_CC_ARCH”中使用“-march=armv7a”修复的编译问题。 IMX6 Sabersd 板基于 Cortex-A9,一开始错过了更新。看来 Cortex-A9 正在使用 armv7a。
    • 通过使用“-march=armv7a”构建使用 yocto 是成功的,但是在使用这个工具链进行编译时它给出了错误“sysroots/imx6qsabresd/usr/include/gnu/stubs.h:10: 29:致命错误:gnu/stubs-hard.h:没有这样的文件或目录”。
    • 通过在“meta-fsl-arm”层(conf/machine/include/imx-base.inc)中使用“cortexa9-neon”而不是“cortexa9hf-neon”为“DEFAULTTUNE_mx6”编译工具链和未观察到此工具链链接问题。
    猜你喜欢
    • 1970-01-01
    • 2020-01-23
    • 1970-01-01
    • 2020-10-12
    • 2017-03-15
    • 2016-08-23
    • 1970-01-01
    • 1970-01-01
    • 2017-06-17
    相关资源
    最近更新 更多