This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: Some fundamental questions for cross too chain.


Tushar wrote:
I am new to building cross tool chain so please forgive if answer of
below questions are obvious. (They may be obvious to u)


I am building a cross tool chain for ARM XSCALE IXP425.
build=i686-pc-linux-gnu host=i686-pc-linux-gnu
target=armbe-xscale-linux-gnu. At many place on web I have seen
procedure as follows,

1.Compile and install binutil for target
2.Configure kernel to generate header and copy arch-specific header to
prefix dir.
3.Compile gcc for target (First pass)
4.Cross Compile glibc with above tools and install.
5.Compile gcc for target (Second Pass).

Right. That's the sequence that is automated by http://kegel.com/crosstool I highly recommend using crosstool if you can; it takes a lot of the pain out of building toolchains.

First,
Is it necessary to compile gcc twice and if yes why? I can somewhat
understand if we are building cross compiler where build and host are
different. But I am not able to understand above steps where build
machine and host machine are same.

Yes. The first build of gcc has some limitations, and isn't useful for building everything a normal gcc can build. (In fact, one might consider building glibc a second time just to get the little helper binaries it comes with compiled right.)

Second,
Are these steps valid for cross compilation when build machine and host
machine are same and target is different.

1.Build binutil and gcc in any order and for target and install them.
2.Configure kernel, get headers.
3.Cross compile glibc using above cross compiler and binutil.

That would be nice, but the circular dependencies between gcc and glibc currently preclude it, I think. Maybe gcc-4.1 or gcc-5 will be refactored to make something like that easier. In the meantime, use crosstool to build your toolchains if you can. - Dan

--
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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