This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
cross-compile failures
- To: egcs at cygnus dot com
- Subject: cross-compile failures
- From: Neal Becker <neal at ctd dot comsat dot com>
- Date: Wed, 3 Dec 1997 11:44:34 -0500
I have been looking into cross-compile failures I have reported. The
problem is building libiberty.
-------
make[3]: Entering directory `/src/m68k/egcs-971201/m68k-unknown-coff/libiberty'
test -z "" || \
/src/m68k/egcs-971201/gcc/xgcc -B/src/m68k/egcs-971201/gcc/ -c -g -O2 -I. -I../../../../egcs-971201/libiberty/../include ../../../../egcs-971201/libiberty/vsprintf.c -o pic/vsprintf.o
/src/m68k/egcs-971201/gcc/xgcc -B/src/m68k/egcs-971201/gcc/ -c -g -O2 -I. -I../../../../egcs-971201/libiberty/../include ../../../../egcs-971201/libiberty/vsprintf.c
../../../../egcs-971201/libiberty/vsprintf.c: In function `vsprintf':
../../../../egcs-971201/libiberty/vsprintf.c:47: structure has no member named `_flag'
../../../../egcs-971201/libiberty/vsprintf.c:47: `_IOWRT' undeclared (first use this function)
../../../../egcs-971201/libiberty/vsprintf.c:47: (Each undeclared identifier is reported only once
../../../../egcs-971201/libiberty/vsprintf.c:47: for each function it appears in.)
../../../../egcs-971201/libiberty/vsprintf.c:47: `_IOSTRG' undeclared (first use this function)
../../../../egcs-971201/libiberty/vsprintf.c:48: structure has no member named `_ptr'
../../../../egcs-971201/libiberty/vsprintf.c:49: structure has no member named `_cnt'
make[3]: *** [vsprintf.o] Error 1
make[3]: Leaving directory `/src/m68k/egcs-971201/m68k-unknown-coff/libiberty'
make[2]: *** [libiberty.a] Error 2
make[2]: Leaving directory `/src/m68k/egcs-971201/m68k-unknown-coff/libiberty'
make[1]: *** [all-target-libiberty] Error 2
make[1]: Leaving directory `/src/m68k/egcs-971201'
make: *** [cross] Error 2
--------------
The problem is that we are using the target compiler, but not using
the target includes.
We have in /src/m68k/egcs-971201/m68k-unknown-coff/libiberty/Makefile:
errors: dummy.o $(EXTRA_OFILES)
-($(ERRORS_CC) -o dummy $(CFLAGS) $(LDFLAGS) $(ERRORS_LDFLAGS) dummy.o $(EXTRA_OFILES) $(LOADLIBES)) >errors 2>&1 || true
When executed we get this:
(/src/m68k/egcs-971201/gcc/xgcc -B/src/m68k/egcs-971201/gcc/ -o dummy
-g -O2 dummy.o ) >errors 2>&1 || true
The problem is, if we are going to use the target compiler we need to
add target includes and libs. Why isn't this being done? Even if I
say --with-headers=/usr/local/m68k/m68k-unknown-coff/include I still
get the same failure.