[15/28] binutils/gcc: Explicitely declare host and build architecture tuple

Message ID 20220204164748.315559-15-michael.tremer@ipfire.org
State Accepted
Commit c16a83df5af5d48f3bc1642121a7bd900b307e2f
Headers
Series [01/28] gcc: toolchain stage 2: Set sysroot to /tools_${arch} |

Commit Message

Michael Tremer Feb. 4, 2022, 4:47 p.m. UTC
  This will fix cross-compiling the toolchain which I broke before.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 lfs/binutils | 2 ++
 lfs/gcc      | 2 ++
 2 files changed, 4 insertions(+)
  

Patch

diff --git a/lfs/binutils b/lfs/binutils
index d05d3c2c5..33555fa23 100644
--- a/lfs/binutils
+++ b/lfs/binutils
@@ -70,6 +70,8 @@  else
 	AR="$(CROSSTARGET)-ar" \
 	RANLIB="$(CROSSTARGET)-ranlib"
   EXTRA_CONFIG = \
+	--build=$(BUILDTARGET) \
+	--host=$(BUILDTARGET) \
 	--prefix=$(TOOLS_DIR) \
 	--with-lib-path=$(TOOLS_DIR)/lib \
 	--with-sysroot \
diff --git a/lfs/gcc b/lfs/gcc
index 6bb1d170a..f9502562d 100644
--- a/lfs/gcc
+++ b/lfs/gcc
@@ -116,6 +116,8 @@  ifeq "$(PASS)" "2"
 	AR="$(CROSSTARGET)-ar" \
 	RANLIB="$(CROSSTARGET)-ranlib"
   EXTRA_CONFIG = \
+	--build=$(BUILDTARGET) \
+	--host=$(BUILDTARGET) \
 	--prefix=$(TOOLS_DIR) \
 	--with-local-prefix=$(TOOLS_DIR) \
 	--with-native-system-header-dir=$(TOOLS_DIR)/include \