From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 15913 invoked from network); 31 Oct 1998 02:25:31 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 31 Oct 1998 02:25:31 -0000 Received: from farstar.rkirkpat.net (dhcp-210-56.letu.edu [204.158.210.56]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id VAA20194 for ; Fri, 30 Oct 1998 21:13:46 -0500 Received: from localhost (rkirkpat@localhost) by farstar.rkirkpat.net (8.8.8/8.8.8/Debian/GNU) with SMTP id UAA20962; Fri, 30 Oct 1998 20:12:51 -0600 X-Authentication-Warning: farstar.rkirkpat.net: rkirkpat owned process doing -bs Date: Fri, 30 Oct 1998 20:12:51 -0600 (CST) From: Ryan Kirkpatrick X-Sender: rkirkpat@farstar.rkirkpat.net To: axp-list@redhat.com cc: Peter Rye Subject: Patches for Pgsql on Linux/Alpha (RE: Last Call...) (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII A member of this list requested that I cross post the patches to allow PostgreSQL to compile on Linux/Alpha to this list. The single patch and a few other catches in compiling it are below in the included message that was orginally posted to the pgsql mailing lists. If any one could assist me in solving some of the regression test problems, I would greatly appericate it! If you are interested, grab the latest snapshot from ftp.postgresql.org, compile and install it. Then run the regression tests and it should become quickly obvious what is broken. Mainly it is datetime at the moment that is broken. If you want more details, email me privatly, and I will let you in on all of the gory details. Thanks. ---------------------------------------------------------------------------- | "For to me to live is Christ, and to die is gain." | | --- Philippians 1:21 (KJV) | ---------------------------------------------------------------------------- | Ryan Kirkpatrick | Boulder, Colorado | rkirkpat@nag.cs.colorado.edu | ---------------------------------------------------------------------------- | http://www-ugrad.cs.colorado.edu/~rkirkpat/ | ---------------------------------------------------------------------------- ---------- Forwarded message ---------- Date: Fri, 30 Oct 1998 19:53:28 -0600 (CST) From: Ryan Kirkpatrick To: pgsql-ports@postgresql.org, pgsql-hackers@postgresql.org, pgsql-patches@postgresql.org Subject: Patches for Pgsql on Linux/Alpha (RE: Last Call...) Ok, here they are, the long awaited patches to make pgsql compile once again on Linux/Alpha. It turned out that our old friend S_LOCK was the problem. Apparently some one had pulled the S_LOCK assembly code out of the static function that I put it in, and attempted to make it inlined again (which is what broke it the first time around). On a whim, I searched the net looking for an Alpha Assembly Programmer's Manual, and see if it would help me any. I was lucky on both accounts. I found the manual, and quickly figured out to make local labels. So... The S_LOCK code for Linux/Alpha is finally safe for inlining! :) Here is the patch for ./pgsql/src/include/storage/s_lock.h 89c87 < bne $0, already_set \n\ --- > bne $0, 3f \n\ 91c89 < bne $0, already_set \n\ --- > bne $0, 3f \n\ 94,95c92,93 < beq $0, stqc_fail \n\ < success: bis $31, $31, %1 \n\ --- > beq $0, 2f \n\ > bis $31, $31, %1 \n\ 97,100c95,98 < jmp $31, end \n\ < stqc_fail: or $31, 1, $0 \n\ < already_set: bis $0, $0, %1 \n\ < end: nop ": "=m"(*lock), "=r"(_res): :"0"); --- > jmp $31, 4f \n\ > 2: or $31, 1, $0 \n\ > 3: bis $0, $0, %1 \n\ > 4: nop ": "=m"(*lock), "=r"(_res): :"0"); Though there are two other catches at the moment in compiling pgsql on Alpha as well: 1. The optimization flag, -O2, that is used, causes some code to fail to compile with very strange errors, and it causes s_locks to jam. Apparently this is due to the (somewhat) unstable nature of gcc/egcs on Alphas at the moment. Turning it down to -O1 solves the problem and everything works fine. 2. C++ is pretty much broken on Linux/Alpha (Debian 2.0 at least), due to missing header files. This means that libpq++ can't be compiled. Either tell configure not to detect/use C++, or comment out the line in interfaces/Makefile that causes libpq++ to be built. Beyond that, it should compile, install, and initdb just fine. Regressions tests are a mixed bag at this time (see my seperate message concerning this), but look promising. Here is the specs on my machine for reference: XL366 Alpha w/192MB of RAM Debian 2.0 Alpha (unstable) Linux 2.0.34 gcc 2.91.57-5 glibc 2.0.7t-1 I would be very interested in regression tests/results from people running RedHat on thier Alphas. Would help me to narrow down what is causing some of the regression test problems. If you do send them to me, make sure to include what kernel, gcc, and glibc you are using. Thanks. Ok, that should pretty much cover it for the 6.4 release on the Linux/Alpha end. I would mark it as working, but still in need of further work. TTYAL. ---------------------------------------------------------------------------- | "For to me to live is Christ, and to die is gain." | | --- Philippians 1:21 (KJV) | ---------------------------------------------------------------------------- | Ryan Kirkpatrick | Boulder, Colorado | rkirkpat@nag.cs.colorado.edu | ---------------------------------------------------------------------------- | http://www-ugrad.cs.colorado.edu/~rkirkpat/ | ----------------------------------------------------------------------------