diff options
author | David Leonard <d@cvs.openbsd.org> | 2000-01-06 07:11:42 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 2000-01-06 07:11:42 +0000 |
commit | 652775e46249924fe0c19436c293dda97b35fda5 (patch) | |
tree | b22fd653924a9c7c353ad6a1c70d163363b43a7f /lib | |
parent | 1ca2190aa7c6931b4176019ab66a476ee6037248 (diff) |
use uthread_machdep.S if exists; conditionally build syscall objects for libc_r
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc_r/sys/Makefile.inc | 33 | ||||
-rw-r--r-- | lib/libpthread/sys/Makefile.inc | 33 |
2 files changed, 56 insertions, 10 deletions
diff --git a/lib/libc_r/sys/Makefile.inc b/lib/libc_r/sys/Makefile.inc index 79b6afe2a4d..91c5982d309 100644 --- a/lib/libc_r/sys/Makefile.inc +++ b/lib/libc_r/sys/Makefile.inc @@ -1,13 +1,36 @@ -# $Id: Makefile.inc,v 1.4 1999/11/25 07:01:29 d Exp $ -# $OpenBSD: Makefile.inc,v 1.4 1999/11/25 07:01:29 d Exp $ +# $Id: Makefile.inc,v 1.5 2000/01/06 07:11:41 d Exp $ +# $OpenBSD: Makefile.inc,v 1.5 2000/01/06 07:11:41 d Exp $ -.PATH: ${.CURDIR}/sys ${.CURDIR}/arch/${MACHINE_ARCH} +.PATH: ${LIBC_RSRCDIR}/sys ${LIBC_RSRCDIR}/arch/${MACHINE_ARCH} SRCS+= uthread_error.c _atomic_lock.c slow_atomic_lock.c +.if exists(${LIBC_RSRCDIR}/arch/${MACHINE_ARCH}/uthread_machdep.S) +SRCS+= uthread_machdep.S +.endif + +.if (${LIB} == "c_r") + +# +# All syscalls are renamed as _thread_sys_{syscall}. +# This is a list of syscalls that are renamed as _thread_sys_{syscall} +# so that libc_r can provide replacement functions. +# +HIDDEN_SYSCALLS= accept.o bind.o close.o connect.o dup.o dup2.o \ + execve.o fchflags.o fchmod.o fchown.o fcntl.o \ + flock.o fpathconf.o fstat.o fstatfs.o fsync.o getdirentries.o \ + getlogin.o getpeername.o getsockname.o getsockopt.o ioctl.o listen.o \ + msync.o nanosleep.o open.o pipe.o poll.o read.o readv.o recvfrom.o \ + recvmsg.o sched_yield.o select.o sendmsg.o sendto.o \ + setsockopt.o shutdown.o sigaction.o sigaltstack.o \ + sigprocmask.o sigsuspend.o \ + socket.o socketpair.o wait4.o write.o writev.o \ + _exit.o + SRCS+= _sys_aliases.c CLEANFILES += _sys_aliases.c -_sys_aliases.c: ${.CURDIR}/Makefile ${LIBCSRCDIR}/sys/Makefile.inc + +_sys_aliases.c: ${LIBC_RSRCDIR}/Makefile ${LIBCSRCDIR}/sys/Makefile.inc echo '#include <sys/cdefs.h>' > ${.TARGET} .if ${MACHINE} == "alpha" # This kludge will disappear when we shift to -lpthread @@ -20,4 +43,4 @@ _sys_aliases.c: ${.CURDIR}/Makefile ${LIBCSRCDIR}/sys/Makefile.inc *) echo "__indr_reference(_thread_sys_$$fn,$$fn);";; \ esac; \ done >> ${.TARGET} - +.endif diff --git a/lib/libpthread/sys/Makefile.inc b/lib/libpthread/sys/Makefile.inc index 79b6afe2a4d..91c5982d309 100644 --- a/lib/libpthread/sys/Makefile.inc +++ b/lib/libpthread/sys/Makefile.inc @@ -1,13 +1,36 @@ -# $Id: Makefile.inc,v 1.4 1999/11/25 07:01:29 d Exp $ -# $OpenBSD: Makefile.inc,v 1.4 1999/11/25 07:01:29 d Exp $ +# $Id: Makefile.inc,v 1.5 2000/01/06 07:11:41 d Exp $ +# $OpenBSD: Makefile.inc,v 1.5 2000/01/06 07:11:41 d Exp $ -.PATH: ${.CURDIR}/sys ${.CURDIR}/arch/${MACHINE_ARCH} +.PATH: ${LIBC_RSRCDIR}/sys ${LIBC_RSRCDIR}/arch/${MACHINE_ARCH} SRCS+= uthread_error.c _atomic_lock.c slow_atomic_lock.c +.if exists(${LIBC_RSRCDIR}/arch/${MACHINE_ARCH}/uthread_machdep.S) +SRCS+= uthread_machdep.S +.endif + +.if (${LIB} == "c_r") + +# +# All syscalls are renamed as _thread_sys_{syscall}. +# This is a list of syscalls that are renamed as _thread_sys_{syscall} +# so that libc_r can provide replacement functions. +# +HIDDEN_SYSCALLS= accept.o bind.o close.o connect.o dup.o dup2.o \ + execve.o fchflags.o fchmod.o fchown.o fcntl.o \ + flock.o fpathconf.o fstat.o fstatfs.o fsync.o getdirentries.o \ + getlogin.o getpeername.o getsockname.o getsockopt.o ioctl.o listen.o \ + msync.o nanosleep.o open.o pipe.o poll.o read.o readv.o recvfrom.o \ + recvmsg.o sched_yield.o select.o sendmsg.o sendto.o \ + setsockopt.o shutdown.o sigaction.o sigaltstack.o \ + sigprocmask.o sigsuspend.o \ + socket.o socketpair.o wait4.o write.o writev.o \ + _exit.o + SRCS+= _sys_aliases.c CLEANFILES += _sys_aliases.c -_sys_aliases.c: ${.CURDIR}/Makefile ${LIBCSRCDIR}/sys/Makefile.inc + +_sys_aliases.c: ${LIBC_RSRCDIR}/Makefile ${LIBCSRCDIR}/sys/Makefile.inc echo '#include <sys/cdefs.h>' > ${.TARGET} .if ${MACHINE} == "alpha" # This kludge will disappear when we shift to -lpthread @@ -20,4 +43,4 @@ _sys_aliases.c: ${.CURDIR}/Makefile ${LIBCSRCDIR}/sys/Makefile.inc *) echo "__indr_reference(_thread_sys_$$fn,$$fn);";; \ esac; \ done >> ${.TARGET} - +.endif |