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
Answer from Valeriy Solovyov on Stack Overflow
🌐
Linux Questions
linuxquestions.org › questions › linux-software-2 › binutils-configuration-options-25109
binutils configuration options - Linux - Software
October 12, 2008 - I'm trying to do a bit of cross-compilation with an m68k-elf target. There's plenty of documentation on the actual utilities, but is there anything on
🌐
Fossies
fossies.org › linux › binutils › binutils › configure
Binutils: binutils/configure | Fossies
November 10, 2025 - nfo] 1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1457 --mandir=DIR man documentation [DATAROOTDIR/man] 1458 --docdir=DIR documentation root [DATAROOTDIR/doc/binutils] 1459 --htmldir=DIR html documentation [DOCDIR] 1460 --dvidir=DIR dvi documentation [DOCDIR] 1461 --pdfdir=DIR pdf documentation [DOCDIR] 1462 --psdir=DIR ps documentation [DOCDIR] 1463 _ACEOF 1464 1465 cat <<\_ACEOF 1466 1467 Program names: 1468 --program-prefix=PREFIX prepend PREFIX to installed program names 1469 --program-suffix=SUFFIX append SUFFIX to installed program names 1470 --program-transform-name=P
🌐
GitHub
github.com › crosstool-ng › crosstool-ng › blob › master › config › binutils › binutils.in
crosstool-ng/config/binutils/binutils.in at master · crosstool-ng/crosstool-ng
There are two options: # - For some C libraries (eg. glibc at least), BFD ld must be · # built and be selected by default. # - For elf2flt, BFD ld must be the only linker built. config BINUTILS_FORCE_LD_BFD_DEFAULT · bool · · config BINUTILS_FORCE_LD_BFD_ONLY · bool · · # Binutils 2.39 requires bison 3.0.4 or later for gprofng on x86/aarch64 · config BINUTILS_DEP_BISON · def_bool y · depends on BINUTILS_2_39_or_later && !CONFIGURE_has_bison_3_0_4_or_newer && (ARCH_X86 || (ARCH_ARM && ARCH_64)) select COMP_TOOLS_BISON ·
Author   crosstool-ng
🌐
Narkive
binutils.sourceware.narkive.com › dqVvbCQh › configure-options-to
configure options to binutils
I asked because I always build for an x86_64-pc-mingw32 target with these options: --target=x86_64-pc-mingw32 --prefix=/tmp/root --with-sysroot=/tmp/root I pass all of that to both gcc and binutils purely for laziness -- so that I don't have to retype the commands =) I noticed, however, that while gcc drops an error and dies during compilation if --with-sysroot isn't present, binutils does not.
🌐
Linux From Scratch
linuxfromscratch.org › lfs › view › development › chapter05 › binutils-pass1.html
5.2. Binutils-2.41 - Pass 1
Because the machine description in the LFS_TGT variable is slightly different than the value returned by the config.guess script, this switch will tell the configure script to adjust binutil's build system for building a cross linker.
🌐
Linux Howtos
linuxhowtos.org › manpages › 8 › binutils-config.htm
Linux Howtos: manpages: binutils-config(8)
using iotop to find disk usage hogs · average rating: 1.5 (154 votes) (1=very good 6=terrible)
🌐
OSDev.org
forum.osdev.org › board index › everything else › general programming
Help Building Binutils - OSDev.org
November 26, 2020 - export PREFIX=/usr/local/x86_64-elf export TARGET=x86_64-elf export PATH="$PREFIX/bin:$PATH" cd build-binutils ../binutils-2.34/configure --target=$TARGET --prefix=$PREFIX --with-sysroot --disable-nls --disable-werror make ; make install There may be some library prerequisites.
Find elsewhere
🌐
Phil-opp
os.phil-opp.com › cross-compile-binutils
Cross Compile Binutils | Writing an OS in Rust
../binutils-2.X/configure --target=x86_64-elf --prefix="$HOME/opt/cross" \ --disable-nls --disable-werror \ --disable-gdb --disable-libdecnumber --disable-readline --disable-sim
🌐
Kanj
kanj.github.io › elfs › book › armMusl › cross-tools › binutils.html
6.9. Cross Binutils-2.23.2
This tells configure that ${CLFS} is going to be the root of our system. It will now use the specified sysroot, ${CLFS}, as a prefix of the default search paths. --disable-nls · This disables internationalization as i18n is not needed for the cross-compile tools. --enable-shared · Enable the creation of the shared libraries. --disable-multilib · This option disables the building of a multilib capable binutils.
🌐
OSDev.org
forum.osdev.org › board index › operating system development › os design & theory
Native build of binutils/gcc - OSDev.org
January 21, 2015 - ../binutils-$BINUTILS_VER/configure --target=x86_64-glidix --prefix=/usr --with-sysroot=/ --with-build-sysroot=~/build-sysroot --host=x86_64-glidix DESTDIR=~/build-sysroot make all DESTDIR=~/build-sysroot make install Note that ~/build-sysroot is the folder that contains the root file system that you are building for your OS.
🌐
Gentoo Wiki
wiki.gentoo.org › wiki › Binutils
Binutils - Gentoo wiki
First use the binutils-config command to select the latest emerged version. See Select a new version section above. After executing this step, return here and perform a --depclean: ... This package is part of the system set and should not be removed from systems. Older versions of the package can be safely removed by passing the --depclean option ...
🌐
GitHub
github.com › redox-os › binutils-gdb › blob › master › binutils › README
binutils-gdb/binutils/README at master · redox-os/binutils-gdb
By default Native Language Support will be enabled for binutils. On · some systems however this support is not present and can lead to error · messages such as "undefined reference to `libintl_gettext'" when · building there tools. If that happens the NLS support can be disabled · by adding the --disable-nls switch to the configure ...
Author   redox-os
Top answer
1 of 1
1

