mingw32 gcj compile failure and possible patch
aking@dreammechanics.com
aking@dreammechanics.com
Wed Apr 3 12:14:00 GMT 2002
On Wed, Apr 03, 2002 at 10:23:11AM -0800, Frank Jacobs wrote:
> I have a question about executable size. When I tried
> the standard Hello, World application, my resulting
> executable was 10 MB.
Just strip it:
aking@nanostorm:~/gcj-test$ i686-pc-mingw32-gcj --main=HelloWorld -o hello.exe HelloWorld.java
aking@nanostorm:~/gcj-test$ ls -al hello.exe
-rwxr-xr-x 1 aking users 10824061 Apr 3 14:17 hello.exe*
aking@nanostorm:~/gcj-test$ strip hello.exe
aking@nanostorm:~/gcj-test$ ls -al hello.exe
-rwxr-xr-x 1 aking users 1208320 Apr 3 14:17 hello.exe*
There now seems to be an exception when compiling java code that uses
exceptions:
aking@nanostorm:~/gcj-test$ i686-pc-mingw32-gcj --main=GCJTest -o gcjtest GCJTest.java
/home/aking/mingw-gcc/lib/gcc-lib/i686-pc-mingw32/3.1/../../../../i686-pc-mingw32/lib/libgcj.a(exception.o): In function `abort':
/home/aking/compile/mingw-gcj/bin/i686-pc-mingw32/libjava/../../../gcc/libjava/exception.cc:27: multiple definition of `abort'
/home/aking/mingw-gcc/lib/gcc-lib/i686-pc-mingw32/3.1/../../../../i686-pc-mingw32/lib/libmsvcrt.a(ds00510.o)(.text+0x0): first defined here
I was hoping Adam M. would have a chance to look at this error, but
if not, I'll try and track it down this evening. The java code
is at the end.
Adam K
public class GCJTest
{
public static void main( String[] args )
{
try
{
Thread.sleep( 2000 );
}
catch( Exception e )
{
}
}
}
More information about the Java
mailing list