Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, Brent Verner <brent(at)rcfile(dot)org>, Ryan Kirkpatrick <pgsql(at)rkirkpat(dot)net>, Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>, Arrigo Triulzi <arrigo(at)albourne(dot)com>
Subject: Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]
Date: 2000-12-31 03:43:51
Message-ID: 6290.978234231@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

"Thomas T. Thai" <tom(at)minnesota(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas T. Thai 2000-12-31 04:17:29 Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]
Previous Message Tatsuo Ishii 2000-12-31 03:23:33 Re: Re: NetBSD/Alpha and PostgreSQL-current [was Re: NetBSD/Alpha and rkirkpat's patch]

Browse pgsql-general by date

  From Date Subject
Next Message Thomas T. Thai 2000-12-31 04:17:29 Re: NetBSD/Alpha and rkirkpat's patch [was Re: regress failed tests.. SERIOUS?]
Previous Message Tatsuo Ishii 2000-12-31 03:23:33 Re: Re: NetBSD/Alpha and PostgreSQL-current [was Re: NetBSD/Alpha and rkirkpat's patch]