Cross compile for g77 and objc

H.J. Lu
Thu Aug 12 14:47:00 GMT 1999

>   In message <>you write:
>   > I saw cross compile disabled for g77 and objc. I enabled it by hand.
>   > It seems to work for me from glibc 2 to libc 5 on x86. I also tried
>   > from glibc 2/x86 to glibc 2/ppc.
> ?!?  What are you talking about?
> Did you actually read the instructions we provide for building cross compilers?

No. I used my old script.

> "make cross" is not the way to build cross compilers anymore.  THe target
> should be removed from the toplevel Makefile.
> jeff

Thanks. It works for me now. "make cross" did confuse me.

Here is a libgcc2 patch for cross compile. When I do cross compile for
Linux, I need a libgcc.a which is identical to the native compiled
libgcc.a. The current libgcc2.c doesn't support it. I used the patch
below to get around it. I added -Dno_inhibit_libc to my CFLAGS so that
my cross compiled libgcc.a is the same as the native compiled libgcc.a.

H.J. Lu (
Thu Aug 12 10:18:30 1999  H.J. Lu  (

	* gcc/libgcc2.c (inhibit_libc): Don't define if no_inhibit_libc
	is defined.

--- ../../import/gcc-2.95/egcs/gcc/libgcc2.c	Sun Jun 13 10:55:04 1999
+++ gcc/libgcc2.c	Wed Aug 11 17:13:19 1999
@@ -60,7 +60,7 @@ Boston, MA 02111-1307, USA.  */
 /* In a cross-compilation situation, default to inhibiting compilation
    of routines that use libc.  */
-#if defined(CROSS_COMPILE) && !defined(inhibit_libc)
+#if defined(CROSS_COMPILE) && !defined(inhibit_libc) && !defined(no_inhibit_libc)
 #define inhibit_libc

More information about the Gcc-patches mailing list