On 2014-06-24 10:22:08 -0700, Tom Lane wrote:
> Andres Freund <and...@2ndquadrant.com> writes:
> > On 2014-06-24 13:03:37 -0400, Noah Misch wrote:
> >> If a change has the potential to make some architectures give wrong
> >> answers only at odd times, that's a different kind of problem.  For
> >> that reason, actively breaking Alpha is a good thing.
> 
> > Not sure what you mean with the 'actively breaking Alpha' statement?
> > That we should drop Alpha?
> 
> +1.  Especially with no buildfarm critter.  Would anyone here care
> to bet even the price of a burger that Alpha isn't broken already?

Here's a patch removing alpha/true64/osf/1 support. I think I got most
relevant references, not sure if I missed something.

Since there seems to be (unanimous?) support for dropping alpha and some
patches coming up that need to deal with platform dependent stuff it
seems sensible to do this first.

Greetings,

Andres Freund

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
>From aba43d095344337fb76fb15b53a6ac4c90900d80 Mon Sep 17 00:00:00 2001
From: Andres Freund <and...@anarazel.de>
Date: Fri, 27 Jun 2014 15:43:46 +0200
Subject: [PATCH] Remove Alpha and Tru64 support.

Support for running postgres on Alpha hasn't been tested for a long
while. Due to Alpha's lax memory order guarantees it's a hard to
develop for platform and thought to be unlikely to currently work
correctly.
As Alpha is the only supported architecture for Tru64 drop support for
it. Tru64's support has ended 2012 and it was in maintenance-only mode
for much longer.

Also remove stray references to  __ksr__ and ultrix defines.
---
 configure                          |  1 -
 configure.in                       |  1 -
 doc/src/sgml/dfunc.sgml            | 21 ------------
 doc/src/sgml/installation.sgml     |  7 ++--
 src/Makefile.shlib                 |  4 ---
 src/backend/main/main.c            | 29 -----------------
 src/backend/port/dynloader/osf.c   |  7 ----
 src/backend/port/dynloader/osf.h   | 47 ---------------------------
 src/backend/utils/misc/ps_status.c |  2 +-
 src/include/port/osf.h             |  4 ---
 src/include/storage/barrier.h      |  9 ------
 src/include/storage/s_lock.h       | 66 --------------------------------------
 src/makefiles/Makefile.osf         | 10 ------
 src/template/osf                   |  6 ----
 14 files changed, 4 insertions(+), 210 deletions(-)
 delete mode 100644 src/backend/port/dynloader/osf.c
 delete mode 100644 src/backend/port/dynloader/osf.h
 delete mode 100644 src/include/port/osf.h
 delete mode 100644 src/makefiles/Makefile.osf
 delete mode 100644 src/template/osf

diff --git a/configure b/configure
index da89c69..c9388f2 100755
--- a/configure
+++ b/configure
@@ -2855,7 +2855,6 @@ dragonfly*) template=netbsd ;;
    mingw*) template=win32 ;;
   netbsd*) template=netbsd ;;
  openbsd*) template=openbsd ;;
-     osf*) template=osf ;;
      sco*) template=sco ;;
  solaris*) template=solaris ;;
    sysv5*) template=unixware ;;
diff --git a/configure.in b/configure.in
index 7dfbe9f..f8bf466 100644
--- a/configure.in
+++ b/configure.in
@@ -69,7 +69,6 @@ dragonfly*) template=netbsd ;;
    mingw*) template=win32 ;;
   netbsd*) template=netbsd ;;
  openbsd*) template=openbsd ;;
-     osf*) template=osf ;;
      sco*) template=sco ;;
  solaris*) template=solaris ;;
    sysv5*) template=unixware ;;
diff --git a/doc/src/sgml/dfunc.sgml b/doc/src/sgml/dfunc.sgml
index 3d90a36..b78537c 100644
--- a/doc/src/sgml/dfunc.sgml
+++ b/doc/src/sgml/dfunc.sgml
@@ -207,27 +207,6 @@ gcc -G -o foo.so foo.o
 
    <varlistentry>
     <term>
