This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Cross compile is broken?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]