summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--documentation/ref-manual/classes.rst80
-rw-r--r--documentation/ref-manual/variables.rst78
2 files changed, 158 insertions, 0 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 4705ca3f4d..ff41c84a73 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -3443,6 +3443,86 @@ This class is not intended to be used directly.
3443The :ref:`ref-classes-toolchain-scripts` class provides the scripts used for setting up 3443The :ref:`ref-classes-toolchain-scripts` class provides the scripts used for setting up
3444the environment for installed SDKs. 3444the environment for installed SDKs.
3445 3445
3446.. _ref-classes-toolchain-clang:
3447
3448``toolchain/clang``
3449===================
3450
3451The :ref:`ref-classes-toolchain-clang` class defines commands for building
3452recipes with Clang/LLVM compiler and utilities.
3453
3454This class is not meant to be inherited directly. Instead, you should either:
3455
3456- set the :term:`PREFERRED_TOOLCHAIN_TARGET`, :term:`PREFERRED_TOOLCHAIN_NATIVE`
3457 or :term:`PREFERRED_TOOLCHAIN_SDK` variables to "clang" from a
3458 :term:`Configuration File`. This will make the :ref:`ref-classes-base` class
3459 use the :ref:`ref-classes-toolchain-clang` accordingly. All recipes will
3460 be built with the Clang/LLVM toolchain, exception be made for recipes that
3461 override the value of :term:`TOOLCHAIN` or :term:`TOOLCHAIN_NATIVE` to
3462 another value.
3463
3464- set :term:`TOOLCHAIN` or :term:`TOOLCHAIN_NATIVE` to "clang" from a recipe
3465 when the recipe needs to override the default toolchain set by
3466 :term:`PREFERRED_TOOLCHAIN_TARGET`, :term:`PREFERRED_TOOLCHAIN_NATIVE` or
3467 :term:`PREFERRED_TOOLCHAIN_SDK`.
3468
3469.. _ref-classes-toolchain-clang-native:
3470
3471``toolchain/clang-native``
3472==========================
3473
3474The :ref:`ref-classes-toolchain-clang-native` class defines commands for
3475building :ref:`ref-classes-native` recipes with Clang/LLVM compiler and
3476utilities independently of the build context.
3477
3478The :ref:`ref-classes-toolchain-gcc-native` class defines :term:`BUILD_CC`,
3479:term:`BUILD_CXX` and other such variables which are rarely used in recipes.
3480Exception be made for target recipes that need to use the compiler from the
3481build host at some point during the build.
3482
3483This class should not be inherited directly. It is inherited by the
3484:ref:`ref-classes-base` class if :term:`TOOLCHAIN_NATIVE` is set to "clang".
3485
3486.. _ref-classes-toolchain-gcc:
3487
3488``toolchain/gcc``
3489=================
3490
3491The :ref:`ref-classes-toolchain-gcc` class defines commands for building
3492recipes with GCC/Binutils compiler and utilities.
3493
3494This class is not meant to be inherited directly. Instead, you should either:
3495
3496- set the :term:`PREFERRED_TOOLCHAIN_TARGET`, :term:`PREFERRED_TOOLCHAIN_NATIVE`
3497 or :term:`PREFERRED_TOOLCHAIN_SDK` variables to "gcc" from a
3498 :term:`Configuration File`. This will make the :ref:`ref-classes-base` class
3499 use the :ref:`ref-classes-toolchain-gcc` accordingly. All recipes will
3500 be built with the GCC/Binutils toolchain, exception be made for recipes that
3501 override the value of :term:`TOOLCHAIN` or :term:`TOOLCHAIN_NATIVE` to
3502 another value.
3503
3504- set :term:`TOOLCHAIN` or :term:`TOOLCHAIN_NATIVE` to "gcc" from a recipe
3505 when the recipe needs to override the default toolchain set by
3506 :term:`PREFERRED_TOOLCHAIN_TARGET`, :term:`PREFERRED_TOOLCHAIN_NATIVE` or
3507 :term:`PREFERRED_TOOLCHAIN_SDK`.
3508
3509.. _ref-classes-toolchain-gcc-native:
3510
3511``toolchain/gcc-native``
3512========================
3513
3514The :ref:`ref-classes-toolchain-gcc-native` class defines commands for building
3515:ref:`ref-classes-native` recipes with GCC/Binutils compiler and utilities
3516independently of the build context.
3517
3518The :ref:`ref-classes-toolchain-gcc-native` class defines :term:`BUILD_CC`,
3519:term:`BUILD_CXX` and other such variables which are rarely used in recipes.
3520Exception be made for target recipes that need to use the compiler from the build
3521host at some point during the build.
3522
3523This class should not be inherited directly. It is inherited by the
3524:ref:`ref-classes-base` class if :term:`TOOLCHAIN_NATIVE` is set to "gcc".
3525
3446.. _ref-classes-typecheck: 3526.. _ref-classes-typecheck:
3447 3527
3448``typecheck`` 3528``typecheck``
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