This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Search more library dirs with --enable-shared
- To: gcc-patches at gcc dot gnu dot org
- Subject: Search more library dirs with --enable-shared
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 18 Nov 2000 18:53:39 -0200
- Cc: gdb-patches at sources dot redhat dot com, binutils at sources dot redhat dot com, newlib at sources dot redhat dot com, java-patches at sources dot redhat dot com
- Organization: GCC Team, Red Hat
This patch arranges for the top-level Makefile to set LD_LIBRARY_PATH
or equivalent such that the directory in which a shared C++ library
would live. This is important to get libgcj's configure tests (and
any other C++ library's, for that matter) to succeed, when shared
libraries are enabled.
I'm checking this in. Tested on i686-pc-linux-gnu.
Index: ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* Makefile.in (HOST_LIB_PATH, TARGET_LIB_PATH): New macros.
(REALLY_SET_LIB_PATH): Use them.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.58
diff -u -p -r1.58 Makefile.in
--- Makefile.in 2000/10/04 18:00:37 1.58
+++ Makefile.in 2000/11/18 20:43:05
@@ -186,14 +186,19 @@ SET_LIB_PATH =
# the libraries. This may be changed by configure.in.
RPATH_ENVVAR = LD_LIBRARY_PATH
+# This is the list of directories that may be needed in RPATH_ENVVAR
+# so that programs built for the host machine work.
+HOST_LIB_PATH = $$r/bfd:$$r/opcodes
+
+# This is the list of directories that may be needed in RPATH_ENVVAR
+# so that prorgams built for the target machine work.
+TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$r/$(TARGET_SUBDIR)/libstdc++
+
# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
+# Some platforms don't like blank entries, so we remove duplicate,
+# leading and trailing colons.
REALLY_SET_LIB_PATH = \
- if [ x"$$$(RPATH_ENVVAR)" != x ]; then \
- $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
- else \
- $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \
- fi; \
- export $(RPATH_ENVVAR);
+ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
ALL = all.normal
INSTALL_TARGET = installdirs \
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me