Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0016911

Browse files
committed
Fix unwanted side-effects of recent SHLIB_LINK -L patch on existing
hacking of SHLIB_LINK for HPUX.
1 parent 505b925 commit 0016911

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/Makefile.shlib

+9-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.94 2005/07/13 02:11:57 momjian Exp $
9+
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.95 2005/07/13 17:00:44 tgl Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -73,6 +73,9 @@ LINK.static = $(AR) $(AROPT)
7373

7474
ifeq ($(enable_shared), yes)
7575

76+
# Insert -L from LDFLAGS after any -L already present in SHLIB_LINK
77+
SHLIB_LINK := $(filter -L%, $(SHLIB_LINK)) $(filter -L%, $(LDFLAGS)) $(filter-out -L%, $(SHLIB_LINK))
78+
7679
# Default shlib naming convention used by the majority of platforms
7780
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
7881
shlib_major = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
@@ -150,9 +153,6 @@ endif
150153

151154
ifeq ($(PORTNAME), hpux)
152155
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
153-
ifeq ($(GCC), yes)
154-
SHLIB_LINK += `$(CC) $(LDFLAGS) -print-libgcc-file-name`
155-
endif
156156
ifeq ($(with_gnu_ld), yes)
157157
LINK.shared = $(CC) $(LDFLAGS) -shared -Wl,-h -Wl,$(soname)
158158
else
@@ -168,9 +168,13 @@ ifeq ($(PORTNAME), hpux)
168168
# ld can find the same libraries gcc does. Make sure it goes after any
169169
# -L switches provided explicitly.
170170
ifeq ($(GCC), yes)
171-
SHLIB_LINK += -L/usr/local/lib
171+
SHLIB_LINK := $(filter -L%, $(SHLIB_LINK)) -L/usr/local/lib $(filter-out -L%, $(SHLIB_LINK))
172172
endif
173173
endif
174+
# do this last so above filtering doesn't pull out -L switches in LDFLAGS
175+
ifeq ($(GCC), yes)
176+
SHLIB_LINK += `$(CC) $(LDFLAGS) -print-libgcc-file-name`
177+
endif
174178
endif
175179

176180
ifeq ($(PORTNAME), irix)
@@ -247,7 +251,6 @@ ifeq ($(PORTNAME), beos)
247251
SHLIB_LINK += -ltermcap -lstdc++.r4 -lbind -lsocket -L/boot/develop/lib/x86
248252
endif
249253

250-
SHLIB_LINK := $(filter -L%, $(SHLIB_LINK)) $(filter -L%, $(LDFLAGS)) $(filter-out -L%, $(SHLIB_LINK))
251254
ifeq ($(enable_rpath), yes)
252255
SHLIB_LINK += $(rpath)
253256
endif

0 commit comments

Comments
 (0)