-     <systemitem class="osname">Tru64 UNIX</>
-     <indexterm><primary>Tru64 UNIX</><secondary>shared library</></>
-     <indexterm><primary>Digital UNIX</><see>Tru64 UNIX</></>
-    </term>
-    <listitem>
-     <para>
-      <acronym>PIC</acronym> is the default, so the compilation command
-      is the usual one.  <command>ld</command> with special options is
-      used to do the linking.
-<programlisting>
-cc -c foo.c
-ld -shared -expect_unresolved '*' -o foo.so foo.o
-</programlisting>
-      The same procedure is used with GCC instead of the system
-      compiler; no special options are required.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term>
      <systemitem class="osname">UnixWare</>
      <indexterm><primary>UnixWare</><secondary>shared library</></>
     </term>
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index 7353c61..2e81bbb 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1669,8 +1669,7 @@ PostgreSQL, contrib and HTML documentation successfully made. Ready to install.
     <systemitem class="osname">HP-UX</>,
     <systemitem class="osname">Linux</>,
     <systemitem class="osname">NetBSD</>, <systemitem
-    class="osname">OpenBSD</>, <systemitem class="osname">Tru64
-    UNIX</> (formerly <systemitem class="osname">Digital UNIX</>), and
+    class="osname">OpenBSD</>, and
     <systemitem class="osname">Solaris</>.
    </para>
 
@@ -1981,7 +1980,7 @@ kill `cat /usr/local/pgsql/data/postmaster.pid`
   <para>
    In general, <productname>PostgreSQL</> can be expected to work on
    these CPU architectures: x86, x86_64, IA64, PowerPC,
-   PowerPC 64, S/390, S/390x, Sparc, Sparc 64, Alpha, ARM, MIPS, MIPSEL, M68K,
+   PowerPC 64, S/390, S/390x, Sparc, Sparc 64, ARM, MIPS, MIPSEL, M68K,
    and PA-RISC.  Code support exists for M32R and VAX, but these
    architectures are not known to have been tested recently.  It is often
    possible to build on an unsupported CPU type by configuring with
@@ -1991,7 +1990,7 @@ kill `cat /usr/local/pgsql/data/postmaster.pid`
   <para>
    <productname>PostgreSQL</> can be expected to work on these operating
    systems: Linux (all recent distributions), Windows (Win2000 SP4 and later),
-   FreeBSD, OpenBSD, NetBSD, Mac OS X, AIX, HP/UX, Solaris, Tru64 Unix,
+   FreeBSD, OpenBSD, NetBSD, Mac OS X, AIX, HP/UX, Solaris,
    and UnixWare.  Other Unix-like systems may also work but are not currently
    being tested.  In most cases, all CPU architectures supported by
    a given operating system will work.  Look in
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 029c7e9..0bf3a17 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -236,10 +236,6 @@ ifeq ($(PORTNAME), solaris)
   endif
 endif
 
-ifeq ($(PORTNAME), osf)
-  LINK.shared		= $(LD) -shared -expect_unresolved '*'
-endif
-
 ifeq ($(PORTNAME), sco)
   ifeq ($(GCC), yes)
     LINK.shared		= $(CC) -shared
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index c6fb8c9..c1116e0 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -22,14 +22,6 @@
 
 #include <unistd.h>
 
-#if defined(__alpha) && defined(__osf__)		/* no __alpha__ ? */
-#include <sys/sysinfo.h>
-#include "machine/hal_sysinfo.h"
-#define ASSEMBLER
-#include <sys/proc.h>
-#undef ASSEMBLER
-#endif
-
 #if defined(__NetBSD__)
 #include <sys/param.h>
 #endif
@@ -245,27 +237,6 @@ static void
 startup_hacks(const char *progname)
 {
 	/*
-	 * On some platforms, unaligned memory accesses result in a kernel trap;
-	 * the default kernel behavior is to emulate the memory access, but this
-	 * results in a significant performance penalty.  We want PG never to make
-	 * such unaligned memory accesses, so this code disables the kernel
-	 * emulation: unaligned accesses will result in SIGBUS instead.
-	 */
-#ifdef NOFIXADE
-
-#if defined(__alpha)			/* no __alpha__ ? */
-	{
-		int			buffer[] = {SSIN_UACPROC, UAC_SIGBUS | UAC_NOPRINT};
-
-		if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL,
-					   (unsigned long) NULL) < 0)
-			write_stderr("%s: setsysinfo failed: %s\n",
-						 progname, strerror(errno));
-	}
-#endif   /* __alpha */
-#endif   /* NOFIXADE */
-
-	/*
 	 * Windows-specific execution environment hacking.
 	 */
 #ifdef WIN32
