summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/mtree/4.4BSD.dist7
-rw-r--r--gnu/egcs/gcc/config/openbsd.h4
-rw-r--r--gnu/egcs/libf2c/Makefile.bsd-wrapper9
-rw-r--r--gnu/egcs/libiberty/Makefile.bsd-wrapper4
-rw-r--r--gnu/egcs/libio/Makefile.bsd-wrapper4
-rw-r--r--gnu/egcs/libobjc/Makefile.bsd-wrapper16
-rw-r--r--gnu/egcs/libstdc++/Makefile.bsd-wrapper107
-rw-r--r--lib/libc/sys/Makefile.inc18
-rw-r--r--share/mk/bsd.README9
-rw-r--r--share/mk/bsd.lib.mk49
-rw-r--r--share/mk/bsd.own.mk5
-rw-r--r--share/mk/sys.mk4
12 files changed, 212 insertions, 24 deletions
diff --git a/etc/mtree/4.4BSD.dist b/etc/mtree/4.4BSD.dist
index 35159005a0f..e37809b8b0b 100644
--- a/etc/mtree/4.4BSD.dist
+++ b/etc/mtree/4.4BSD.dist
@@ -1,4 +1,4 @@
-# $OpenBSD: 4.4BSD.dist,v 1.90 2000/05/02 10:18:23 niklas Exp $
+# $OpenBSD: 4.4BSD.dist,v 1.91 2000/05/15 06:10:20 niklas Exp $
/set type=dir uname=root gname=wheel mode=0755
# .
@@ -250,6 +250,11 @@ xml gname=bin uname=root mode=0755
# ./usr/lib/apache
..
+# ./usr/lib/debug
+debug gname=bin uname=root mode=0755
+# ./usr/lib/debug
+..
+
# ./usr/lib
..
diff --git a/gnu/egcs/gcc/config/openbsd.h b/gnu/egcs/gcc/config/openbsd.h
index f34c87f770a..3f66d2d6726 100644
--- a/gnu/egcs/gcc/config/openbsd.h
+++ b/gnu/egcs/gcc/config/openbsd.h
@@ -116,10 +116,10 @@ Boston, MA 02111-1307, USA. */
#undef LINK_SPEC
#ifdef OBSD_NO_DYNAMIC_LIBRARIES
#define LINK_SPEC \
- "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{assert*}"
+ "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{assert*}"
#else
#define LINK_SPEC \
- "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}}} %{shared:-Bshareable -x} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
+ "%{g:%{!nostdlib:-L/usr/lib/debug}} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}}} %{shared:-Bshareable -x} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
#endif
#undef LIB_SPEC
diff --git a/gnu/egcs/libf2c/Makefile.bsd-wrapper b/gnu/egcs/libf2c/Makefile.bsd-wrapper
index 60c9aa51c78..8c170f6acbe 100644
--- a/gnu/egcs/libf2c/Makefile.bsd-wrapper
+++ b/gnu/egcs/libf2c/Makefile.bsd-wrapper
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.3 1999/11/20 18:08:34 espie Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2000/05/15 06:10:20 niklas Exp $
EGCS_DIR= $(.CURDIR)/..
.if defined(OBJMACHINE)
@@ -75,6 +75,7 @@ F2CEXT = abort derf derfc ef1asc ef1cmc erf erfc exit getarg getenv iargc \
F2CO=${F2CEXT:S/^/libE77\/L/:S/$/.o/}
OBJS+=${F2CO}
+F2CGO=${F2CO:.o=.go}
F2CPO=${F2CO:.o=.po}
F2CSO=${F2CO:.o=.so}
@@ -84,6 +85,12 @@ ${F2CO}: f2cext.c
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+${F2CGO}: f2cext.c
+ @echo "${COMPILE.c} -g -D${.TARGET:T:R} $> -o ${.TARGET}"
+ @${COMPILE.c} -g -D${.TARGET:T:R} $> -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
${F2CPO}: f2cext.c
@echo "${COMPILE.c} -p -D${.TARGET:T:R} $> -o ${.TARGET}"
@${COMPILE.c} -p -D${.TARGET:T:R} $> -o ${.TARGET}.o
diff --git a/gnu/egcs/libiberty/Makefile.bsd-wrapper b/gnu/egcs/libiberty/Makefile.bsd-wrapper
index 13df547a06c..e629c531a08 100644
--- a/gnu/egcs/libiberty/Makefile.bsd-wrapper
+++ b/gnu/egcs/libiberty/Makefile.bsd-wrapper
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.6 1999/12/07 00:42:54 espie Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.7 2000/05/15 06:10:20 niklas Exp $
LIB= iberty
CPPFLAGS+= -I$(.CURDIR) -I$(.CURDIR)/../include -I$(.OBJDIR)
@@ -30,7 +30,7 @@ SRCS= argv.c choose-temp.c concat.c cplus-dem.c \
CLEANFILES+= config.h config.status needed-list
# XXX -- Why are these not removed by the generated Makefile?
-CLEANFILES+= insque.o insque.po insque.so
+CLEANFILES+= insque.o insque.go insque.po insque.so
# and more
CLEANFILES+=Makefile config.cache config.log stamp-h xhost-mkfrag testsuite/Makefile
diff --git a/gnu/egcs/libio/Makefile.bsd-wrapper b/gnu/egcs/libio/Makefile.bsd-wrapper
index e1f683dab41..220c82a1892 100644
--- a/gnu/egcs/libio/Makefile.bsd-wrapper
+++ b/gnu/egcs/libio/Makefile.bsd-wrapper
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.3 1999/05/28 21:53:16 espie Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2000/05/15 06:10:20 niklas Exp $
LIBIO= io
LIBIOSTREAM= iostream
@@ -57,10 +57,12 @@ iostream.list: _G_config.h
clean:
rm -f a.out [Ee]rrs mklog core *.core $(CLEANFILES)
rm -f lib$(LIBIO).a $(LIBIO_SRCS:.c=.o)
+ rm -f lib$(LIBIO)_g.a $(LIBIO_SRCS:.c=.go)
rm -f lib$(LIBIO)_p.a $(LIBIO_SRCS:.c=.po)
rm -f lib$(LIBIO)_pic.a lib$(LIBIO).so.*.* $(LIBIO_SRCS:.c=.so)
rm -f llib-lib$(LIBIO).ln $(LIBIO_SRCS:.c=.ln)
rm -f lib$(LIBIOSTREAM).a $(IOSTREAM_SRCS:.cc=.o)
+ rm -f lib$(LIBIOSTREAM)_g.a $(IOSTREAM_SRCS:.cc=.go)
rm -f lib$(LIBIOSTREAM)_p.a $(IOSTREAM_SRCS:.cc=.po)
rm -f lib$(LIBIOSTREAM)_pic.a lib$(LIBIOSTREAM).so.*.* \
$(IOSTREAM_SRCS:.cc=.so)
diff --git a/gnu/egcs/libobjc/Makefile.bsd-wrapper b/gnu/egcs/libobjc/Makefile.bsd-wrapper
index 4295b1cfc8f..f4adc05545f 100644
--- a/gnu/egcs/libobjc/Makefile.bsd-wrapper
+++ b/gnu/egcs/libobjc/Makefile.bsd-wrapper
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.3 1999/09/24 08:25:14 espie Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2000/05/15 06:10:21 niklas Exp $
LIB= objc
@@ -44,7 +44,7 @@ all: config.status
depend:
cd ${.CURDIR}/../gcc && make -f Makefile.bsd-wrapper config.status target_path
-sendmsg.o sengmsg.po sendmsg.so: runtime-info.h
+sendmsg.o sendmsg.go sendmsg.po sendmsg.so: runtime-info.h
runtime-info.h:
echo "" > tmp-runtime
@@ -70,6 +70,12 @@ gc.o: gc.c
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+gc.go: gc.c
+ @echo "${COMPILE.m} -g ${.IMPSRC} -o ${.TARGET}"
+ @${COMPILE.m} -g ${.IMPSRC} -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
gc.po: gc.c
@echo "${COMPILE.m} -p ${.IMPSRC} -o ${.TARGET}"
@${COMPILE.m} -p ${.IMPSRC} -o ${.TARGET}.o
@@ -88,6 +94,12 @@ gc.so: gc.c
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+.m.go:
+ @echo "${COMPILE.m} -g ${.IMPSRC} -o ${.TARGET}"
+ @${COMPILE.m} -g ${.IMPSRC} -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
.m.po:
@echo "${COMPILE.m} -p ${.IMPSRC} -o ${.TARGET}"
@${COMPILE.m} -p ${.IMPSRC} -o ${.TARGET}.o
diff --git a/gnu/egcs/libstdc++/Makefile.bsd-wrapper b/gnu/egcs/libstdc++/Makefile.bsd-wrapper
index 96af0f54a24..2ff03bd5799 100644
--- a/gnu/egcs/libstdc++/Makefile.bsd-wrapper
+++ b/gnu/egcs/libstdc++/Makefile.bsd-wrapper
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.7 1999/12/07 00:42:54 espie Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.8 2000/05/15 06:10:21 niklas Exp $
IO_DIR= $(.CURDIR)/../libio
LIBIBERTY_DIR= $(.CURDIR)/../libiberty
@@ -74,6 +74,7 @@ $(G_CFG_H):
clean: _SUBDIRUSE
rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
rm -f lib${LIB}.a ${STD_OBJS}
+ rm -f lib${LIB}_g.a ${STD_OBJS:.o=.go}
rm -f lib${LIB}_p.a ${STD_OBJS:.o=.po}
rm -f lib${LIB}_pic.a lib${LIB}.so.*.* ${STD_OBJS:.o=.so}
rm -f llib-l${LIB}.ln ${STD_OBJS:.o=.ln}
@@ -98,10 +99,10 @@ includes:
#
# Misc GNU overridden targets.
#
-$(QIO_OBJS) $(QIO_OBJS:.o=.po) $(QIO_OBJS:.o=.so):
+$(QIO_OBJS) $(QIO_OBJS:.o=.go) $(QIO_OBJS:.o=.po) $(QIO_OBJS:.o=.so):
cd $(IO_DIR); $(MAKE) -f Makefile.bsd-wrapper
-$(QLIBIBERTY_OBJS) $(QLIBIBERTY_OBJS:.o=.po) $(QLIBIBERTY_OBJS:.o=.so):
+$(QLIBIBERTY_OBJS) $(QLIBIBERTY_OBJS:.o=.go) $(QLIBIBERTY_OBJS:.o=.po) $(QLIBIBERTY_OBJS:.o=.so):
cd $(LIBIBERTY_DIR); $(MAKE) -f Makefile.bsd-wrapper
stdexcepti.o: stdexcepti.cc
@@ -110,6 +111,12 @@ stdexcepti.o: stdexcepti.cc
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+stdexcepti.go: stdexcepti.cc
+ @echo "${COMPILE.cc} -frtti -g ${.IMPSRC} -o ${.TARGET}"
+ @${COMPILE.cc} -frtti -g ${.IMPSRC} -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
stdexcepti.po: stdexcepti.cc
@echo "${COMPILE.cc} -frtti -p ${.IMPSRC} -o ${.TARGET}"
@${COMPILE.cc} -frtti -p ${.IMPSRC} -o ${.TARGET}.o
@@ -128,6 +135,12 @@ typeinfoi.o: typeinfoi.cc $(.CURDIR)/std/typeinfo.h
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+typeinfoi.go: typeinfoi.cc $(.CURDIR)/std/typeinfo.h
+ @echo "${COMPILE.cc} -frtti -g ${.IMPSRC} -o ${.TARGET}"
+ @${COMPILE.cc} -frtti -g ${.IMPSRC} -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
typeinfoi.po: typeinfoi.cc $(.CURDIR)/std/typeinfo.h
@echo "${COMPILE.cc} -frtti -p ${.IMPSRC} -o ${.TARGET}"
@${COMPILE.cc} -frtti -p ${.IMPSRC} -o ${.TARGET}.o
@@ -161,6 +174,17 @@ cstrmain.o: sinst.cc $(STD_DIR)/bastring.h \
@$(LD) -x -r cstrmain.o.o -o cstrmain.o
@rm -f cstrmain.o.o
+cstrmain.go: sinst.cc $(STD_DIR)/bastring.h \
+ $(STD_DIR)/bastring.cc $(STD_DIR)/straits.h
+ @echo '$(COMPILE.cc) -g -DC \
+ `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
+ $(.CURDIR)/sinst.cc -o cstrmain.go'
+ @$(COMPILE.cc) -g -DC \
+ `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
+ $(.CURDIR)/sinst.cc -o cstrmain.go.o
+ @$(LD) -X -r cstrmain.go.o -o cstrmain.go
+ @rm -f cstrmain.go.o
+
cstrmain.po: sinst.cc $(STD_DIR)/bastring.h \
$(STD_DIR)/bastring.cc $(STD_DIR)/straits.h
@echo '$(COMPILE.cc) -p -DC \
@@ -194,6 +218,17 @@ cstrio.o: sinst.cc $(STD_DIR)/bastring.h \
@$(LD) -x -r cstrio.o.o -o cstrio.o
@rm -f cstrio.o.o
+cstrio.go: sinst.cc $(STD_DIR)/bastring.h \
+ $(STD_DIR)/bastring.cc $(STD_DIR)/straits.h
+ @echo '$(COMPILE.cc) -g -DC \
+ `for N in $(STRIO); do echo " -D$${N}"; done` \
+ $(.CURDIR)/sinst.cc -o cstrio.go'
+ @$(COMPILE.cc) -g -DC \
+ `for N in $(STRIO); do echo " -D$${N}"; done` \
+ $(.CURDIR)/sinst.cc -o cstrio.go.o
+ @$(LD) -X -r cstrio.go.o -o cstrio.go
+ @rm -f cstrio.go.o
+
cstrio.po: sinst.cc $(STD_DIR)/bastring.h \
$(STD_DIR)/bastring.cc $(STD_DIR)/straits.h
@echo '$(COMPILE.cc) -p -DC \
@@ -227,6 +262,17 @@ fcomplex.o: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
@$(LD) -x -r fcomplex.o.o -o fcomplex.o
@rm -f fcomplex.o.o
+fcomplex.go: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
+ $(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
+ @echo '$(COMPILE.cc) -g -DF \
+ `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o fcomplex.go'
+ @$(COMPILE.cc) -g -DF \
+ `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o fcomplex.go.o
+ @$(LD) -X -r fcomplex.go.o -o fcomplex.go
+ @rm -f fcomplex.go.o
+
fcomplex.po: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
$(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
@echo '$(COMPILE.cc) -p -DF \
@@ -261,6 +307,17 @@ fcomio.o: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
@$(LD) -x -r fcomio.o.o -o fcomio.o
@rm -f fcomio.o.o
+fcomio.go: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
+ $(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
+ @echo '$(COMPILE.cc) -g -DF \
+ `for N in $(COMIO); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o fcomio.go'
+ @$(COMPILE.cc) -g -DF \
+ `for N in $(COMIO); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o fcomio.go.o
+ @$(LD) -X -r fcomio.go.o -o fcomio.go
+ @rm -f fcomio.go.o
+
fcomio.po: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
$(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
@echo '$(COMPILE.cc) -p -DF \
@@ -294,6 +351,17 @@ dcomplex.o: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
@$(LD) -x -r dcomplex.o.o -o dcomplex.o
@rm -f dcomplex.o.o
+dcomplex.go: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
+ $(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
+ @echo '$(COMPILE.cc) -g -DD \
+ `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o dcomplex.go'
+ @$(COMPILE.cc) -g -DD \
+ `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o dcomplex.go.o
+ @$(LD) -X -r dcomplex.go.o -o dcomplex.go
+ @rm -f dcomplex.go.o
+
dcomplex.po: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
$(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
@echo '$(COMPILE.cc) -p -DD \
@@ -327,6 +395,17 @@ dcomio.o: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
@$(LD) -x -r dcomio.o.o -o dcomio.o
@rm -f dcomio.o.o
+dcomio.go: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
+ $(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
+ @echo '$(COMPILE.cc) -g -DD \
+ `for N in $(COMIO); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o dcomio.go'
+ @$(COMPILE.cc) -g -DD \
+ `for N in $(COMIO); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o dcomio.go.o
+ @$(LD) -X -r dcomio.go.o -o dcomio.go
+ @rm -f dcomio.go.o
+
dcomio.po: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
$(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
@echo '$(COMPILE.cc) -p -DD \
@@ -360,6 +439,17 @@ ldcomplex.o: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
@$(LD) -x -r ldcomplex.o.o -o ldcomplex.o
@rm -f ldcomplex.o.o
+ldcomplex.go: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
+ $(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
+ @echo '$(COMPILE.cc) -g -DLD \
+ `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o ldcomplex.go'
+ @$(COMPILE.cc) -g -DLD \
+ `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o ldcomplex.go.o
+ @$(LD) -X -r ldcomplex.go.o -o ldcomplex.go
+ @rm -f ldcomplex.go.o
+
ldcomplex.po: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
$(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
@echo '$(COMPILE.cc) -p -DLD \
@@ -393,6 +483,17 @@ ldcomio.o: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
@$(LD) -x -r ldcomio.o.o -o ldcomio.o
@rm -f ldcomio.o.o
+ldcomio.go: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
+ $(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
+ @echo '$(COMPILE.cc) -g -DLD \
+ `for N in $(COMIO); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o ldcomio.go'
+ @$(COMPILE.cc) -g -DLD \
+ `for N in $(COMIO); do echo " -D$${N}"; done` \
+ $(.CURDIR)/cinst.cc -o ldcomio.go.o
+ @$(LD) -X -r ldcomio.go.o -o ldcomio.go
+ @rm -f ldcomio.go.o
+
ldcomio.po: cinst.cc $(STD_DIR)/complext.h $(STD_DIR)/complext.cc \
$(STD_DIR)/dcomplex.h $(STD_DIR)/ldcomplex.h
@echo '$(COMPILE.cc) -p -DLD \
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' | \
diff --git a/share/mk/bsd.README b/share/mk/bsd.README
index 347081f3421..4a83f69ac41 100644
--- a/share/mk/bsd.README
+++ b/share/mk/bsd.README
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.README,v 1.21 1999/11/26 21:47:09 millert Exp $
+# $OpenBSD: bsd.README,v 1.22 2000/05/15 06:10:21 niklas Exp $
# $NetBSD: bsd.README,v 1.17 1996/04/13 02:08:08 thorpej Exp $
# @(#)bsd.README 5.1 (Berkeley) 5/11/90
@@ -216,8 +216,11 @@ NOPIC Do not build PIC versions of system libraries, and
NOLINT Do not build lint libraries. [set, set unconditionally]
-DEBUG Add -g to assembly and C compiler passes. Also doesn't
- set STRIP to -s per default if defined.
+DEBUG Add -g to assembly, C compiler and linking passes. Also
+ doesn't set STRIP to -s per default if defined.
+
+DEBUGLIBS Create libraries with -g debug information, and install
+ them in /usr/lib/debug.
SUDO Command to run when doing "make install" portion of
"make build". If set to sudo, this allows one to run
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index cf497c38bae..41591917020 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.lib.mk,v 1.20 1999/05/26 19:10:28 espie Exp $
+# $OpenBSD: bsd.lib.mk,v 1.21 2000/05/15 06:10:21 niklas Exp $
# $NetBSD: bsd.lib.mk,v 1.67 1996/01/17 20:39:26 mycroft Exp $
# @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
@@ -19,7 +19,7 @@ SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
# .so used for PIC object files. .ln used for lint output files.
# .m for objective c files.
.SUFFIXES:
-.SUFFIXES: .out .o .po .so .S .s .c .cc .C .cxx .f .y .l .ln .m4 .m
+.SUFFIXES: .out .o .go .po .so .S .s .c .cc .C .cxx .f .y .l .ln .m4 .m
.c.o:
@echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}"
@@ -27,6 +27,12 @@ SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+.c.go:
+ @echo "${COMPILE.c} -g ${.IMPSRC} -o ${.TARGET}"
+ @${COMPILE.c} -g ${.IMPSRC} -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
.c.po:
@echo "${COMPILE.c} -p ${.IMPSRC} -o ${.TARGET}"
@${COMPILE.c} -p ${.IMPSRC} -o ${.TARGET}.o
@@ -48,6 +54,12 @@ SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+.cc.go .C.go .cxx.go:
+ @echo "${COMPILE.cc} -g ${.IMPSRC} -o ${.TARGET}"
+ @${COMPILE.cc} -g ${.IMPSRC} -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
.cc.po .C.po .cxx.po:
@echo "${COMPILE.cc} -p ${.IMPSRC} -o ${.TARGET}"
@${COMPILE.cc} -p ${.IMPSRC} -o ${.TARGET}.o
@@ -68,6 +80,14 @@ SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
+.S.go .s.go:
+ @echo "${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} |\
+ ${AS} -o ${.TARGET}"
+ @${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
+ ${AS} -o ${.TARGET}.o
+ @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @rm -f ${.TARGET}.o
+
.S.po .s.po:
@echo "${CPP} -DPROF ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} |\
${AS} -o ${.TARGET}"
@@ -97,10 +117,12 @@ PICFLAG+=-fno-function-cse
.endif
.endif
-.if !defined(NOPROFILE)
-_LIBS=lib${LIB}.a lib${LIB}_p.a
-.else
_LIBS=lib${LIB}.a
+.if defined(DEBUGLIBS)
+_LIBS+=lib${LIB}_g.a
+.endif
+.if !defined(NOPROFILE)
+_LIBS+=lib${LIB}_p.a
.endif
.if !defined(NOPIC)
@@ -126,6 +148,13 @@ lib${LIB}.a:: ${OBJS}
@${AR} cq lib${LIB}.a `${LORDER} ${OBJS} | tsort -q`
${RANLIB} lib${LIB}.a
+GOBJS+= ${OBJS:.o=.go}
+lib${LIB}_g.a:: ${GOBJS}
+ @echo building debugging ${LIB} library
+ @rm -f lib${LIB}_g.a
+ @${AR} cq lib${LIB}_g.a `${LORDER} ${GOBJS} | tsort -q`
+ ${RANLIB} lib${LIB}_g.a
+
POBJS+= ${OBJS:.o=.po}
lib${LIB}_p.a:: ${POBJS}
@echo building profiled ${LIB} library
@@ -166,6 +195,7 @@ llib-l${LIB}.ln: ${LOBJS}
clean: _SUBDIRUSE
rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
rm -f lib${LIB}.a ${OBJS}
+ rm -f lib${LIB}_g.a ${GOBJS}
rm -f lib${LIB}_p.a ${POBJS}
rm -f lib${LIB}_pic.a lib${LIB}.so.*.* ${SOBJS}
rm -f llib-l${LIB}.ln ${LOBJS}
@@ -198,6 +228,15 @@ realinstall:
${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}.a
.endif
chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}.a
+.if defined(DEBUGLIBS)
+# ranlib lib${LIB}_g.a
+ ${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \
+ lib${LIB}_g.a ${DESTDIR}${LIBDIR}/debug/lib${LIB}.a
+.if (${INSTALL_COPY} != "-p")
+ ${RANLIB} -t ${DESTDIR}${LIBDIR}/debug/lib${LIB}.a
+.endif
+ chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/debug/lib${LIB}.a
+.endif
.if !defined(NOPROFILE)
# ranlib lib${LIB}_p.a
${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 67824e9bd7e..cb0e5e81b85 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.own.mk,v 1.31 2000/03/31 18:03:54 espie Exp $
+# $OpenBSD: bsd.own.mk,v 1.32 2000/05/15 06:10:21 niklas Exp $
# $NetBSD: bsd.own.mk,v 1.24 1996/04/13 02:08:09 thorpej Exp $
# Host-specific overrides
@@ -32,6 +32,9 @@ AFS?= no
.else
AFS?= yes
.endif
+# Set `DEBUGLIBS' to `yes' to build libraries with debugging symbols
+DEBUGLIBS= no
+
# where the system object and source trees are kept; can be configurable
# by the user in case they want them in ~/foosrc and ~/fooobj, for example
BSDSRCDIR?= /usr/src
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index a61aec0b89a..be5479854c1 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: sys.mk,v 1.22 2000/04/08 05:06:25 deraadt Exp $
+# $OpenBSD: sys.mk,v 1.23 2000/05/15 06:10:21 niklas Exp $
# $NetBSD: sys.mk,v 1.27 1996/04/10 05:47:19 mycroft Exp $
# @(#)sys.mk 5.11 (Berkeley) 3/13/91
@@ -65,7 +65,7 @@ LFLAGS?=
LEX.l?= ${LEX} ${LFLAGS}
LD?= ld
-LDFLAGS?=
+LDFLAGS+= ${DEBUG}
LINT?= lint
LINTFLAGS?= -chapbx