diff options
author | Antonin Godard <antonin.godard@bootlin.com> | 2025-07-22 15:33:37 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-01 11:59:18 +0100 |
commit | 649c93080f1e6db1f5c8c8436a797038a5c12c87 (patch) | |
tree | 92e54b395060f24ca84bfaa0de6cc4fd77066830 /documentation/ref-manual/variables.rst | |
parent | e9a49660a5bc3f42b414e4da9bfc0070dbf762d5 (diff) | |
download | poky-649c93080f1e6db1f5c8c8436a797038a5c12c87.tar.gz |
ref-manual: document new toolchain classes and variables
Document the new classes under classes/toolchain as well as
PREFERRED_TOOLCHAIN* and TOOLCHAIN variables, which allow selecting the
toolchain. For now there's "gcc" and "clang" as available toolchain.
(From yocto-docs rev: 69a9568f8bd7ed57efddab507a4294ad3408f4dd)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual/variables.rst')
-rw-r--r-- | documentation/ref-manual/variables.rst | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 7e4f7e58ad..038e5541ef 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -7325,6 +7325,57 @@ system and gives an overview of their function and contents. | |||
7325 | ":ref:`dev-manual/new-recipe:using virtual providers`" section in the | 7325 | ":ref:`dev-manual/new-recipe:using virtual providers`" section in the |
7326 | Yocto Project Development Tasks Manual. | 7326 | Yocto Project Development Tasks Manual. |
7327 | 7327 | ||
7328 | :term:`PREFERRED_TOOLCHAIN` | ||
7329 | The :term:`PREFERRED_TOOLCHAIN` variable selects the toolchain to use for | ||
7330 | compiling recipes. This variable is not meant to be overridden globally. | ||
7331 | Instead, the values of :term:`PREFERRED_TOOLCHAIN_TARGET`, | ||
7332 | :term:`PREFERRED_TOOLCHAIN_NATIVE` and :term:`PREFERRED_TOOLCHAIN_SDK` | ||
7333 | should be overridden. | ||
7334 | |||
7335 | :term:`PREFERRED_TOOLCHAIN_NATIVE` | ||
7336 | This variable controls the toolchain used for compiling | ||
7337 | :ref:`ref-classes-native` recipes. | ||
7338 | |||
7339 | This variable should be set globally from a :term:`configuration file`. | ||
7340 | |||
7341 | See :term:`PREFERRED_TOOLCHAIN_TARGET` for more details on the possible | ||
7342 | values for this variable. | ||
7343 | |||
7344 | A recipe that does not support the toolchain specified by | ||
7345 | :term:`PREFERRED_TOOLCHAIN_NATIVE` can override it locally with | ||
7346 | :term:`TOOLCHAIN_NATIVE`. | ||
7347 | |||
7348 | :term:`PREFERRED_TOOLCHAIN_SDK` | ||
7349 | This variable controls the toolchain used for compiling | ||
7350 | :ref:`ref-classes-nativesdk` recipes. | ||
7351 | |||
7352 | This variable should be set globally from a :term:`configuration file`. | ||
7353 | |||
7354 | See :term:`PREFERRED_TOOLCHAIN_TARGET` for more details on the possible | ||
7355 | values for this variable. | ||
7356 | |||
7357 | :term:`PREFERRED_TOOLCHAIN_TARGET` | ||
7358 | This variable controls the toolchain used for compiling recipes in the | ||
7359 | architecture of the target :term:`MACHINE`. | ||
7360 | |||
7361 | There are two possible values for this variable at the moment: | ||
7362 | |||
7363 | - :ref:`gcc <ref-classes-toolchain-gcc>` (default): the GCC/Binutils toolchain. | ||
7364 | - :ref:`clang <ref-classes-toolchain-clang>`: the Clang/LLVM toolchain. | ||
7365 | |||
7366 | :term:`PREFERRED_TOOLCHAIN_TARGET` will make the :ref:`ref-classes-base` | ||
7367 | class inherit one of the toolchain classes defined in | ||
7368 | :oe_git:`meta/classes/toolchain | ||
7369 | </openembedded-core/tree/meta/classes/toolchain>`. As a consequence, this | ||
7370 | variable should be set globally from a :term:`configuration file`. | ||
7371 | |||
7372 | These classes define commands used for cross-compiling such as :term:`CC`, | ||
7373 | :term:`CXX`, :term:`LD` and so on. | ||
7374 | |||
7375 | A recipe that does not support the toolchain specified by | ||
7376 | :term:`PREFERRED_TOOLCHAIN_TARGET` can override it locally with | ||
7377 | :term:`TOOLCHAIN`. | ||
7378 | |||
7328 | :term:`PREFERRED_VERSION` | 7379 | :term:`PREFERRED_VERSION` |
7329 | If there are multiple versions of a recipe available, this variable | 7380 | If there are multiple versions of a recipe available, this variable |
7330 | determines which version should be given preference. You must always | 7381 | determines which version should be given preference. You must always |
@@ -10125,6 +10176,21 @@ system and gives an overview of their function and contents. | |||
10125 | implementations, NFS does not meet this minimum requirement. | 10176 | implementations, NFS does not meet this minimum requirement. |
10126 | Consequently, :term:`TMPDIR` cannot be on NFS. | 10177 | Consequently, :term:`TMPDIR` cannot be on NFS. |
10127 | 10178 | ||
10179 | :term:`TOOLCHAIN` | ||
10180 | The :term:`TOOLCHAIN` variable can be used to override the toolchain used | ||
10181 | by a recipe. | ||
10182 | |||
10183 | The default value for this variable is the value of | ||
10184 | :term:`PREFERRED_TOOLCHAIN`. See the description of | ||
10185 | :term:`PREFERRED_TOOLCHAIN` to know the list of possible values for | ||
10186 | :term:`TOOLCHAIN`. | ||
10187 | |||
10188 | It is possible to override the value of this variable from a recipe if | ||
10189 | this recipe is known to support only a specific toolchain. For example, | ||
10190 | the :oe_git:`Pseudo </openembedded-core/tree/meta/recipes-devtools/pseudo/pseudo_git.bb>` | ||
10191 | recipe overrides this variable to "gcc", because Pseudo uses GCC compiler | ||
10192 | built-ins options that the Clang/LLVM compiler does not provide. | ||
10193 | |||
10128 | :term:`TOOLCHAIN_HOST_TASK` | 10194 | :term:`TOOLCHAIN_HOST_TASK` |
10129 | This variable lists packages the OpenEmbedded build system uses when | 10195 | This variable lists packages the OpenEmbedded build system uses when |
10130 | building an SDK, which contains a cross-development environment. The | 10196 | building an SDK, which contains a cross-development environment. The |
@@ -10180,6 +10246,18 @@ system and gives an overview of their function and contents. | |||
10180 | :term:`SDK_VERSION` variables for additional | 10246 | :term:`SDK_VERSION` variables for additional |
10181 | information. | 10247 | information. |
10182 | 10248 | ||
10249 | :term:`TOOLCHAIN_NATIVE` | ||
10250 | The :term:`TOOLCHAIN_NATIVE` variable can be used to override the | ||
10251 | toolchain used by a :ref:`ref-classes-native` recipe. | ||
10252 | |||
10253 | The default value for this variable is the value of | ||
10254 | :term:`PREFERRED_TOOLCHAIN` (in :ref:`ref-classes-native` contexts). See | ||
10255 | the description of :term:`PREFERRED_TOOLCHAIN` to know the list of | ||
10256 | possible values for :term:`TOOLCHAIN_NATIVE`. | ||
10257 | |||
10258 | It is possible to override the value of this variable from a recipe if | ||
10259 | this recipe is known to support only a specific toolchain. | ||
10260 | |||
10183 | :term:`TOOLCHAIN_TARGET_TASK` | 10261 | :term:`TOOLCHAIN_TARGET_TASK` |
10184 | This variable lists packages the OpenEmbedded build system uses when | 10262 | This variable lists packages the OpenEmbedded build system uses when |
10185 | it creates the target part of an SDK (i.e. the part built for the | 10263 | it creates the target part of an SDK (i.e. the part built for the |