diff --git a/src/backend/port/dynloader/osf.c b/src/backend/port/dynloader/osf.c
deleted file mode 100644
index aabf805..0000000
--- a/src/backend/port/dynloader/osf.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * src/backend/port/dynloader/osf.c
- *
- * Dummy file used for nothing at this point
- *
- * see osf.h
- */
diff --git a/src/backend/port/dynloader/osf.h b/src/backend/port/dynloader/osf.h
deleted file mode 100644
index 273a903..0000000
--- a/src/backend/port/dynloader/osf.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * osf.h
- *	  prototypes for OSF/1-specific routines
- *
- *
- * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/backend/port/dynloader/osf.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef PORT_PROTOS_H
-#define PORT_PROTOS_H
-
-#include <dlfcn.h>
-#include "utils/dynamic_loader.h"		/* pgrminclude ignore */
-
-/*
- * Dynamic Loader on Alpha OSF/1.x
- *
- * this dynamic loader uses the system dynamic loading interface for shared
- * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
- * library as the file to be dynamically loaded.
- */
-
-/*
- * In some older systems, the RTLD_NOW flag isn't defined and the mode
- * argument to dlopen must always be 1.  The RTLD_GLOBAL flag is wanted
- * if available, but it doesn't exist everywhere.
- * If it doesn't exist, set it to 0 so it has no effect.
- */
-#ifndef RTLD_NOW
-#define RTLD_NOW 1
-#endif
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#define  pg_dlopen(f)	dlopen((f), RTLD_NOW | RTLD_GLOBAL)
-#define  pg_dlsym(h, f) ((PGFunction) dlsym(h, f))
-#define  pg_dlclose(h)	dlclose(h)
-#define  pg_dlerror()	dlerror()
-
-#endif   /* PORT_PROTOS_H */
diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c
index 3aeceae..5407d3f 100644
--- a/src/backend/utils/misc/ps_status.c
+++ b/src/backend/utils/misc/ps_status.c
@@ -66,7 +66,7 @@ bool		update_process_title = true;
 #define PS_USE_PS_STRINGS
 #elif (defined(BSD) || defined(__hurd__)) && !defined(__darwin__)
 #define PS_USE_CHANGE_ARGV
-#elif defined(__linux__) || defined(_AIX) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(ultrix) || defined(__ksr__) || defined(__osf__) || defined(__svr5__) || defined(__darwin__)
+#elif defined(__linux__) || defined(_AIX) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(__svr5__) || defined(__darwin__)
 #define PS_USE_CLOBBER_ARGV
 #elif defined(WIN32)
 #define PS_USE_WIN32
diff --git a/src/include/port/osf.h b/src/include/port/osf.h
deleted file mode 100644
index d56b35b..0000000
--- a/src/include/port/osf.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* src/include/port/osf.h */
-
-#define NOFIXADE
-#define DISABLE_XOPEN_NLS
diff --git a/src/include/storage/barrier.h b/src/include/storage/barrier.h
index bc61de0..79a2f8d 100644
--- a/src/include/storage/barrier.h
+++ b/src/include/storage/barrier.h
@@ -109,16 +109,7 @@ extern slock_t dummy_spinlock;
 #define pg_memory_barrier()		__asm__ __volatile__ ("sync" : : : "memory")
 #define pg_read_barrier()		__asm__ __volatile__ ("lwsync" : : : "memory")
 #define pg_write_barrier()		__asm__ __volatile__ ("lwsync" : : : "memory")
-#elif defined(__alpha) || defined(__alpha__)	/* Alpha */
 
-/*
- * Unlike all other known architectures, Alpha allows dependent reads to be
- * reordered, but we don't currently find it necessary to provide a conditional
- * read barrier to cover that case.  We might need to add that later.
- */
-#define pg_memory_barrier()		__asm__ __volatile__ ("mb" : : : "memory")
-#define pg_read_barrier()		__asm__ __volatile__ ("rmb" : : : "memory")
-#define pg_write_barrier()		__asm__ __volatile__ ("wmb" : : : "memory")
 #elif defined(__hppa) || defined(__hppa__)		/* HP PA-RISC */
 
 /* HPPA doesn't do either read or write reordering */
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index ba4dfe1..895abe6 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -548,51 +548,6 @@ tas(volatile slock_t *lock)
 
 #endif	 /* __vax__ */
 
