mirror of https://github.com/postgres/postgres
HP-UX hardware is no longer produced, build farm coverage recently ended, and there are no known active maintainers targeting this OS. Since there is a major rewrite of the build system in the pipeline for PostgreSQL 16, and that requires development, testing and maintainance for each OS and tool chain, it seems like a good time to drop support for: * HP-UX, the operating system. * HP aCC, the HP-UX native compiler. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com> Discussion: https://postgr.es/m/1415825.1656893299%40sss.pgh.pa.uspull/92/head
parent
3c633f32b9
commit
9db300ce6e
@ -1,40 +0,0 @@ |
|||||||
/* |
|
||||||
* tas() for HPPA. |
|
||||||
* |
|
||||||
* To generate tas.s using this template: |
|
||||||
* 1. cc +O2 -S -c tas.c |
|
||||||
* 2. edit tas.s: |
|
||||||
* - replace the LDW with LDCWX |
|
||||||
* 3. install as src/backend/port/tas/hpux_hppa.s. |
|
||||||
* |
|
||||||
* For details about the LDCWX instruction, see the "Precision |
|
||||||
* Architecture and Instruction Reference Manual" (09740-90014 of June |
|
||||||
* 1987), p. 5-38. |
|
||||||
*/ |
|
||||||
|
|
||||||
int |
|
||||||
tas(lock) |
|
||||||
int *lock; /* LDCWX is a word instruction */ |
|
||||||
{ |
|
||||||
/* |
|
||||||
* LDCWX requires that we align the "semaphore" to a 16-byte |
|
||||||
* boundary. The actual datum is a single word (4 bytes). |
|
||||||
*/ |
|
||||||
lock = ((uintptr_t) lock + 15) & ~15; |
|
||||||
|
|
||||||
/* |
|
||||||
* The LDCWX instruction atomically clears the target word and |
|
||||||
* returns the previous value. Hence, if the instruction returns |
|
||||||
* 0, someone else has already acquired the lock before we tested |
|
||||||
* it (i.e., we have failed). |
|
||||||
* |
|
||||||
* Notice that this means that we actually clear the word to set |
|
||||||
* the lock and set the word to clear the lock. This is the |
|
||||||
* opposite behavior from the SPARC LDSTUB instruction. For some |
|
||||||
* reason everything that H-P does is rather baroque... |
|
||||||
*/ |
|
||||||
if (*lock) { /* this generates the LDW */ |
|
||||||
return(0); /* success */ |
|
||||||
} |
|
||||||
return(1); /* failure */ |
|
||||||
} |
|
@ -1,28 +0,0 @@ |
|||||||
|
|
||||||
.SPACE $TEXT$,SORT=8 |
|
||||||
.SUBSPA $CODE$,QUAD=0,ALIGN=4,ACCESS=44,CODE_ONLY,SORT=24 |
|
||||||
tas |
|
||||||
.PROC |
|
||||||
.CALLINFO CALLER,FRAME=0,ENTRY_SR=3 |
|
||||||
.ENTRY |
|
||||||
LDO 15(%r26),%r31 ;offset 0x0
|
|
||||||
DEPI 0,31,4,%r31 ;offset 0x4
|
|
||||||
LDCWX 0(0,%r31),%r23 ;offset 0x8
|
|
||||||
COMICLR,= 0,%r23,%r0 ;offset 0xc
|
|
||||||
DEP,TR %r0,31,32,%r28 ;offset 0x10
|
|
||||||
$00000001 |
|
||||||
LDI 1,%r28 ;offset 0x14
|
|
||||||
$L0 |
|
||||||
.EXIT |
|
||||||
BV,N %r0(%r2) ;offset 0x18
|
|
||||||
.PROCEND ;in=26;out=28;
|
|
||||||
|
|
||||||
|
|
||||||
.SPACE $TEXT$ |
|
||||||
.SUBSPA $CODE$ |
|
||||||
.SPACE $PRIVATE$,SORT=16 |
|
||||||
.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31,SORT=16 |
|
||||||
.SPACE $TEXT$ |
|
||||||
.SUBSPA $CODE$ |
|
||||||
.EXPORT tas,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR |
|
||||||
.END |
|
@ -1,106 +0,0 @@ |
|||||||
/*-------------------------------------------------------------------------
|
|
||||||
* |
|
||||||
* generic-acc.h |
|
||||||
* Atomic operations support when using HPs acc on HPUX |
|
||||||
* |
|
||||||
* Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group |
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California |
|
||||||
* |
|
||||||
* NOTES: |
|
||||||
* |
|
||||||
* Documentation: |
|
||||||
* * inline assembly for Itanium-based HP-UX: |
|
||||||
* http://h21007.www2.hp.com/portal/download/files/unprot/Itanium/inline_assem_ERS.pdf
|
|
||||||
* * Implementing Spinlocks on the Intel (R) Itanium (R) Architecture and PA-RISC |
|
||||||
* http://h21007.www2.hp.com/portal/download/files/unprot/itanium/spinlocks.pdf
|
|
||||||
* |
|
||||||
* Itanium only supports a small set of numbers (6, -8, -4, -1, 1, 4, 8, 16) |
|
||||||
* for atomic add/sub, so we just implement everything but compare_exchange |
|
||||||
* via the compare_exchange fallbacks in atomics/generic.h. |
|
||||||
* |
|
||||||
* src/include/port/atomics/generic-acc.h |
|
||||||
* |
|
||||||
* ------------------------------------------------------------------------- |
|
||||||
*/ |
|
||||||
|
|
||||||
#include <machine/sys/inline.h> |
|
||||||
|
|
||||||
#define pg_compiler_barrier_impl() _Asm_sched_fence() |
|
||||||
|
|
||||||
#if defined(HAVE_ATOMICS) |
|
||||||
|
|
||||||
/* IA64 always has 32/64 bit atomics */ |
|
||||||
|
|
||||||
#define PG_HAVE_ATOMIC_U32_SUPPORT |
|
||||||
typedef struct pg_atomic_uint32 |
|
||||||
{ |
|
||||||
volatile uint32 value; |
|
||||||
} pg_atomic_uint32; |
|
||||||
|
|
||||||
#define PG_HAVE_ATOMIC_U64_SUPPORT |
|
||||||
typedef struct pg_atomic_uint64 |
|
||||||
{ |
|
||||||
/*
|
|
||||||
* Alignment is guaranteed to be 64bit. Search for "Well-behaved |
|
||||||
* application restrictions" => "Data alignment and data sharing" on HP's |
|
||||||
* website. Unfortunately the URL doesn't seem to stable enough to |
|
||||||
* include. |
|
||||||
*/ |
|
||||||
volatile uint64 value; |
|
||||||
} pg_atomic_uint64; |
|
||||||
|
|
||||||
|
|
||||||
#define MINOR_FENCE (_Asm_fence) (_UP_CALL_FENCE | _UP_SYS_FENCE | \ |
|
||||||
_DOWN_CALL_FENCE | _DOWN_SYS_FENCE ) |
|
||||||
|
|
||||||
#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U32 |
|
||||||
static inline bool |
|
||||||
pg_atomic_compare_exchange_u32_impl(volatile pg_atomic_uint32 *ptr, |
|
||||||
uint32 *expected, uint32 newval) |
|
||||||
{ |
|
||||||
bool ret; |
|
||||||
uint32 current; |
|
||||||
|
|
||||||
_Asm_mov_to_ar(_AREG_CCV, *expected, MINOR_FENCE); |
|
||||||
/*
|
|
||||||
* We want a barrier, not just release/acquire semantics. |
|
||||||
*/ |
|
||||||
_Asm_mf(); |
|
||||||
/*
|
|
||||||
* Notes: |
|
||||||
* _DOWN_MEM_FENCE | _UP_MEM_FENCE prevents reordering by the compiler |
|
||||||
*/ |
|
||||||
current = _Asm_cmpxchg(_SZ_W, /* word */ |
|
||||||
_SEM_REL, |
|
||||||
&ptr->value, |
|
||||||
newval, _LDHINT_NONE, |
|
||||||
_DOWN_MEM_FENCE | _UP_MEM_FENCE); |
|
||||||
ret = current == *expected; |
|
||||||
*expected = current; |
|
||||||
return ret; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U64 |
|
||||||
static inline bool |
|
||||||
pg_atomic_compare_exchange_u64_impl(volatile pg_atomic_uint64 *ptr, |
|
||||||
uint64 *expected, uint64 newval) |
|
||||||
{ |
|
||||||
bool ret; |
|
||||||
uint64 current; |
|
||||||
|
|
||||||
_Asm_mov_to_ar(_AREG_CCV, *expected, MINOR_FENCE); |
|
||||||
_Asm_mf(); |
|
||||||
current = _Asm_cmpxchg(_SZ_D, /* doubleword */ |
|
||||||
_SEM_REL, |
|
||||||
&ptr->value, |
|
||||||
newval, _LDHINT_NONE, |
|
||||||
_DOWN_MEM_FENCE | _UP_MEM_FENCE); |
|
||||||
ret = current == *expected; |
|
||||||
*expected = current; |
|
||||||
return ret; |
|
||||||
} |
|
||||||
|
|
||||||
#undef MINOR_FENCE |
|
||||||
|
|
||||||
#endif /* defined(HAVE_ATOMICS) */ |
|
@ -1,3 +0,0 @@ |
|||||||
/* src/include/port/hpux.h */ |
|
||||||
|
|
||||||
/* nothing needed */ |
|
@ -1,47 +0,0 @@ |
|||||||
# Using X/Open Networking Interfaces requires to link with libxnet.
|
|
||||||
# Without specifying this, bind(), getpeername() and so on don't work
|
|
||||||
# correctly in the LP64 data model.
|
|
||||||
LIBS := -lxnet $(LIBS)
|
|
||||||
|
|
||||||
# Set up rpath so that the executables don't need SHLIB_PATH to be set.
|
|
||||||
# (Note: --disable-rpath is a really bad idea on this platform...)
|
|
||||||
ifeq ($(with_gnu_ld), yes) |
|
||||||
rpath = -Wl,-rpath -Wl,'$(rpathdir)'
|
|
||||||
else |
|
||||||
rpath = -Wl,+b -Wl,'$(rpathdir)'
|
|
||||||
endif |
|
||||||
|
|
||||||
# catch null pointer dereferences
|
|
||||||
ifeq ($(with_gnu_ld), yes) |
|
||||||
# XXX what to put here?
|
|
||||||
else |
|
||||||
LDFLAGS_EX += -Wl,-z
|
|
||||||
endif |
|
||||||
|
|
||||||
# set up appropriate options for shared library builds
|
|
||||||
export_dynamic = -Wl,-E
|
|
||||||
|
|
||||||
INSTALL_SHLIB_OPTS = -m 555
|
|
||||||
|
|
||||||
AROPT = crs
|
|
||||||
|
|
||||||
# env var name to use in place of LD_LIBRARY_PATH
|
|
||||||
ld_library_path_var = SHLIB_PATH
|
|
||||||
|
|
||||||
# Rule for building a shared library from a single .o file
|
|
||||||
%$(DLSUFFIX): %.o |
|
||||||
ifeq ($(GCC), yes) |
|
||||||
ifeq ($(with_gnu_ld), yes)
|
|
||||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ `$(CC) $(LDFLAGS) -print-libgcc-file-name`
|
|
||||||
else
|
|
||||||
$(LD) -b -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
|
|
||||||
endif
|
|
||||||
else |
|
||||||
ifeq ($(with_gnu_ld), yes)
|
|
||||||
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@
|
|
||||||
else
|
|
||||||
$(LD) -b -o $@ $<
|
|
||||||
endif
|
|
||||||
endif |
|
||||||
|
|
||||||
sqlmansect = 5
|
|
@ -1,34 +0,0 @@ |
|||||||
# src/template/hpux |
|
||||||
|
|
||||||
# Need this for access to many modern library features |
|
||||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" |
|
||||||
|
|
||||||
# HP's compiler likes the spelling +O2 not -O2, so adjust default CFLAGS |
|
||||||
if test "$GCC" != yes ; then |
|
||||||
CFLAGS="+O2" |
|
||||||
fi |
|
||||||
|
|
||||||
# Extra CFLAGS for code that will go into a shared library |
|
||||||
if test "$GCC" = yes ; then |
|
||||||
CFLAGS_SL="-fPIC" |
|
||||||
else |
|
||||||
CFLAGS_SL="+Z" |
|
||||||
fi |
|
||||||
|
|
||||||
# Pick right test-and-set (TAS) code. We need out-of-line assembler |
|
||||||
# when not using gcc. |
|
||||||
case $host in |
|
||||||
hppa*-*-hpux*) |
|
||||||
if test "$GCC" != yes ; then |
|
||||||
need_tas=yes |
|
||||||
tas_file=hpux_hppa.s |
|
||||||
fi |
|
||||||
;; |
|
||||||
esac |
|
||||||
|
|
||||||
case $host_cpu in |
|
||||||
ia64) |
|
||||||
DLSUFFIX=".so";; |
|
||||||
*) |
|
||||||
DLSUFFIX=".sl";; |
|
||||||
esac |
|
Loading…
Reference in new issue