From owner-svn-src-stable-12@freebsd.org Tue Sep 3 14:07:13 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48739DD66E; Tue, 3 Sep 2019 14:07:12 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N80H6BTjz4QLr; Tue, 3 Sep 2019 14:07:11 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id B42811B24E; Tue, 3 Sep 2019 14:06:31 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id E5AE0A078; Sat, 20 Apr 2019 11:06:01 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A74D8CEA3; Sat, 20 Apr 2019 11:06:01 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 1012DA01A; Sat, 20 Apr 2019 11:06:01 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 1D514A017 for ; Sat, 20 Apr 2019 11:05:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBAA38CE9B; Sat, 20 Apr 2019 11:05:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F54FD335; Sat, 20 Apr 2019 11:05:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KB5v1U090738; Sat, 20 Apr 2019 11:05:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KB5vTA090737; Sat, 20 Apr 2019 11:05:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201904201105.x3KB5vTA090737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r346439 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 346439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 2A74D8CEA3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] Status: O X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:07:13 -0000 X-Original-Date: Sat, 20 Apr 2019 11:05:57 +0000 (UTC) X-List-Received-Date: Tue, 03 Sep 2019 14:07:13 -0000 Author: markj Date: Sat Apr 20 11:05:56 2019 New Revision: 346439 URL: https://svnweb.freebsd.org/changeset/base/346439 Log: MFC r345348, r345594: Use -fdebug-prefix-map to map auto-generated kernel build paths. Modified: stable/12/sys/conf/kern.post.mk stable/12/sys/conf/kmod.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/kern.post.mk ============================================================================== --- stable/12/sys/conf/kern.post.mk Sat Apr 20 11:04:13 2019 (r346438) +++ stable/12/sys/conf/kern.post.mk Sat Apr 20 11:05:56 2019 (r346439) @@ -310,6 +310,11 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .depend: .PRECIOUS ${SRCS} +.if ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000) +_MAP_DEBUG_PREFIX= yes +.endif + _ILINKS= machine .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" _ILINKS+= ${MACHINE_CPUARCH} @@ -319,9 +324,17 @@ _ILINKS+= x86 .endif # Ensure that the link exists without depending on it when it exists. +# Ensure that debug info references the path in the source tree. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) ${SRCS} ${CLEAN:M*.o}: ${_link} +.endif +.if defined(_MAP_DEBUG_PREFIX) +.if ${_link} == "machine" +CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include +.else +CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include +.endif .endif .endfor Modified: stable/12/sys/conf/kmod.mk ============================================================================== --- stable/12/sys/conf/kmod.mk Sat Apr 20 11:04:13 2019 (r346438) +++ stable/12/sys/conf/kmod.mk Sat Apr 20 11:05:56 2019 (r346439) @@ -267,6 +267,11 @@ ${FULLPROG}: ${OBJS} ${OBJCOPY} --strip-debug ${.TARGET} .endif +.if ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000) +_MAP_DEBUG_PREFIX= yes +.endif + _ILINKS=machine .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64" _ILINKS+=${MACHINE_CPUARCH} @@ -283,9 +288,17 @@ beforebuild: ${_ILINKS} # Ensure that the links exist without depending on it when it exists which # causes all the modules to be rebuilt when the directory pointed to changes. +# Ensure that debug info references the path in the source tree. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) OBJS_DEPEND_GUESS+= ${_link} +.endif +.if defined(_MAP_DEBUG_PREFIX) +.if ${_link} == "machine" +CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include +.else +CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include +.endif .endif .endfor