From nobody Mon Jun 16 20:24:44 2025 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 4bLhLh42Qlz5yMmG; Mon, 16 Jun 2025 20:24:44 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bLhLh2QlLz3JjL; Mon, 16 Jun 2025 20:24:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750105484; 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=uw0lHvG8ZSR0WdSfAax7AKsIedykbUi5UxjbW4rQAuU=; b=WH8b6FY2d387XEXob3D5cnvbpSTpOgPzpdq3XzSdf4F9qwJXc3fxIRbbDwJK5c0/c+d7EP i5scGBAlca7Ri7qVQ1Q3JJyJIfh79xJ8c/34UQ6C/FR7gEvOhWGIomNVsx0JURxHjgnT4R XQWmYfbj6KvVsGvxcmmlLiyKONoMR7EFKwoTxc1sG5QagCzyVNzoI7+yanlyo7PpUevkhB MQSlTBb5MQtqJON9buBhg8W8m771BQyNsdrMCoJOB0Uu+gBY54SKQe2pim1UOnl1eMnwXy hOFUOSJP2IcIlyJTEllLQC55JqYt+nOk5piejdAMPhcyjGrpvMgFA9oGBDDB0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750105484; 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=uw0lHvG8ZSR0WdSfAax7AKsIedykbUi5UxjbW4rQAuU=; b=Elkw7QjNawmglMPbYfmUgx5gLoun0yzOj0EpcrxkPfKJqrrj5Zu9lnKKpE4Sig1OItj14r NgoN1c9yrYX8SiYqywGriGjjfpI9PK+VG6DaCbPCJ81aUMBIOhZbpWtIyTYQGOpX/s0m8G KBWRYF70NcZvJTU+Q/xtQkOKqncbktrKc4iK64oR1yn4gIUIOeVw0YoFC/81/cIqnzYZ+g YTQXs1wDsQweKn/G/uZMFePnT3cR27uxLjhfB83s2tEX5Rp4cOXjD+dqrg/QhcpjgiLEiv 9CmPUVaw5jKtlc7TRajumAX5BBjJgf/vjZTPC+pVFUpnjc2jfxGxXYlxfya6Cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750105484; a=rsa-sha256; cv=none; b=pnheWuSlp0m1WtuVGCxQyuYUba9V5SqdX+SE+bkQQ++AARP2WiRVm+lbmukjR4HH8ywQAr HoiHu7XdVVEboRVCpW4+tAK6jCcGi1FH9lcu1Jllgu++tgbI/Ko8k5cKLPqkap9C0/36C3 dsX/sQyx96UNcB6n8cyc3iFewfL0MMVjpYOD/0bI36ASCdCkgW23M+1m9cglLBqVvEmjud 8aLc+nQXnGGhyQrVl+kNXBFbKUfpp+9PvtJu1Tlsqt0Q6YdB3gJlqgEjg3+Yiuvr/kGC+m UKoAtGPZIvg3S5FX+aZaniZ/uzS8CGVWare5spEL5gMQzjg8f849VO/hyK2yYw== 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 4bLhLh1vfwz1BZv; Mon, 16 Jun 2025 20:24:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55GKOiYu040312; Mon, 16 Jun 2025 20:24:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55GKOiZh040309; Mon, 16 Jun 2025 20:24:44 GMT (envelope-from git) Date: Mon, 16 Jun 2025 20:24:44 GMT Message-Id: <202506162024.55GKOiZh040309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: bb5a2106555d - stable/14 - config.5: Document CONF_CFLAGS under 'makeoptions' 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bb5a2106555d810bb6a5ec0a80584abf8154cfbd Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=bb5a2106555d810bb6a5ec0a80584abf8154cfbd commit bb5a2106555d810bb6a5ec0a80584abf8154cfbd Author: Olivier Certner AuthorDate: 2025-05-27 07:41:19 +0000 Commit: Olivier Certner CommitDate: 2025-06-16 20:09:06 +0000 config.5: Document CONF_CFLAGS under 'makeoptions' This variable serves to tweak CFLAGS from the kernel configuration file, easing some custom kernel builds. It was introduced by bde@ in 1999. The description has been kept simple on purpose. It does not completely reflect reality as the build infrastructure actually appends variables to CFLAGS after CONF_CFLAGS has been processed in a few cases. However, these cases do not collide with expected common uses of CONF_CFLAGS, so have not been mentioned. Reviewed by: markj (older version) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50544 (cherry picked from commit 1bdf1b8186359d4ea26e26de03e03b7c1543b707) Event: Kitchener-Waterloo Hackathon 202506 --- usr.sbin/config/config.5 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/usr.sbin/config/config.5 b/usr.sbin/config/config.5 index f77b79a31510..a04ecd4ac0fe 100644 --- a/usr.sbin/config/config.5 +++ b/usr.sbin/config/config.5 @@ -307,11 +307,28 @@ variable is specified, .Ar value is assumed to be the empty string. .Pp +Note that, as the common makefiles overwrite the +.Va CFLAGS +variable after having processed the configuration file, +customizing +.Va CFLAGS +directly via +.Ic makeoptions +is not possible. +Nonetheless, custom compiler flags can be specified using the +.Va CONF_CFLAGS +variable instead. +Its content is appended to +.Va CFLAGS +after the common makefiles have set the latter, allowing to override their +compilation flags. +.Pp Example: .Bd -literal -offset indent -compact makeoptions MYMAKEOPTION="foo" makeoptions MYMAKEOPTION+="bar" makeoptions MYNULLMAKEOPTION +makeoptions CONF_CFLAGS+="-DSOME_CONTROLLING_MACRO" .Ed .\" -------- MAXUSERS -------- .Pp