diff options
| author | Heikki Linnakangas | 2024-02-28 11:10:51 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2024-02-28 11:17:23 +0000 |
| commit | 0b16bb8776bb834eb1ef8204ca95dd7667ab948b (patch) | |
| tree | a06173763fba46c78613abb5b9181a88d98148e1 /src/backend | |
| parent | bcdfa5f2e2f274caeed20b2f986012a9cb6a259c (diff) | |
Remove AIX support
There isn't a lot of user demand for AIX support, we have a bunch of
hacks to work around AIX-specific compiler bugs and idiosyncrasies,
and no one has stepped up to the plate to properly maintain it.
Remove support for AIX to get rid of that maintenance overhead. It's
still supported for stable versions.
The acute issue that triggered this decision was that after commit
8af2565248, the AIX buildfarm members have been hitting this
assertion:
TRAP: failed Assert("(uintptr_t) buffer == TYPEALIGN(PG_IO_ALIGN_SIZE, buffer)"), File: "md.c", Line: 472, PID: 2949728
Apperently the "pg_attribute_aligned(a)" attribute doesn't work on AIX
for values larger than PG_IO_ALIGN_SIZE, for a static const variable.
That could be worked around, but we decided to just drop the AIX support
instead.
Discussion: https://www.postgresql.org/message-id/20240224172345.32@rfd.leadboat.com
Reviewed-by: Andres Freund, Noah Misch, Thomas Munro
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/Makefile | 20 | ||||
| -rw-r--r-- | src/backend/meson.build | 15 | ||||
| -rwxr-xr-x | src/backend/port/aix/mkldexport.sh | 61 | ||||
| -rw-r--r-- | src/backend/utils/error/elog.c | 2 | ||||
| -rw-r--r-- | src/backend/utils/misc/ps_status.c | 4 |
5 files changed, 2 insertions, 100 deletions
diff --git a/src/backend/Makefile b/src/backend/Makefile index 7d2ea7d54a6..d66e2a4b9fa 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -62,14 +62,12 @@ all: submake-libpgport submake-catalog-headers submake-utils-headers postgres $( ifneq ($(PORTNAME), cygwin) ifneq ($(PORTNAME), win32) -ifneq ($(PORTNAME), aix) postgres: $(OBJS) $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LIBS) -o $@ endif endif -endif ifeq ($(PORTNAME), cygwin) @@ -96,24 +94,6 @@ libpostgres.a: postgres endif # win32 -ifeq ($(PORTNAME), aix) - -postgres: $(POSTGRES_IMP) - $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(LDFLAGS) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -Wl,-brtllib -o $@ - -# Linking to a single .o with -r is a lot faster than building a .a or passing -# all objects to MKLDEXPORT. -# -# It looks alluring to use $(CC) -r instead of ld -r, but that doesn't -# trivially work with gcc, due to gcc specific static libraries linked in with -# -r. -$(POSTGRES_IMP): $(OBJS) - ld -r -o SUBSYS.o $(call expand_subsys,$^) - $(MKLDEXPORT) SUBSYS.o . > $@ - @rm -f SUBSYS.o - -endif # aix - $(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport diff --git a/src/backend/meson.build b/src/backend/meson.build index 8767aaba678..436c04af080 100644 --- a/src/backend/meson.build +++ b/src/backend/meson.build @@ -91,21 +91,6 @@ if cc.get_id() == 'msvc' # be restricted to b_pch=true. backend_link_with += postgres_lib -elif host_system == 'aix' - # The '.' argument leads mkldexport.sh to emit "#! .", which refers to the - # main executable, allowing extension libraries to resolve their undefined - # symbols to symbols in the postgres binary. - postgres_imp = custom_target('postgres.imp', - command: [files('port/aix/mkldexport.sh'), '@INPUT@', '.'], - input: postgres_lib, - output: 'postgres.imp', - capture: true, - install: true, - install_dir: dir_lib, - build_by_default: false, - ) - backend_link_args += '-Wl,-bE:@0@'.format(postgres_imp.full_path()) - backend_link_depends += postgres_imp endif backend_input = [] diff --git a/src/backend/port/aix/mkldexport.sh b/src/backend/port/aix/mkldexport.sh deleted file mode 100755 index adf3793e868..00000000000 --- a/src/backend/port/aix/mkldexport.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -# -# mkldexport -# create an AIX exports file from an object file -# -# src/backend/port/aix/mkldexport.sh -# -# Usage: -# mkldexport objectfile [location] -# where -# objectfile is the current location of the object file. -# location is the eventual (installed) location of the -# object file (if different from the current -# working directory). -# -# [This file comes from the Postgres 4.2 distribution. - ay 7/95] -# -# Header: /usr/local/devel/postgres/src/tools/mkldexport/RCS/mkldexport.sh,v 1.2 1994/03/13 04:59:12 aoki Exp -# - -# setting this to nm -B might be better -# ... due to changes in AIX 4.x ... -# ... let us search in different directories - Gerhard Reithofer -if [ -x /usr/ucb/nm ] -then NM=/usr/ucb/nm -elif [ -x /usr/bin/nm ] -then NM=/usr/bin/nm -elif [ -x /usr/ccs/bin/nm ] -then NM=/usr/ccs/bin/nm -elif [ -x /usr/usg/bin/nm ] -then NM=/usr/usg/bin/nm -else echo "Fatal error: cannot find `nm' ... please check your installation." - exit 1 -fi - -CMDNAME=`basename $0` -if [ -z "$1" ]; then - echo "Usage: $CMDNAME object [location]" - exit 1 -fi -OBJNAME=`basename $1` -if [ "`basename $OBJNAME`" != "`basename $OBJNAME .o`" ]; then - OBJNAME=`basename $OBJNAME .o`.so -fi -if [ -z "$2" ]; then - echo '#!' -else - if [ "$2" = "." ]; then - # for the base executable (AIX 4.2 and up) - echo '#! .' - else - echo '#!' $2 - fi -fi -$NM -BCg $1 | \ - egrep ' [TDB] ' | \ - sed -e 's/.* //' | \ - egrep -v '\$' | \ - sed -e 's/^[.]//' | \ - sort | \ - uniq diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index bba00a0087f..c9719f358b6 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -911,9 +911,7 @@ errcode_for_file_access(void) /* Wrong object type or state */ case ENOTDIR: /* Not a directory */ case EISDIR: /* Is a directory */ -#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */ case ENOTEMPTY: /* Directory not empty */ -#endif edata->sqlerrcode = ERRCODE_WRONG_OBJECT_TYPE; break; diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c index 8f77f4b563a..ddb45a6bce8 100644 --- a/src/backend/utils/misc/ps_status.c +++ b/src/backend/utils/misc/ps_status.c @@ -52,7 +52,7 @@ bool update_process_title = DEFAULT_UPDATE_PROCESS_TITLE; #define PS_USE_SETPROCTITLE_FAST #elif defined(HAVE_SETPROCTITLE) #define PS_USE_SETPROCTITLE -#elif defined(__linux__) || defined(_AIX) || defined(__sun) || defined(__darwin__) +#elif defined(__linux__) || defined(__sun) || defined(__darwin__) #define PS_USE_CLOBBER_ARGV #elif defined(WIN32) #define PS_USE_WIN32 @@ -62,7 +62,7 @@ bool update_process_title = DEFAULT_UPDATE_PROCESS_TITLE; /* Different systems want the buffer padded differently */ -#if defined(_AIX) || defined(__linux__) || defined(__darwin__) +#if defined(__linux__) || defined(__darwin__) #define PS_PADDING '\0' #else #define PS_PADDING ' ' |
