This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
A bug (I think) comilig a cross compiler
- To: gcc-bugs at gcc dot gnu dot org
- Subject: A bug (I think) comilig a cross compiler
- From: Neil Townsend <neil at robots dot ox dot ac dot uk>
- Date: Fri, 26 May 2000 18:45:12 +0100
Dear gcc people,
I am trying to build a gcc cross compiler. I have sucessfully
installed djgpp on a PC and build gcc on a SUN. Now I am trying to build a
cross compiler so that I can build executable for PCs on my sun.
To this end I have acquired the releveant DJGPP libraries and
successfuly built the binutils for the right target.
The problem comes when building gcc after the following configure:
../gcc-2.95.2/configure --prefix=${PREFIX} \
--target=${TARGET} \
--enable-languages=${LANGUAGES} \
--with-headers=${DJGPP_HEADERS_IN_DIST} \
--with-libs=${DJGPP_LIBS_IN_DIST} -v ; \
where the two DJGPP markers point to the place in the distribution
that the precompiled libraries and headers files are. The code finds
them (and copies them to their install places) just fine. LANGUAGES=c and
TARGET=i386-pc-msdosdjgpp, PREFIX=/users/neil/bli/sun4-sunos
The build proceeds smoothly until it get to making libgcc2.a and it fails as
follows: [line wrapping a bit messy, sorry]
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3
_ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2
_floatdidf _floatdisf
_fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi
_fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf
__gcc_bcmp _varargs __dummy _eprintf _bb _shtab _clear_cache _trampoline
__main _exit _ctors _pure; \
do \
echo ${name}; \
/tmp/djgpp/cross/build-gcc/gcc/xgcc -B/tmp/djgpp/cross/build-gcc/gcc/ -B/users/neil/bli/sun4-sunos/i386-pc-msdosdjgpp/bin/ -I/users/neil/bli/sun4-sunos/i386-pc-msdosdjgpp/include -O2 -DCROSS_COMPILE -DIN_GCC -DSVR4 -g -O2 -I./include -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I../../gcc-2.95.2/gcc -I../../gcc-2.95.2/gcc/config -I../../gcc-2.95.2/gcc/../include -c -DL${name} \
../../gcc-2.95.2/gcc/libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
i386-pc-msdosdjgpp-ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_muldi3
In file included from ../../gcc-2.95.2/gcc/libgcc2.c:48:
include/stddef.h:170: warning: redefinition of `size_t'
/users/neil/bli/sun4-sunos/lib/gcc-lib/i386-pc-msdosdjgpp/2.95.2/../../../../i38
6-pc-msdosdjgpp/sys-include/stdlib.h:36: warning: `size_t' previously
declared h
ere
include/stddef.h:255: conflicting types for `wchar_t'
/users/neil/bli/sun4-sunos/lib/gcc-lib/i386-pc-msdosdjgpp/2.95.2/../../../../i38
6-pc-msdosdjgpp/sys-include/stdlib.h:39: previous declaration of `wchar_t'
make[2]: *** [libgcc2.a] Error 1
make[2]: Leaving directory `/tmp/djgpp/cross/build-gcc/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/tmp/djgpp/cross/build-gcc'
What I find intriguing about this is that it has a -I to a directory
that does not exist:
/users/neil/bli/sun4-sunos/i386-pc-msdosdjgpp/include
Should this not be ....../sys-include as that is where the build
process put the files earlier?
Yours gratefully,
Neil