This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cross compilation and headers.
- To: LUTHER Sven <INST dot LUTTERSV at creditmutuel dot fr>
- Subject: Re: cross compilation and headers.
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Tue, 09 Jun 1998 14:56:37 +0200
- Cc: "'egcs at cygnus dot com'" <egcs at cygnus dot com>
At 09:10 09.06.98 , LUTHER Sven wrote:
>
>Hello, ...
>
>i am trying to build a cross compiler from linux-m68k to linux-ppc.
>i already asked a question regarding that on this list some day ago, and it
>seems that i don't had the header files to compile libgcc2.c
>
>but, after some experimentation, i am a bit confused.
>
>What are the target headers good for, if the cross compiler will only run on
>the host ?
You have a specialization of cross compilation, host OS == target OS.
Usually that's not true for cross compilation, so you would need different
includes.
>I wanted to use glibc, and the purpose of the cross compiler is to cross
>build glibc. so how can i get the headers, if i don't yet have a working
>glibc ? Is there a difference between the headers on different plateform, or
>can i just use the m68k glibc headers. can i use headers from an older
>version from glibc ?
I would think the target headers should be in
/usr/powerpc-unknown-linux-gnu/include assuming --prefix=/usr and
--target=powerpc-unknown-linux-gnu on a glibc-2.0.9x linux system.
>Do i also need the target kernel headers ? linux/include/asm-ppc and
>linux/include/linux ?
Probably yes, since they are used by glibc. But since they are links also
in /usr/include anyway, it's probably easy to do. One thing I don't know is
if the links have to point to kernel-sources configure for powerpc cross
compilation...
Franz.