-#if defined(__alpha) || defined(__alpha__)	/* Alpha */
-/*
- * Correct multi-processor locking methods are explained in section 5.5.3
- * of the Alpha AXP Architecture Handbook, which at this writing can be
- * found at ftp://ftp.netbsd.org/pub/NetBSD/misc/dec-docs/index.html.
- * For gcc we implement the handbook's code directly with inline assembler.
- */
-#define HAS_TEST_AND_SET
-
-typedef unsigned long slock_t;
-
-#define TAS(lock)  tas(lock)
-
-static __inline__ int
-tas(volatile slock_t *lock)
-{
-	register slock_t _res;
-
-	__asm__	__volatile__(
-		"	ldq		$0, %1	\n"
-		"	bne		$0, 2f	\n"
-		"	ldq_l	%0, %1	\n"
-		"	bne		%0, 2f	\n"
-		"	mov		1,  $0	\n"
-		"	stq_c	$0, %1	\n"
-		"	beq		$0, 2f	\n"
-		"	mb				\n"
-		"	br		3f		\n"
-		"2:	mov		1, %0	\n"
-		"3:					\n"
-:		"=&r"(_res), "+m"(*lock)
-:
-:		"memory", "0");
-	return (int) _res;
-}
-
-#define S_UNLOCK(lock)	\
-do \
-{\
-	__asm__ __volatile__ ("	mb \n"); \
-	*((volatile slock_t *) (lock)) = 0; \
-} while (0)
-
-#endif /* __alpha || __alpha__ */
-
 
 #if defined(__mips__) && !defined(__sgi)	/* non-SGI MIPS */
 /* Note: on SGI we use the OS' mutex ABI, see below */
@@ -733,27 +688,6 @@ tas(volatile slock_t *s_lock)
 #endif	 /* defined(USE_UNIVEL_CC) */
 
 
-#if defined(__alpha) || defined(__alpha__)	/* Tru64 Unix Alpha compiler */
-/*
- * The Tru64 compiler doesn't support gcc-style inline asm, but it does
- * have some builtin functions that accomplish much the same results.
- * For simplicity, slock_t is defined as long (ie, quadword) on Alpha
- * regardless of the compiler in use.  LOCK_LONG and UNLOCK_LONG only
- * operate on an int (ie, longword), but that's OK as long as we define
- * S_INIT_LOCK to zero out the whole quadword.
- */
-#define HAS_TEST_AND_SET
-
-typedef unsigned long slock_t;
-
-#include <alpha/builtins.h>
-#define S_INIT_LOCK(lock)  (*(lock) = 0)
-#define TAS(lock)		   (__LOCK_LONG_RETRY((lock), 1) == 0)
-#define S_UNLOCK(lock)	   __UNLOCK_LONG(lock)
-
-#endif	 /* __alpha || __alpha__ */
-
-
 #if defined(__hppa) || defined(__hppa__)	/* HP PA-RISC, GCC and HP compilers */
 /*
  * HP's PA-RISC
diff --git a/src/makefiles/Makefile.osf b/src/makefiles/Makefile.osf
deleted file mode 100644
index 31822fd..0000000
--- a/src/makefiles/Makefile.osf
+++ /dev/null
@@ -1,10 +0,0 @@
-AROPT = crs
-DLSUFFIX = .so
-CFLAGS_SL =
-rpath = -rpath '$(rpathdir)'
-
-# Rule for building a shared library from a single .o file
-%.so: %.o
-	$(LD) -shared -expect_unresolved '*' -o $@ $<
-
-sqlmansect = 5
diff --git a/src/template/osf b/src/template/osf
deleted file mode 100644
index 4f10ad6..0000000
--- a/src/template/osf
+++ /dev/null
@@ -1,6 +0,0 @@
-# src/template/osf
-
-if test "$GCC" != yes ; then
-  CC="$CC -std"
-  CFLAGS="-O -ieee"
-fi
-- 
2.0.0.rc2.4.g1dc51c6.dirty

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to