This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Building a crosscompiler for mingw
- From: Adam Megacz <gcj at lists dot megacz dot com>
- To: Lars Andersen <lars at rimfaxe dot com>
- Cc: java at gcc dot gnu dot org
- Date: 12 Jun 2002 10:36:41 -0700
- Subject: Re: Building a crosscompiler for mingw
- Organization: Myself
- References: <1023895424.16832.14.camel@lars.rimfaxe.com>
You need to have the Mingw headers in $PREFIX/i686-pc-mingw32/include
- a
Lars Andersen <lars@rimfaxe.com> writes:
> In a previous post i found this for building a crosscompiler with target
> mingw
>
>
> >>>>>>>>>>>>>>>>>>>>>>>>
> >
> > Actually, it does work OOTB (as of 3.1). The binaries it produces are
> > native Win32 binaries which do not require the Cygwin POSIX-to-Win32
> > translation layer DLL.
>
> ../gcc/configure \
> --prefix=$PREFIX \
> --target=i686-pc-mingw32 \
> --host=i686-pc-linux-gnu \
> --enable-languages=c,c++,java \
> --disable-nls \
> --with-as=$PREFIX/i686-pc-mingw32/bin/as \
> --with-ld=$PREFIX/i686-pc-mingw32/bin/ld \
> --with-gnu-ld \
> --with-gnu-as \
> --enable-libgcj \
> --enable-gc-type=boehm \
> --disable-shared \
> --enable-threads=win32 \
> --disable-hash-synchronization \
> --disable-interpreter \
> --enable-sjlj-exceptions
> >
> >>>>>>>>>>>>>>>>>>>
>
>
> However, when i try this it produces an error.
> In particular this command from the makefile :
>
> /home/lars/gcc_cvs/objwin/gcc/xgcc \
> -B/home/lars/gcc_cvs/objwin/gcc/ \
> -B/usr/local/win32/i686-pc-mingw32/bin/ \
> -B/usr/local/win32/i686-pc-mingw32/lib/ \
> -isystem /usr/local/win32/i686-pc-mingw32/include -O2 \
> -I../../gcc/gcc/../winsup/include \
> -I../../gcc/gcc/../winsup/cygwin/include \
> -I../../gcc/gcc/../winsup/w32api/include \
> -DIN_GCC -DCROSS_COMPILE \
> -W -Wall -Wwrite-strings -Wstrict-prototypes \
> -Wmissing-prototypes -isystem ./include \
> -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 \
> -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc \
> -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. \
> -I../../gcc/gcc/config -I../../gcc/gcc/../include \
> -DL_muldi3 -c ../../gcc/gcc/libgcc2.c -o libgcc/./_muldi3.o
>
>
> produces the following error :
>
> In file included from ../../gcc/gcc/config/i386/mingw32.h:31,
> from tconfig.h:17,
> from ../../gcc/gcc/libgcc2.c:36:
> ../../gcc/gcc/config/i386/cygwin.h:30:19: stdio.h: No such file or
> directory
> In file included from ../../gcc/gcc/config/i386/mingw32.h:31,
> from tconfig.h:17,
> from ../../gcc/gcc/libgcc2.c:36:
> ../../gcc/gcc/config/i386/cygwin.h:394: error: parse error before '*'
> token
> ../../gcc/gcc/config/i386/cygwin.h:394: warning: function declaration
> isn't a prototype
> ../../gcc/gcc/config/i386/cygwin.h:396: error: parse error before '*'
> token
> ../../gcc/gcc/config/i386/cygwin.h:396: warning: function declaration
> isn't a prototype
>
>
> Also i notice that the above command includes many dirs from
> gcc/winsup/, a dir absent from the source tarballs??
>
> Same error when building using gcc3.04 and gcc3.2 (cvs), and using
> gcc3.1 source and gcc3.2(cvs) source.
>
>
> /Lars Andersen
>
>
--
Sick of HTML user interfaces?
www.xwt.org