summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-11-07 17:05:34 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-12-04 16:44:26 (GMT)
commitb07c7e832a3079d22fa1a5ef53d8ccfd75756343 (patch)
tree0095fdf9cb0a28f5250cfc6bb7634ce6a9dd69cf
parent952eb2aea572ba7b7b83485facb81dddc1019fc2 (diff)
downloaddefinitions-b07c7e832a3079d22fa1a5ef53d8ccfd75756343.tar.gz
gnu-toolchain: Use correct target names in Binutils and GCC
We intended to set the architecture triplet for systems we build to something like x86_64-baserock-linux-gnu. This wasn't actually happening though as nobody had passed the message on to the GCC and Binutils build systems, so we got mixed defaults of x86_64-pc-linux-gnu and x86_64-unknown-linux-gnu. Both GCC and Binutils install files that have the target name in their path, and it's useful when writing split rules if we know in advance what that's actually going to be. Plus it looks neater if we set the vendor field in the architecture triplet correctly!
-rw-r--r--elements/gnu-toolchain/binutils.bst5
-rw-r--r--elements/gnu-toolchain/gcc.bst5
2 files changed, 8 insertions, 2 deletions
diff --git a/elements/gnu-toolchain/binutils.bst b/elements/gnu-toolchain/binutils.bst
index 0548af4..91650b0 100644
--- a/elements/gnu-toolchain/binutils.bst
+++ b/elements/gnu-toolchain/binutils.bst
@@ -21,7 +21,10 @@ config:
configure-commands:
- |
./configure --prefix="%{prefix}" --disable-nls --disable-werror \
- --with-system-zlib
+ --with-system-zlib \
+ --build=%{target} \
+ --host=%{target} \
+ --target=%{target}
strip-commands:
- |
diff --git a/elements/gnu-toolchain/gcc.bst b/elements/gnu-toolchain/gcc.bst
index 6bf6e63..bf6eca6 100644
--- a/elements/gnu-toolchain/gcc.bst
+++ b/elements/gnu-toolchain/gcc.bst
@@ -56,7 +56,10 @@ config:
--disable-bootstrap \
`# [2]` --with-system-zlib \
`# [3]` --disable-multilib \
- --enable-languages=c,c++,fortran
+ --enable-languages=c,c++,fortran \
+ --build=%{target} \
+ --host=%{target} \
+ --target=%{target}
build-commands:
- cd o && make