[703] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

patches to get 1.60 beta6 to build on ELF NetBSD/alpha systems

daemon@ATHENA.MIT.EDU (Chris G. Demetriou)
Thu Aug 14 22:27:52 1997

To: pthreads-bugs@MIT.EDU
Cc: "Chris G. Demetriou" <cgd@pa.dec.com>, pthreads@MIT.EDU
From: "Chris G. Demetriou" <cgd@pa.dec.com>
Date: Thu, 14 Aug 97 18:57:55 -0700

Enclosed below are patches to pthreads 1.60 beta6 to build on
current NetBSD/alpha systems (which use ELF).  With these patches,
pthreads passes 'make check.'

As an aside, the test_switch test generates _340k_ of output ("a"
for a while, then "ab" for a while) when run one the machine I was
testing on.  In my opinion, that's a ... bit excessive, especially
since 'make check' has to be run interactively!



chris
============================================================================
diff -rc pthreads-1_60_beta6.orig/config/Makefile.in pthreads-1_60_beta6/config/Makefile.in
*** pthreads-1_60_beta6.orig/config/Makefile.in	Thu Mar 21 20:29:54 1996
--- pthreads-1_60_beta6/config/Makefile.in	Thu Aug 14 17:56:55 1997
***************
*** 29,35 ****
  # pathname for srcdir here, and live with it.
  srcdir = $(srctop)
  
! beforeinstall:: install-dirs
  
  .include "${srcdir}/pthreads/Makefile.inc"
  .include "${srcdir}/stdlib/Makefile.inc"
--- 29,35 ----
  # pathname for srcdir here, and live with it.
  srcdir = $(srctop)
  
! beforeinstall: install-dirs
  
  .include "${srcdir}/pthreads/Makefile.inc"
  .include "${srcdir}/stdlib/Makefile.inc"
diff -rc pthreads-1_60_beta6.orig/machdep/syscall-alpha-netbsd-1.1.S pthreads-1_60_beta6/machdep/syscall-alpha-netbsd-1.1.S
*** pthreads-1_60_beta6.orig/machdep/syscall-alpha-netbsd-1.1.S	Wed Nov 13 13:03:28 1996
--- pthreads-1_60_beta6/machdep/syscall-alpha-netbsd-1.1.S	Thu Aug 14 18:03:27 1997
***************
*** 35,54 ****
  	.frame	sp,0,ra					;\
  	ldiq	v0, CONCAT(SYS_,x)			;\
  	CHMK()						;\
! 	beq	a3, 2f					;\
! 	br	gp, 1f					;\
! 1:							;\
  	/* Load gp so we can find cerror to jump to.  */;\
  	ldgp	gp, 0(gp)				;\
! 	jmp	zero, machdep_cerror				;\
! 2:
  
  #define XSYSCALL(x)	SYSCALL(x) ; RET ; .end CONCAT(machdep_sys_,x)
  
  	.globl	machdep_cerror 
  machdep_cerror:
! 	br	t0, 1f
! 1:
  	ldgp	gp, 0(t0)
  	stl	v0, errno
  #if 0
--- 35,54 ----
  	.frame	sp,0,ra					;\
  	ldiq	v0, CONCAT(SYS_,x)			;\
  	CHMK()						;\
! 	beq	a3, CONCAT(Lsys_noerr_,x)		;\
! 	br	gp, CONCAT(Lsys_err_,x)			;\
! CONCAT(Lsys_err_,x):					;\
  	/* Load gp so we can find cerror to jump to.  */;\
  	ldgp	gp, 0(gp)				;\
! 	jmp	zero, machdep_cerror			;\
! CONCAT(Lsys_noerr_,x):
  
  #define XSYSCALL(x)	SYSCALL(x) ; RET ; .end CONCAT(machdep_sys_,x)
  
  	.globl	machdep_cerror 
  machdep_cerror:
! 	br	t0, Lmachdep_cerror_setgp
! Lmachdep_cerror_setgp:
  	ldgp	gp, 0(t0)
  	stl	v0, errno
  #if 0
diff -rc pthreads-1_60_beta6.orig/machdep/syscall-template-alpha-netbsd-1.1.S pthreads-1_60_beta6/machdep/syscall-template-alpha-netbsd-1.1.S
*** pthreads-1_60_beta6.orig/machdep/syscall-template-alpha-netbsd-1.1.S	Mon Apr 22 23:15:42 1996
--- pthreads-1_60_beta6/machdep/syscall-template-alpha-netbsd-1.1.S	Thu Aug 14 17:58:14 1997
***************
*** 31,43 ****
  	.frame	sp,0,ra					;\
  	ldiq	v0, SYS_##x				;\
  	CHMK()						;\
! 	beq	a3, 2f					;\
! 	br	gp, 1f					;\
! 1:							;\
  	/* Load gp so we can find cerror to jump to.  */;\
  	ldgp	gp, 0(gp)				;\
! 	jmp	zero, machdep_cerror				;\
! 2:
  
  #define SIMPLE_SYSCALL(x)	SYSCALL(x) ; ret ; .end machdep_sys_##x
  
--- 31,43 ----
  	.frame	sp,0,ra					;\
  	ldiq	v0, SYS_##x				;\
  	CHMK()						;\
! 	beq	a3, Lsys_noerr_##x			;\
! 	br	gp, Lsys_err_##x			;\
! Lsys_err_##x:						;\
  	/* Load gp so we can find cerror to jump to.  */;\
  	ldgp	gp, 0(gp)				;\
! 	jmp	zero, machdep_cerror			;\
! Lsys_noerr_##x:
  
  #define SIMPLE_SYSCALL(x)	SYSCALL(x) ; ret ; .end machdep_sys_##x
  
diff -rc pthreads-1_60_beta6.orig/pthreads/process.c pthreads-1_60_beta6/pthreads/process.c
*** pthreads-1_60_beta6.orig/pthreads/process.c	Tue Nov 12 05:45:16 1996
--- pthreads-1_60_beta6/pthreads/process.c	Thu Aug 14 18:12:49 1997
***************
*** 40,45 ****
--- 40,47 ----
  #include <stdarg.h>
  #include <unistd.h>
  
+ extern void *alloca();
+ 
  #ifndef lint
  static const char rcsid[] = "$Id: process.c,v 1.53.4.1 1996/11/12 13:45:16 proven Exp $";
  #endif

home help back first fref pref prev next nref lref last post