Commit 0225d1f0 authored by Peter Eisentraut's avatar Peter Eisentraut

Fix 'soname's for various platforms, so that libpq.so.2.0 is considered

compatible with libpq.so.2.1, etc.
parent ac27a5b4
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California # Copyright (c) 1998, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.32 2000/11/04 16:35:54 petere Exp $ # $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.33 2000/11/08 20:18:49 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -97,6 +97,7 @@ else ...@@ -97,6 +97,7 @@ else
override CXXFLAGS += $(CXXFLAGS_SL) override CXXFLAGS += $(CXXFLAGS_SL)
endif endif
soname = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
ifeq ($(PORTNAME), aix) ifeq ($(PORTNAME), aix)
shlib := lib$(NAME)$(DLSUFFIX) shlib := lib$(NAME)$(DLSUFFIX)
...@@ -111,7 +112,7 @@ endif ...@@ -111,7 +112,7 @@ endif
ifeq ($(PORTNAME), openbsd) ifeq ($(PORTNAME), openbsd)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
LINK.shared = $(LD) -x -Bshareable -soname $(shlib) LINK.shared = $(LD) -x -Bshareable -soname $(soname)
else else
LINK.shared = $(LD) -x -Bshareable -Bforcearchive LINK.shared = $(LD) -x -Bshareable -Bforcearchive
endif endif
...@@ -120,7 +121,7 @@ endif ...@@ -120,7 +121,7 @@ endif
ifeq ($(PORTNAME), bsdi) ifeq ($(PORTNAME), bsdi)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
ifeq ($(DLSUFFIX), .so) ifeq ($(DLSUFFIX), .so)
LINK.shared = $(LD) -shared -soname $(shlib) LINK.shared = $(LD) -shared -soname $(soname)
endif endif
ifeq ($(DLSUFFIX), .o) ifeq ($(DLSUFFIX), .o)
LINK.shared = shlicc -O $(LDREL) LINK.shared = shlicc -O $(LDREL)
...@@ -130,7 +131,7 @@ endif ...@@ -130,7 +131,7 @@ endif
ifeq ($(PORTNAME), freebsd) ifeq ($(PORTNAME), freebsd)
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
LINK.shared = $(LD) -x -shared -soname $(shlib) LINK.shared = $(LD) -x -shared -soname $(soname)
else else
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LINK.shared = $(LD) -x -Bshareable -Bforcearchive LINK.shared = $(LD) -x -Bshareable -Bforcearchive
...@@ -138,10 +139,9 @@ ifeq ($(PORTNAME), freebsd) ...@@ -138,10 +139,9 @@ ifeq ($(PORTNAME), freebsd)
endif endif
ifeq ($(PORTNAME), netbsd) ifeq ($(PORTNAME), netbsd)
soname := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
ifdef ELF_SYSTEM ifdef ELF_SYSTEM
LINK.shared = $(COMPILER) -shared -Wl,-soname -Wl,$(soname) LINK.shared = $(COMPILER) -shared -Wl,-soname,$(soname)
else else
LINK.shared = $(LD) -x -Bshareable -Bforcearchive LINK.shared = $(LD) -x -Bshareable -Bforcearchive
endif endif
...@@ -160,12 +160,17 @@ endif ...@@ -160,12 +160,17 @@ endif
ifeq ($(PORTNAME), linux) ifeq ($(PORTNAME), linux)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LINK.shared = $(COMPILER) -shared -Wl,-soname,$(shlib) LINK.shared = $(COMPILER) -shared -Wl,-soname,$(soname)
endif endif
ifeq ($(PORTNAME), solaris) ifeq ($(PORTNAME), solaris)
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LINK.shared = $(COMPILER) -G LINK.shared = $(COMPILER) -G
ifeq ($(with_gnu_ld), yes)
LINK.shared += -Wl,-soname,$(soname)
else
LINK.shared += -Wl,-h,$(soname)
endif
SHLIB_LINK += -ldl -lsocket -lresolv -lnsl -lm -lc SHLIB_LINK += -ldl -lsocket -lresolv -lnsl -lm -lc
endif endif
...@@ -199,7 +204,7 @@ ifeq ($(PORTNAME), unixware) ...@@ -199,7 +204,7 @@ ifeq ($(PORTNAME), unixware)
LINK.shared = $(CXX) -G LINK.shared = $(CXX) -G
endif endif
endif endif
LINK.shared += -Wl,-z,text LINK.shared += -Wl,-z,text -Wl,-h,$(soname)
endif endif
ifeq ($(PORTNAME), win) ifeq ($(PORTNAME), win)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment