This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Cross compile for g77 and objc
- To: law at cygnus dot com
- Subject: Re: Cross compile for g77 and objc
- From: hjl at varesearch dot com (H.J. Lu)
- Date: Thu, 12 Aug 1999 14:47:33 -0700 (PDT)
- Cc: egcs at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com
>
>
> In message <19990812165338.C8A8F3FC1@varesearch.com>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 (hjl@gnu.org)
----
Thu Aug 12 10:18:30 1999 H.J. Lu (hjl@gnu.org)
* 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
#endif