6
6
# Copyright (c) 1998, Regents of the University of California
7
7
#
8
8
# IDENTIFICATION
9
- # $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.32 2000/11/04 16:35:54 petere Exp $
9
+ # $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.33 2000/11/08 20:18:49 petere Exp $
10
10
#
11
11
#-------------------------------------------------------------------------
12
12
97
97
override CXXFLAGS += $(CXXFLAGS_SL)
98
98
endif
99
99
100
+ soname = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
100
101
101
102
ifeq ($(PORTNAME), aix)
102
103
shlib := lib$(NAME)$(DLSUFFIX)
@@ -111,7 +112,7 @@ endif
111
112
ifeq ($(PORTNAME), openbsd)
112
113
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
113
114
ifdef ELF_SYSTEM
114
- LINK.shared = $(LD) -x -Bshareable -soname $(shlib )
115
+ LINK.shared = $(LD) -x -Bshareable -soname $(soname )
115
116
else
116
117
LINK.shared = $(LD) -x -Bshareable -Bforcearchive
117
118
endif
@@ -120,7 +121,7 @@ endif
120
121
ifeq ($(PORTNAME), bsdi)
121
122
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
122
123
ifeq ($(DLSUFFIX), .so)
123
- LINK.shared = $(LD) -shared -soname $(shlib )
124
+ LINK.shared = $(LD) -shared -soname $(soname )
124
125
endif
125
126
ifeq ($(DLSUFFIX), .o)
126
127
LINK.shared = shlicc -O $(LDREL)
@@ -130,18 +131,17 @@ endif
130
131
ifeq ($(PORTNAME), freebsd)
131
132
ifdef ELF_SYSTEM
132
133
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
133
- LINK.shared = $(LD) -x -shared -soname $(shlib )
134
+ LINK.shared = $(LD) -x -shared -soname $(soname )
134
135
else
135
136
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
136
137
LINK.shared = $(LD) -x -Bshareable -Bforcearchive
137
138
endif
138
139
endif
139
140
140
141
ifeq ($(PORTNAME), netbsd)
141
- soname := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
142
142
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
143
143
ifdef ELF_SYSTEM
144
- LINK.shared = $(COMPILER) -shared -Wl,-soname -Wl ,$(soname)
144
+ LINK.shared = $(COMPILER) -shared -Wl,-soname,$(soname)
145
145
else
146
146
LINK.shared = $(LD) -x -Bshareable -Bforcearchive
147
147
endif
@@ -160,12 +160,17 @@ endif
160
160
161
161
ifeq ($(PORTNAME), linux)
162
162
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
163
- LINK.shared = $(COMPILER) -shared -Wl,-soname,$(shlib )
163
+ LINK.shared = $(COMPILER) -shared -Wl,-soname,$(soname )
164
164
endif
165
165
166
166
ifeq ($(PORTNAME), solaris)
167
167
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
168
168
LINK.shared = $(COMPILER) -G
169
+ ifeq ($(with_gnu_ld), yes)
170
+ LINK.shared += -Wl,-soname,$(soname)
171
+ else
172
+ LINK.shared += -Wl,-h,$(soname)
173
+ endif
169
174
SHLIB_LINK += -ldl -lsocket -lresolv -lnsl -lm -lc
170
175
endif
171
176
@@ -199,7 +204,7 @@ ifeq ($(PORTNAME), unixware)
199
204
LINK.shared = $(CXX) -G
200
205
endif
201
206
endif
202
- LINK.shared += -Wl,-z,text
207
+ LINK.shared += -Wl,-z,text -Wl,-h,$(soname)
203
208
endif
204
209
205
210
ifeq ($(PORTNAME), win)
0 commit comments