From b07c7e832a3079d22fa1a5ef53d8ccfd75756343 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 7 Nov 2017 17:05:34 +0000 Subject: 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! --- elements/gnu-toolchain/binutils.bst | 5 ++++- elements/gnu-toolchain/gcc.bst | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/elements/gnu-toolchain/binutils.bst b/elements/gnu-toolchain/binutils.bst index 0548af41..91650b09 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 6bf6e639..bf6eca66 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 -- cgit v1.2.1