This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
nonexistent dirs in $(RPATH_ENVVAR)
- To: gcc-patches at gcc dot gnu dot org
- Subject: nonexistent dirs in $(RPATH_ENVVAR)
- From: "Golubev I. N." <gin at mo dot msk dot ru>
- Date: Mon, 07 May 2001 14:21:45 (GMT)
Version: 2.95.3
Top level `Makefile.in' of gcc distribution assumes that adding
nonexistent directories to LD_LIBRARY_PATH does no harm.
Unfortunately there are buggy systems like sco5 where this is not the
case. It may cause segmentation in dynamic linker when build
procedure attempts to run `gen*' programs built by `stage1/'. To
avoid that, I apply the following patch.
--- gcc-2.95.3/Makefile.in 2001/05/05 15:35:51 1.1
+++ gcc-2.95.3/Makefile.in 2001/05/05 15:36:53 1.2
@@ -188,12 +188,17 @@
# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
REALLY_SET_LIB_PATH = \
- if [ x"$$$(RPATH_ENVVAR)" != x ]; then \
- $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
+ if [ -d $$r/bfd ]; then p=$$r/bfd; else p=; fi; \
+ if [ -d $$r/opcodes ]; then q=$$r/opcodes; else q=; fi; \
+ if [ ."$$p" != . -a ."$$q" != . ]; then c="$$p:$$q"; else c="$$p$$q";fi; \
+ if [ ."$$c" != . -a x"$$$(RPATH_ENVVAR)" != x ]; then \
+ $(RPATH_ENVVAR)="$$c:$$$(RPATH_ENVVAR)"; \
else \
- $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \
+ $(RPATH_ENVVAR)="$$c$$$(RPATH_ENVVAR)"; \
fi; \
- export $(RPATH_ENVVAR);
+ if [ ."$$$(RPATH_ENVVAR)" != . ]; then \
+ export $(RPATH_ENVVAR); \
+ else :; fi;
ALL = all.normal
INSTALL_TARGET = installdirs \