From nobody Fri Jun 13 20:58:13 2025 X-Original-To: dev-commits-src-main@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 4bJsDk0D4mz516d7; Fri, 13 Jun 2025 20:58:14 +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 4bJsDj6kkzz3Grq; Fri, 13 Jun 2025 20:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749848294; 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=es2cHdQ6cOfG08PsrJcBljuai4y+w7x/9Ft1LGZWamY=; b=w08p3ljQF3TF78R+aSf02uujfLNxJzIyKSqrZO7V6NEsHXbaoCwGkynY+UOUSOhM40lBxy HUZLxACLPJPrAd7QiIOKn5clRjjq0ou0xrfHo6Xh9cFlZCEe7uQocIiXcLmJLVqT/BkX9i sp7uuX8HgLdixUKa0GGSFu2q+G4j4EmB/bBmYSUxtBorTx0gIW9veZLBB+ZKyVcUusfWYP G6/0hvT2EkLYoCMhbMVq8ETraHk7z3jbLghHirTyR9DORDFA6WAeTLNOm1WwDR7R/iC12o ls1jg5x7cRzY9kdF2yBPCxt0hMIRytRokhu7OeoCUFxUcpeN2JnDwUCLDNgOcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749848293; 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=es2cHdQ6cOfG08PsrJcBljuai4y+w7x/9Ft1LGZWamY=; b=NJuOd4tTVRuS6ZhRNpwZnSX0AO+vXqq+ZBoHoOM2pxfr79/zl4dsEed4lXgdugBRTTxZcu ur9Yv4vJSn3bT4l908jTglB9plIFRM8HSTn2s3oN+R1/CF7nGugt57OHLXrZ5I1jhW2Utz TUQmUWOcOyLTem8NCnadNEt22tXq+gMqedYPvmL64HiO3Su/R+QNn2P1v5hadOoKqZTi+P 9dtVwadoPxVOarSKBr9fm0z+DkGUKnEt6hi/jvdWkfGTWtxdK4o3nV8OAl3ZfKkChW9u3B L5uoEcT62+yOu64YwCjys+OVLMjWj8LUdZ9MKPRQtk70g1SiPwe+29PABQBJhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749848294; a=rsa-sha256; cv=none; b=LQ3SC8i+/aZxKRWx1PYTGZb8Ks3iWlOXOH7ogKuLlfIR5XLHHLOBcht6N5LoCPSa9ZE6Mb Etab7YjYF8MzQZRUpKEDDt7c847O4c6EDRSVaaK5fpFdvzMmrMcpMeHFMWT20WQY8PulCP ctKUEhoGgpwnEVpIVMkUYFq70ZRRFFZ39gbbCz8wDZGStVp71AfvfCl8Yqx2WtQexWhYgg WadA1BM/hMrNauiT98w9K2HmWNsh1yjXwhiGqRhMBTBnfIUg+inLYhTmblnUVLWciZic52 tPeq0GOkJFObqhmqsQqnDN2BzGqsovyvv25k+qLE27Y94kmB9e9sb+Oaxpw+2A== 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 4bJsDj6Bwhz1CY8; Fri, 13 Jun 2025 20:58:13 +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 55DKwD2T087077; Fri, 13 Jun 2025 20:58:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55DKwDQR087074; Fri, 13 Jun 2025 20:58:13 GMT (envelope-from git) Date: Fri, 13 Jun 2025 20:58:13 GMT Message-Id: <202506132058.55DKwDQR087074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 1bdf1b818635 - main - config.5: Document CONF_CFLAGS under 'makeoptions' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 1bdf1b8186359d4ea26e26de03e03b7c1543b707 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=1bdf1b8186359d4ea26e26de03e03b7c1543b707 commit 1bdf1b8186359d4ea26e26de03e03b7c1543b707 Author: Olivier Certner AuthorDate: 2025-05-27 07:41:19 +0000 Commit: Olivier Certner CommitDate: 2025-06-13 20:57:51 +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 --- 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 93d65819d1d8..134afb17f9a4 100644 --- a/usr.sbin/config/config.5 +++ b/usr.sbin/config/config.5 @@ -316,11 +316,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