This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: problems compiling host tools
Thanks Jonathan, I indeed had used "make" alone.
Now I tryed to rebuild the tools on another machine (simply copying them
didn 't work because of different system libraries). Unluckily, I got
errors similar to the other ones, but this time I followed the
instruction, I believe. This document
http://sources.redhat.com/ecos/tools/linux-v850-elf.html
says to use a snapshot more recent than 2000-03-20. I thought gcc-2.95.3
would be fine, as it's newer.
I did
../src/gcc-2.95.3/configure --target=v850-elf --prefix=/ecos/tools
--exec-prefix=/ecos/tools/H-i686-pc-linux-gnu --with-gnu-as
--with-gnu-ld --with-gnulib -v | & tee configure.out
make -w all-gcc install-gcc LANGUAGES="c c++" | & tee make.out
I attach the last part of make output
What's weird is that I think these are exactly the same steps I follow
on the other machine to build the v850 gcc. The other machine is a
Debian unstable system, whereas the one on which I am trying to work now
is a RedHat 7.2 (but using gcc-2.95.3 as the native compiler)
Any ideas?
TIA
Aldo
Jonathan Larmour wrote:
Aldo Dolfi wrote:
Thanks for the hint, but I am still stuck.
I tried to configure gcc-2.95.3 but it says target i386-pc-elf not
supported.
So I tried 2.95.2 with the patch
http://sources.redhat.com/ecos/tools/patches/ecos-gcc-2952.pat
The configure goes fine, but during the make I get errors about not
finding system include files.
The output from make is attached.
What's wrong this time? :)
You didn't follow the instructions quite carefully enough I'm afraid.
You need to use:
make -w all-gcc install-gcc LANGUAGES="c c++"
It looks like you did just "make" or "make all"
Jifl
rm -rf include; mkdir include
TARGET_MACHINE=v850-unknown-elf; srcdir=`cd ../../src/gcc-2.95.3/gcc; pwd`; \
INSTALL_ASSERT_H=; SHELL=/bin/sh ;\
export TARGET_MACHINE srcdir INSTALL_ASSERT_H SHELL ; \
/bin/sh ./fixinc.sh `pwd`/include /ecos/tools/H-i686-pc-linux-gnu/v850-elf/sys-include
Fixing headers into /tmp/ecos/build-gcc/gcc/include for v850-unknown-elf target
rm -f include/syslimits.h
if [ -f include/limits.h ]; then \
mv include/limits.h include/syslimits.h; \
else \
cp ../../src/gcc-2.95.3/gcc/gsyslimits.h include/syslimits.h; \
fi
chmod a+r include/syslimits.h
if [ "/ecos/tools/H-i686-pc-linux-gnu/v850-elf/sys-include" = "/ecos/tools/H-i686-pc-linux-gnu/v850-elf/sys-include" ] \
&& [ -d /ecos/tools/H-i686-pc-linux-gnu/v850-elf/sys-include ]; then \
if [ -d /ecos/tools/H-i686-pc-linux-gnu/lib ] ; then true ; else mkdir /ecos/tools/H-i686-pc-linux-gnu/lib ; fi; \
if [ -d /ecos/tools/H-i686-pc-linux-gnu/lib/gcc-lib ] ; then true ; else mkdir /ecos/tools/H-i686-pc-linux-gnu/lib/gcc-lib; fi; \
if [ -d /ecos/tools/H-i686-pc-linux-gnu/lib/gcc-lib/v850-elf ] ; then true ; else mkdir /ecos/tools/H-i686-pc-linux-gnu/lib/gcc-lib/v850-elf ; fi; \
if [ -d /ecos/tools/H-i686-pc-linux-gnu/lib/gcc-lib/v850-elf/2.95.3 ] ; then true ; else mkdir /ecos/tools/H-i686-pc-linux-gnu/lib/gcc-lib/v850-elf/2.95.3 ; fi; \
else true; fi
touch stmp-fixinc
if [ -f /ecos/tools/H-i686-pc-linux-gnu/v850-elf/sys-include/limits.h ] ; then \
cat ../../src/gcc-2.95.3/gcc/limitx.h ../../src/gcc-2.95.3/gcc/glimits.h ../../src/gcc-2.95.3/gcc/limity.h > tmp-xlimits.h; \
else \
cat ../../src/gcc-2.95.3/gcc/glimits.h > tmp-xlimits.h; \
fi
mv tmp-xlimits.h xlimits.h
for file in .. ../../src/gcc-2.95.3/gcc/ginclude/stdarg.h ../../src/gcc-2.95.3/gcc/ginclude/stddef.h ../../src/gcc-2.95.3/gcc/ginclude/varargs.h ../../src/gcc-2.95.3/gcc/ginclude/va-alpha.h ../../src/gcc-2.95.3/gcc/ginclude/va-h8300.h ../../src/gcc-2.95.3/gcc/ginclude/va-i860.h ../../src/gcc-2.95.3/gcc/ginclude/va-i960.h ../../src/gcc-2.95.3/gcc/ginclude/va-mips.h ../../src/gcc-2.95.3/gcc/ginclude/va-m88k.h ../../src/gcc-2.95.3/gcc/ginclude/va-mn10200.h ../../src/gcc-2.95.3/gcc/ginclude/va-mn10300.h ../../src/gcc-2.95.3/gcc/ginclude/va-pa.h ../../src/gcc-2.95.3/gcc/ginclude/va-pyr.h ../../src/gcc-2.95.3/gcc/ginclude/va-sparc.h ../../src/gcc-2.95.3/gcc/ginclude/va-clipper.h ../../src/gcc-2.95.3/gcc/ginclude/va-spur.h ../../src/gcc-2.95.3/gcc/ginclude/va-m32r.h ../../src/gcc-2.95.3/gcc/ginclude/va-sh.h ../../src/gcc-2.95.3/gcc/ginclude/va-v850.h ../../src/gcc-2.95.3/gcc/ginclude/va-arc.h ../../src/gcc-2.95.3/gcc/ginclude/iso646.h ../../src/gcc-2.95.3/gcc/ginclude/va-ppc.h ../../src/gcc-2.95.3/gcc/ginclude/va-c4x.h ../../src/gcc-2.95.3/gcc/cp/inc/typeinfo ../../src/gcc-2.95.3/gcc/cp/inc/exception ../../src/gcc-2.95.3/gcc/cp/inc/new ../../src/gcc-2.95.3/gcc/cp/inc/new.h ../../src/gcc-2.95.3/gcc/ginclude/proto.h ../../src/gcc-2.95.3/gcc/ginclude/stdbool.h; do \
if [ X$file != X.. ]; then \
realfile=`echo $file | sed -e 's|.*/\([^/]*\)$|\1|'`; \
touch include/$realfile; \
rm -f include/$realfile; \
cp $file include; \
chmod a+r include/$realfile; \
fi; \
done
rm -f include/limits.h
cp xlimits.h include/limits.h
chmod a+r include/limits.h
rm -f include/float.h
if [ xfloat-i64.h != xMakefile.in ]; then \
cp ../../src/gcc-2.95.3/gcc/config/float-i64.h include/float.h && \
chmod a+r include/float.h; \
else :; fi
rm -f include/README
cp ../../src/gcc-2.95.3/gcc/README-fixinc include/README
chmod a+r include/README
touch stmp-int-hdrs
if [ -f libgcc2.ready ] ; then \
true; \
else \
touch libgcc2.ready; \
fi
rm -f tmplibgcc1.a libgcc1.S
cp ../../src/gcc-2.95.3/gcc/config/v850/lib1funcs.asm libgcc1.S
for name in _mulsi3 _divsi3 _udivsi3 _modsi3 _umodsi3 _save_2 _save_20 _save_21 _save_22 _save_23 _save_24 _save_25 _save_26 _save_27 _save_28 _save_29 _save_2c _save_20c _save_21c _save_22c _save_23c _save_24c _save_25c _save_26c _save_27c _save_28c _save_29c _save_31c _save_varargs _save_interrupt _save_all_interrupt; \
do \
echo ${name}; \
/tmp/ecos/build-gcc/gcc/xgcc -B/tmp/ecos/build-gcc/gcc/ -B/ecos/tools/H-i686-pc-linux-gnu/v850-elf/bin/ -I/ecos/tools/H-i686-pc-linux-gnu/v850-elf/include -O2 -DCROSS_COMPILE -DIN_GCC -g -O2 -I./include -Wa,-mwarn-signed-overflow -Wa,-mwarn-unsigned-overflow -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I../../src/gcc-2.95.3/gcc -I../../src/gcc-2.95.3/gcc/config -I../../src/gcc-2.95.3/gcc/../include -c -DL${name} libgcc1.S; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
mv libgcc1.o ${name}.o; \
v850-elf-ar rc tmplibgcc1.a ${name}.o; \
rm -f ${name}.o; \
done
_mulsi3
_divsi3
_udivsi3
_modsi3
_umodsi3
_save_2
_save_20
_save_21
_save_22
_save_23
_save_24
_save_25
_save_26
_save_27
_save_28
_save_29
_save_2c
_save_20c
_save_21c
_save_22c
_save_23c
_save_24c
_save_25c
_save_26c
_save_27c
_save_28c
_save_29c
_save_31c
_save_varargs
_save_interrupt
_save_all_interrupt
rm -f libgcc1.S
mv tmplibgcc1.a libgcc1-asm.a
echo '#define FLOAT' > fp-bit.c
echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
echo '#endif' >> fp-bit.c
cat ../../src/gcc-2.95.3/gcc/config/fp-bit.c >> fp-bit.c
echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
echo '#endif' >> dp-bit.c
cat ../../src/gcc-2.95.3/gcc/config/fp-bit.c >> dp-bit.c
case " c c++ " in \
*" "[cC]"++ "*) \
echo tinfo.o tinfo2.o new.o opnew.o opnewnt.o opvnew.o opvnewnt.o opdel.o opdelnt.o opvdel.o opvdelnt.o exception.o > cplib2.new;; \
*) \
echo "" > cplib2.new;; \
esac
mv -f cplib2.new cplib2.txt
rm -f tmplibgcc2.a
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/ecos/build-gcc/gcc/xgcc -B/tmp/ecos/build-gcc/gcc/ -B/ecos/tools/H-i686-pc-linux-gnu/v850-elf/bin/ -I/ecos/tools/H-i686-pc-linux-gnu/v850-elf/include -O2 -DCROSS_COMPILE -DIN_GCC -g -O2 -I./include -Wa,-mwarn-signed-overflow -Wa,-mwarn-unsigned-overflow -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I../../src/gcc-2.95.3/gcc -I../../src/gcc-2.95.3/gcc/config -I../../src/gcc-2.95.3/gcc/../include -c -DL${name} \
../../src/gcc-2.95.3/gcc/libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
v850-elf-ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_muldi3
../../src/gcc-2.95.3/gcc/libgcc2.c:41: stdlib.h: No such file or directory
../../src/gcc-2.95.3/gcc/libgcc2.c:42: unistd.h: No such file or directory
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/tmp/ecos/build-gcc/gcc'
make: *** [all-gcc] Error 2
make: Leaving directory `/tmp/ecos/build-gcc'
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss