Subject: Re: Build fails with undefined reference to `PT_SLEEPUC'
To: None <port-vax@netbsd.org>
From: Christopher SEKIYA <wileyc@rezrov.net>
List: port-vax
Date: 07/17/2003 19:53:37
On Tue, Jul 08, 2003 at 09:21:29PM -0700, Matt Thomas wrote:

> I have fixed (but not yet verified) this so your builds will complete.

The fix that hit the CVS repository appears to be incomplete.  The following
is required for builds to complete.

-- Chris

Index: genassym.cf
===================================================================
RCS file: /cvsroot/src/lib/libpthread/arch/vax/genassym.cf,v
retrieving revision 1.1
diff -u -r1.1 genassym.cf
--- genassym.cf	2003/01/19 23:20:14	1.1
+++ genassym.cf	2003/07/17 10:50:46
@@ -47,10 +47,10 @@
 define PT_STATE         offsetof(struct pthread_st, pt_state)
 define PT_SWITCHTO      offsetof(struct pthread_st, pt_switchto)
 define PT_SWITCHTOUC    offsetof(struct pthread_st, pt_switchtouc)
-define PT_SLEEPUC       offsetof(struct pthread_st, pt_sleepuc)
 define PT_SPINLOCKS     offsetof(struct pthread_st, pt_spinlocks)
 define PT_HELDLOCK      offsetof(struct pthread_st, pt_heldlock)
 define PT_UC            offsetof(struct pthread_st, pt_uc)
+define PT_TRAPUC    	offsetof(struct pthread_st, pt_trapuc)
 define CONTEXTSIZE      sizeof(ucontext_t)
 define UC_FLAGS		offsetof(ucontext_t, uc_flags)
 define UC_GREGS		offsetof(ucontext_t, uc_mcontext.__gregs)
Index: pthread_switch.S
===================================================================
RCS file: /cvsroot/src/lib/libpthread/arch/vax/pthread_switch.S,v
retrieving revision 1.3
diff -u -r1.3 pthread_switch.S
--- pthread_switch.S	2003/07/09 00:55:45	1.3
+++ pthread_switch.S	2003/07/17 10:50:46
@@ -75,7 +75,7 @@
 	calls	$1,_getcontext_u
 
 	/* Edit the context to make it continue below, rather than here */
-	movab	switch_return_point,(UC_GREGS + _REG_PC)(%sp)
+	movab	pthread__switch_return_point,(UC_GREGS + _REG_PC)(%sp)
 
 	movq	4(%ap),%r2
 	movl	%sp,PT_UC(%r2)		/* self->pt_uc = &context */
@@ -85,7 +85,7 @@
 	pushl	%sp			/* sp = &context */
 	calls	$1,_setcontext_u
 	NOTREACHED
-switch_return_point:	
+NENTRY(pthread__switch_return_point, 0)
 	ret
 
 /*