This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Building a cross compiler
- To: The Red Fox <ben at proximity dot com dot au>
- Subject: Re: Building a cross compiler
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Tue, 28 Apr 1998 17:45:55 -0700
- cc: egcs at cygnus dot com, hjl at lucon dot org
mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a;
false)
mv: libgcc1.a: No such file or directory
You must find a way to make libgcc1.a
The problem here is that the i386 ports use the perform_* macros to implement
libgcc1.a. These perform_* macros are defined to be asms, and hence one
can compile libgcc1.c with gcc without generating recursive code.
Unfortunately, there is no way for the toplevel Makefile to know whether any
particular port has defined the necessary perform_* macros to make this work.
For a native (linux/freebsd/etc), one just compiles libgcc1.c with `cc', which
is gcc, and it just works.
For a cross, we have a problem, because we know we can't use `cc', and we
don't know if we can use `./xgcc -B./' (because we don't know if the
perform_* macros are defined), so the build fails with an error.
I think this should be fixed by rewriting the x86 port to implement libgcc1
as an assembler file instead of the perform_* macros, and then we should
eliminate the perform_* macros so that no one else will be tempted to use
them. This is how all other ports work nowadays.
Jim