Re: Postgresql 7.3.4 compile failes on NetBSD 1.6 mac68k - Mailing list pgsql-ports

From Rémi Zara
Subject Re: Postgresql 7.3.4 compile failes on NetBSD 1.6 mac68k
Date
Msg-id 4894A2B9-F105-11D7-BB4E-003065B81B34@mac.com
Whole thread Raw
In response to Re: Postgresql 7.3.4 compile failes on NetBSD 1.6 mac68k  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-ports
Hi,

It was indeed the '_' that was causing problem. It is due to the fact
that NetBSD switch to ELF with release 1.6

Here is the patch to make postgresql compile on m68k 1.6.x NetBSD:

--- postgresql-7.3.4/src/backend/storage/lmgr/s_lock.c  Sat Sep 21
02:14:05 2002
+++ s_lock.c    Thu Sep 25 18:47:34 2003
@@ -97,15 +97,15 @@
  {
         __asm__         __volatile__(

          "\
-.global                _tas                            \n\
-_tas:                                                  \n\
-                       movel   sp@(0x4),a0     \n\
-                       tas     a0@                     \n\
+.global                tas                             \n\
+tas:                                                   \n\
+                       movel   %sp@(0x4),%a0   \n\
+                       tas     %a0@                    \n\
                         beq     _success        \n\
-                       moveq   #-128,d0        \n\
+                       moveq   #-128,%d0       \n\
                         rts                                     \n\
  _success:                                              \n\
-                       moveq   #0,d0           \n\
+                       moveq   #0,%d0          \n\
                         rts                                     \n\
  ");
  }

Regards,

Rémi ZARA


Le jeudi, 25 sep 2003, à 04:57 Europe/Paris, Tom Lane a écrit :

> =?ISO-8859-1?Q?R=E9mi_Zara?= <remi_zara@mac.com> writes:
>> I'm trying to compile Postgresql 7.3.4 on NetBSD 1.6 mac68k.
>> First, I Had to add '%' signs in src/backend/storage/lmgr/s_lock.c
>> before register names.
>> Then, linking fails with undefined reference to the 'tas' function:
>
> Some of the other platforms' tas functions make a point of defining
> both "tas" and "_tas".  Does it help if you do likewise?
>
>             regards, tom lane
>
>
--
Rémi Zara
web: http://www.remi-zara.net/


pgsql-ports by date:

Previous
From: Joseph J.Bove
Date:
Subject: Inquiry From Form [pgsql]
Next
From: Bruce Momjian
Date:
Subject: Re: 7.4 won't compile for Borland