compiling with shared libraries
Per Bothner
per@bothner.com
Wed Dec 20 17:34:00 GMT 2006
Andrew Haley wrote:
> I think I may know what causes this. Please try one experiment:
> compile everything PIC, including the executable.
That worked. Thanks! The key is that the jvgenmain-generated .o file
also needs to be compiled with -fPIC. Would it make sense to make -fPIC
the default when compiling that .o file?
I then had to figure out how to coax automake+libtool to add the -fPIC.
My quick-and-dirty fix:
AC_DISABLE_STATIC (in configure.in)
AM_CFLAGS = -fPIC
And add $(AM_CLFAGS) to the command to link the executable.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Java
mailing list