GCJ adoption and improving our "PR"

Erik Poupaert erik.poupaert@skynet.be
Wed Apr 14 18:39:00 GMT 2004


> It may have to wait for the new, more stable, ABI.

I hope the new, more stable ABI will help with the following as well:

$ gcj -v
...
Thread model: posix
gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)

$ cat Hello.java

public class Hello
{
	public static void main(String[] args)
	{
		System.out.println("hello");
	}
}

$ gcj -static Hello.java -o hello --main=Hello

$ ls -lh hello

-rwxr-xr-x    1 erik     users        4.2M Apr 14 20:19 hello

That is: 4,376,645 bytes.
That is: 4,274 KB.
That is: 4.2 MB.

It used to be better, I remember. 

By the way, I've been treated to a whole new series of warnings en provenance from
the linker underworld:

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libgcj.a(gc_dlopen.o)(.text+0xbc): In
function `GC_dlopen':: warning: Using 'dlopen' in statically linked applications
requires at runtime the shared libraries from the glibc version used for
linking/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libgcj.a(natRuntime.o)(.text+0xcea):
In function `java::lang::Runtime::insertSystemProperties(java::util::Properties*)'::
warning: Using 'getpwuid_r' in statically linked applications requires at runtime the
shared libraries from the glibc version used for
linking/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libgcj.a(natInetAddress.o)(.text+0x5
03): In function `java::net::InetAddress::lookup(java::lang::String*,
java::net::InetAddress*, bool)':: warning: Using 'gethostbyaddr_r' in statically
linked applications requires at runtime the shared libraries from the glibc version
used for
linking/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libgcj.a(natInetAddress.o)(.text+0x2
2f): In function `java::net::InetAddress::lookup(java::lang::String*,
java::net::InetAddress*, bool)':: warning: Using 'gethostbyname_r' in statically
linked applications requires at runtime the shared libraries from the glibc version
used for linking

Funny, isn't it? "Hello world" is dragging around -- kicking and screaming -- entire
excerpts from java.net.InetAddress with related dependencies.

Any chance that this "hello world" executable accidentally includes a complete
version of the Bible in Aramean as well?



More information about the Java mailing list