Subject: Re: releasebuild for sparc64 -current fails
To: None <current-users@netbsd.org>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: current-users
Date: 06/15/2003 12:35:29
On Sun, Jun 15, 2003 at 12:14:57PM +0200, Frank Kardel wrote:
> Hi *,
> 
> in current-20030614 a make release fails
> in the regession test for atexit with:
> 
> /usr/btools/bin/sparc64--netbsd-gcc   -o atexit -nostdlib  -Wl,-rpath-link,/src/NetBSD/BUILD.sparc64/lib:/src/NetBSD/BUILD.sparc64/usr/lib  -L/src/NetBSD/BUILD.sparc64/lib /src/NetBSD/BUILD.sparc64/usr/lib/crt0.o /src/NetBSD/BUILD.sparc64/usr/lib/crti.o /src/NetBSD/BUILD.sparc64/usr/lib/crtbegin.o atexit.o -lpthread -L/src/NetBSD/BUILD.sparc64/usr/lib -L/src/NetBSD/BUILD.sparc64/usr/lib  -lgcc -lc -lgcc /src/NetBSD/BUILD.sparc64/usr/lib/crtend.o /src/NetBSD/BUILD.sparc64/usr/lib/crtn.o
> /src/NetBSD/BUILD.sparc64/usr/lib/libpthread.so: undefined reference to `pthread__switch_return_point'
> collect2: ld returned 1 exit status
> *** Error code 1
> 
> Stop.
> nbmake: stopped in /fs/IC35L120AVV207-0-e/src/NetBSD/netbsd/regress/lib/libpthread/atexit
> *** Error code 1
> 
> Stop.
> nbmake: stopped in /fs/IC35L120AVV207-0-e/src/NetBSD/netbsd/regress/lib/libpthread/atexit
> *** Error code 1
> 
> ...
> 
> Is there anything i overlooked?
> 
> Frank

According to Nathan J. Williams lib/libpthread/arch/sparc*/pthread_switch.S
need maintenance (Volunteers?):

1) make pthread__switch more like pthread__locked_switch, and store
   into PT_UC of the old thread after the stack switch. Done a long
   time ago for several architectures, but never done for sparc.   
	 
2) In the code paths that write to PT_SWITCHTO and PT_SWITCTOUC, make
   PT_SWITCHTO set *last*.
      
3) Expose the return point of pthread__locked_switch from (1).


-- 
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)