66# Copyright (c) 1998, Regents of the University of California
77#
88# IDENTIFICATION
9- # $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.39 2001/02/10 16:25:10 momjian Exp $
9+ # $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.40 2001/02/10 16:26:38 momjian Exp $
1010#
1111#-------------------------------------------------------------------------
1212
@@ -112,7 +112,7 @@ endif
112112ifeq ($(PORTNAME), openbsd)
113113 shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
114114 ifdef ELF_SYSTEM
115- LINK.shared = $(COMPILER ) -shared -Wl,-x,- soname, $(soname)
115+ LINK.shared = $(LD ) -x -Bshareable - soname $(soname)
116116 else
117117 LINK.shared = $(LD) -x -Bshareable -Bforcearchive
118118 endif
@@ -121,7 +121,7 @@ endif
121121ifeq ($(PORTNAME), bsdi)
122122 shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
123123 ifeq ($(DLSUFFIX), .so)
124- LINK.shared = $(COMPILER ) -shared -Wl,- soname, $(soname)
124+ LINK.shared = $(LD ) -shared -soname $(soname)
125125 endif
126126 ifeq ($(DLSUFFIX), .o)
127127 LINK.shared = shlicc -O $(LDREL)
@@ -131,7 +131,7 @@ endif
131131ifeq ($(PORTNAME), freebsd)
132132 ifdef ELF_SYSTEM
133133 shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
134- LINK.shared = $(COMPILER ) -shared -Wl,-x,- soname, $(soname)
134+ LINK.shared = $(LD ) -x - shared -soname $(soname)
135135 else
136136 shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
137137 LINK.shared = $(LD) -x -Bshareable -Bforcearchive
@@ -165,12 +165,13 @@ endif
165165
166166ifeq ($(PORTNAME), solaris)
167167 shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
168+ LINK.shared = $(COMPILER) -G
168169 ifeq ($(with_gnu_ld), yes)
169- LINK.shared = $(COMPILER) -G -Wl,-soname,$(soname)
170+ LINK.shared += -Wl,-soname,$(soname)
170171 else
171- LINK.shared = $(COMPILER) -G -Wl,-h,$(soname)
172+ LINK.shared += -Wl,-h,$(soname)
172173 endif
173- SHLIB_LINK = $(COMPILER) -G -lm -lc
174+ SHLIB_LINK += -lm -lc
174175endif
175176
176177ifeq ($(PORTNAME), osf)
0 commit comments