Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 2014 22:32:13 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263750 - head/sys/conf
Message-ID:  <201403252232.s2PMWDkE031033@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Tue Mar 25 22:32:13 2014
New Revision: 263750
URL: http://svnweb.freebsd.org/changeset/base/263750

Log:
  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@

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk	Tue Mar 25 22:08:31 2014	(r263749)
+++ head/sys/conf/kern.mk	Tue Mar 25 22:32:13 2014	(r263750)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403252232.s2PMWDkE031033>