If the user hasn't set EXTERNAL_TOOLCHAIN, but CODEBENCH_PATH is set, then we automatically set both EXTERNAL_TOOLCHAIN and EXTERNAL_TARGET_SYS based on the installed toolchains in CODEBENCH_PATH/../toolchains. This adds a new variable, rather than allowing EXTERNAL_TOOLCHAIN to point to CodeBench instead of the actual toolchain path, to keep the clean separation between the generic toolchain logic and that which is specific to our toolchains, and also avoids overloading the variable's meaning. JIRA: SB-7881 Signed-off-by: Christopher Larson <chris_larson@mentor.com>
OpenEmbedded/Yocto layer for the Sourcery G++ toolchain
Dependencies
- openembedded-core layer, with a matching branch (i.e. master of oe-core and master of meta-sourcery).
- bitbake, with a matching branch.
- An installed Sourcery G++ toolchain
- An existing build directory configured for this bitbake and openembedded-core.
Usage & Instructions
-
If it's an ia32 toolchain, make sure you did not let it modify your PATH, and if you did, remove it.
This is necessary because the ia32 Sourcery G++ toolchain shipped non-prefixed binaries (e.g.
gccrather thani586-none-linux-gcc), which means bitbake would be unable to run the host's gcc directly anymore. -
Add the meta-sourcery layer to your
BBLAYERSinconf/bblayers.conf. Please make certain that it is listed before themetalayer, as this ensures meta-sourcery gets priority over meta. -
Set
EXTERNAL_TOOLCHAIN = "/path/to/your/sourcery-g++-install"inconf/local.conf.
Optional Functionality
- If the user chooses to, they may optionally decide to rebuild the Sourcery G++ glibc
from source, if they have downloaded the corresponding source archive from Mentor
Graphics. To so, set
TCMODE = "external-sourcery-rebuild-libc", rather than relying on the default value ofexternal-sourcery. After setting TCMODE appropriately, you must also setSOURCERY_SRC_FILE = "/path/to/your/sourcery-g++-source-tarball"orSOURCERY_SRC_URI = "http://some.domain/some-path".
Behavior
The meta-sourcery layer.conf automatically defines TCMODE for us. The tcmode
performs a number of operations:
- Sets
TARGET_PREFIXappropriately, after determining what prefix is in use by the toolchain - Sanity checks
EXTERNAL_TOOLCHAIN: does the path exist? does the expected sysroot exist? - Sets preferences so that external recipes are used in preference to building them from source, including cross recipes which link/wrap the toolchain cross binaries
Contributing
To contribute to this layer, please fork and submit pull requests to the github repository, or open issues for any bugs you find, or feature requests you have.
Maintainer
This layer is maintained by Mentor Graphics Corporation. Please direct all support requests for this layer to the GitHub repository issues interface.
To Do List
See TODO.md.