Skip to content

Commit a7de22d

Browse files
committed
Clean up AIX build to avoid 'duplicate symbol' warnings, by moving use
of postgres.imp file into BE_DLLLIBS macro. This makes the AIX build work more like the Windows and Darwin builds, which have similar requirements to mention a backend library when linking shared libraries that will be dynamically loaded into the backend.
1 parent 1986ca5 commit a7de22d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/Makefile.shlib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.97 2005/08/08 03:35:13 tgl Exp $
9+
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.98 2005/10/28 17:32:22 tgl Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -309,7 +309,7 @@ else # PORTNAME == aix
309309
# AIX case
310310
$(shlib): lib$(NAME).a
311311
$(MKLDEXPORT) lib$(NAME).a > lib$(NAME)$(EXPSUFF)
312-
$(COMPILER) $(LDFLAGS_SL) -o $@ $< $(LDFLAGS) $(SHLIB_LINK) -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) -Wl,-bE:lib$(NAME)$(EXPSUFF)
312+
$(COMPILER) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $< -Wl,-bE:lib$(NAME)$(EXPSUFF) $(SHLIB_LINK)
313313

314314
endif # PORTNAME == aix
315315

src/makefiles/Makefile.aix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,18 @@ IMPSUFF= .imp
2121

2222
POSTGRES_IMP= postgres$(IMPSUFF)
2323

24+
ifdef PGXS
25+
BE_DLLLIBS= -Wl,-bI:$(DESTDIR)$(bindir)/postgres/$(POSTGRES_IMP)
26+
else
27+
BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
28+
endif
29+
2430
MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh
2531

2632
%$(EXPSUFF): %.o
2733
$(MKLDEXPORT) $*.o > $*$(EXPSUFF)
2834

2935
%$(DLSUFFIX): %.o %$(EXPSUFF)
30-
@echo Making shared library $@ from $*.o, $*$(EXPSUFF) and postgres.imp
31-
$(CC) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $*.o -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) -Wl,-bE:$*$(EXPSUFF) $(SHLIB_LINK)
36+
$(CC) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $*.o -Wl,-bE:$*$(EXPSUFF) $(SHLIB_LINK)
3237

3338
sqlmansect = 7

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy