Linking against a new shared library file

David Holmes david.holmes at
Thu Mar 30 01:00:16 UTC 2017

On 30/03/2017 7:53 AM, Wade Hennessey wrote:
> I'm trying to figure out how to link libjvm against a shared library that
> isn't linked against by default. Where in the build system would I specify
> this new library path? -wade

Assuming JDK 9.


See JVM_LIBS setting eg:

   # Set $2JVM_LIBS (per os)
   if test "x$OPENJDK_$1_OS" = xlinux; then
     $2JVM_LIBS="[$]$2JVM_LIBS -lm -ldl -lpthread"
   elif test "x$OPENJDK_$1_OS" = xsolaris; then
     # FIXME: This hard-coded path is not really proper.
     if test "x$OPENJDK_$1_CPU" = xx86_64; then
     elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
     $2JVM_LIBS="[$]$2JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS 
-lCrun \
         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"



More information about the build-dev mailing list