【问题标题】:What configure options were used when building binutils?构建 binutils 时使用了哪些配置选项?
【发布时间】:2016-04-25 04:12:37
【问题描述】:

我有一个由某人编译的 binutils 版本。我需要用相同的选项重新编译一个新的 binutils。

我知道gcc -v 会打印出配置选项。那么也许有任何方法可以读取binutils 的构建选项?

【问题讨论】:

  • 显然,最简单的方法是为您的发行版获取构建文件(例如,binutils.spec 用于基于 RPM 的发行版,PKGBUILD 用于 Arch 等...)并检查。否则,我不知道没有通用方法可以检查任何已编译的 binutils 本身。
  • 嗨,它是构建到 /opt 的定制版本。
  • 为什么需要相同的选项?
  • 因为它用于在自定义工具链中构建遗留应用程序

标签: c linux gcc toolchain binutils


【解决方案1】:

我发现支持平台和一个我可以检查的 binutils 版本:

#ld -V

GNU ld (GNU Binutils for Ubuntu) 2.22
  Supported emulations:
   elf_x86_64
   elf32_x86_64
   elf_i386
   i386linux
   elf_l1om
   elf_k1om

所以ld -V 表明你应该在--enable-targets 中使用。

我没有找到任何选项,所以我尝试检查,这是我当前的一组选项:

  ./configure --prefix=/opt/dev-tools-4.9            \
--exec-prefix=/opt/dev-tools-4.9       \
 --with-sysroot=/   --enable-multilib     \
 --with-lib-path=/opt/dev-tools-4.9/lib \
 --disable-werror  --enable-shared \
 --with-pkgversion="GNU Binutils for Ubuntu" \
 --enable-targets=x86_64-linux-gnu,i686-linux-gnu,x86_64-pc-mingw32,i686-pc-mingw32
make -j $(nproc || grep -c ^processor /proc/cpuinfo|| echo "1") && \
make install

【讨论】:

    猜你喜欢
    • 2011-01-26
    • 1970-01-01
    • 2015-01-17
    • 1970-01-01
    • 1970-01-01
    • 2017-05-11
    • 2011-06-07
    • 2021-11-22
    相关资源
    最近更新 更多