我目前正在使用以下configure
命令为armv7l-未知-linux-gnueabihf目标构建Binutils2.32:
chronos@localhost ~/Downloads/tarballs/binutils-2.32 $ ./configure --prefix=/usr/local/opt/arm-cross --target=armv7l-unknown-linux-gnueabihf --enable-shared --enable-host-shared --disable-static --enable-plugins --enable-gold=default --enable-ld --with-system-zlib
我运行了make -j3 && make install
,没有出现任何错误。
但是,当我将/usr/local/opt/arm-cross/bin
添加到我的路径中并运行armv7l-unknown-linux-gnueabihf-objdump
时,发生了以下错误:
armv7l-unknown-linux-gnueabihf-objdump: can't set BFD default target to `armv7l-unknown-linux-gnueabihf': invalid bfd target
我该如何解决这个问题?我在Stack Overflow和Google上搜索,都找不到任何东西。
发布于 2019-06-30 03:20:46
您已使用--enable-shared --enable-host-shared --disable-static
进行配置。这意味着您需要确保binutils程序可以找到它们需要的共享对象。因此,除了PATH
之外,您还必须使用LD_LIBRARY_PATH
,或者使BFD库可用于您的自定义binutils构建。
然而,这可能会影响其他安装的binutils版本如何找到它们的BFD库,因此静态链接您的版本可能会更容易。
https://stackoverflow.com/questions/56819881
复制相似问题