Reputation: 5648
I have a version of binutils that was compiled by someone. I need recompile a new binutils with same options.
I know that gcc -v
prints out the configuration options. So maybe there is any way to read build options for binutils
?
Upvotes: 8
Views: 5583
Reputation: 5648
I found that support platforms and a binutils version I can check with:
#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
So ld -V
shows that you should use in --enable-targets
.
I didn't found any way for options so I tried and check and this is my current set of options:
./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
Upvotes: 5