This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: cross building binutils?
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Anonymous <christel-von-der-post at eurovibes dot org>
- Cc: binutils at sourceware dot org
- Date: Tue, 15 May 2012 18:33:34 -0400 (EDT)
- Subject: Re: cross building binutils?
- References: <208f41fd7c9f43384c80f1172f0af1e3@eurovibes.org>
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
--sysroot.
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