From 1a4720735b150f9eed1b086068b33804b027e4bf Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Mon, 15 May 2000 06:10:22 +0000 Subject: 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. --- lib/libc/sys/Makefile.inc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lib') 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' | \ -- cgit v1.2.3