cross building binutils?

Hans-Peter Nilsson
Tue May 15 22:33:00 GMT 2012

On Tue, 15 May 2012, Anonymous wrote:
> Do I need to have all the directories containing header files and
> libraries I'll build against present during the build of binutils, or only
> when I want to assemble and link against them?

I wish I could just say "look in src/binutils/README for answers
to all your questions", but that doesn't really fit; it doesn't
say you *don't* need target headers and libraries, but of course
it doesn't say a lot of other things you don't need to do (but
that you need for e.g. building gcc). :-]  Besides, you might
want to consider using the --with-sysroot option to point at a
location for your libraries.  See the fine documentation on

Besides, IIRC there are (or used to be) the odd system where you
*do* need headers at time of building binutils, e.g. hppa-hpux.
But now forget that previous sentence unless you have a specific
interest there; you're more likely to cross-build for a current
hosted target or embedded target.  Of course it'd help if you
mention what targets you have in mind.

> That is, does binutils need
> to know about paths to things when it's built or can that be done
> afterwards. And is it possible and advisable to build for multiple targets
> or should it be built once for each target. Thank you.

src/binutils/README mentions --enable-targets, but that's just
for auxiliary tools like objdump; inspection of the object
formats - including disassembly.  It doesn't really work for
the assembler and linker.  Incidentally, there's enough of
skeleton support to trick someone who RTFS.

Separate builds, one for each target.

brgds, H-P

More information about the Binutils mailing list