GCC 4.1: Buildable on GHz machines only?

Marcin Dalecki martin@dalecki.de
Thu Apr 28 01:58:00 GMT 2005


On 2005-04-28, at 03:06, Peter Barada wrote:

>
>> Well, yes.  1 second/file is still slow!  I want "make" to complete
>> instantaneously!  Don't you?
>
> Actually I want it to complete before I even start, but I don't want
> to get too greedy. :)
>
> What's really sad is that for cross-compilation of the toolchain, we
> have to repeat a few steps (build gcc twice, build glibc twice)
> because glibc and gcc assume that a near-complete environment is
> available(such as gcc needing headers, and glibc needing -lgcc-eh), so
> even really fast machines(2.4Ghz P4) take an hour to do a cross-build
> from scratch.

Actually what GCC needs to know are the following:

1. What will the signal strucutre look alike on the target system.
    In esp.: What does the kernel think? What does the glibc think?
2. Do we do TLS?
3. Do we do linuxthreads or nptl?

glibc just wants:

1. Say hello to libgcc_s
2. Does the compiler support TLS?

And then don't forget that libgcc_s wants:

1. Say hello to C++, in a way requiring libc functions for exception
handling.

With a "tad bit" of work the double compilation can be avoided for the 
glibc.
You will have to build a GCC with static libgcc first and you will only 
need
the second gcc build cycle to get a dynamic libgcc_s as well as C++, 
since
C++ makes a shared libgcc mandatory.

The whole double build could be avoided if:

1. It would be possible to build libgcc for itself without rebuilding 
the
whole compiler.

2. It would be possible to build first the C compiler and then just the 
C++ compiler.

2. The information required by glibc could be provided statically to it.

All of the above are basically problems of the "configure" system - 
which isn't pretty.



More information about the Gcc mailing list