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: Building a cross-toolchain from scratch


E. Weddington wrote:
I build a gcc toolset for the Atmel AVR target hosted on Windows (built on mingw). Interestingly, for the AVR target, we (I and my other colleagues who build for Linux and FreeBSD) have our own C library, avr-libc. Building the toolset from scratch is really straightforward: build binutils, gcc, avr-libc, in that order. And in building gcc, we only build with C and C++.

I freely admit that I have no experience with building other targets, especially ones that use glibc | newlib.

So that's why I wonder, why is it so hard? Why is it designed in such a way to have to build parts of the C library to finish building the compiler, and then build the rest of the lib? Newlib claims it's for embedded targets, is building / using it any easier then glibc? Is glibc and newlib just not architected well enough to provide simple builds?

No, I think it's just that not enough people do these builds for it to matter that it's not smooth.

Several people are working on smoothing out the build process.
For instance, I'm putting together a build script that does
everything, including fetching virgin sources, needed to build
a gcc-glibc toolchain for any recent versions of those tools.
Once scripts like this are available, newcomers won't have such
a hard time, and even Kai might start seeing that truly virgin
builds are a good idea.

My script could be easily generalized to handle other C libraries.
I invite you to adapt it to avr-libc.  It's a work in progress;
see http://www.kegel.com/crossgcc
- Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


------ 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]