summaryrefslogtreecommitdiff
path: root/libexec/ld.so/Makefile
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-08-27 21:59:53 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-08-27 21:59:53 +0000
commit7f5398b1f45a6105b16eeb5672676e0ada0e6d37 (patch)
tree7ed36e3384bee80b519d279b09da113e8d23a450 /libexec/ld.so/Makefile
parent1f33e8fe5544ebb65e81ef2b4c9a5924e3e5a7f2 (diff)
Replace heaps of hand-written syscall stubs with a simpler framework
which is largely MI. ok visa kettenis
Diffstat (limited to 'libexec/ld.so/Makefile')
-rw-r--r--libexec/ld.so/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/libexec/ld.so/Makefile b/libexec/ld.so/Makefile
index 4c1cc668879..080aea92a70 100644
--- a/libexec/ld.so/Makefile
+++ b/libexec/ld.so/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.64 2017/08/19 17:28:32 deraadt Exp $
+# $OpenBSD: Makefile,v 1.65 2017/08/27 21:59:49 deraadt Exp $
SUBDIR=ldconfig ldd
MAN= ld.so.1
@@ -21,6 +21,18 @@ SRCS+= path.c util.c sod.c strsep.c strtol.c dir.c library_subr.c
SRCS+= dl_realpath.c dl_uname.c dl_dirname.c strlcat.c strlen.c trace.c
SRCS+= malloc.c reallocarray.c tib.c
+syscall=__syscall close exit fstat __getcwd getdents getentropy getthrid \
+ issetugid mprotect munmap open pledge read readlink sendsyslog \
+ __set_tcb sysctl thrkill utrace write
+
+.for _i in ${syscall}
+OBJS+=dl_${_i}.o
+dl_${_i}.o: SYS.h
+ printf '#include "SYS.h"\nDL_SYSCALL(${_i})\n' | \
+ ${CC} ${DEBUG} -c -fPIC ${CFLAGS:M-[ID]*} ${CFLAGS:M-pipe} ${AINC} -P \
+ -x assembler-with-cpp - ${DFLAGS} -MF ${.TARGET:R}.d -o ${.TARGET}
+.endfor
+
.if (${MACHINE_ARCH} == "i386")
SRCS+= library_mquery.c
.else