summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2000-05-15 06:10:22 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2000-05-15 06:10:22 +0000
commit1a4720735b150f9eed1b086068b33804b027e4bf (patch)
tree2d4c1cfcca8df79dcdfe436e1f2262a01e5ff645 /lib
parentec93d5e14c9a1724996c1462a2e25c37f388dae6 (diff)
Add support for building libraries with debugging information in them.
Enable by setting DEBUGLIBS=yes in /etc/mk.conf, then -g libraries will get installed in /usr/lib/debug. This directory will be searched first if gcc is given the -g flag during the link stage.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/Makefile.inc18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index e0a85b85a25..cce9047dc8b 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.35 2000/05/01 23:13:17 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.36 2000/05/15 06:10:21 niklas Exp $
# $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $
# @(#)Makefile.inc 8.1 (Berkeley) 6/17/93
@@ -61,15 +61,24 @@ ASM= accept.o access.o acct.o adjtime.o bind.o chdir.o chflags.o chmod.o \
utimes.o vadvise.o wait4.o write.o writev.o xfspioctl.o __semctl.o \
__syscall.o __sysctl.o
+GASM= ${ASM:.o=.go}
PASM= ${ASM:.o=.po}
SASM= ${ASM:.o=.so}
PSEUDO= _exit.o _getlogin.o _setlogin.o _ptrace.o
+GPSEUDO=${PSEUDO:.o=.go}
PPSEUDO=${PSEUDO:.o=.po}
SPSEUDO=${PSEUDO:.o=.so}
OBJS+= ${ASM} ${PSEUDO}
+${GASM}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h
+ @echo creating ${.TARGET}
+ @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \
+ ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
${PASM}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h
@echo creating ${.TARGET}
@printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \
@@ -96,6 +105,13 @@ ${ASM}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+${GPSEUDO}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h
+ @echo creating ${.TARGET}
+ @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \
+ ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
${PPSEUDO}: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/SYS.h /usr/include/sys/syscall.h
@echo creating ${.TARGET}
@printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \