OK, I modified the m64k spinlock patch to more cleanly merge into our
code, attached.  Applied.

---------------------------------------------------------------------------

Rémi Zara wrote:
> Hi,
> 
> Here is a port report for NetBSD 2.0 mac68k, with sources of  
> postgresql8.0.0rc1.
> 
> Here is the configure line used :
> ./configure --prefix=/data/postgresql/pgsql-8.0.0rc1 --with-openssl  
> --with-python --with-perl --with-tcl --with-krb5 --with-pam
> 
> But some tweaking was necessary to make it work:
>   * krb5.h is in /usr/include/krb5 on netbsd (set via CPPFLAGS)
>   * krb5_encrypt is to be found in  -lkrb5 -ldes -lasn1 -lroken -lcrypto
> 
> --enable-thread-safety does not work because the thread safety test  
> fails (src/tools/thread/thread_test)
> configure:18831: ./conftest
> conftest in free(): error: freelist is destroyed.
> [1]   Abort trap (core dumped) ./conftest${ac_e...
> 
> 
> Then the tas code in src/backend/storage/lmgr/s_lock.c cannot be  
> compiled and linked on this system without modification:
> the '_' in front of the tas symbol should be removes, and '%' added in  
> front of register names. I've attached a diff that makes these  
> modifications only for NetBSD mac68k ELF.
> 
> 
> With these modifications, make and make install are OK !
> 
> template1=# SELECT version();
>                                                   version
> ------------------------------------------------------------------------ 
> ---------------------------------
>   PostgreSQL 8.0.0rc1 on m68k-unknown-netbsdelf2.0, compiled by GCC gcc  
> (GCC) 3.3.3 (NetBSD nb3 20040520)
> (1 row)
> 
> in make check, two tests fail: float8 and misc.
> I've attached the regression.diffs file.
> 
> Regards,
> 
> R?mi Zara
> 
> --
> R?mi Zara
> http://www.remi-zara.net/
> 
> 

[ Attachment, skipping... ]

> 
> 
> 
> 

[ Attachment, skipping... ]

> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/storage/lmgr/s_lock.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/storage/lmgr/s_lock.c,v
retrieving revision 1.32
diff -c -c -r1.32 s_lock.c
*** src/backend/storage/lmgr/s_lock.c   30 Aug 2004 23:47:20 -0000      1.32
--- src/backend/storage/lmgr/s_lock.c   18 Dec 2004 20:19:35 -0000
***************
*** 136,147 ****
  
  
  #if defined(__m68k__)
  static void
! tas_dummy()                                           /* really means: extern 
int tas(slock_t
!                                                                * **lock); */
  {
        __asm__         __volatile__(
!                                                                               
 "\
  .global               _tas                            \n\
  _tas:                                                 \n\
                        movel   sp@(0x4),a0     \n\
--- 136,161 ----
  
  
  #if defined(__m68k__)
+ /* really means: extern int tas(slock_t* **lock); */
  static void
! tas_dummy()
  {
        __asm__         __volatile__(
! #if defined(__NetBSD__) && defined(__ELF__)
! /* no underscore for label and % for registers */
!                                                                               
"\
! .global               tas                             \n\
! tas:                                                  \n\
!                       movel   %sp@(0x4),%a0   \n\
!                       tas     %a0@            \n\
!                       beq     _success        \n\
!                       moveq   #-128,%d0       \n\
!                       rts                             \n\
! _success:                                             \n\
!                       moveq   #0,%d0          \n\
!                       rts                             \n"
! #else
!                                                                               
"\
  .global               _tas                            \n\
  _tas:                                                 \n\
                        movel   sp@(0x4),a0     \n\
***************
*** 151,158 ****
                        rts                                     \n\
  _success:                                             \n\
                        moveq   #0,d0           \n\
!                       rts                                     \n\
! ");
  }
  #endif   /* __m68k__ */
  
--- 165,173 ----
                        rts                                     \n\
  _success:                                             \n\
                        moveq   #0,d0           \n\
!                       rts                                     \n"
! #endif   /* __NetBSD__ && __ELF__ */
! );
  }
  #endif   /* __m68k__ */
  
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to