diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-12-18 03:22:40 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-12-21 12:23:24 +0100 |
commit | d6a21142582300238fd370705f23580571c98f5f (patch) | |
tree | 3e9108ccf9585483993ab95435e0b85917293b52 /README.md | |
parent | 8f1aa5e4668636151417fa6f1ad904fcaf12064b (diff) | |
download | bootstrappable-toolchain-d6a21142582300238fd370705f23580571c98f5f.tar.gz |
gcc-musl: Support building as crossed native
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -90,9 +90,25 @@ You can install a portable version of any provided toolchain (e.g., $ just-mr --main gcc-latest-musl install toolchain -D'{"ARCH":"x86_64"}' -o /opt/gcc ~~~ -*Note that the configuration variable `ARCH` should be set to the host -architecture. For installing a cross-compiler, you can additionally set -`BUILD_ARCH` to specify a different target architecture.* +*Note that the configuration variable `ARCH` should be set to the build host +architecture.* + +For installing a *cross compiler*, you can additionally set `BUILD_ARCH` to +specify the architecture the compiler should build for: + +~~~ sh +$ just-mr --main gcc-latest-musl install toolchain \ + -D'{"ARCH":"x86_64","BUILD_ARCH":"arm64"}' -o /opt/gcc-for-arm64 +~~~ + +For installing a *crossed native compiler*, you have to also set the variable +`TARGET_ARCH` (the architecture the compiler is build for) to the same value as +`BUILD_ARCH`: + +~~~ sh +$ just-mr --main gcc-latest-musl install toolchain \ + -D'{"ARCH":"x86_64","TARGET_ARCH":"arm64","BUILD_ARCH":"arm64"}' -o /opt/arm64-gcc-for-arm64 +~~~ ## Initial requirements |