aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando ApesteguĂ­a <fernape@FreeBSD.org>2021-05-11 09:47:53 +0000
committerFernando ApesteguĂ­a <fernape@FreeBSD.org>2021-05-14 14:31:38 +0000
commit47c32d3f6b84ce4d77b82d9217884b0342ea515e (patch)
treedc6ba2034377be0d19e2aa83a140e5c6a574c149
parent781d22ec2d94632df30e5fa3e7ae587a150d7b3c (diff)
-rw-r--r--documentation/content/en/books/porters-handbook/makefiles/_index.adoc21
1 files 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
====
|===