]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
gcc: toolchain stage 2: Set sysroot to /tools_${arch}
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Feb 2022 16:47:21 +0000 (16:47 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Sat, 5 Feb 2022 12:08:42 +0000 (12:08 +0000)
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 <michael.tremer@ipfire.org>
lfs/gcc

diff --git a/lfs/gcc b/lfs/gcc
index ade02dcda1b081fa56dd314f8bc13d1238a46859..96e58ddae2c11f90a9a259c9ec326939b8d5fac8 100644 (file)
--- 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++ \