This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libgcc2.c & cross compilation
- To: Elliot Lee <sopwith at redhat dot com>
- Subject: Re: libgcc2.c & cross compilation
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Sat, 13 Jun 1998 11:13:59 +0200
- Cc: egcs at cygnus dot com
Am Fri, 12 Jun 1998 schrieb Elliot Lee:
>egcs/gcc/libgcc2.c (latest CVS) has something along the lines of:
>
>#ifndef inhibit_libc
>/* fixproto guarantees these system headers exist. */
>#include <stdlib.h>
>#include <unistd.h>
>#endif
>
>#if defined(CROSS_COMPILE) && !defined(inhibit_libc)
>#define inhibit_libc
>#endif
>
>/* various routines for libgcc */
>
>Now, I've been told about the need for compiling with inhibit_libc for the
>CROSS_COMPILE before you get libc built, but what I don't understand that
>it is "sort of" using libc in the above example.
>
>As far as I can see, either the "if CROSS_COMPILE, define inhibit_libc"
>part needs to be removed totally, or it should be placed before the
>#include's.
>
>Comments?
Hi Elliot,
configure egcs with "--with-newlib", this defines inhibit_libc. Not very
intuitive, but it works.
Franz.