Linking against a new shared library file

Wade Hennessey wadehennessey at gmail.com
Thu Mar 30 02:12:29 UTC 2017


Thanks. I found that after I sent my msg, but the write date on the file
made me think it was a generated file. -wade

p.s - yes, I'm using JDK 9.

On Wed, Mar 29, 2017 at 6:00 PM, David Holmes <david.holmes at oracle.com>
wrote:

> 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.
>
> <top>/common/autoconf/flags.m4
>
> 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
>       $2SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
>     elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
>       $2SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
>     fi
>     $2JVM_LIBS="[$]$2JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS
> -lCrun \
>         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
>
>   ...
>
> David
>
>
>
>
>
>



More information about the build-dev mailing list