mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX.
Per example from Dirk Pirschel.
This commit is contained in:
parent
d20901a39b
commit
6d4bcda38c
@ -6,7 +6,7 @@
|
|||||||
# Copyright (c) 1998, Regents of the University of California
|
# Copyright (c) 1998, Regents of the University of California
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.98 2005/10/28 17:32:22 tgl Exp $
|
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.99 2005/12/03 20:16:31 tgl Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -76,6 +76,9 @@ ifeq ($(enable_shared), yes)
|
|||||||
# Insert -L from LDFLAGS after any -L already present in SHLIB_LINK
|
# Insert -L from LDFLAGS after any -L already present in SHLIB_LINK
|
||||||
SHLIB_LINK := $(filter -L%, $(SHLIB_LINK)) $(filter -L%, $(LDFLAGS)) $(filter-out -L%, $(SHLIB_LINK))
|
SHLIB_LINK := $(filter -L%, $(SHLIB_LINK)) $(filter -L%, $(LDFLAGS)) $(filter-out -L%, $(SHLIB_LINK))
|
||||||
|
|
||||||
|
# Need a -L-free version of LDFLAGS to use in combination with SHLIB_LINK
|
||||||
|
LDFLAGS_NO_L := $(filter-out -L%, $(LDFLAGS))
|
||||||
|
|
||||||
# Default shlib naming convention used by the majority of platforms
|
# Default shlib naming convention used by the majority of platforms
|
||||||
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
|
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
|
||||||
shlib_major = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
|
shlib_major = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
|
||||||
@ -154,7 +157,7 @@ endif
|
|||||||
ifeq ($(PORTNAME), hpux)
|
ifeq ($(PORTNAME), hpux)
|
||||||
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
|
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
|
||||||
ifeq ($(with_gnu_ld), yes)
|
ifeq ($(with_gnu_ld), yes)
|
||||||
LINK.shared = $(CC) $(LDFLAGS) -shared -Wl,-h -Wl,$(soname)
|
LINK.shared = $(CC) $(LDFLAGS_NO_L) -shared -Wl,-h -Wl,$(soname)
|
||||||
else
|
else
|
||||||
# can't use the CC-syntax rpath pattern here
|
# can't use the CC-syntax rpath pattern here
|
||||||
rpath =
|
rpath =
|
||||||
@ -309,7 +312,7 @@ else # PORTNAME == aix
|
|||||||
# AIX case
|
# AIX case
|
||||||
$(shlib): lib$(NAME).a
|
$(shlib): lib$(NAME).a
|
||||||
$(MKLDEXPORT) lib$(NAME).a > lib$(NAME)$(EXPSUFF)
|
$(MKLDEXPORT) lib$(NAME).a > lib$(NAME)$(EXPSUFF)
|
||||||
$(COMPILER) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $< -Wl,-bE:lib$(NAME)$(EXPSUFF) $(SHLIB_LINK)
|
$(COMPILER) $(LDFLAGS_NO_L) $(LDFLAGS_SL) -o $@ $< -Wl,-bE:lib$(NAME)$(EXPSUFF) $(SHLIB_LINK)
|
||||||
|
|
||||||
endif # PORTNAME == aix
|
endif # PORTNAME == aix
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user