This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

nonexistent dirs in $(RPATH_ENVVAR)


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 \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]