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/