diff options
author | bad <bad@pkgsrc.org> | 1999-07-29 16:44:41 +0000 |
---|---|---|
committer | bad <bad@pkgsrc.org> | 1999-07-29 16:44:41 +0000 |
commit | e3924bdfce32d21696d31db98f7b559c230922d9 (patch) | |
tree | feb0ebb40c7f20ad68e66acd9ac459eaaa2d9360 /devel | |
parent | 1e10c515bbf3016a4212fba04d7207abbf28f4d8 (diff) | |
download | pkgsrc-e3924bdfce32d21696d31db98f7b559c230922d9.tar.gz |
Add m68k support to MIT-pthreads. By Andy Finnell <andy@vei.net>.
Thanks to Greg Oster for testing on the hp300.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/mit-pthreads/Makefile | 4 | ||||
-rw-r--r-- | devel/mit-pthreads/files/patch-sum | 11 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-aj | 16 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-ak | 16 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bl | 87 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bm | 261 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bn | 87 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bo | 48 | ||||
-rw-r--r-- | devel/mit-pthreads/patches/patch-bp | 34 |
9 files changed, 553 insertions, 11 deletions
diff --git a/devel/mit-pthreads/Makefile b/devel/mit-pthreads/Makefile index dd41da4f807..8e59e5ce14e 100644 --- a/devel/mit-pthreads/Makefile +++ b/devel/mit-pthreads/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 1999/06/20 21:06:18 tron Exp $ +# $NetBSD: Makefile,v 1.21 1999/07/29 16:44:41 bad Exp $ # DISTNAME= pthreads-1_60_beta6 @@ -10,7 +10,7 @@ MAINTAINER= agc@netbsd.org HOMEPAGE= http://www.mit.edu:8001/people/proven/pthreads.html ONLY_FOR_PLATFORM= NetBSD-*-alpha NetBSD-*-arm32 NetBSD-*-i386 \ - NetBSD-*-sparc + NetBSD-*-sparc NetBSD-*-m68k HAS_CONFIGURE= yes MAKE_ENV+= NOLINT=1 NOPROFILE=1 OBJECT_FMT=${OBJECT_FMT} diff --git a/devel/mit-pthreads/files/patch-sum b/devel/mit-pthreads/files/patch-sum index d7cd231efd6..811fcb03449 100644 --- a/devel/mit-pthreads/files/patch-sum +++ b/devel/mit-pthreads/files/patch-sum @@ -1,4 +1,4 @@ -$NetBSD: patch-sum,v 1.1 1999/07/09 13:50:38 agc Exp $ +$NetBSD: patch-sum,v 1.2 1999/07/29 16:44:42 bad Exp $ MD5 (patch-aa) = 5af930f67e251f5eb89b5414426d2396 MD5 (patch-ab) = 9bb4e83bd91f0159a522d8bfbba89362 @@ -9,8 +9,8 @@ MD5 (patch-af) = 05fd444f6dcbef375c1519d6db94d34f MD5 (patch-ag) = 46040c24e589e90ebf85efa5297431a1 MD5 (patch-ah) = dbd55a3663beee3a52764c9624e2b2f6 MD5 (patch-ai) = 1fccdc004b2cfc9becefe152092257a3 -MD5 (patch-aj) = 4c07dcd466a931dbf7ad3d8e4eb03a25 -MD5 (patch-ak) = ca55408a8346104638796bbbc180ec7f +MD5 (patch-aj) = 7d554bf0aea1c92f35ca8463d76e6391 +MD5 (patch-ak) = 00f407523ef321cf49a7eebc1e6c26d6 MD5 (patch-al) = c09486e1df2ac8e817a79c64d99b4c76 MD5 (patch-am) = 5cc3228a2d6d23e76ea22519157e5771 MD5 (patch-an) = a23a065821615f8a28867e28e5a90a59 @@ -37,3 +37,8 @@ MD5 (patch-bh) = 6046a4dd11b818f5b82e53087998da25 MD5 (patch-bi) = 6ccec1b86e87cc776a6fe89e01008678 MD5 (patch-bj) = 54a351b3eada61b8b2c58e6531aabbd7 MD5 (patch-bk) = 4b51776930f1794d0977663115559846 +MD5 (patch-bl) = 7c38bc16118af90ee47e493806123a75 +MD5 (patch-bm) = a7fad900fb3275e44ee0a102e1d57fc0 +MD5 (patch-bn) = 5f77a364bbffc7d7e678014d61e0ba4b +MD5 (patch-bo) = 56589eee6da387750ebfd528cff72774 +MD5 (patch-bp) = d86110e4e9a7b3c3763a4d737e2ef103 diff --git a/devel/mit-pthreads/patches/patch-aj b/devel/mit-pthreads/patches/patch-aj index 7f9928e44ed..8df99e236c8 100644 --- a/devel/mit-pthreads/patches/patch-aj +++ b/devel/mit-pthreads/patches/patch-aj @@ -1,7 +1,7 @@ -$NetBSD: patch-aj,v 1.5 1999/04/16 16:32:11 bad Exp $ +$NetBSD: patch-aj,v 1.6 1999/07/29 16:44:42 bad Exp $ --- config/configure.orig Wed Nov 13 22:03:02 1996 -+++ config/configure Fri Apr 16 18:09:45 1999 ++++ config/configure Tue Jul 27 16:25:36 1999 @@ -1049,6 +1049,17 @@ name=$host_cpu-$host_os @@ -74,7 +74,17 @@ $NetBSD: patch-aj,v 1.5 1999/04/16 16:32:11 bad Exp $ i386-*-netbsd1.1* | i386-*-netbsd1.2*) name=i386-netbsd-1.0 sysincludes=netbsd-1.1 -@@ -1697,6 +1741,39 @@ +@@ -1129,6 +1173,9 @@ + ;; + m68*-*-netbsd*) + name=m68000-netbsd ++ sysincludes=netbsd-1.1 ++ except="lseek ftruncate pipe fstat" ++ available_syscalls="sigsuspend sigprocmask" + ;; + i386-*-freebsd2.*) + name=i386-freebsd-2.0 +@@ -1697,6 +1744,39 @@ if test $pthreads_cv_timespec_in_time = yes ; then cat >> confdefs.h <<\EOF #define _OS_HAS_TIMESPEC 1 diff --git a/devel/mit-pthreads/patches/patch-ak b/devel/mit-pthreads/patches/patch-ak index 1cd5732d97b..25572e0dbb5 100644 --- a/devel/mit-pthreads/patches/patch-ak +++ b/devel/mit-pthreads/patches/patch-ak @@ -1,7 +1,7 @@ -$NetBSD: patch-ak,v 1.5 1999/04/16 16:32:11 bad Exp $ +$NetBSD: patch-ak,v 1.6 1999/07/29 16:44:42 bad Exp $ --- config/configure.in.orig Wed Nov 13 22:03:08 1996 -+++ config/configure.in Fri Apr 16 18:09:29 1999 ++++ config/configure.in Tue Jul 27 16:26:24 1999 @@ -124,6 +124,17 @@ name=$host_cpu-$host_os @@ -74,7 +74,17 @@ $NetBSD: patch-ak,v 1.5 1999/04/16 16:32:11 bad Exp $ i386-*-netbsd1.1* | i386-*-netbsd1.2*) name=i386-netbsd-1.0 sysincludes=netbsd-1.1 -@@ -304,6 +348,16 @@ +@@ -195,6 +239,9 @@ + ;; + m68*-*-netbsd*) + name=m68000-netbsd ++ sysincludes=netbsd-1.1 ++ except="lseek ftruncate pipe fstat" ++ available_syscalls="sigsuspend sigprocmask" + ;; + i386-*-freebsd2.*) + name=i386-freebsd-2.0 +@@ -304,6 +351,16 @@ AC_MSG_RESULT($pthreads_cv_timespec_in_time) if test $pthreads_cv_timespec_in_time = yes ; then AC_DEFINE(_OS_HAS_TIMESPEC) diff --git a/devel/mit-pthreads/patches/patch-bl b/devel/mit-pthreads/patches/patch-bl new file mode 100644 index 00000000000..9694728ec49 --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bl @@ -0,0 +1,87 @@ +$NetBSD: patch-bl,v 1.1 1999/07/29 16:44:43 bad Exp $ + +--- machdep/engine-m68000-netbsd.h.orig Tue Nov 8 16:39:15 1994 ++++ machdep/engine-m68000-netbsd.h Wed Jul 7 04:29:09 1999 +@@ -3,6 +3,9 @@ + * + * $Id: patch-bl,v 1.1 1999/07/29 16:44:43 bad Exp $ + * ++ * m68k work by Andy Finnell <andyf@vei.net> based off work by ++ * David Leonard and Chris Provenzano. ++ * + */ + + #include <unistd.h> +@@ -16,14 +19,14 @@ + #define SEMAPHORE_CLEAR 0 + #define SEMAPHORE_SET 0x80; + +-#define SEMAPHORE_TEST_AND_SET(lock) \ +-({ \ +-volatile long temp = SEMAPHORE_CLEAR; \ +- \ +-__asm__ volatile("tas (%2); bpl 0f; movl #1,%0; 0:" \ +- :"=r" (temp) \ +- :"0" (temp),"r" (lock)); \ +-temp; \ ++#define SEMAPHORE_TEST_AND_SET(lock) \ ++({ \ ++ volatile long temp = SEMAPHORE_CLEAR; \ ++ __asm__ volatile( \ ++ "tas %2; bpl 0f; movl #1,%0; 0:" \ ++ :"=r" (temp) \ ++ :"0" (temp),"m" (*lock)); \ ++ temp; \ + }) + + #define SEMAPHORE_RESET(lock) *lock = SEMAPHORE_CLEAR +@@ -48,6 +51,7 @@ + void *machdep_stack; + struct itimerval machdep_timer; + jmp_buf machdep_state; ++ char machdep_fstate[92]; + }; + + /* +@@ -56,6 +60,12 @@ + #define PTHREAD_STACK_MIN 1024 + + /* ++ * Some fd flag defines that are necessary to distinguish between posix ++ * behavior and bsd4.3 behavior. ++ */ ++#define __FD_NONBLOCK O_NONBLOCK ++ ++/* + * Static machdep_pthread initialization values. + * For initial thread only. + */ +@@ -70,7 +80,27 @@ + + #if defined(PTHREAD_KERNEL) + +-int machdep_save_state __P((void)); ++ ++#ifndef __machdep_stack_get ++#define __machdep_stack_get(x) (x)->machdep_stack ++#endif ++#ifndef __machdep_stack_set ++#define __machdep_stack_set(x, y) (x)->machdep_stack = y ++#endif ++#ifndef __machdep_stack_repl ++#define __machdep_stack_repl(x, y) \ ++{ \ ++ if (stack = __machdep_stack_get(x)) { \ ++ __machdep_stack_free(stack); \ ++ } \ ++ __machdep_stack_set(x, y); \ ++} ++#endif ++ ++void * __machdep_stack_alloc __P_((size_t)); ++void __machdep_stack_free __P_((void *)); ++ ++int machdep_save_state __P_((void)); + + #endif + diff --git a/devel/mit-pthreads/patches/patch-bm b/devel/mit-pthreads/patches/patch-bm new file mode 100644 index 00000000000..e6f58577328 --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bm @@ -0,0 +1,261 @@ +$NetBSD: patch-bm,v 1.1 1999/07/29 16:44:43 bad Exp $ + +--- /dev/null Wed Jul 28 16:32:34 1999 ++++ machdep/engine-m68000-netbsd.c Wed Jul 28 23:54:31 1999 +@@ -0,0 +1,256 @@ ++/* ==== machdep.c ============================================================ ++ * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu ++ * ++ * Copyright (c) 1993 by Chris Provenzano, proven@mit.edu ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. All advertising materials mentioning features or use of this software ++ * must display the following acknowledgement: ++ * This product includes software developed by Chris Provenzano. ++ * 4. The name of Chris Provenzano may not be used to endorse or promote ++ * products derived from this software without specific prior written ++ * permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY ++ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * Description : Machine dependent functions for NetBSD on i386 ++ * ++ * 1.00 93/08/04 proven ++ * -Started coding this file. ++ * ++ * m68k work from David Leonard <david.leonard@it.uq.edu.au>. ++ * updated and NetBSD/m68k work from Andy Finnell <andyf@vei.net>. ++ * ++ */ ++ ++#ifndef lint ++static const char rcsid[] = "$Id: patch-bm,v 1.1 1999/07/29 16:44:43 bad Exp $"; ++#endif ++ ++#include "pthread.h" ++#include <sys/syscall.h> ++#include <sys/stat.h> ++ ++/* ========================================================================== ++ * machdep_save_state() ++ */ ++int machdep_save_state(void) ++{ ++ return( _setjmp(pthread_run->machdep_data.machdep_state) ); ++} ++ ++/* ========================================================================== ++ * machdep_restore_state() ++ */ ++void machdep_restore_state(void) ++{ ++ _longjmp(pthread_run->machdep_data.machdep_state, 1); ++} ++ ++/* ========================================================================== ++ * machdep_save_state() ++ */ ++void machdep_save_float_state(struct pthread * pthread) ++{ ++ char * fdata = pthread->machdep_data.machdep_fstate; ++ ++ __asm__ ( "fmovem fp0-fp7,%0"::"m" (*fdata) ); ++ __asm__ ( "fmovem fpcr/fpsr/fpi,%0"::"m" (fdata[80]) ); ++} ++ ++/* ========================================================================== ++ * machdep_restore_float_state() ++ */ ++void machdep_restore_float_state(void) ++{ ++ char * fdata = pthread_run->machdep_data.machdep_fstate; ++ ++ __asm__ ( "fmovem %0,fp0-fp7"::"m" (*fdata) ); ++ __asm__ ( "fmovem %0,fpcr/fpsr/fpi"::"m" (fdata[80]) ); ++ ++} ++ ++/* ========================================================================== ++ * machdep_set_thread_timer() ++ */ ++void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread) ++{ ++ if (setitimer(ITIMER_VIRTUAL, &(machdep_pthread->machdep_timer), NULL)) { ++ PANIC(); ++ } ++} ++ ++/* ========================================================================== ++ * machdep_unset_thread_timer() ++ */ ++void machdep_unset_thread_timer(struct machdep_pthread *machdep_pthread) ++{ ++ struct itimerval zeroval = { { 0, 0 }, { 0, 0 } }; ++ ++ if (setitimer(ITIMER_VIRTUAL, &zeroval, NULL)) { ++ PANIC(); ++ } ++} ++ ++/* ========================================================================== ++ * __machdep_stack_free() ++ */ ++void __machdep_stack_free(void * stack) ++{ ++ free(stack); ++} ++ ++/* ========================================================================== ++ * __machdep_stack_alloc() ++ */ ++void * __machdep_stack_alloc(size_t size) ++{ ++ void * stack; ++ ++ return((void*)malloc(size)); ++} ++ ++/* ========================================================================== ++ * machdep_pthread_cleanup() ++ */ ++void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread) ++{ ++ return(machdep_pthread->machdep_stack); ++} ++ ++/* ========================================================================== ++ * machdep_pthread_start() ++ */ ++void machdep_pthread_start(void) ++{ ++ context_switch_done(); ++ pthread_sched_resume(); ++ ++ /* Run current thread's start routine with argument */ ++ pthread_exit( ++ pthread_run->machdep_data.start_routine( ++ pthread_run->machdep_data.start_argument ++ ) ++ ); ++ ++ /* should never reach here */ ++ PANIC(); ++} ++ ++/* ========================================================================== ++ * __machdep_pthread_create() ++ */ ++void __machdep_pthread_create(struct machdep_pthread *machdep_pthread, ++ void *(* start_routine)(), void *start_argument, ++ long stack_size, long nsec, long flags) ++{ ++ machdep_pthread->start_routine = start_routine; ++ machdep_pthread->start_argument = start_argument; ++ ++ machdep_pthread->machdep_timer.it_value.tv_sec = 0; ++ machdep_pthread->machdep_timer.it_interval.tv_sec = 0; ++ machdep_pthread->machdep_timer.it_interval.tv_usec = 0; ++ machdep_pthread->machdep_timer.it_value.tv_usec = nsec / 1000; ++ ++ _setjmp(machdep_pthread->machdep_state); ++ /* ++ * Set up new stack frame so that it looks like it ++ * returned from a longjmp() to the beginning of ++ * machdep_pthread_start(). ++ * ++ * state is the set_jmp structure, which for m68k is: ++ * long onstack_flag; // [0] ++ * long sigmask; // [1] ++ * long sp; // [2] ++ * long fp; // [3] ++ * long ap; // [4] ++ * long pc; // [5] ++ * long ps; // [6] ++ * long regs[10]; // non scratch registers ++ */ ++ machdep_pthread->machdep_state[5] = (long)machdep_pthread_start; ++ ++ /* Stack starts high and builds down. */ ++ machdep_pthread->machdep_state[2] = ++ (int)machdep_pthread->machdep_stack + stack_size; ++} ++ ++/* ========================================================================== ++ * machdep_sys_wait3() ++ */ ++machdep_sys_wait3(int * b, int c, int * d) ++{ ++ return(machdep_sys_wait4(0, b, c, d)); ++} ++ ++/* ========================================================================== ++ * machdep_sys_waitpid() ++ */ ++machdep_sys_waitpid(int a, int * b, int c) ++{ ++ return(machdep_sys_wait4(a, b, c, NULL)); ++} ++ ++/* ========================================================================== ++ * machdep_sys_getdtablesize() ++ */ ++machdep_sys_getdtablesize() ++{ ++ return(sysconf(_SC_OPEN_MAX)); ++} ++ ++/* ========================================================================== ++ * machdep_sys_getdirentries() ++ */ ++machdep_sys_getdirentries(int fd, char * buf, int len, int * seek) ++{ ++ return(machdep_sys_getdents(fd, buf, len)); ++} ++ ++/* ========================================================================== ++ * machdep_sys_lseek() ++ */ ++off_t machdep_sys_lseek(int fd, off_t offset, int whence) ++{ ++ extern off_t __syscall(); ++ ++ return(__syscall((quad_t)SYS_lseek, fd, 0, offset, whence)); ++} ++ ++int machdep_sys_ftruncate( int fd, off_t length) ++{ ++ quad_t q; ++ int rv; ++ ++ q = __syscall((quad_t)SYS_ftruncate, fd,0, length); ++ if( /* LINTED constant */ sizeof( quad_t ) == sizeof( register_t ) || ++ /* LINTED constant */ BYTE_ORDER == LITTLE_ENDIAN ) ++ rv = (int)q; ++ else ++ rv = (int)((u_quad_t)q >> 32); ++ ++ return rv; ++} ++ ++int machdep_sys_fstat( int f, struct stat* st ) ++{ ++ return __fstat13(f,st); ++} diff --git a/devel/mit-pthreads/patches/patch-bn b/devel/mit-pthreads/patches/patch-bn new file mode 100644 index 00000000000..11a66eda1b4 --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bn @@ -0,0 +1,87 @@ +$NetBSD: patch-bn,v 1.1 1999/07/29 16:44:43 bad Exp $ + +--- /dev/null Tue Jul 27 03:18:59 1999 ++++ machdep/syscall-m68000-netbsd.S Wed Jul 7 04:29:09 1999 +@@ -0,0 +1,82 @@ ++ ++#ifndef lint ++ .text ++ .asciz "$Id: patch-bn,v 1.1 1999/07/29 16:44:43 bad Exp $"; ++#endif ++ ++#include <machine/asm.h> ++#include <sys/syscall.h> ++ ++#ifdef __STDC__ ++#define SYSCALL(x) .even; ENTRY(machdep_sys_ ## x); \ ++ movl \#SYS_ ## x,d0; trap \#0; jcs err; rts ++#else /* !__STDC__ */ ++#define SYSCALL(x) .even; ENTRY(machdep_sys_/**/x); \ ++ movl #SYS_/**/x,d0; trap #0; jcs err; rts ++#endif /* !__STDC__ */ ++ ++/* ++ * Initial asm stuff for all functions. ++ */ ++ .text ++ .even ++ ++ ++/* ========================================================================== ++ * error code for all syscalls. The error value is returned as the negative ++ * of the errno value. ++ */ ++ ++err: ++ negl d0 ++ rts ++ ++/* ========================================================================== ++ * machdep_sys_pipe ++ */ ++ .even ++ENTRY(machdep_sys_pipe); ++ movl #SYS_pipe,d0 ++ trap #0 ++ jcs err ++ movl sp@(4),a0 ++ movl d0,a0@+ ++ movl d1,a0@ ++ clrl d0 ++ rts ++ ++#ifndef SYS___sigsuspend14 ++ .even ++ENTRY(machdep_sys_sigsuspend) ++ movl sp@(4),a0 ++ movl a0@,sp@(4) ++ movl #SYS_compat_13_sigsuspend13,d0 ++ trap #0 ++ jcs err ++ clrl d0 ++ rts ++#endif ++ ++#ifndef SYS___sigprocmask14 ++ .even ++ENTRY(machdep_sys_sigprocmask) ++ tstl sp@(8) ++ jne gotptr ++/* movl #0,sp@(8) /* null mask pointer; block empty set */ ++ movl #1,sp@(4) ++ jra doit ++gotptr: ++ movl sp@(8),a0 ++ movl a0@,sp@(8) ++doit: ++ movl #SYS_compat_13_sigprocmask13,d0 ++ trap #0 ++ jcs err ++ tstl sp@(12) ++ jeq out ++ movl sp@(12),a0 ++ movl d0,a0@ ++out: ++ clrl d0 ++ rts ++#endif diff --git a/devel/mit-pthreads/patches/patch-bo b/devel/mit-pthreads/patches/patch-bo new file mode 100644 index 00000000000..1fdf39afdf0 --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bo @@ -0,0 +1,48 @@ +$NetBSD: patch-bo,v 1.1 1999/07/29 16:44:44 bad Exp $ + +--- /dev/null Tue Jul 27 03:18:59 1999 ++++ machdep/syscall-template-m68000-netbsd.S Wed Jul 7 04:29:09 1999 +@@ -0,0 +1,43 @@ ++#include <machine/asm.h> ++#include <sys/syscall.h> ++ ++#ifdef SYS___sigsuspend14 ++#define SYS_sigsuspend SYS___sigsuspend14 ++#endif ++#ifdef SYS___sigprocmask14 ++#define SYS_sigprocmask SYS___sigprocmask14 ++#endif ++ ++ ++#ifdef __STDC__ ++#define IMM # ++#define SYSCALL(x) .even; \ ++ ENTRY(machdep_sys_ ## x); \ ++ movl IMM SYS_ ## x,d0; \ ++ trap IMM 0; \ ++ jcs err; \ ++ rts ++#else /* !__STDC__ */ ++#define SYSCALL(x) .even; ENTRY(machdep_sys_/**/x); \ ++ movl #SYS_/**/x,d0; trap #0; jcs err; rts ++#endif /* !__STDC__ */ ++ ++/* ++ * Initial asm stuff for all functions. ++ */ ++ .text ++ .even ++ ++ ++/* ========================================================================== ++ * error code for all syscalls. The error value is returned as the negative ++ * of the errno value. ++ */ ++ ++err: ++ negl d0 ++ rts ++ ++#define XSYSCALL(NAME) SYSCALL(NAME) ++ ++XSYSCALL(SYSCALL_NAME) diff --git a/devel/mit-pthreads/patches/patch-bp b/devel/mit-pthreads/patches/patch-bp new file mode 100644 index 00000000000..43fbb0b2acb --- /dev/null +++ b/devel/mit-pthreads/patches/patch-bp @@ -0,0 +1,34 @@ +$NetBSD: patch-bp,v 1.1 1999/07/29 16:44:44 bad Exp $ + +--- config/config.guess.orig Sun Jul 7 05:51:23 1996 ++++ config/config.guess Tue Jul 27 16:55:36 1999 +@@ -261,8 +261,29 @@ + CRAY-2:UNICOS:*:*) + echo cray2-cray-unicos + exit 0 ;; ++ amiga:NetBSD:*:*) ++ echo m68k-amiga-netbsd${UNAME_RELEASE} ++ exit 0 ;; ++ atari:NetBSD:*:*) ++ echo m68k-atari-netbsd${UNAME_RELEASE} ++ exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} ++ exit 0 ;; ++ mac68k:NetBSD:*:*) ++ echo m68k-apple-netbsd${UNAME_RELEASE} ++ exit 0 ;; ++ mvme68:NetBSD:*:*) ++ echo m68k-motorola-netbsd${UNAME_RELEASE} ++ exit 0 ;; ++ next68k:NetBSD:*:*) ++ echo m68k-next-netbsd${UNAME_RELEASE} ++ exit 0 ;; ++ sun3:NetBSD:*:*) ++ echo m68k-sun-netbsd${UNAME_RELEASE} ++ exit 0 ;; ++ x68k:NetBSD:*:*) ++ echo m68k-sharp-netbsd${UNAME_RELEASE} + exit 0 ;; + i[34]86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |