linux-gnu to mingw32 cross

Martin Aliger
Sat Nov 23 03:49:00 GMT 2002

>> I have native linux gcc 3.2, and i386-pc-mingw-gcc cross C compiler successfully build (and working!). Even gcj
>> builts successfully but no libjava... (gcj doesn't work due to lack of libjava.spec)

>You need to also specify --enable-languages=c,c++,java to
>GCC configure.


--enable-libgcj does the job!  ;-)

Now I get a little further but libjava does NOT compile either. I use:
~/java/crossgcc-src/configure --prefix=$HOME/java/crossgcc-install --target=i386-pc-mingw32 --with-headers=$HOME/java/crossgcc-install/i386-pc-mingw32/include/ --enable-languages=c,c++,java --enable-libgcj --disable-java-gc --disable-java-awt

and I must delete boehm-gc directory and hand-edit libjava/Makefile to skip java.awt.*, javax.* and some xlib stuff

Still there is error in thread support:

/crossgcc-src/libjava/.././libjava/../gcc -I/home/alik/java/crossgcc-src/libjava/../zlib -I/home/alik/java/crossgcc-src/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -I/usr/X11R6/include -W -Wall -D_GNU_SOURCE -DPREFIX=\"/home/alik/java/crossgcc-install\" -g -O2 -Wp,-MD,.deps/prims.pp -c /home/alik/java/crossgcc-src/libjava/ -o prims.o
In file included from /home/alik/java/crossgcc-src/libjava/include/jvm.h:23,
                 from /home/alik/java/crossgcc-src/libjava/
include/java-threads.h: In function `int _Jv_CondWait(_Jv_ConditionVariable_t*, 
   _Jv_Mutex_t*, __java_long, __java_int)':
include/java-threads.h:53: `sleep' undeclared (first use this function)
include/java-threads.h:53: (Each undeclared identifier is reported only once 
   for each function it appears in.)
In file included from /home/alik/java/crossgcc-src/libjava/
java/lang/Thread.h: At global scope:
java/lang/Thread.h:80: declaration does not declare anything
java/lang/Thread.h:80: storage class specified for typename
java/lang/Thread.h:80: parse error before numeric constant
java/lang/Thread.h:81: declaration does not declare anything
java/lang/Thread.h:81: storage class specified for typename
java/lang/Thread.h:81: parse error before numeric constant
/home/alik/java/crossgcc-src/libjava/ In function `void 
/home/alik/java/crossgcc-src/libjava/ warning: unused parameter `
   int _dummy'
/home/alik/java/crossgcc-src/libjava/ In function `void 
/home/alik/java/crossgcc-src/libjava/ warning: unused parameter `
   int _dummy'
make[2]: *** [prims.lo] Error 1
make[2]: Leaving directory `/home/alik/java/crossgcc-obj/i386-pc-mingw32/libjava'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alik/java/crossgcc-obj/i386-pc-mingw32/libjava'
make: *** [all-target-libjava] Error 2

As well disabling GC is not good idea, is it? But boehm-gc build fails as well (in misc.c something about GC_*_ml undeclared function - sorry for inaccuracy)

Any help?
Martin Aliger
[Please CC to me]

______________________________________________________________________________ -----> Vaše emailová schránka zdarma. <------------Pošta zdarma!

More information about the Java mailing list