From ad73df7c9779cdb7e68fccd78bf79f445ae7059f Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Sat, 6 Aug 2022 13:22:49 -0700
Subject: [PATCH 3/5] aix: Remove checks for very old OS versions

---
 src/makefiles/Makefile.aix | 14 ++------------
 src/template/aix           |  3 ---
 src/backend/Makefile       |  8 --------
 3 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
index 84f26b49b87..4cf2cc52d45 100644
--- a/src/makefiles/Makefile.aix
+++ b/src/makefiles/Makefile.aix
@@ -8,19 +8,9 @@ AROPT = crs
 # -blibpath must contain ALL directories where we should look for libraries
 libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib
 
-ifeq ($(host_os), aix3.2.5)
-	rpath = -L'$(rpathdir)'
-else
-	rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)'
-endif
+rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)'
 
-ifeq ($(host_os), aix3.2.5)
-ifneq ($(GCC), yes)
-	LDFLAGS_SL += -e _nostart -H512 -bM:SRE
-endif
-else
-	LDFLAGS_SL += -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE
-endif
+LDFLAGS_SL += -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE
 
 # env var name to use in place of LD_LIBRARY_PATH
 ld_library_path_var = LIBPATH
diff --git a/src/template/aix b/src/template/aix
index cec240d27b9..47fa8990a7c 100644
--- a/src/template/aix
+++ b/src/template/aix
@@ -6,9 +6,6 @@
 # non-default CFLAGS setting.
 if test "$GCC" != yes ; then
   case $host_os in
-    aix3.2.5 | aix4.1*)
-      CFLAGS="-O -qmaxmem=16384"
-      ;;
     *)
       CFLAGS="-O2 -qmaxmem=16384"
       ;;
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 953c80db5ab..7262861b12a 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -101,15 +101,7 @@ postgres: $(POSTGRES_IMP)
 
 $(POSTGRES_IMP): $(OBJS)
 	$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(call expand_subsys,$^)
-ifeq ($(host_os), aix3.2.5)
 	$(MKLDEXPORT) SUBSYS.o $(bindir)/postgres > $@
-else
-ifneq (,$(findstring aix4.1, $(host_os)))
-	$(MKLDEXPORT) SUBSYS.o $(bindir)/postgres > $@
-else
-	$(MKLDEXPORT) SUBSYS.o . > $@
-endif
-endif
 	@rm -f SUBSYS.o
 
 endif # aix
-- 
2.37.0.3.g30cc8d0f14

