This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Building cross-compiler w/ linux host and mingw target.
- From: Lars Andersen <lars at rimfaxe dot com>
- To: java at gcc dot gnu dot org
- Date: 23 Aug 2002 01:22:31 +0200
- Subject: Building cross-compiler w/ linux host and mingw target.
I'm trying to build a cross compiler with :
host=i686-pc-linux-gnu
target=i686-pc-mingw32
prefix=/usr/local/cross_gcc/mingw
I'll describe what i do, and if someone can see where i go wrong it'll
be great. Or even better, if anyone has made it work, please post what
packages was used and how they were configured.
I unpack the mingw 2.1 runtime and w32api 1.5 into
/usr/local/cross_gcc/mingw/i686-pc-mingw32
to get header files etc in place.
Then I install binutils 2.12 with the following :
> ./configure --target=i686-pc-mingw32
--prefix=/usr/local/cross_gcc/mingw
> make
> make install
Set the path so i686-pc-mingw32-ar can be found :
> PATH=/usr/local/cross_gcc/mingw/bin:$PATH
Next up is gcc :
> ../gcc/configure --with-gnu-as --with-gnu-ld
--with-as=/usr/local/cross_gcc/mingw/i686-pc-mingw32/bin/as
--with-ld=/usr/local/cross_gcc/mingw/i686-pc-mingw32/bin/ld
--target=i686-pc-mingw32 --enable-threads=win32 --enable-java-gc=boehm
--enable-fast-character --prefix=/usr/local/cross_gcc/mingw
--disable-hash-synchronization --disable-interpreter
--enable-sjlj-exceptions --disable-shared --enable-libgcj
> make
Make fails, here is the last lines :
checking how to run the C preprocessor... (cached)
/home/lars/gcc_cvs/objwin/gcc/xgcc -B/home/lars/gcc_cvs/objwin/gcc/
-B/usr/local/cross_gcc/mingw/i686-pc-mingw32/bin/
-B/usr/local/cross_gcc/mingw/i686-pc-mingw32/lib/ -isystem
/usr/local/cross_gcc/mingw/i686-pc-mingw32/include -E
checking for sys/file.h... yes
checking for sys/param.h... no
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for time.h... yes
checking for sys/resource.h... no
checking for sys/stat.h... yes
checking for sys/mman.h... no
checking for fcntl.h... yes
checking for alloca.h... no
checking for sys/wait.h that is POSIX.1 compatible... no
checking whether time.h and sys/time.h may both be included... yes
checking whether errno must be declared... no
checking for ANSI C header files... no
checking for uintptr_t... no
checking for pid_t... yes
checking whether the C compiler ( /home/lars/gcc_cvs/objwin/gcc/xgcc
-B/home/lars/gcc_cvs/objwin/gcc/
-B/usr/local/cross_gcc/mingw/i686-pc-mingw32/bin/
-B/usr/local/cross_gcc/mingw/i686-pc-mingw32/lib/ -isystem
/usr/local/cross_gcc/mingw/i686-pc-mingw32/include -O2 -g -O2 ) works...
no
configure: error: installation or configuration problem: C compiler
cannot create executables.
make: *** [configure-target-libiberty] Error 1
/Lars Andersen