summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2014-04-01 14:24:20 +0000
committerWarner Losh <imp@FreeBSD.org>2014-04-01 14:24:20 +0000
commit647a9d043b5d16782ce8fbf76ae8e569245d1b1e (patch)
tree28f499e3f8c02dae2b505988243e9f79a51a849c /sys
parentfffba3dbc239061e8fdf280f88ac17d2df09a3c0 (diff)
downloadsrc-test2-647a9d043b5d16782ce8fbf76ae8e569245d1b1e.tar.gz
src-test2-647a9d043b5d16782ce8fbf76ae8e569245d1b1e.zip
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/kern.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 1ba7ec37de35..1571f8360512 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -164,10 +164,12 @@ CFLAGS+= -fstack-protector
.endif
#
-# Add -gdwarf-2 when compiling -g on clang. The default starting in v3.4
-# is to generate DWARF version 4. However, our tools don't cope well with
-# DWARF 4, so force it to genereate DWARF2, which they understand.
+# Add -gdwarf-2 when compiling -g. The default starting in clang v3.4
+# and gcc 4.8 is to generate DWARF version 4. However, our tools don't
+# cope well with DWARF 4, so force it to genereate DWARF2, which they
+# understand. Do this unconditionally as it is harmless when not needed,
+# but critical for these newer versions.
#
-.if ${COMPILER_TYPE} == "clang" && ${CFLAGS:M-g} != "" && ${CFLAGS:M-gdwarf*} == ""
+.if ${CFLAGS:M-g} != "" && ${CFLAGS:M-gdwarf*} == ""
CFLAGS+= -gdwarf-2
.endif