external-toolchain.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Optionally Using an External Toolchain
  3. **************************************
  4. You might want to use an external toolchain as part of your development.
  5. If this is the case, the fundamental steps you need to accomplish are as
  6. follows:
  7. - Understand where the installed toolchain resides. For cases where you
  8. need to build the external toolchain, you would need to take separate
  9. steps to build and install the toolchain.
  10. - Make sure you add the layer that contains the toolchain to your
  11. ``bblayers.conf`` file through the
  12. :term:`BBLAYERS` variable.
  13. - Set the :term:`EXTERNAL_TOOLCHAIN` variable in your ``local.conf`` file
  14. to the location in which you installed the toolchain.
  15. The toolchain configuration is very flexible and customizable. It
  16. is primarily controlled with the :term:`TCMODE` variable. This variable
  17. controls which ``tcmode-*.inc`` file to include from the
  18. ``meta/conf/distro/include`` directory within the :term:`Source Directory`.
  19. The default value of :term:`TCMODE` is "default", which tells the
  20. OpenEmbedded build system to use its internally built toolchain (i.e.
  21. ``tcmode-default.inc``). However, other patterns are accepted. In
  22. particular, "external-\*" refers to external toolchains. One example is
  23. the Mentor Graphics Sourcery G++ Toolchain. Support for this toolchain resides
  24. in the separate ``meta-sourcery`` layer at
  25. https://github.com/MentorEmbedded/meta-sourcery/.
  26. See its ``README`` file for details about how to use this layer.
  27. Another example of external toolchain layer is
  28. :yocto_git:`meta-arm-toolchain </meta-arm/tree/meta-arm-toolchain/>`
  29. supporting GNU toolchains released by ARM.
  30. You can find further information by reading about the :term:`TCMODE` variable
  31. in the Yocto Project Reference Manual's variable glossary.