From 1bf1597e3ac2b2c664aebc56aaab5bd78fd48a50 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Sun, 5 Jan 2003 13:45:47 +0000
Subject: [PATCH] Revert rpath-mangling patch.  See discussion on -patches
 around Nov 29 for the rationale.

---
 src/Makefile.global.in          |  5 +----
 src/makefiles/Makefile.unixware | 18 ++----------------
 2 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index fda7cddb85..0a9b3ff75e 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,5 +1,5 @@
 # -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.157 2002/12/30 17:19:50 tgl Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.158 2003/01/05 13:45:47 petere Exp $
 
 #------------------------------------------------------------------------------
 # All PostgreSQL makefiles include this file and use the variables it sets,
@@ -190,9 +190,6 @@ LIBS = @LIBS@
 LD = @LD@
 with_gnu_ld = @with_gnu_ld@
 ld_R_works = @ld_R_works@
-# Set trpath to a list of library paths included in LDFLAGS
-# These paths can be added to rpath in the port specific makefiles if needed.
-trpath = $(filter -L%,@LDFLAGS@)
 LDFLAGS = @LDFLAGS@
 LDREL = -r
 LDOUT = -o
diff --git a/src/makefiles/Makefile.unixware b/src/makefiles/Makefile.unixware
index 6b37982290..9e4d715932 100644
--- a/src/makefiles/Makefile.unixware
+++ b/src/makefiles/Makefile.unixware
@@ -7,23 +7,9 @@ endif
 
 ifeq ($(ld_R_works), yes)
 ifeq ($(with_gnu_ld), yes)
-	# Convert the list of library search paths into -rpath options
-	# (i.e. "-LpathA -LpathB" -> ",-rpath,pathA,-rpath,pathB"), adding
-	# the contents of LD_LIBRARY_PATH if it exists.
-	tpath1=$(shell echo $(trpath) | sed -e 's/ *-L/,-rpath,/g')
-ifdef LD_LIBRARY_PATH
-	tpath2 = ,-rpath,$(shell echo $(LD_LIBRARY_PATH) | sed -e 's/:/,-rpath,/g')
-endif
-	rpath = -Wl,-rpath,$(libdir)$(tpath)$(tpath2)
+	rpath = -Wl,-rpath,$(libdir)
 else
-	# Convert the list of library search paths into a -R option path
-	# (i.e. "-LpathA -LpathB" -> ":pathA:pathB"), adding the contents of
-	# LD_LIBRARY_PATH if it exists.
-	tpath1 = $(shell echo $(trpath) | sed -e 's/ *-L/:/g')
-ifdef LD_LIBRARY_PATH
-	tpath2 = :$(LD_LIBRARY_PATH)
-endif
-	rpath = -Wl,-R$(libdir)$(tpath1)$(tpath2)
+	rpath = -Wl,-R$(libdir)
 endif
 endif
 shlib_symbolic = -Wl,-Bsymbolic
-- 
2.50.1