From b07c7e832a3079d22fa1a5ef53d8ccfd75756343 Mon Sep 17 00:00:00 2001
From: Sam Thursfield <sam.thursfield@codethink.co.uk>
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/gcc.bst | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'elements/gnu-toolchain/gcc.bst')

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

