Commit 4fa3741d authored by Tom Lane's avatar Tom Lane

Use -Bsymbolic for shared libraries on HP-UX and Solaris.

These platforms are also subject to the mis-linking problem addressed
in commit e3d77ea6.  It's not clear whether we could solve it with
a solution equivalent to GNU ld's version scripts, but -Bsymbolic
appears to fix it, so let's use that.

Like the previous commit, back-patch as far as v10.

Discussion: https://postgr.es/m/153626613985.23143.4743626885618266803@wrigleys.postgresql.org
parent 14ea3652
...@@ -198,12 +198,12 @@ ifeq ($(PORTNAME), hpux) ...@@ -198,12 +198,12 @@ ifeq ($(PORTNAME), hpux)
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
endif endif
ifeq ($(with_gnu_ld), yes) ifeq ($(with_gnu_ld), yes)
LINK.shared = $(CC) -shared LINK.shared = $(CC) -shared -Wl,-Bsymbolic
ifdef soname ifdef soname
LINK.shared += -Wl,-h -Wl,$(soname) LINK.shared += -Wl,-h -Wl,$(soname)
endif endif
else else
LINK.shared = $(LD) -b LINK.shared = $(LD) -b -Bsymbolic
ifdef soname ifdef soname
LINK.shared += +h $(soname) LINK.shared += +h $(soname)
endif endif
...@@ -240,9 +240,9 @@ endif ...@@ -240,9 +240,9 @@ endif
ifeq ($(PORTNAME), solaris) ifeq ($(PORTNAME), solaris)
ifeq ($(GCC), yes) ifeq ($(GCC), yes)
LINK.shared = $(COMPILER) -shared LINK.shared = $(COMPILER) -shared -Wl,-Bsymbolic
else else
LINK.shared = $(COMPILER) -G LINK.shared = $(COMPILER) -G -Bsymbolic
endif endif
ifdef soname ifdef soname
ifeq ($(with_gnu_ld), yes) ifeq ($(with_gnu_ld), yes)
......
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