This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
CrosGCC: [cross]compiling egcs/gcc with glibc headers
- To: crossgcc <crossgcc at sourceware dot cygnus dot com>
- Subject: CrosGCC: [cross]compiling egcs/gcc with glibc headers
- From: Brendan John Simon <Brendan dot Simon at ctam dot com dot au>
- Date: Mon, 24 Jan 2000 23:07:25 +1100
- CC: Kai Ruottu <karuottu at freenet dot hut dot fi>, glibc-linux <glibc-linux at ricardo dot ecn dot wfu dot edu>
- Organization: CTAM Pty Ltd
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
I'm trying to cross-compile gcc-2.95.2 and egcs-1.1.2 for a
powerpc-linux system. Kai Ruotto suggested preinstalling headers and
libs from an exisiting powerpc-linux system (yellowdog) into the
$prefix/$target/include and $prefix/$target/lib directory. This does
work but I'm not too keen on this method. I'd prefer to compile
everything from the sources.
I would prefer to use gcc-2.95.2 but it has problems compiling
glibc-2.1.1 and glibc-2.1.2. It complains about
__libc_global_constructors not being defined. I do not have this
problem when I use egcs-1.1.2. This problem shows up for both native
ix86-linux compiles and also powerpc-linux cross-compiles. Any ideas ?
The egcs/gcc configure documentation says that the --with-headers=
option can be used to point to the libc headers. I have used this
method when using newlib for a powerpc-eabi target, so I tried it
("--with-headers=<glibc-2.1.2-path>/include") with glibc-2.1.2 for a
powerpc-linux target. When making I get errors saying that
stdlib/stdlib.h and posix/unistd.h can not be found. eg.
In file included from
/usr/local/src/gnu-tools/egcs-1.1.2/gcc/libgcc2.c:41:
/usr/local/gcc/powerpc-linux/sys-include/stdlib.h:7: stdlib/stdlib.h: No
such file or directory
In file included from
/usr/local/src/gnu-tools/egcs-1.1.2/gcc/libgcc2.c:42:
/usr/local/gcc/powerpc-linux/sys-include/unistd.h:2: posix/unistd.h: No
such file or directory
It seems that the header files in the glib-2.1.2/include directory
actually include other files (eg. glibc-2.1.2/stdio/stdio.h,
glibc-2.1.2/stdlib/stdlib.h). I don't know which of these header files
should be copied to the $prefix/$target/include directory. The
configure script copies all the files from the directory specified
(--with-headers=) to $prefix/$target/sys-include. So the other header
files can't be found. Also, why does the configure script copy the
files to $prefix/$target/sys-include instead of $prefix/$target/include
?
What do I do ?
How do I get the correct header files from glibc to the standard place
for the [cross]compiler ?
Which are the correct header files ? Do I need the ones in
glibc/inlcude only ? What about the other depencies ?
I dont recall seeing stdio.h including stdio/stdio.h before. I just
checked my /usr/include/stdio.h and there is nothing like this to be
found. Is there some kind of script that parses the header files
first. Does "make install" do something funky.
Please help.
I'm a bit confused with the glibc header file setup.
Thanks,
Brendan Simon.