]> granicus.if.org Git - postgresql/commitdiff
AIX: Link the postgres executable with -Wl,-brtllib.
authorNoah Misch <noah@leadboat.com>
Thu, 16 Jul 2015 01:00:26 +0000 (21:00 -0400)
committerNoah Misch <noah@leadboat.com>
Thu, 16 Jul 2015 01:00:31 +0000 (21:00 -0400)
This allows PostgreSQL modules and their dependencies to have undefined
symbols, resolved at runtime.  Perl module shared objects rely on that
in Perl 5.8.0 and later.  This fixes the crash when PL/PerlU loads such
modules, as the hstore_plperl test suite does.  Module authors can link
using -Wl,-G to permit undefined symbols; by default, linking will fail
as it has.  Back-patch to 9.0 (all supported versions).

src/backend/Makefile

index b31eb8cfe1f81d137bb98fd6fc955b0f0f04c15f..e53bd8787c0db85dbe56b3e5a8c76532b0ff3606 100644 (file)
@@ -96,7 +96,7 @@ endif # win32
 ifeq ($(PORTNAME), aix)
 
 postgres: $(POSTGRES_IMP)
-       $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(call expand_subsys,$(OBJS)) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -o $@
+       $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(call expand_subsys,$(OBJS)) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -Wl,-brtllib -o $@
 
 $(POSTGRES_IMP): $(OBJS)
        $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(call expand_subsys,$^)