mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
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
This commit is contained in:
@@ -106,20 +106,6 @@ ifdef SO_MAJOR_VERSION
|
||||
override CPPFLAGS += -DSO_MAJOR_VERSION=$(SO_MAJOR_VERSION)
|
||||
endif
|
||||
|
||||
ifeq ($(PORTNAME), aix)
|
||||
LINK.shared = $(COMPILER)
|
||||
ifdef SO_MAJOR_VERSION
|
||||
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
|
||||
endif
|
||||
haslibarule = yes
|
||||
# $(exports_file) is also usable as an import file
|
||||
exports_file = lib$(NAME).exp
|
||||
BUILD.exports = ( echo '\#! $(shlib)'; $(AWK) '/^[^\#]/ {printf "%s\n",$$1}' $< ) > $@
|
||||
ifneq (,$(SHLIB_EXPORTS))
|
||||
LINK.shared += -Wl,-bE:$(exports_file)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PORTNAME), darwin)
|
||||
ifdef soname
|
||||
# linkable library
|
||||
@@ -268,14 +254,6 @@ $(stlib): $(OBJS) | $(SHLIB_PREREQS)
|
||||
touch $@
|
||||
endif #haslibarule
|
||||
|
||||
# AIX wraps shared libraries inside a static library, can be used both
|
||||
# for static and shared linking
|
||||
ifeq ($(PORTNAME), aix)
|
||||
$(stlib): $(shlib)
|
||||
rm -f $(stlib)
|
||||
$(AR) $(AROPT) $(stlib) $(shlib)
|
||||
endif # aix
|
||||
|
||||
ifeq (,$(filter cygwin win32,$(PORTNAME)))
|
||||
|
||||
# Normal case
|
||||
@@ -289,11 +267,8 @@ ifneq ($(shlib), $(shlib_major))
|
||||
endif
|
||||
# Make sure we have a link to a name without any version numbers
|
||||
ifneq ($(shlib), $(shlib_bare))
|
||||
# except on AIX, where that's not a thing
|
||||
ifneq ($(PORTNAME), aix)
|
||||
rm -f $(shlib_bare)
|
||||
$(LN_S) $(shlib) $(shlib_bare)
|
||||
endif # aix
|
||||
endif # shlib_bare
|
||||
endif # shlib_major
|
||||
|
||||
@@ -401,9 +376,6 @@ install-lib-static: $(stlib) installdirs-lib
|
||||
|
||||
install-lib-shared: $(shlib) installdirs-lib
|
||||
ifdef soname
|
||||
# we don't install $(shlib) on AIX
|
||||
# (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at)
|
||||
ifneq ($(PORTNAME), aix)
|
||||
$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
|
||||
ifneq ($(PORTNAME), cygwin)
|
||||
ifneq ($(PORTNAME), win32)
|
||||
@@ -419,7 +391,6 @@ ifneq ($(shlib), $(shlib_bare))
|
||||
endif
|
||||
endif # not win32
|
||||
endif # not cygwin
|
||||
endif # not aix
|
||||
ifneq (,$(findstring $(PORTNAME),win32 cygwin))
|
||||
$(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)'
|
||||
endif
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 ' '
|
||||
|
||||
@@ -401,8 +401,7 @@ SKIP:
|
||||
{
|
||||
my $tar = $ENV{TAR};
|
||||
# don't check for a working tar here, to accommodate various odd
|
||||
# cases such as AIX. If tar doesn't work the init_from_backup below
|
||||
# will fail.
|
||||
# cases. If tar doesn't work the init_from_backup below will fail.
|
||||
skip "no tar program available", 1
|
||||
if (!defined $tar || $tar eq '');
|
||||
|
||||
|
||||
@@ -104,8 +104,7 @@ for my $tc (@test_configuration)
|
||||
{
|
||||
my $tar = $ENV{TAR};
|
||||
# don't check for a working tar here, to accommodate various odd
|
||||
# cases such as AIX. If tar doesn't work the init_from_backup below
|
||||
# will fail.
|
||||
# cases. If tar doesn't work the init_from_backup below will fail.
|
||||
skip "no tar program available", 1
|
||||
if (!defined $tar || $tar eq '');
|
||||
|
||||
|
||||
@@ -134,8 +134,7 @@ for my $tc (@test_configuration)
|
||||
{
|
||||
my $tar = $ENV{TAR};
|
||||
# don't check for a working tar here, to accommodate various odd
|
||||
# cases such as AIX. If tar doesn't work the init_from_backup below
|
||||
# will fail.
|
||||
# cases. If tar doesn't work the init_from_backup below will fail.
|
||||
skip "no tar program available", 1
|
||||
if (!defined $tar || $tar eq '');
|
||||
|
||||
|
||||
@@ -105,8 +105,6 @@
|
||||
* GCC: https://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html
|
||||
* Clang: https://clang.llvm.org/docs/AttributeReference.html
|
||||
* Sunpro: https://docs.oracle.com/cd/E18659_01/html/821-1384/gjzke.html
|
||||
* XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/function_attributes.html
|
||||
* XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/type_attrib.html
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -171,8 +169,8 @@
|
||||
#define PG_USED_FOR_ASSERTS_ONLY pg_attribute_unused()
|
||||
#endif
|
||||
|
||||
/* GCC and XLC support format attributes */
|
||||
#if defined(__GNUC__) || defined(__IBMC__)
|
||||
/* GCC supports format attributes */
|
||||
#if defined(__GNUC__)
|
||||
#define pg_attribute_format_arg(a) __attribute__((format_arg(a)))
|
||||
#define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE, f, a)))
|
||||
#else
|
||||
@@ -180,8 +178,8 @@
|
||||
#define pg_attribute_printf(f,a)
|
||||
#endif
|
||||
|
||||
/* GCC, Sunpro and XLC support aligned, packed and noreturn */
|
||||
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
|
||||
/* GCC and Sunpro support aligned, packed and noreturn */
|
||||
#if defined(__GNUC__) || defined(__SUNPRO_C)
|
||||
#define pg_attribute_aligned(a) __attribute__((aligned(a)))
|
||||
#define pg_attribute_noreturn() __attribute__((noreturn))
|
||||
#define pg_attribute_packed() __attribute__((packed))
|
||||
@@ -212,8 +210,8 @@
|
||||
* choose not to. But, if possible, don't force inlining in unoptimized
|
||||
* debug builds.
|
||||
*/
|
||||
#if (defined(__GNUC__) && __GNUC__ > 3 && defined(__OPTIMIZE__)) || defined(__SUNPRO_C) || defined(__IBMC__)
|
||||
/* GCC > 3, Sunpro and XLC support always_inline via __attribute__ */
|
||||
#if (defined(__GNUC__) && __GNUC__ > 3 && defined(__OPTIMIZE__)) || defined(__SUNPRO_C)
|
||||
/* GCC > 3 and Sunpro support always_inline via __attribute__ */
|
||||
#define pg_attribute_always_inline __attribute__((always_inline)) inline
|
||||
#elif defined(_MSC_VER)
|
||||
/* MSVC has a special keyword for this */
|
||||
@@ -229,8 +227,8 @@
|
||||
* for proper cost attribution. Note that unlike the pg_attribute_XXX macros
|
||||
* above, this should be placed before the function's return type and name.
|
||||
*/
|
||||
/* GCC, Sunpro and XLC support noinline via __attribute__ */
|
||||
#if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C) || defined(__IBMC__)
|
||||
/* GCC and Sunpro support noinline via __attribute__ */
|
||||
#if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C)
|
||||
#define pg_noinline __attribute__((noinline))
|
||||
/* msvc via declspec */
|
||||
#elif defined(_MSC_VER)
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
* src/include/port/aix.h
|
||||
*/
|
||||
#define CLASS_CONFLICT
|
||||
#define DISABLE_XOPEN_NLS
|
||||
|
||||
/*
|
||||
* "IBM XL C/C++ for AIX, V12.1" miscompiles, for 32-bit, some inline
|
||||
* expansions of ginCompareItemPointers() "long long" arithmetic. To take
|
||||
* advantage of inlining, build a 64-bit PostgreSQL.
|
||||
*/
|
||||
#if defined(__ILP32__) && defined(__IBMC__)
|
||||
#define PG_FORCE_DISABLE_INLINE
|
||||
#endif
|
||||
@@ -84,11 +84,9 @@
|
||||
* using compiler intrinsics are a good idea.
|
||||
*/
|
||||
/*
|
||||
* gcc or compatible, including clang and icc. Exclude xlc. The ppc64le "IBM
|
||||
* XL C/C++ for Linux, V13.1.2" emulates gcc, but __sync_lock_test_and_set()
|
||||
* of one-byte types elicits SIGSEGV. That bug was gone by V13.1.5 (2016-12).
|
||||
* gcc or compatible, including clang and icc.
|
||||
*/
|
||||
#if (defined(__GNUC__) || defined(__INTEL_COMPILER)) && !(defined(__IBMC__) || defined(__IBMCPP__))
|
||||
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
|
||||
#include "port/atomics/generic-gcc.h"
|
||||
#elif defined(_MSC_VER)
|
||||
#include "port/atomics/generic-msvc.h"
|
||||
|
||||
@@ -414,12 +414,6 @@ typedef unsigned int slock_t;
|
||||
* an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.
|
||||
* But if the spinlock is in ordinary memory, we can use lwsync instead for
|
||||
* better performance.
|
||||
*
|
||||
* Ordinarily, we'd code the branches here using GNU-style local symbols, that
|
||||
* is "1f" referencing "1:" and so on. But some people run gcc on AIX with
|
||||
* IBM's assembler as backend, and IBM's assembler doesn't do local symbols.
|
||||
* So hand-code the branch offsets; fortunately, all PPC instructions are
|
||||
* exactly 4 bytes each, so it's not too hard to count.
|
||||
*/
|
||||
static __inline__ int
|
||||
tas(volatile slock_t *lock)
|
||||
@@ -430,15 +424,17 @@ tas(volatile slock_t *lock)
|
||||
__asm__ __volatile__(
|
||||
" lwarx %0,0,%3,1 \n"
|
||||
" cmpwi %0,0 \n"
|
||||
" bne $+16 \n" /* branch to li %1,1 */
|
||||
" bne 1f \n"
|
||||
" addi %0,%0,1 \n"
|
||||
" stwcx. %0,0,%3 \n"
|
||||
" beq $+12 \n" /* branch to lwsync */
|
||||
" beq 2f \n"
|
||||
"1: \n"
|
||||
" li %1,1 \n"
|
||||
" b $+12 \n" /* branch to end of asm sequence */
|
||||
" b 3f \n"
|
||||
"2: \n"
|
||||
" lwsync \n"
|
||||
" li %1,0 \n"
|
||||
|
||||
"3: \n"
|
||||
: "=&b"(_t), "=r"(_res), "+m"(*lock)
|
||||
: "r"(lock)
|
||||
: "memory", "cc");
|
||||
@@ -666,21 +662,6 @@ tas(volatile slock_t *lock)
|
||||
|
||||
#if !defined(HAS_TEST_AND_SET) /* We didn't trigger above, let's try here */
|
||||
|
||||
#if defined(_AIX) /* AIX */
|
||||
/*
|
||||
* AIX (POWER)
|
||||
*/
|
||||
#define HAS_TEST_AND_SET
|
||||
|
||||
#include <sys/atomic_op.h>
|
||||
|
||||
typedef int slock_t;
|
||||
|
||||
#define TAS(lock) _check_lock((slock_t *) (lock), 0, 1)
|
||||
#define S_UNLOCK(lock) _clear_lock((slock_t *) (lock), 0)
|
||||
#endif /* _AIX */
|
||||
|
||||
|
||||
/* These are in sunstudio_(sparc|x86).s */
|
||||
|
||||
#if defined(__SUNPRO_C) && (defined(__i386) || defined(__x86_64__) || defined(__sparc__) || defined(__sparc))
|
||||
|
||||
@@ -114,7 +114,7 @@ backend_src = $(top_srcdir)/src/backend
|
||||
# coding rule.
|
||||
libpq-refs-stamp: $(shlib)
|
||||
ifneq ($(enable_coverage), yes)
|
||||
ifeq (,$(filter aix solaris,$(PORTNAME)))
|
||||
ifeq (,$(filter solaris,$(PORTNAME)))
|
||||
@if nm -A -u $< 2>/dev/null | grep -v -e __cxa_atexit -e __tsan_func_exit | grep exit; then \
|
||||
echo 'libpq must not be calling any function which invokes exit'; exit 1; \
|
||||
fi
|
||||
|
||||
@@ -54,9 +54,8 @@ libpq_c_args = ['-DSO_MAJOR_VERSION=5']
|
||||
# libpq_st, and {pgport,common}_shlib for libpq_sh
|
||||
#
|
||||
# We could try to avoid building the source files twice, but it probably adds
|
||||
# more complexity than its worth (AIX doesn't support link_whole yet, reusing
|
||||
# object files requires also linking to the library on windows or breaks
|
||||
# precompiled headers).
|
||||
# more complexity than its worth (reusing object files requires also linking
|
||||
# to the library on windows or breaks precompiled headers).
|
||||
libpq_st = static_library('libpq',
|
||||
libpq_sources,
|
||||
include_directories: [libpq_inc],
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# MAKE_EXPORTS is required for svr4 loaders that want a file of
|
||||
# symbol names to tell them what to export/import.
|
||||
MAKE_EXPORTS= true
|
||||
|
||||
# -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
|
||||
|
||||
# when building with gcc, need to make sure that libgcc can be found
|
||||
ifeq ($(GCC), yes)
|
||||
libpath := $(libpath):$(dir $(shell gcc -print-libgcc-file-name))
|
||||
endif
|
||||
|
||||
rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)'
|
||||
|
||||
LDFLAGS_SL += -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE
|
||||
|
||||
# gcc needs to know it's building a shared lib, otherwise it'll not emit
|
||||
# correct code / link to the right support libraries
|
||||
ifeq ($(GCC), yes)
|
||||
LDFLAGS_SL += -shared
|
||||
endif
|
||||
|
||||
# env var name to use in place of LD_LIBRARY_PATH
|
||||
ld_library_path_var = LIBPATH
|
||||
|
||||
|
||||
POSTGRES_IMP= postgres.imp
|
||||
|
||||
ifdef PGXS
|
||||
BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP)
|
||||
else
|
||||
BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
|
||||
endif
|
||||
|
||||
MKLDEXPORT_DIR=src/backend/port/aix
|
||||
MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh
|
||||
|
||||
%$(DLSUFFIX): %.o
|
||||
$(CC) $(CFLAGS) $*.o $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(BE_DLLLIBS)
|
||||
@@ -28,5 +28,5 @@ applications.
|
||||
from libpgport are linked first. This avoids having applications
|
||||
dependent on symbols that are _used_ by libpq, but not intended to be
|
||||
exported by libpq. libpq's libpgport usage changes over time, so such a
|
||||
dependency is a problem. Windows, Linux, AIX, and macOS use an export
|
||||
dependency is a problem. Windows, Linux, and macOS use an export
|
||||
list to control the symbols exported by libpq.
|
||||
|
||||
@@ -214,10 +214,8 @@ get_errno_symbol(int errnum)
|
||||
return "ENOTCONN";
|
||||
case ENOTDIR:
|
||||
return "ENOTDIR";
|
||||
#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
|
||||
case ENOTEMPTY:
|
||||
return "ENOTEMPTY";
|
||||
#endif
|
||||
case ENOTSOCK:
|
||||
return "ENOTSOCK";
|
||||
#ifdef ENOTSUP
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
# src/template/aix
|
||||
|
||||
# Set default options if using xlc. This formerly included -qsrcmsg, but that
|
||||
# option elicits internal compiler errors from xlc v16.1.0. Note: configure
|
||||
# will add -qnoansialias if the compiler accepts it, even if user specifies a
|
||||
# non-default CFLAGS setting.
|
||||
if test "$GCC" != yes ; then
|
||||
case $host_os in
|
||||
*)
|
||||
CFLAGS="-O2 -qmaxmem=16384"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Due to a compiler bug, see 20171013023536.GA492146@rfd.leadboat.com for details,
|
||||
# force restrict not to be used when compiling with xlc.
|
||||
FORCE_DISABLE_RESTRICT=yes
|
||||
fi
|
||||
|
||||
# Extra CFLAGS for code that will go into a shared library
|
||||
CFLAGS_SL=""
|
||||
|
||||
# Native memset() is faster, tested on:
|
||||
# AIX 5.1 and 5.2, XLC 6.0 (IBM's cc)
|
||||
# AIX 5.3 ML3, gcc 4.0.1
|
||||
MEMSET_LOOP_LIMIT=0
|
||||
@@ -7,11 +7,6 @@
|
||||
# GNU make uses a make file named "GNUmakefile" in preference to "Makefile"
|
||||
# if it exists. Postgres is shipped with a "GNUmakefile".
|
||||
|
||||
|
||||
# AIX make defaults to building *every* target of the first rule. Start with
|
||||
# a single-target, empty rule to make the other targets non-default.
|
||||
all:
|
||||
|
||||
all install clean check installcheck:
|
||||
@echo "You must use GNU make to use Postgres. It may be installed"
|
||||
@echo "on your system with the name 'gmake'."
|
||||
|
||||
@@ -25,32 +25,3 @@ SELECT relname, relkind
|
||||
---------+---------
|
||||
(0 rows)
|
||||
|
||||
--
|
||||
-- When ALIGNOF_DOUBLE==4 (e.g. AIX), the C ABI may impose 8-byte alignment on
|
||||
-- some of the C types that correspond to TYPALIGN_DOUBLE SQL types. To ensure
|
||||
-- catalog C struct layout matches catalog tuple layout, arrange for the tuple
|
||||
-- offset of each fixed-width, attalign='d' catalog column to be divisible by 8
|
||||
-- unconditionally. Keep such columns before the first NameData column of the
|
||||
-- catalog, since packagers can override NAMEDATALEN to an odd number.
|
||||
--
|
||||
WITH check_columns AS (
|
||||
SELECT relname, attname,
|
||||
array(
|
||||
SELECT t.oid
|
||||
FROM pg_type t JOIN pg_attribute pa ON t.oid = pa.atttypid
|
||||
WHERE pa.attrelid = a.attrelid AND
|
||||
pa.attnum > 0 AND pa.attnum < a.attnum
|
||||
ORDER BY pa.attnum) AS coltypes
|
||||
FROM pg_attribute a JOIN pg_class c ON c.oid = attrelid
|
||||
JOIN pg_namespace n ON c.relnamespace = n.oid
|
||||
WHERE attalign = 'd' AND relkind = 'r' AND
|
||||
attnotnull AND attlen <> -1 AND n.nspname = 'pg_catalog'
|
||||
)
|
||||
SELECT relname, attname, coltypes, get_columns_length(coltypes)
|
||||
FROM check_columns
|
||||
WHERE get_columns_length(coltypes) % 8 != 0 OR
|
||||
'name'::regtype::oid = ANY(coltypes);
|
||||
relname | attname | coltypes | get_columns_length
|
||||
---------+---------+----------+--------------------
|
||||
(0 rows)
|
||||
|
||||
|
||||
@@ -19,29 +19,3 @@ SELECT relname, relkind
|
||||
FROM pg_class
|
||||
WHERE relkind IN ('v', 'c', 'f', 'p', 'I')
|
||||
AND relfilenode <> 0;
|
||||
|
||||
--
|
||||
-- When ALIGNOF_DOUBLE==4 (e.g. AIX), the C ABI may impose 8-byte alignment on
|
||||
-- some of the C types that correspond to TYPALIGN_DOUBLE SQL types. To ensure
|
||||
-- catalog C struct layout matches catalog tuple layout, arrange for the tuple
|
||||
-- offset of each fixed-width, attalign='d' catalog column to be divisible by 8
|
||||
-- unconditionally. Keep such columns before the first NameData column of the
|
||||
-- catalog, since packagers can override NAMEDATALEN to an odd number.
|
||||
--
|
||||
WITH check_columns AS (
|
||||
SELECT relname, attname,
|
||||
array(
|
||||
SELECT t.oid
|
||||
FROM pg_type t JOIN pg_attribute pa ON t.oid = pa.atttypid
|
||||
WHERE pa.attrelid = a.attrelid AND
|
||||
pa.attnum > 0 AND pa.attnum < a.attnum
|
||||
ORDER BY pa.attnum) AS coltypes
|
||||
FROM pg_attribute a JOIN pg_class c ON c.oid = attrelid
|
||||
JOIN pg_namespace n ON c.relnamespace = n.oid
|
||||
WHERE attalign = 'd' AND relkind = 'r' AND
|
||||
attnotnull AND attlen <> -1 AND n.nspname = 'pg_catalog'
|
||||
)
|
||||
SELECT relname, attname, coltypes, get_columns_length(coltypes)
|
||||
FROM check_columns
|
||||
WHERE get_columns_length(coltypes) % 8 != 0 OR
|
||||
'name'::regtype::oid = ANY(coltypes);
|
||||
|
||||
@@ -16,12 +16,11 @@ GetOptions(
|
||||
'input:s' => \$input,
|
||||
'output:s' => \$output) or die "wrong arguments";
|
||||
|
||||
if (not( $format eq 'aix'
|
||||
or $format eq 'darwin'
|
||||
if (not( $format eq 'darwin'
|
||||
or $format eq 'gnu'
|
||||
or $format eq 'win'))
|
||||
{
|
||||
die "$0: $format is not yet handled (only aix, darwin, gnu, win are)\n";
|
||||
die "$0: $format is not yet handled (only darwin, gnu, win are)\n";
|
||||
}
|
||||
|
||||
open(my $input_handle, '<', $input)
|
||||
@@ -56,11 +55,7 @@ while (<$input_handle>)
|
||||
}
|
||||
elsif (/^(\S+)\s+(\S+)/)
|
||||
{
|
||||
if ($format eq 'aix')
|
||||
{
|
||||
print $output_handle "$1\n";
|
||||
}
|
||||
elsif ($format eq 'darwin')
|
||||
if ($format eq 'darwin')
|
||||
{
|
||||
print $output_handle "_$1\n";
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ do
|
||||
|
||||
# These files are platform-specific, and c.h will include the
|
||||
# one that's relevant for our current platform anyway.
|
||||
test "$f" = src/include/port/aix.h && continue
|
||||
test "$f" = src/include/port/cygwin.h && continue
|
||||
test "$f" = src/include/port/darwin.h && continue
|
||||
test "$f" = src/include/port/freebsd.h && continue
|
||||
|
||||
@@ -57,7 +57,6 @@ do
|
||||
|
||||
# These files are platform-specific, and c.h will include the
|
||||
# one that's relevant for our current platform anyway.
|
||||
test "$f" = src/include/port/aix.h && continue
|
||||
test "$f" = src/include/port/cygwin.h && continue
|
||||
test "$f" = src/include/port/darwin.h && continue
|
||||
test "$f" = src/include/port/freebsd.h && continue
|
||||
|
||||
Reference in New Issue
Block a user