diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2022-12-08 19:10:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-18 10:41:21 +0000 |
commit | 766a44b8e30551fc61b5031129175d207e7ea78b (patch) | |
tree | ff9af597f5cf9ab334f053e1107f0702fd907a94 /documentation | |
parent | 397586e4aebcbd2bc9cbeb595f7d753b22a36edb (diff) | |
download | poky-766a44b8e30551fc61b5031129175d207e7ea78b.tar.gz |
manual: improve documentation about using external toolchains
- Remove the redundant FAQ entry about this topic,
already covered in a specific section of the Development Tasks manual
- Document the TOOLCHAIN_LOCATION variable
- Expand both the Development Tasks manual and
the TCMODE variable description using details from the FAQ entry.
- Mention the "meta-arm-toolchain" layer too.
(From yocto-docs rev: 53faa54a8e6311b4d3d41d96cb1a497d0f6502fb)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/dev-manual/external-toolchain.rst | 28 | ||||
-rw-r--r-- | documentation/ref-manual/faq.rst | 19 | ||||
-rw-r--r-- | documentation/ref-manual/variables.rst | 20 |
3 files changed, 37 insertions, 30 deletions
diff --git a/documentation/dev-manual/external-toolchain.rst b/documentation/dev-manual/external-toolchain.rst index e1fabbed22..238f8cf467 100644 --- a/documentation/dev-manual/external-toolchain.rst +++ b/documentation/dev-manual/external-toolchain.rst | |||
@@ -15,14 +15,26 @@ follows: | |||
15 | ``bblayers.conf`` file through the | 15 | ``bblayers.conf`` file through the |
16 | :term:`BBLAYERS` variable. | 16 | :term:`BBLAYERS` variable. |
17 | 17 | ||
18 | - Set the ``EXTERNAL_TOOLCHAIN`` variable in your ``local.conf`` file | 18 | - Set the :term:`EXTERNAL_TOOLCHAIN` variable in your ``local.conf`` file |
19 | to the location in which you installed the toolchain. | 19 | to the location in which you installed the toolchain. |
20 | 20 | ||
21 | A good example of an external toolchain used with the Yocto Project is | 21 | The toolchain configuration is very flexible and customizable. It |
22 | Mentor Graphics Sourcery G++ Toolchain. You can see information on how | 22 | is primarily controlled with the :term:`TCMODE` variable. This variable |
23 | to use that particular layer in the ``README`` file at | 23 | controls which ``tcmode-*.inc`` file to include from the |
24 | https://github.com/MentorEmbedded/meta-sourcery/. You can find | 24 | ``meta/conf/distro/include`` directory within the :term:`Source Directory`. |
25 | further information by reading about the | ||
26 | :term:`TCMODE` variable in the Yocto | ||
27 | Project Reference Manual's variable glossary. | ||
28 | 25 | ||
26 | The default value of :term:`TCMODE` is "default", which tells the | ||
27 | OpenEmbedded build system to use its internally built toolchain (i.e. | ||
28 | ``tcmode-default.inc``). However, other patterns are accepted. In | ||
29 | particular, "external-\*" refers to external toolchains. One example is | ||
30 | the Mentor Graphics Sourcery G++ Toolchain. Support for this toolchain resides | ||
31 | in the separate ``meta-sourcery`` layer at | ||
32 | https://github.com/MentorEmbedded/meta-sourcery/. | ||
33 | See its ``README`` file for details about how to use this layer. | ||
34 | |||
35 | Another example of external toolchain layer is | ||
36 | :yocto_git:`meta-arm-toolchain </meta-arm/tree/meta-arm-toolchain/>` | ||
37 | supporting GNU toolchains released by ARM. | ||
38 | |||
39 | You can find further information by reading about the :term:`TCMODE` variable | ||
40 | in the Yocto Project Reference Manual's variable glossary. | ||
diff --git a/documentation/ref-manual/faq.rst b/documentation/ref-manual/faq.rst index 8f38808a78..a3a15506c3 100644 --- a/documentation/ref-manual/faq.rst +++ b/documentation/ref-manual/faq.rst | |||
@@ -168,23 +168,8 @@ Using the OpenEmbedded Build system | |||
168 | How do I use an external toolchain? | 168 | How do I use an external toolchain? |
169 | ----------------------------------- | 169 | ----------------------------------- |
170 | 170 | ||
171 | The toolchain configuration is very flexible and customizable. It | 171 | See the ":ref:`dev-manual/external-toolchain:optionally using an external toolchain`" |
172 | is primarily controlled with the :term:`TCMODE` variable. This variable | 172 | section in the Development Task manual. |
173 | controls which ``tcmode-*.inc`` file to include from the | ||
174 | ``meta/conf/distro/include`` directory within the :term:`Source Directory`. | ||
175 | |||
176 | The default value of :term:`TCMODE` is "default", which tells the | ||
177 | OpenEmbedded build system to use its internally built toolchain (i.e. | ||
178 | ``tcmode-default.inc``). However, other patterns are accepted. In | ||
179 | particular, "external-\*" refers to external toolchains. One example is | ||
180 | the Sourcery G++ Toolchain. The support for this toolchain resides in | ||
181 | the separate ``meta-sourcery`` layer at | ||
182 | https://github.com/MentorEmbedded/meta-sourcery/. | ||
183 | |||
184 | In addition to the toolchain configuration, you also need a | ||
185 | corresponding toolchain recipe file. This recipe file needs to package | ||
186 | up any pre-built objects in the toolchain such as ``libgcc``, | ||
187 | ``libstdcc++``, any locales, and ``libc``. | ||
188 | 173 | ||
189 | Why do I get chmod permission issues? | 174 | Why do I get chmod permission issues? |
190 | ------------------------------------- | 175 | ------------------------------------- |
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 31a3c16c61..499a26f50b 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -2417,6 +2417,12 @@ system and gives an overview of their function and contents. | |||
2417 | :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in | 2417 | :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in |
2418 | ``meta/classes-recipe`` to see how the variable is used. | 2418 | ``meta/classes-recipe`` to see how the variable is used. |
2419 | 2419 | ||
2420 | :term:`EXTERNAL_TOOLCHAIN` | ||
2421 | When you intend to use an | ||
2422 | :ref:`external toolchain <dev-manual/external-toolchain:optionally using an external toolchain>`, | ||
2423 | this variable allows to specify the directory where this toolchain was | ||
2424 | installed. | ||
2425 | |||
2420 | :term:`EXTERNALSRC` | 2426 | :term:`EXTERNALSRC` |
2421 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` | 2427 | When inheriting the :ref:`externalsrc <ref-classes-externalsrc>` |
2422 | class, this variable points to the source tree, which is outside of | 2428 | class, this variable points to the source tree, which is outside of |
@@ -8475,16 +8481,20 @@ system and gives an overview of their function and contents. | |||
8475 | https://github.com/MentorEmbedded/meta-sourcery/. | 8481 | https://github.com/MentorEmbedded/meta-sourcery/. |
8476 | 8482 | ||
8477 | The layer's ``README`` file contains information on how to use the | 8483 | The layer's ``README`` file contains information on how to use the |
8478 | Sourcery G++ Toolchain as an external toolchain. In summary, you must | 8484 | Sourcery G++ Toolchain as an external toolchain. You will have to |
8479 | be sure to add the layer to your ``bblayers.conf`` file in front of | 8485 | add the layer to your ``bblayers.conf`` file and then set the |
8480 | the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable | 8486 | :term:`EXTERNAL_TOOLCHAIN` variable in your ``local.conf`` file to |
8481 | in your ``local.conf`` file to the location in which you installed | 8487 | the location of the toolchain. |
8482 | the toolchain. | ||
8483 | 8488 | ||
8484 | The fundamentals used for this example apply to any external | 8489 | The fundamentals used for this example apply to any external |
8485 | toolchain. You can use ``meta-sourcery`` as a template for adding | 8490 | toolchain. You can use ``meta-sourcery`` as a template for adding |
8486 | support for other external toolchains. | 8491 | support for other external toolchains. |
8487 | 8492 | ||
8493 | In addition to toolchain configuration, you will also need a | ||
8494 | corresponding toolchain recipe file. This recipe file needs to package | ||
8495 | up any pre-built objects in the toolchain such as ``libgcc``, | ||
8496 | ``libstdcc++``, any locales, and ``libc``. | ||
8497 | |||
8488 | :term:`TC_CXX_RUNTIME` | 8498 | :term:`TC_CXX_RUNTIME` |
8489 | Specifies the C/C++ STL and runtime variant to use during | 8499 | Specifies the C/C++ STL and runtime variant to use during |
8490 | the build process. Default value is 'gnu' | 8500 | the build process. Default value is 'gnu' |