Converting a JAR into a gcj-statically-linked SO

Andrew Haley aph@redhat.com
Tue Jan 8 17:47:00 GMT 2008


David Daney writes:
 > Matthijs van de Water wrote:
 > > On Jan 7, 2008 2:42 PM, Andrew Haley <aph@redhat.com> wrote:
 > > 
 > >> You don't seem to be linking your shared library statically against
 > >> libgcj. You must use the -static-libgcj option.
 > >> 
 > > Changing my compile line into
 > > $ gcj -o libmynative.so -shared -fPIC native_lib.cc MyJavaLib.o
 > > -lstdc++ -shared-libgcc -static-libgcj
 > > 
 > 
 > That won't work. The static libgcj (libgcj.a) is not compiled with
 > -fPIC, so it cannot be used in a shared object.
Are you sure? I thought we changed it so that it was, ages ago. It
really ought to be: it'd halve the time to build libgcj and it'd make
this kind of thing possible.
Andrew.
-- 
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /