From owner-dev-commits-doc-all@freebsd.org Fri May 14 14:38:33 2021 Return-Path: Delivered-To: dev-commits-doc-all@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 A7B0E64A84A for ; Fri, 14 May 2021 14:38:33 +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 4FhWNn4P3Rz3sQD; Fri, 14 May 2021 14:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7F6E013FBA; Fri, 14 May 2021 14:38:33 +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 14EEcXdp071997; Fri, 14 May 2021 14:38:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14EEcX16071996; Fri, 14 May 2021 14:38:33 GMT (envelope-from git) Date: Fri, 14 May 2021 14:38:33 GMT Message-Id: <202105141438.14EEcX16071996@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: =?utf-8?B?RmVybmFuZG8gQXBlc3RlZ3XDrWE=?= Subject: git: 47c32d3f6b - main - [phb]: update USE_GCC description MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47c32d3f6b84ce4d77b82d9217884b0342ea515e Auto-Submitted: auto-generated X-BeenThere: dev-commits-doc-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the doc repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2021 14:38:33 -0000 The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/doc/commit/?id=47c32d3f6b84ce4d77b82d9217884b0342ea515e commit 47c32d3f6b84ce4d77b82d9217884b0342ea515e Author: Fernando ApesteguĂ­a AuthorDate: 2021-05-11 09:47:53 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2021-05-14 14:31:38 +0000 [phb]: update USE_GCC description Update USE_GCC documentation after port's commit 768f18f327ac9646fb8ee83263233909be540966 Show that USE_GCC=any is deprecated and also the possibility to specify :build to inject a BUILD only dependency. PR: 254253 Reported by: gerald@ Reviewed by: 0mp@, gerald@ Approved by: 0mp@ (mentor), gerald@ Differential Revision: https://reviews.freebsd.org/D30209 --- .../en/books/porters-handbook/makefiles/_index.adoc | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/documentation/content/en/books/porters-handbook/makefiles/_index.adoc b/documentation/content/en/books/porters-handbook/makefiles/_index.adoc index 9e9850d616..db5b8a9a03 100644 --- a/documentation/content/en/books/porters-handbook/makefiles/_index.adoc +++ b/documentation/content/en/books/porters-handbook/makefiles/_index.adoc @@ -3296,11 +3296,28 @@ USE_GCC=X.Y |`USE_GCC` a| -The port requires GCC (`gcc` or `{g-plus-plus}`) to build. Some ports need any GCC version, some require modern, recent versions. It is typically set to `any` (in this case, GCC from base would be used on versions of FreeBSD that still have it, or `lang/gcc` port would be installed when default C/C++ compiler is Clang); or `yes` (means always use stable, modern GCC from `lang/gcc` port). The exact version can also be specified, with a value such as `4.7`. The minimal required version can be specified as `4.6+`. The GCC from the base system is used when it satisfies the requested version, otherwise an appropriate compiler is built from the port, and `CC` and `CXX` are adjusted accordingly. +The port requires GCC (`gcc` or `{g-plus-plus}`) to build. +Some ports need a specific, old GCC version, some require modern, recent versions. +It is typically set to `yes` (means always use stable, modern GCC from ports per `GCC_DEFAULT` in [.filename]#Mk/bsd.default-versions.mk#). +This is also the default value. +The exact version can also be specified, with a value such as `10`. +The minimal required version can be specified as `10+`. +GCC from the base system is used when it satisfies the requested version, otherwise an appropriate compiler is built from ports, and `CC` and `CXX` are adjusted accordingly. +The `:build` argument following the version specifier adds only a build time dependency to the port. + +For example: +[example] +==== +[.programlisting] +.... +USE_GCC=yes # port requires a current version of GCC +USE_GCC=11+:build # port requires GCC 11 or later at build time only +.... +==== [NOTE] ==== -`USE_GCC` will register a build-time and a run-time dependency. +`USE_GCC=any` is deprecated and should not be used in new ports ==== |===