path: root/elements/gnu-toolchain/stage1-gcc.bst
diff options
authorSam Thursfield <>2017-06-14 22:58:52 +0100
committerSam Thursfield <>2017-07-07 11:44:36 +0000
commit23a3a3c746261c3ecb2aa961d91f988f0602a032 (patch)
treea98e6f2d5451025f6ebd0c660c03db1bf306d19e /elements/gnu-toolchain/stage1-gcc.bst
parentaaefeb1e22579deef6a7829d055eee70c8a7a4f0 (diff)
Support cross-building the stage1 and stage2 components
This requires a feature recently added to BuildStream (in commit 03906221) that adds a framework for elements to support being cross-compiled. To build an armv8l64 native toolchain and sysroot on an x86_64 build machine, for example, you can do this: bst build --target-arch=armv8l64 gnu-toolchain/stage2.bst You can then run `bst checkout` to get at the resulting binaries and copy them onto an armv8l64 machine where they can be executed.
Diffstat (limited to 'elements/gnu-toolchain/stage1-gcc.bst')
1 files changed, 2 insertions, 2 deletions
diff --git a/elements/gnu-toolchain/stage1-gcc.bst b/elements/gnu-toolchain/stage1-gcc.bst
index 8e9eadfd..bcf30bc3 100644
--- a/elements/gnu-toolchain/stage1-gcc.bst
+++ b/elements/gnu-toolchain/stage1-gcc.bst
@@ -43,7 +43,7 @@ config:
# without an existing libc, and generally try to keep this build as
# simple as possible.
- |
- case "%{bst-arch}" in
+ case "%{bst-target-arch}" in
armv7lhf) ARCH_FLAGS="--with-arch=armv7-a \
--with-cpu=cortex-a9 \
--with-tune=cortex-a9 \
@@ -89,7 +89,7 @@ config:
# code results on an undefined reference to `__gmpn_invert_limb' in
# ARMv7. Fix the invocation of GMP's configure script so that GMP can
# use the machine-dependent code.
- case "%{bst-arch}" in
+ case "%{bst-target-arch}" in
armv5*) sed -i "s/--host=none/--host=armv5/" o/Makefile
sed -i "s/--target=none/--target=armv5/" o/Makefile ;;
armv7*) sed -i "s/--host=none/--host=armv7a/" o/Makefile