From 07e3294937e8792cd25f513606a8a5607afe73e8 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 8 Feb 2013 09:34:26 -0700 Subject: [PATCH] use rpath=$ORIGIN instead of LD_LIBRARY_PATH Hi If libjvm.so is in the same directory as avian-dynamic, then there's no need for LD_LIBRARY_PATH to include that directory, we can just set the rpath in avian-dynamic to $ORIGIN when linking it. Working patch attached. Regards Damjan --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index b3cbd88a57..fe83a35381 100755 --- a/makefile +++ b/makefile @@ -1245,7 +1245,7 @@ ifdef msvc -MANIFESTFILE:$(@).manifest $(mt) -manifest $(@).manifest -outputresource:"$(@);1" else - $(ld) $(driver-dynamic-objects) -L$(build) -ljvm $(lflags) $(no-lto) -o $(@) + $(ld) $(driver-dynamic-objects) -L$(build) -ljvm $(lflags) $(no-lto) -Wl,-rpath=\$$ORIGIN -z origin -o $(@) endif $(strip) $(strip-all) $(@)