summaryrefslogtreecommitdiff
path: root/sys/arch/luna88k/conf
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-08-09 23:04:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-08-09 23:04:50 +0000
commitd820f3e3ba1e6e29ce2bf7dcd9ec368578f3f3d7 (patch)
tree5ec3967e190bbeba0c2ab7e8e86b3f45ba20c19a /sys/arch/luna88k/conf
parent4ad0571c604526a0bb64f7b2d6e62d9ac8366227 (diff)
Introduce option DDB_STRUCT. Kernels compiled with this option (except on
a few arches where toolchain limitations apply) will embed some symbolic information about the various structs used within the kernel, and have new ddb commands allowing struct display and some useful information gathering. Kernel rodata increase varies accross platforms from ~150KB to ~300KB. This option is not enabled by default.
Diffstat (limited to 'sys/arch/luna88k/conf')
-rw-r--r--sys/arch/luna88k/conf/Makefile.luna88k17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k
index 261dc7dea01..a2d0cf53238 100644
--- a/sys/arch/luna88k/conf/Makefile.luna88k
+++ b/sys/arch/luna88k/conf/Makefile.luna88k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.luna88k,v 1.14 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.luna88k,v 1.15 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD
#
@@ -50,6 +50,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE ${CMACHFLAGS}
LINKFLAGS= -N -Ttext 0x20000 -e start
STRIPFLAGS= -d
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS?=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS?= ${CFLAGS}
@@ -124,7 +130,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
- [Ee]rrs linterrs makelinks assym.h
+ [Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -146,7 +152,7 @@ links:
SRCS= param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c
+.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -157,6 +163,11 @@ depend:: .depend
< assym.dep >> .depend
@rm -f assym.dep
+db_structinfo.h: $S/ddb/db_structinfo.c $S/ddb/parse_structinfo.awk
+ ${CC} ${CFLAGS} ${CPPFLAGS} -gstabs -c $S/ddb/db_structinfo.c
+ objdump -g db_structinfo.o | awk -f $S/ddb/parse_structinfo.awk > $@
+ rm -f db_structinfo.o
+
# depend on root or device configuration
autoconf.o conf.o: Makefile