This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
'/usr/lib:' in LD_RUN_PATH for java tools
- From: Matthias Klose <doko at cs dot tu-berlin dot de>
- To: java at gcc dot gnu dot org
- Date: Sun, 22 Feb 2004 13:10:05 +0100
- Subject: '/usr/lib:' in LD_RUN_PATH for java tools
when building with --prefix=/usr, libtool still sets the LD_RUN_PATH
to '/usr/lib:', which it shouldn't do. I currently use the following
workaround to build the gcj tools without an LD_RUN_PATH compiled in
(yes, long lines, but's easier to see the four lines changed). Is
there a more proper way?
--- libjava/Makefile.am~ 2004-01-26 07:36:06.000000000 +0100
+++ libjava/Makefile.am 2004-02-21 22:39:34.000000000 +0100
@@ -719,7 +719,7 @@
## need this because we are explicitly using libtool to link using the
## `.la' file.
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ $(shell test $(toolexeclibdir) = /usr/lib || echo -rpath $(toolexeclibdir)) -shared-libgcc $(THREADLDFLAGS)
jv_convert_LINK = $(GCJLINK)
## We don't explicitly link in the libraries we need; libgcj.la brings
## in all dependencies. We need the -L so that gcj can find libgcj
@@ -738,7 +738,8 @@
## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
## need this because we are explicitly using libtool to link using the
## `.la' file.
-gij_LDFLAGS = -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+gij_LDFLAGS = $(shell test $(toolexeclibdir) = /usr/lib || echo -rpath $(toolexeclibdir)) -shared-libgcc $(THREADLDFLAGS)
+
gij_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gij_LDADD = -L$(here)/.libs libgcj.la
@@ -750,7 +751,7 @@
## This is a dummy definition.
EXTRA_rmic_SOURCES = $(rmi_java_source_files)
rmic_LDFLAGS = --main=gnu.java.rmi.rmic.RMIC \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ $(shell test $(toolexeclibdir) = /usr/lib || echo -rpath $(toolexeclibdir)) -shared-libgcc $(THREADLDFLAGS)
rmic_LINK = $(GCJLINK)
## See jv_convert_LDADD.
rmic_LDADD = -L$(here)/.libs libgcj.la
@@ -762,7 +763,7 @@
## This is a dummy definition.
EXTRA_rmiregistry_SOURCES = $(rmi_java_source_files)
rmiregistry_LDFLAGS = --main=gnu.java.rmi.registry.RegistryImpl \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ $(shell test $(toolexeclibdir) = /usr/lib || echo -rpath $(toolexeclibdir)) -shared-libgcc $(THREADLDFLAGS)
rmiregistry_LINK = $(GCJLINK)
## See jv_convert_LDADD.
rmiregistry_LDADD = -L$(here)/.libs libgcj.la