This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Converting a JAR into a gcj-statically-linked SO


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]