Building a cross compiler

Ian Lance Taylor ian@cygnus.com
Mon Apr 27 14:44:00 GMT 1998


   From: hjl@lucon.org (H.J. Lu)
   Date: Mon, 27 Apr 1998 09:50:13 -0700 (PDT)

   > In general writing libgcc1.a in assembler or just taking it from an
   > existing native gcc compile are the two options.

   The third one is if libgcc1 is written in asm in egcs or it can be
   compiled by egcs, you can set OLD_CC to "./xgcc -B./" and compile it
   by hand:

   # cd egcs/gcc
   # make libgcc1.a OLD_CC="./xgcc -B./"

   I have done that for Linux/x86. Maybe we should add something to
   egcs to do it automatically. It should be easy.

We already have such mechanisms.

If you have an assembler version of the file in egcs, set
CROSS_LIBGCC1 to libgcc1-asm.a, and set LIB1ASMSRC and LIB1ASMFUNCS in
your t-* file.  For example, see m68k/t-m68kbare, which uses
m68k/lib1sf68.asm.

If the file can be built with egcs, then it isn't necessary at all.
In such a case, set CROSS_LIBGCC1 to the empty string, as in
mips/t-mips.

Ian



More information about the Gcc mailing list