summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-07-17 04:06:04 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-07-17 04:06:04 +0000
commit86494de2484b90b530d0cf49d26529d58626947d (patch)
tree71d317e854820b9c7e9d0d357782ad367008733c
parent6ec28d8503ca4d13a7c23ae569ffbce1e39bb2e2 (diff)
downloadpostgresql-86494de2484b90b530d0cf49d26529d58626947d.tar.gz
Back-patch recent changes to alter the order of -L flags inserted from
LDFLAGS versus those built into the Makefiles. This looks like it will fix several buildfarm failures in the back branches.
-rw-r--r--src/Makefile.shlib6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 4dd2ea6b55..1de2fbaf6f 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.72 2003/10/20 01:34:33 tgl Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.72.2.1 2005/07/17 04:06:04 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -65,6 +65,9 @@ LINK.static = $(AR) $(AROPT)
ifeq ($(enable_shared), yes)
+# Insert -L from LDFLAGS after any -L already present in SHLIB_LINK
+SHLIB_LINK := $(filter -L%, $(SHLIB_LINK)) $(filter -L%, $(LDFLAGS)) $(filter-out -L%, $(SHLIB_LINK))
+
# For each platform we support shared libraries on, set shlib to the
# name of the library, LINK.shared to the command to link the library,
# and adjust SHLIB_LINK if necessary.
@@ -207,7 +210,6 @@ ifeq ($(PORTNAME), beos)
SHLIB_LINK += -ltermcap -lstdc++.r4 -lbind -lsocket -L/boot/develop/lib/x86
endif
-SHLIB_LINK := $(filter -L%, $(LDFLAGS)) $(SHLIB_LINK)
ifeq ($(enable_rpath), yes)
SHLIB_LINK += $(rpath)
endif