Skip to content

Commit 7803d57

Browse files
committed
AIX: Link the postgres executable with -Wl,-brtllib.
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).
1 parent 6718f07 commit 7803d57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ endif # win32
9696
ifeq ($(PORTNAME), aix)
9797

9898
postgres: $(POSTGRES_IMP)
99-
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(call expand_subsys,$(OBJS)) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -o $@
99+
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(call expand_subsys,$(OBJS)) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -Wl,-brtllib -o $@
100100

101101
$(POSTGRES_IMP): $(OBJS)
102102
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(call expand_subsys,$^)

0 commit comments

Comments
 (0)