From: Tom Lane Date: Sun, 17 Jul 2005 04:06:04 +0000 (+0000) Subject: Back-patch recent changes to alter the order of -L flags inserted from X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=e1f5c20cf42e1e882598bbfa1ea5d5b495dd88f2;p=users%2Fbernd%2Fpostgres.git 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. --- diff --git a/src/Makefile.shlib b/src/Makefile.shlib index 3cc0ec0b76..acc4b2d77e 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -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