Cross compile is broken?
H.J. Lu
hjl@varesearch.com
Mon Aug 9 08:42:00 GMT 1999
Is gcc cross compile broken for glibc? From what I can see in gcc
source, cross compile only works for newlib. These are in
gcc/Makefile.in:
----
# Directory in which the compiler finds executables, libraries, etc.
libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
# Used to produce a relative $(gcc_tooldir) in gcc.o
unlibsubdir = ../../..
# Directory in which to find other cross-compilation tools and headers.
dollar =
# Used in install-cross.
gcc_tooldir = $(libsubdir)/$(unlibsubdir)/../$(target_alias)
# Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
build_tooldir = $(exec_prefix)/$(target_alias)
----
The person(s) who wrote it didn't take into account that when glibc,
you need to add
-I$(build_tooldir)/include -I$(build_tooldir)/sys-include
for libgcc2.c when your C library and header files are in
$(build_tooldir). I have to do
# mkdir $(libdir)/gcc-lib/$(target_alias)/$(version)
everytime before I build a new cross compiler. It has been very
annoying. Can we fix it?
Thanks.
H.J.
More information about the Gcc-bugs
mailing list