Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?] - Mailing list pgsql-bugs

From Tom Lane
Subject Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]
Date
Msg-id 6290.978234231@sss.pgh.pa.us
Whole thread Raw
In response to Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]  ("Thomas T. Thai" <tom@minnesota.com>)
Responses Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]  ("Thomas T. Thai" <tom@minnesota.com>)
Re: Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
"Thomas T. Thai" <tom@minnesota.com> writes:
> i grabbed the CVS ball last night and tried to build it. i'm attaching a
> patch that made it possible to build -current on NetBSD/Alpha
> 1.5.1_ALPHA.

Partially applied, per comments below.

> after install, i did the regression test and it failed in the same way
> that 7.0.3+rkirkpat.patch did as described below (copy of my last post).

Hmm, no idea what's going on here.  Could you compile with -g and then
use gdb to track the reported PC addresses to particular source lines?
That might give us a clue.


--- /usr/local/source/postgresql/pgsql/src/backend/main/main.c    Fri Nov 24 21:45:47 2000
+++ /usr/local/build/pgsql-current/src/backend/main/main.c    Sat Dec 30 15:06:34 2000

-#if defined(__alpha) && !defined(linux) && !defined(__FreeBSD__)
+#if defined(__alpha) && !defined(linux) && !defined(__FreeBSD__) && !defined(__NetBSD__)
 #include <sys/sysinfo.h>
 #include "machine/hal_sysinfo.h"

Applied, but I begin to think that we should be testing here for the
*presence* of a Tru64 symbol, rather than the absence of a bunch of
other OSes.  Anyone know what would be suitable?

+#include <sys/param.h>

I inserted this conditionally on #if defined(__NetBSD__).  It seems
a bad idea to risk breaking other ports to fix yours.

--- /usr/local/source/postgresql/pgsql/src/include/port/netbsd.h    Sun Oct 29 07:17:34 2000
+++ /usr/local/build/pgsql-current/src/include/port/netbsd.h    Sat Dec 30 14:59:06 2000

netbsd.h changes look good, applied.

--- /usr/local/source/postgresql/pgsql/src/include/storage/s_lock.h    Fri Dec 29 20:34:56 2000
+++ /usr/local/build/pgsql-current/src/include/storage/s_lock.h    Sat Dec 30 14:59:37 2000
@@ -241,7 +241,17 @@
 #if defined(NEED_NS32K_TAS_ASM)
 #define TAS(lock) tas(lock)

+#if defined(__GNUC__)
+/*
+ * GCC on the Alpha doesn't appear to handle inlining of assembly with
+ * %0 or %1 properly.  This removes the inlining of the tas (test-and-set)
+ * function, which probably slows things down considerably, but correctness
+ * first!
+ */
+static int
+#else
 static __inline__ int
+#endif
 tas(volatile slock_t *lock)
 {
   register _res;

Uh, why are you altering NS32K code in an Alpha patch?  I did not apply
this.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Re: NetBSD/Alpha and PostgreSQL-current [was Re: NetBSD/Alpha and rkirkpat's patch]
Next
From: "Thomas T. Thai"
Date:
Subject: Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]