diff --git a/documentation/content/en/books/porters-handbook/makefiles/_index.adoc b/documentation/content/en/books/porters-handbook/makefiles/_index.adoc --- 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` 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 `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 `: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 ==== |===