After installing your toolchain in nonstandard places you need to set environment(maybe system-wide) correctly for GCC using LIBRARY_PATH and C_INCLUDE_PATHor CPLUS_INCLUDE_PATH.

Environment Variables Affecting GCC

I see three ways to automate setting path variables for your relocatable toolchain:

  • on every relocation adding your GCC path to your PATH environment variable. And create alias in your busybox profile (usually /etc/profile)

    alias example:

    alias gcc='TOOLCHAIN_PREFIX=$(which gcc | rev | cut -d"/" -f3-10 |rev); \
               LIBRARY_PATH=$TOOLCHAIN_PREFIX/lib/ \
               C_INCLUDE_PATH=$TOOLCHAIN_PREFIX/include/ gcc'
    
  • creating for your toolchain launcher-script that will calculate pathes, but you'll should launch it with direct path, setting it when you launch build process, or of course you can add its location to PATH environment varaible.

    script example

    #!/bin/sh
    TOOLCHAIN_PREFIX=$(echo $0 | rev | cut -d"/" -f3-10 |rev);
    LIBRARY_PATH=$TOOLCHAIN_PREFIX/lib/ \
        C_INCLUDE_PATH=$TOOLCHAIN_PREFIX/include/ \
        $TOOLCHAIN_PREFIX/bin/gcc-4.*
    
  • The most reliable and ergonomic way — create install/uninstall script that will unpack and set environment correctly, to relocate toolchain you will uninstall from it from one prefix and install to another. If you have dpkg on your debian-testing system, .deb package is best choice.

I can see no way to set environment fully automatically. But we can reduce it to setting just one path — path of toolchain.

HINT* For better stability you should isolate your toolchain and also install in your prefix Linux Kernel headers and Glib

🌐
GitHub
github.com › redox-os › binutils-gdb › blob › master › configure
binutils-gdb/configure at master · redox-os/binutils-gdb
May 23, 2020 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using paths configured with --with-target-bdw-gc options" >&5
Author   redox-os
🌐
GNU
sourceware.org › binutils › docs › binutils.html
GNU Binary Utilities
Do not operate in deterministic mode. This is the inverse of the -D option, above: when copying archive members and writing the archive index, use their actual UID, GID, timestamp, and file mode values. This is the default unless binutils was configured with --enable-deterministic-archives.
🌐
GNU
gnu.org › software › binutils
Binutils - GNU Project - Free Software Foundation
When a release is imminent a pre-release tarball is created in order to allow users a chance to preview the changes before they become official. These are available from here: https://sourceware.org/pub/binutils/snapshots/.