arm linux gcc fpic,插件 – 需要不支持的动态重定位R_ARM_REL32;用-fPIC重新编译

我正在通过yocto 1.6构建一个gst-plugin.我是linaro 4.9交叉工具链的32位和64位.

当我使用64位工具链构建插件时,它成功了(我得到了插件.so文件)而如果我使用32位工具链构建相同的源,我得到了以下错误

/home/build-directory/tmp/sysroots/x86_64-linux/usr/libexec/cortexa8hf-vfp-neon-rdk-linux-gnueabi/gccgcc/arm-rdk-linux-gnueabi/4.9.4/ld: error: .libs/libgstpluginxxx_la-gstpluginxxx.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC

这里整个错误

./arm-rdk-linux-gnueabi-libtool --tag=CC --tag=disable-static --mode=link arm-rdk-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=/home/sysroots/path -pthread -I/home/sysroots/path/usr/include/gstreamer-1.0 -I/home/sysroots/path/usr/include/glib-2.0 -I/home/sysroots/path/usr/lib/glib-2.0/include -O2 -pipe -g -feliminate-unused-debug-types -fPIC -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o libgstpluginxxx.la -rpath /usr/lib/gstreamer-1.0 libgstpluginxxx_la-gstpluginxxx.lo -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0

arm-rdk-linux-gnueabi-libtool: link: arm-rdk-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -enable-shared -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=/home/sysroots/path -shared -fPIC -DPIC .libs/libgstpluginxxx_la-gstpluginxxx.o /home/sysroots/path/usr/lib/libgstreamer-1.0.so -L/home/sysroots/path/usr/lib /home/sysroots/path/usr/lib/libgmodule-2.0.so -lm -ldl /home/sysroots/path/usr/lib/libgobject-2.0.so /home/sysroots/path/usr/lib/libffi.so /home/sysroots/path/usr/lib/libglib-2.0.so -lpthread -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/sysroots/path -pthread -O2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -pthread -Wl,-soname -Wl,libgstpluginxxx.so.0 -o .libs/libgstpluginxxx.so.0.0.0

/home/build-directory/tmp/sysroots/x86_64-linux/usr/libexec/cortexa8hf-vfp-neon-rdk-linux-gnueabi/gcc/arm-rdk-linux-gnueabi/4.9.4/ld: error: .libs/libgstpluginxxx_la-gstpluginxxx.o: requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC

我很困惑,为什么构建无法使用-fPIC重新编译虽然在链接命令中提到了它?我在Makefile和libtool脚本中手动尝试-fPIC选项,但没有用:(

在不修改源文件和配方文件的情况下,它在32位工具链中成功,而在64位工具链中失败并告诉使用-fPIC选项重新编译

以下是构建机器信息.

BB_VERSION = "1.28.0"

BUILD_SYS = "i686-linux"

NATIVELSBSTRING = "Ubuntu-14.04"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值