From 6d12300f90fad2255ee8886b22df9d054ead72cb Mon Sep 17 00:00:00 2001 From: kan Date: Tue, 2 Sep 2003 19:37:11 +0000 Subject: Rethink the way thr_libc.So is generated. Relying on GCC to extract only needed symbols from libc_pic is not working on sparc64. Requested by: jake --- lib/libpthread/support/Makefile.inc | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'lib/libpthread/support') diff --git a/lib/libpthread/support/Makefile.inc b/lib/libpthread/support/Makefile.inc index 1b445ab..c8176b3 100644 --- a/lib/libpthread/support/Makefile.inc +++ b/lib/libpthread/support/Makefile.inc @@ -1,9 +1,37 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/support +.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string + +CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH} + +SYSCALLS= clock_gettime \ + kse_create \ + kse_exit \ + kse_release \ + kse_thr_interrupt \ + kse_wakeup \ + sigaction \ + sigprocmask \ + sigtimedwait \ + write + +SYSCALL_SRC= ${SYSCALLS:S/$/.S/} +SYSCALL_OBJ= ${SYSCALLS:S/$/.So/} + +${SYSCALL_SRC}: + printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET} + +LIBC_OBJS= sigsetops.So \ + bcopy.So \ + bzero.So \ + memcpy.So \ + memset.So \ + strcpy.So \ + strlen.So SOBJS+= thr_libc.So -CLEANFILES+= thr_support.So +CLEANFILES+= ${SYSCALL_SRC} ${SYSCALL_OBJ} ${LIBC_OBJS} + +thr_libc.So: ${SYSCALL_OBJ} ${LIBC_OBJS} + ${CC} -fPIC -nostdlib -o ${.TARGET} -r ${.ALLSRC} -thr_libc.So: thr_support.So - ${CC} -nostdlib -o ${.TARGET} -r thr_support.So -lc_pic -- cgit v1.1