summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2014-03-25 22:32:13 +0000
committerimp <imp@FreeBSD.org>2014-03-25 22:32:13 +0000
commit64cb2c82c7e337096ffdcfd09598282f9c3fcf59 (patch)
tree9c04a894e841e9e1f3d0a2618fe87f2854eda25c
parentbd031ca10c83a98ddff5518137ae075a066b02de (diff)
downloadFreeBSD-src-64cb2c82c7e337096ffdcfd09598282f9c3fcf59.zip
FreeBSD-src-64cb2c82c7e337096ffdcfd09598282f9c3fcf59.tar.gz
Add a '*' to the M modifier string so we match any -gdwarf string (even
though it works w/o it for some reason, contrary to our reading of make(1)). Also add a comment explaining things a bit better so there's one less mystery that must be answered with svn blame. Submitted by: ian@
-rw-r--r--sys/conf/kern.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 6b8a3dd..1ba7ec3 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -164,8 +164,10 @@ CFLAGS+= -fstack-protector
.endif
#
-# Add -gdwarf-2 when compiling -g
+# 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.
#
-.if ${COMPILER_TYPE} == "clang" && ${CFLAGS:M-g} != "" && ${CFLAGS:M-gdwarf} == ""
+.if ${COMPILER_TYPE} == "clang" && ${CFLAGS:M-g} != "" && ${CFLAGS:M-gdwarf*} == ""
CFLAGS+= -gdwarf-2
.endif
OpenPOWER on IntegriCloud