This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Cross compile is broken?
- To: law at cygnus dot com
- Subject: Cross compile is broken?
- From: hjl at varesearch dot com (H.J. Lu)
- Date: Mon, 9 Aug 1999 08:41:16 -0700 (PDT)
- Cc: wilson at cygnus dot com, egcs-bugs at egcs dot cygnus dot com
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.