From 551f5cddb4ac213d99d054f4ca671ed34ce60182 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 5 Aug 2021 13:48:48 +0000 Subject: [PATCH] gcc: toolchain stage 2: Set sysroot to /tools_${arch} The stage 2 compiler was looking for libraries outside the bootstrapped toolchain environment which causes that linked programs cannot be executied because the runtime linker only looks for libraries inside the toolchain environment. Signed-off-by: Michael Tremer --- lfs/gcc | 1 + 1 file changed, 1 insertion(+) diff --git a/lfs/gcc b/lfs/gcc index 44112bd70c..40d4fb1c9c 100644 --- a/lfs/gcc +++ b/lfs/gcc @@ -116,6 +116,7 @@ ifeq "$(PASS)" "2" EXTRA_CONFIG = \ --build=$(BUILDTARGET) \ --prefix=$(TOOLS_DIR) \ + --with-sysroot=$(ROOT) \ --with-local-prefix=$(TOOLS_DIR) \ --with-native-system-header-dir=$(TOOLS_DIR)/include \ --enable-languages=c,c++ \ -- 2.39.5