From nobody Fri May 30 23:28:21 2025 X-Original-To: dev-commits-doc-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 4b8KDQ6MQJz5x51d for ; Fri, 30 May 2025 23:28:22 +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 4b8KDP6jCMz3rFW; Fri, 30 May 2025 23:28:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748647702; 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=/RhmgtuCfl/wjQ9mcK0Ho5vDbWgAzCKlzOdy44XlUso=; b=M2nwdoqWRzCpqUIaqMljHDy7geyvdRzk6/WXNtl/oy4JBvC5Ah7LJ9wfo9SjHqxtuXMKuN KnX+GD53CSzD+Tpz1H+LRAqgJ0xsF5fD9GlDVFBl35fYprdcKNXc8rBs0e8dbQufGv4Abg AKgfJXNtH9mX6QSh4gWxsfDKqXStxy0uED2KwddomjJXKwE+ipnQiskZmj919Lu8csnfW4 M9hHScZ+3ZG0gXFAPzGoy6sDcwm8zm5CZ63mH0f/YcnsQ1HwVvdkWwJAqvENL0g/VUdLNN nrjBYNQPu0IkVdomDUkXz5gOFZLFsD/C/vSq1Yyq7aTguz/YFXh/SoFLUutqtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748647702; a=rsa-sha256; cv=none; b=b5hfByNUXlnv6MXAkw9WT7UaXuCb9RYIo2/sUfZ1p6c0XjEA6yCXaDuHBv0zCfM8wtBMg4 DbkobY2agyZPmevVFjMOpx3RLUn5siv2l8CFCt0Mp6lD/sP+W26+mCEyk1Pjhp5QI1GSnd 3YnBbSnZGmIRxLfufXQWsTBOfzwJAVGxlBlVIf6r6j7c01zZYicZPVW3aNZ07TdBATgFCQ BRZNZMPYH2rhuGLTZhXgo9axQbPlEp8iI3lcOzVZEY0rP54j5eV6qaWKvkh2YJIEgVzkcZ D5vhf8shOCGb02eziGE9dS30T9dHZSDaxh0uPRAPTIgoCeCOGAJ8A7DlbYo8SA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748647702; 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=/RhmgtuCfl/wjQ9mcK0Ho5vDbWgAzCKlzOdy44XlUso=; b=wszqb7+QooUOUv0007VYVlaRyj8m/7vDHq3ZemHkCDpiVoWvTc4yf6q7Wag7Fw6lYghDkn Dwp3uuHxco7OdTRXAwfRx7BhQ7jF5iPrkBC+1D1twuVCQjfZHhmZmjNn0CIQqnPDZtDqlZ 9wxTV2dXOrALTcPLPj6ZPEmrebwfYWqP/kfVRkAwAifeci3NgXgpxI4Kjx0u7zW6ocJx7f J9erOhqBo9v7umgz998doAHR4s1veRfpULd2oZWSrN9vohrwSlWQ03pcDVtupgGUtZADrO s6/LR3nTabizMWqa3Bu7lMIaMr1aoyroCgWwKx0jNuEoZzGjufS2DVV2WWWa4Q== 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 4b8KDP5Bz9z1Bb3; Fri, 30 May 2025 23:28:21 +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 54UNSL42022899; Fri, 30 May 2025 23:28:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54UNSLs2022896; Fri, 30 May 2025 23:28:21 GMT (envelope-from git) Date: Fri, 30 May 2025 23:28:21 GMT Message-Id: <202505302328.54UNSLs2022896@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: John Baldwin Subject: git: 7762186d3e - main - committers-guide: Update current compiler verisons List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-doc-all@freebsd.org Sender: owner-dev-commits-doc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7762186d3e032f4d55568b36ce08563c6f7c3619 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/doc/commit/?id=7762186d3e032f4d55568b36ce08563c6f7c3619 commit 7762186d3e032f4d55568b36ce08563c6f7c3619 Author: John Baldwin AuthorDate: 2025-05-30 23:26:05 +0000 Commit: John Baldwin CommitDate: 2025-05-30 23:27:02 +0000 committers-guide: Update current compiler verisons - Restructure some of the text to avoid hardcoding compiler versions when possible. - Explicitly note the naming pattern for llvm toolchain packages. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D50618 --- .../en/articles/committers-guide/_index.adoc | 35 ++++++++++++++-------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/documentation/content/en/articles/committers-guide/_index.adoc b/documentation/content/en/articles/committers-guide/_index.adoc index f8a617ace1..34106482fe 100644 --- a/documentation/content/en/articles/committers-guide/_index.adoc +++ b/documentation/content/en/articles/committers-guide/_index.adoc @@ -3206,7 +3206,7 @@ The Tier rules for feature support on architectures at release-time are more str [[compilers]] === Policy on Multiple Compilers -FreeBSD builds with both Clang and GCC. +The FreeBSD base system builds with both Clang and GCC. The project does this in a careful and controlled way to maximize benefits from this extra work, while keeping the extra work to a minimum. Supporting both Clang and GCC improves the flexibility our users have. These compilers have different strengths and weaknesses, and supporting both allows users to pick the best one for their needs. @@ -3219,22 +3219,29 @@ The exact balance continues to evolve to ensure the benefits of extra work remai The project used to support really old Intel compilers or old GCC versions, but we traded supporting those obsolete compilers for a carefully selected range of modern compilers. This section documents where we use different compilers, and the expectations around that. -The FreeBSD project provides an in-tree Clang compiler. +The FreeBSD base system includes an in-tree Clang compiler. Due to being in the tree, this compiler is the most supported compiler. All changes must compile with it, prior to commit. Complete testing, as appropriate for the change, should be done with this compiler. -At any moment in time, the FreeBSD project also supports one or more out-of-tree compilers. -At present, this is GCC 12.x. -Ideally, committers should test compile with this compiler, especially for large or risky changes. -This compiler is available as the `${TARGET_ARCH}-gcc${VERSION}` package, such as package:devel/freebsd-gcc12@aarch64[aarch64-gcc12] or package:devel/freebsd-gcc12@riscv64[riscv64-gcc12]. +The FreeBSD base system also supports various versions of Clang and GCC as out-of-tree compilers. +For large or risky changes, committers should do a test build with a +supported version of GCC. +Out of tree compilers are available as packages. +GCC compilers are available as `${TARGET_ARCH}-gcc${VERSION}` packages, such as package:devel/freebsd-gcc14@aarch64[aarch64-gcc14]. +Clang compilers are available as `llvm${VERSION}` packages, such as +package:devel/llvm18[llvm18]. The project runs automated CI jobs to build everything with these compilers. Committers are expected to fix the jobs they break with their changes. -Committers may test build with, for example `CROSS_TOOLCHAIN=aarch64-gcc12` or `CROSS_TOOLCHAIN=llvm15` where necessary. +Committers may test builds of userspace or individual kernels by setting `CROSS_TOOLCHAIN` to the package name, for example `CROSS_TOOLCHAIN=aarch64-gcc14` or `CROSS_TOOLCHAIN=llvm18`. +For universe or tinderbox builds, `USE_GCC_TOOLCHAINS=gcc${VERSION}` builds all architectures using the appropriate GCC compiler packages. +For universe or tinderbox builds using an out-of-tree Clang, pass `CROSS_TOOLCHAIN=llvm${VERSION}`. +Note that while all architectures in the base system can be compiled by Clang, +only a few architectures can be fully built by GCC. The FreeBSD project also has some CI pipelines on github. -For pull requests on github and some branches pushed to the github forks, a number of cross compilation jobs run. -These test FreeBSD building using a version of Clang that sometimes lags the in-tree compiler by a major version for a time. +For pull requests on github and some branches pushed to github forks, a number of cross compilation jobs run. +These test FreeBSD building using versions of Clang that lag the in-tree compiler by one or more major versions. The FreeBSD project is also upgrading compilers. Both Clang and GCC are fast moving targets. @@ -3258,10 +3265,12 @@ However, sometimes these warnings require extensive rework, so are suppressed in Developers should be mindful of this, and ensure any compiler specific flags are properly conditionalized. ==== Current Compiler Versions -The in-tree compiler is currently Clang 15.x. -Currently, GCC 12 and Clang 12, 13, 14 and 15 are tested in the github and project's CI jenkins jobs. -Work is underway to get the tree ready for Clang 16. -The oldest project supported branch has Clang 12, so the bootstrap portions of the build must work for Clang major versions 12 to 15. +The versions of supported compilers for a given branch such as `main` or `stable/X` varies over time. +The authoritative source for supported compiler versions are automated CI jobs tested in GitHub's cross-build actions and Jenkins. + +For `main`, the in-tree compiler is currently Clang 19. +Currently, GCC 12, 13, and 14 are tested for amd64 via CI jobs in Jenkins. +Clang 14 and 18 are tested for aarch64 and arm64 in GitHub's cross-build actions. === Other Suggestions