diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-11-29 09:08:35 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-11-29 09:08:35 +0000 |
commit | 1fd678dbf11f20d49fd1a02f58dfb28f4508e4a6 (patch) | |
tree | 978ea697c116a4eaca8b13b860ada07c7c67f9b9 | |
parent | 90e2188c73019eabdcd112bb8cd8ef50268d03ab (diff) |
Build kernel with DEBUG=-g by default.
This will allow us to extract type informations from DWARF2 sections. It
also makes developer life easier as debug information are now included in
every object.
Resulting kernels will be stripped using strip(1) instead of ld(1).
Kernel build time increases by approximately 10%. However it is still
possible to disable this by defining DEBUG="".
ok kettenis@, bluhm@, natano@, jasper@, reyk@, deraadt@
-rw-r--r-- | sys/arch/alpha/conf/Makefile.alpha | 4 | ||||
-rw-r--r-- | sys/arch/amd64/conf/Makefile.amd64 | 4 | ||||
-rw-r--r-- | sys/arch/armv7/conf/Makefile.armv7 | 4 | ||||
-rw-r--r-- | sys/arch/hppa/conf/Makefile.hppa | 4 | ||||
-rw-r--r-- | sys/arch/i386/conf/Makefile.i386 | 4 | ||||
-rw-r--r-- | sys/arch/landisk/conf/Makefile.landisk | 4 | ||||
-rw-r--r-- | sys/arch/loongson/conf/Makefile.loongson | 4 | ||||
-rw-r--r-- | sys/arch/luna88k/conf/Makefile.luna88k | 4 | ||||
-rw-r--r-- | sys/arch/macppc/conf/Makefile.macppc | 4 | ||||
-rw-r--r-- | sys/arch/octeon/conf/Makefile.octeon | 4 | ||||
-rw-r--r-- | sys/arch/sgi/conf/Makefile.sgi | 4 | ||||
-rw-r--r-- | sys/arch/socppc/conf/Makefile.socppc | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/conf/Makefile.sparc64 | 4 | ||||
-rw-r--r-- | sys/conf/GENERIC | 4 |
14 files changed, 28 insertions, 28 deletions
diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha index 40b3a0c6a43..c12d317f149 100644 --- a/sys/arch/alpha/conf/Makefile.alpha +++ b/sys/arch/alpha/conf/Makefile.alpha @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.alpha,v 1.94 2016/11/15 09:08:37 natano Exp $ +# $OpenBSD: Makefile.alpha,v 1.95 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -35,6 +35,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -75,7 +76,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index 3409a55a3a1..6d99b22b959 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.amd64,v 1.73 2016/11/15 09:08:37 natano Exp $ +# $OpenBSD: Makefile.amd64,v 1.74 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -39,6 +39,7 @@ CMACHFLAGS+= -fno-stack-protector CMACHFLAGS+= -Wa,-n .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -79,7 +80,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/armv7/conf/Makefile.armv7 b/sys/arch/armv7/conf/Makefile.armv7 index a2b41b93c5b..bda816de339 100644 --- a/sys/arch/armv7/conf/Makefile.armv7 +++ b/sys/arch/armv7/conf/Makefile.armv7 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.armv7,v 1.19 2016/11/15 09:08:37 natano Exp $ +# $OpenBSD: Makefile.armv7,v 1.20 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -35,6 +35,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -80,7 +81,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa index f53f0e008e9..d48f19359ae 100644 --- a/sys/arch/hppa/conf/Makefile.hppa +++ b/sys/arch/hppa/conf/Makefile.hppa @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.hppa,v 1.87 2016/11/15 09:08:37 natano Exp $ +# $OpenBSD: Makefile.hppa,v 1.88 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -33,6 +33,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS} CMACHFLAGS+= -fno-stack-protector +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -85,7 +86,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386 index 89646c73e41..c01f98a3aef 100644 --- a/sys/arch/i386/conf/Makefile.i386 +++ b/sys/arch/i386/conf/Makefile.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.i386,v 1.101 2016/11/15 09:08:37 natano Exp $ +# $OpenBSD: Makefile.i386,v 1.102 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -35,6 +35,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -81,7 +82,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/landisk/conf/Makefile.landisk b/sys/arch/landisk/conf/Makefile.landisk index 0af96149610..2d19089fd4e 100644 --- a/sys/arch/landisk/conf/Makefile.landisk +++ b/sys/arch/landisk/conf/Makefile.landisk @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.landisk,v 1.60 2016/11/15 09:08:38 natano Exp $ +# $OpenBSD: Makefile.landisk,v 1.61 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -35,6 +35,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -74,7 +75,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson index b22223b6f51..77556ad90ac 100644 --- a/sys/arch/loongson/conf/Makefile.loongson +++ b/sys/arch/loongson/conf/Makefile.loongson @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.loongson,v 1.52 2016/11/15 09:08:38 natano Exp $ +# $OpenBSD: Makefile.loongson,v 1.53 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -42,6 +42,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -82,7 +83,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k index 30a31ee9840..3e1a07fc92f 100644 --- a/sys/arch/luna88k/conf/Makefile.luna88k +++ b/sys/arch/luna88k/conf/Makefile.luna88k @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.luna88k,v 1.65 2016/11/15 09:08:38 natano Exp $ +# $OpenBSD: Makefile.luna88k,v 1.66 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -35,6 +35,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -79,7 +80,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc index 8dc43e5a99e..2aba79b6c60 100644 --- a/sys/arch/macppc/conf/Makefile.macppc +++ b/sys/arch/macppc/conf/Makefile.macppc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.macppc,v 1.78 2016/11/15 09:08:38 natano Exp $ +# $OpenBSD: Makefile.macppc,v 1.79 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -35,6 +35,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE ${CMACHFLAGS} @@ -74,7 +75,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index 4ffdf12ca02..47bcb233204 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.octeon,v 1.28 2016/11/15 09:08:38 natano Exp $ +# $OpenBSD: Makefile.octeon,v 1.29 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -42,6 +42,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -83,7 +84,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" LINKFLAGS+= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi index ea750daabca..56bf7cf4d39 100644 --- a/sys/arch/sgi/conf/Makefile.sgi +++ b/sys/arch/sgi/conf/Makefile.sgi @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sgi,v 1.76 2016/11/15 09:08:38 natano Exp $ +# $OpenBSD: Makefile.sgi,v 1.77 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -42,6 +42,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -82,7 +83,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/socppc/conf/Makefile.socppc b/sys/arch/socppc/conf/Makefile.socppc index afbde2e7a67..9760181b023 100644 --- a/sys/arch/socppc/conf/Makefile.socppc +++ b/sys/arch/socppc/conf/Makefile.socppc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.socppc,v 1.49 2016/11/15 09:08:38 natano Exp $ +# $OpenBSD: Makefile.socppc,v 1.50 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -35,6 +35,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE ${CMACHFLAGS} @@ -74,7 +75,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64 index 8d5f71f6b23..5663470996a 100644 --- a/sys/arch/sparc64/conf/Makefile.sparc64 +++ b/sys/arch/sparc64/conf/Makefile.sparc64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sparc64,v 1.79 2016/11/15 09:08:38 natano Exp $ +# $OpenBSD: Makefile.sparc64,v 1.80 2016/11/29 09:08:34 mpi Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -35,6 +35,7 @@ CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \ CMACHFLAGS+= -fno-stack-protector .endif +DEBUG?= -g COPTS?= -O2 CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS} @@ -75,7 +76,6 @@ SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS} SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ -DEBUG?= .if ${DEBUG} == "-g" STRIPFLAGS= -S SYSTEM_LD_TAIL+=; \ diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC index b1ce195f70c..14732076e9b 100644 --- a/sys/conf/GENERIC +++ b/sys/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.235 2016/09/18 14:28:05 deraadt Exp $ +# $OpenBSD: GENERIC,v 1.236 2016/11/29 09:08:34 mpi Exp $ # # Machine-independent option; used by all architectures for their # GENERIC kernel @@ -7,7 +7,7 @@ option DDB # in-kernel debugger #option DDBPROF # ddb(4) based profiling #option DDBCTF # DDB support for CTF #option DDB_SAFE_CONSOLE # allow break into ddb during boot -#makeoptions DEBUG="-g" # compile full symbol table +#makeoptions DEBUG="" # do not compile full symbol table #makeoptions PROF="-pg" # build profiled kernel #option GPROF # kernel profiling, kgmon(8) option DIAGNOSTIC # internal consistency checks |