Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 May 2021 14:38:33 GMT
From:      =?utf-8?B?RmVybmFuZG8gQXBlc3RlZ3XDrWE=?= <fernape@FreeBSD.org>
To:        doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org
Subject:   git: 47c32d3f6b - main - [phb]: update USE_GCC description
Message-ID:  <202105141438.14EEcX16071996@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/doc/commit/?id=47c32d3f6b84ce4d77b82d9217884b0342ea515e

commit 47c32d3f6b84ce4d77b82d9217884b0342ea515e
Author:     Fernando ApesteguĂ­a <fernape@FreeBSD.org>
AuthorDate: 2021-05-11 09:47:53 +0000
Commit:     Fernando ApesteguĂ­a <fernape@FreeBSD.org>
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
 ====
 
 |===



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105141438.14EEcX16071996>