This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: configure options to binutils


On 03 Dec 2007 18:05:46 -0500, DJ Delorie <dj@redhat.com> wrote:
> NightStrike <nightstrike@gmail.com> writes:
>
> > Does the option "--with-sysroot" have any meaning to binutils?
>
> Yes.  The linker does some magic transformations on linker scripts
> found within the sysroot, lest they refer to native files.

Ah, interesting.  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.  It
compiles everything nicely regardless of whether or not the option is
present.  If I understand your explanation correctly, failing to use a
with-sysroot option will produce an errorneous cross-compiler, but
without any warning or error generated.  Is that correct?

Further, the sysroot, when I start the toolchain build, is mostly
empty.  It contains the following structure:

./root
./root/mingw -> ./x86_64-pc-mingw32
./root/x86_64-pc-mingw32
./root/x86_64-pc-mingw32/include

The latter directory is populated with the x86_64-pc-mingw32 header
files, and no other files are present in the sysroot.  After a make
install of binutils, there's quite a bit more available.

Does that make sense?  Is that the way I should be doing it?

> > Does binutils need target system headers?
>
> Not that I know of.  There may be some rare natives that need native
> object format headers, but not anything that's supported as crosses.

Cool.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]