This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: help building gcc 3.2
- From: Rupert Wood <rup at kanat dot pair dot com>
- To: Ralph Blach <rcblach at us dot ibm dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 9 Oct 2002 09:20:20 -0400 (EDT)
- Subject: Re: help building gcc 3.2
Ralph Blach wrote:
> crti.o and libc.a
:
> Whey would a compiler need these files or care about them.
It needs them to link applications. The first one in the C runtime
entrypoint/initialization and the second is the C library.
For example, the operating system knows nothing about main(). The
application's real entrypoint has to fetch the arguments from the OS, chop
them up into an array and then invoke main(). It usually also sets up
floating point state and, for C++, invokes constructors of global objects
and initializes the exception mechanism.
> After all, you might need the compiler to build theses files.
At this point you should have enough of the compiler to build these.
Likely crti will be compiled from assembler, and the C library source
should neither make assumptions about having a C library to link against
(!) nor that it can link an executable.
Your best bet is to fetch these, along with the /usr/include headers, from
the target powerpc-linux system or, if you don't have access to one, from
a PowerPC linux distribution; then see --with-headers and --with-libs in
the GCC configure documentation. Alternatively you could use these to
compile and install glibc for powerpc-linux.
> How do I specify the configure options so that these files are not
> needed.
Build and install newlib and configure --with-newlib. newlib (I think) can
now interface with a linux kernel. However, glibc's probably a better
bet.
Rup.