Help building basic cross-compiler

Kai Ruottu
Fri Apr 16 02:30:00 GMT 2010

15.4.2010 20:07, Kai Ruottu kirjoitti:

> A bare GCC can be produced without anything, headers or libs, provided
> for the target system. Simply :
> make all-gcc
> "Make everything which belongs to GCC!" A bare 'make' uses the
> assumptions for "an ordinary builder"...

A man came into a PC-shop and wanted to buy a bare PC. The shopkeeper
asked if the customer really didn't want an opsys like Windows to the
PC. The customer said that he really didn't want anything like that!
The next day the customer came back with the PC and said that it didn't
work! The problem was that it didn't show the same GUI as the PC he had
seen in the shop and so demanded a "working PC" for the price he had

Sometimes it sounds like that many GCC-builders are just like this
customer, they want a "working" GCC but when they get one, they don't
understand it being fully "working" :(

Quite many maybe expect GCC being capable at least to compile and link a
"Hello World" in C, sometimes in C++, but maybe don't understand what
that means: a working C library and additionally a C++ class library
with C++... They want a "working" GCC, but they don't want a C library,
neither a C++ library, the GCC should "work" without them!

The PC shop keeper decided to sell only "working" PCs because the
customers were idiots... The GCC developers decided to let the GCC
build to produce "working" GCCs because the GCC builders were idiots...

Because of these idiots those who know must suffer, or then not...
PCs can still be bought without an opsys, GCCs can still be built
without having a C library....

Is the previous true or not true, everyone can think oneself! Basically
it could be expected people to know what to do with a PC without an
opsys or with a GCC without any C library, without any C++ library, 
without a libgcc,..., but who really knows what the people really are
knowing about these basic things :(

Ok, in the gcc-4.4.3 for 'sparc-elf' case there was absolutely NO
problems with the 'make all-gcc', neither in 'make all-target-libgcc'.
No target C headers, no target C libraries! The build-script was :

------------- clip -----------------
../gcc-4.4.3/configure --build=i686-linux-gnu --host=i686-linux-gnu \
--target=sparc-elf --enable-languages=c,c++ --disable-shared \
--with-gxx-include-dir=/usr/local/include/c++/4.4.3 \
--enable-version-specific-runtime-libs --with-newlib
make all-gcc
make all-target-libgcc
------------- clip -----------------

More information about the Gcc-help mailing list