Re: building native cross compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From what I gather by reading the INSTALL (and FAQ) files from the
source archives I would need to build glibc separately, after I built
binutils, use the same prefix and probably specify the
"--with-headers" option as well. I take it glibc won't be relying on
the GCC cross-compiler otherwise we have a chicken-and-egg scenario on
our hands?

There is a chicken-and-egg scenario.
:-(

I sort of thought as much by what I looked at so far...

  You need to first build a vanilla
cross-compiler without building the library.
What does constitute a "vanilla cross-compiler"? Is this a "limited" cross-compiler without the glibc dependencies (because that is the only way I think possible to have glibc and a fully-fledged cross compiler the way I want it)?

  You need to use that to
build glibc.  Then you need to use glibc to build the full
cross-compiler.
I see, thought as much. Small steps and all that!


Finally, in the same file there is mention that I would also need the
header files for the Linux arch (presumably the target arch as I
already have the host ones installed) - is that really a requirement?

As far as I know, it is a requirement.
I've just downloaded the headers, but (see below) I think I found exactly what I was looking for...

Also, I take it it is not possible to build glibc at the same time I
build GCC (i.e. by dropping the source tree into the GCC main tree),
right?

Right.

Anyhow look at http://kegel.com/crosstool/ .
W-H-A-T a gem that crosstool.sh file is (provided it works though)!

According to the help page it even builds a canadian cross (build - x86_64, host & target - ppc) though I have to execute it 3 times to get that done - that is my GCC2 & 3 built straight away (again, on the proviso that it works - a big if though). I am looking at the various variables it requires right now and see if I can manage to include my own compiler/optimisation options before I fire it up.

If that little gem does what it is supposed to I will be extremely happy as about 40% of my job will be done - just like that! Fingers crossed though.

MZ


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux