From nobody Wed Jun 8 21:15:48 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 332AE834818; Wed, 8 Jun 2022 21:15:49 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LJKl90yPsz3t2w; Wed, 8 Jun 2022 21:15:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654722949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=psGyqUxZc5ZEpZomjg1ZCl/Z61I8K4PzpauSEth8vEk=; b=nMpew+M/ao6JDatLxcyz9EwQZ4VBfXV5mp1xWMmGAwK5hNQkcQ/KIPFX6GeDyW13uDvL0P AWGxR94pBuCYxOxz7wvqG/5/Dx5I3VBqHNRieZ5nvNuIjTF0O4MlrhxExZj0y6FE10n5Pv rx4WbJVBPB1MV3ehoaiFfgUKfs75VF6qu3spE7e+wHJpViiBzKqPETHMSS/hG+/ZWgJjVP 1dfcayG7HLVI0UwpZshrjRY55BY76pBrlZsMEM7SBwBK/0T0uHMx96J559cybGTzRkeTG/ tA7Cid/j5J+n0vNftgGCFvChe7PH3qVdOekL/z8ajj77B4bfa6yQSrUUOSKEzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00FE016FF8; Wed, 8 Jun 2022 21:15:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 258LFmnR028170; Wed, 8 Jun 2022 21:15:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 258LFm8V028169; Wed, 8 Jun 2022 21:15:48 GMT (envelope-from git) Date: Wed, 8 Jun 2022 21:15:48 GMT Message-Id: <202206082115.258LFm8V028169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: e3709cfe6a2a - main - Add SPLIT_KERNEL_DEBUG knob List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3709cfe6a2a1f7d345db2870be175c9cf2a8979 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654722949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=psGyqUxZc5ZEpZomjg1ZCl/Z61I8K4PzpauSEth8vEk=; b=GIENN5LGMzmimnIavne46g+Ifvfh3bnLY1mumeoCiDqiekbhS+sQDmPl/UTLULCblP7X5k 9qnibf/mYo5yV4ft9okAJyEOe8IB+xSuX4iIou53AArNCZkz6d0uhY1g2kBhxS9l/vGfA+ J3GDwrJ4oc1CXYi+9uOAivTO0guTB+6iCiJGfoz5FuXviKKm0LJKXnJHH84Fnlm/SNdc6B gEk3eeFJjYdsWoMWnNlIP10sZzNGRwUIuqO98WaMkvpfXDlPa/1VmK8b7F6FaR3yitwj0j PkyF8S9z1W69i0rLXp/S6vBawIxUoi7pfVDPE3AFEjDDbHYFk7nID/NXXRZMHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654722949; a=rsa-sha256; cv=none; b=JLq78gbo/B/+gSeK0yE8aNNdPaiCGMmqVwobS8OYCFeJumio9GX3C1YHON6PQRBXU35OYd q7yZ2qAhIOq4VIXUyF+xueDRBlTiVMeO11tOrGa9cZ1fonFXqazJ/JPL4BSWnZzKJVA9qm q/RaEJvEIHQnqz8m8Lyims4/ulpudIBlmUpqg6NNdsXQunURc6ePvuk+AtULMMKyKJZWKv kd4C2TzLGAw3KAXhegh5JajYcOXXKeRe+YQ28jwrUKyuk6qgdDoXsQKP6WfUVCUqloY5xp NxzKsfEoyv1B8kqtYBU4sYrq2eeC1iz8Dzyuba+KWR2a57SDE2tGu4pdE/x1zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e3709cfe6a2a1f7d345db2870be175c9cf2a8979 commit e3709cfe6a2a1f7d345db2870be175c9cf2a8979 Author: Ed Maste AuthorDate: 2022-06-08 21:02:24 +0000 Commit: Ed Maste CommitDate: 2022-06-08 21:14:46 +0000 Add SPLIT_KERNEL_DEBUG knob Prior to 9b6edf364eb0 WITHOUT_KERNEL_SYMBOLS split kernel debug data into standalone debug files at build time, but did not install those files. As of 9b6edf364eb0 it stopped splitting the debug data, leaving it in the kernel and modules (the default kernel configs include DEBUG=-g). Revert 9b6edf364eb0 and introduce a new build-time SPLIT_KERNEL_DEBUG knob, as some people rely on the pre-9b6edf364eb0 WITHOUT_KERNEL_SYMBOLS behaviour and that was imp's original intent. PR: 264433 Reviewed by: eugen, imp MFC after: 3 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35437 --- sys/conf/kern.opts.mk | 5 +++++ sys/conf/kmod.mk | 4 ++-- tools/build/options/WITHOUT_KERNEL_SYMBOLS | 5 ++--- tools/build/options/WITHOUT_SPLIT_KERNEL_DEBUG | 3 +++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 077009baebf0..b47b71cdce22 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -42,6 +42,7 @@ __DEFAULT_YES_OPTIONS = \ IPFILTER \ IPSEC_SUPPORT \ ISCSI \ + SPLIT_KERNEL_DEBUG \ KERNEL_SYMBOLS \ NETGRAPH \ OFED \ @@ -178,6 +179,10 @@ MK_${var}_SUPPORT:= yes .endif .endfor +.if ${MK_SPLIT_KERNEL_DEBUG} == "no" +MK_KERNEL_SYMBOLS:= no +.endif + # Some modules only compile successfully if option FDT is set, due to #ifdef FDT # wrapped around declarations. Module makefiles can optionally compile such # things using .if !empty(OPT_FDT) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 2ab8fb576472..63041480eca9 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -217,7 +217,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} PROG= ${KMOD}.ko .endif -.if !defined(DEBUG_FLAGS) || ${MK_KERNEL_SYMBOLS} == "no" +.if !defined(DEBUG_FLAGS) || ${MK_SPLIT_KERNEL_DEBUG} == "no" FULLPROG= ${PROG} .else FULLPROG= ${PROG}.full @@ -321,7 +321,7 @@ ${_ILINKS}: CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} -.if defined(DEBUG_FLAGS) && ${MK_KERNEL_SYMBOLS} != "no" +.if defined(DEBUG_FLAGS) && ${MK_SPLIT_KERNEL_DEBUG} != "no" CLEANFILES+= ${FULLPROG} ${PROG}.debug .endif diff --git a/tools/build/options/WITHOUT_KERNEL_SYMBOLS b/tools/build/options/WITHOUT_KERNEL_SYMBOLS index 7837744cf399..c56359d9fa6b 100644 --- a/tools/build/options/WITHOUT_KERNEL_SYMBOLS +++ b/tools/build/options/WITHOUT_KERNEL_SYMBOLS @@ -1,4 +1,3 @@ .\" $FreeBSD$ -Do not build or install standalone kernel debug symbol files. -Debug data (if enabled by the kernel configuration file) -will be included in the kernel and modules. +Do not install standalone kernel debug symbol files. +This option has no effect at build time. diff --git a/tools/build/options/WITHOUT_SPLIT_KERNEL_DEBUG b/tools/build/options/WITHOUT_SPLIT_KERNEL_DEBUG new file mode 100644 index 000000000000..a23bcd5ffdb6 --- /dev/null +++ b/tools/build/options/WITHOUT_SPLIT_KERNEL_DEBUG @@ -0,0 +1,3 @@ +Do not build standalone kernel debug files. +Debug data (if enabled by the kernel configuration file) +will be included in the kernel and modules.