This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Problems making a cross-compiler


    Hi there,

    I'm trying to compile a cross-compiler from gcc-4.0.2 sources.

    It is configured this way:

/usr/src/redhat/BUILD/gcc-4.0.2/configure --prefix=/usr/local/i686-pc-msdosdjgpp --enable-checking=release --disable-threads --disable-libunwind-exceptions --enable-target-optspace --with-system-zlib --enable-__cxa_atexit --enable-languages="c,c++" --host=i386-redhat-linux --target=i686-pc-msdosdjgpp

    But at a point during the make process I've got this:

make
...
make[2]: Entering directory `/root/gnu-build/gcc'
for d in libgcc; do \
  if [ -d $d ]; then true; else /bin/sh /usr/src/redhat/BUILD/gcc-4.0.2/gcc/../mkinstalldirs $d; fi; \
done
mkdir -p -- libgcc
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/root/gnu-build/gcc/xgcc -B/root/gnu-build/gcc/ -B/usr/local/i686-pc-msdosdjgpp/i686-pc-msdosdjgpp/bin/ -B/usr/local/i686-pc-msdosdjgpp/i686-pc-msdosdjgpp/lib/ -isystem /usr/local/i686-pc-msdosdjgpp/i686-pc-msdosdjgpp/include -isystem /usr/local/i686-pc-msdosdjgpp/i686-pc-msdosdjgpp/sys-include -O2 -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/usr/src/redhat/BUILD/gcc-4.0.2/gcc -I/usr/src/redhat/BUILD/gcc-4.0.2/gcc/. -I/usr/src/redhat/BUILD/gcc-4.0.2/gcc/../include -I/usr/src/redhat/BUILD/gcc-4.0.2/gcc/../libcpp/include  -DL_muldi3 -c /usr/src/redhat/BUILD/gcc-4.0.2/gcc/libgcc2.c -o libgcc/./_muldi3.o
cc1: error: ../include/sys/version.h: No such file or directory
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/root/gnu-build/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/root/gnu-build/gcc'
make: *** [all-gcc] Error 2

    As far as I can see, both -isystem directories don't exist in my
system, so I guessed that I should get djcrx203.zip from DJGPP site to
fix that.

    Anyway, it seems IMPOSSIBLE to tell the build process that it
should look for those files other place but PREFIX/TARGET/, no matter
what you put in --with-sysroot or --with-local-prefix, so I put them
there.

    Trying again, I've got:

...
gcc   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition    -DHAVE_CONFIG_H  -o g++ \
  gcc.o g++spec.o intl.o prefix.o version.o   ../libcpp/libcpp.a   ../libiberty/libiberty.a
rm -f g++-cross
cp g++ g++-cross
make[1]: Leaving directory `/root/gnu-build/gcc'
Checking multilib configuration...
/bin/sh /usr/src/redhat/BUILD/gcc-4.0.2/mkinstalldirs i686-pc-msdosdjgpp/libstdc++-v3 ; \
rm -f i686-pc-msdosdjgpp/libstdc++-v3/Makefile || : ; \
cp multilib.out i686-pc-msdosdjgpp/libstdc++-v3/multilib.out
mkdir -p -- i686-pc-msdosdjgpp/libstdc++-v3
Configuring in i686-pc-msdosdjgpp/libstdc++-v3
configure: creating cache ./config.cache
checking build system type... i386-redhat-linux-gnu
...
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking sys/uio.h usability... no
checking sys/uio.h presence... no
checking for sys/uio.h... no
checking for g++ that supports -ffunction-sections -fdata-sections... yes
checking for sin in -lm... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make: *** [configure-target-libstdc++-v3] Error 1


    What I'm doing wrong?. Where should I get the missing header
files?.

        
    Thank you in advance.

David.

P.D.	I've been unable to find crossgcc faq...


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