]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
binutils+gcc: Fix that the toolchain compiler is trying to link against host libraries
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Feb 2022 16:47:25 +0000 (16:47 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Sat, 5 Feb 2022 12:09:40 +0000 (12:09 +0000)
Binutils and GCC were misconfigured and used host libraries to build
toolchain programs. That resulted in that those programs were correctly
linked, but could not be executed, because the runtime linker did not
search in the host system.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/binutils
lfs/gcc

index d94be9a066c69504b1513efdbb7817668b9f71c9..94e295cf955f8a1229d71a15bd484fc47ea06f4e 100644 (file)
@@ -59,7 +59,8 @@ ifeq "$(PASS)" "1"
        --target=$(CROSSTARGET) \
        --prefix=$(TOOLS_DIR) \
        --with-sysroot=$(ROOT) \
-       --with-lib-path=$(TOOLS_DIR)/lib
+       --with-lib-path=$(TOOLS_DIR)/lib \
+       --disable-nls
   EXTRA_MAKE =
   EXTRA_INSTALL = 
 else
@@ -69,10 +70,10 @@ else
        AR="$(CROSSTARGET)-ar" \
        RANLIB="$(CROSSTARGET)-ranlib"
   EXTRA_CONFIG = \
-       --host=$(BUILDTARGET) \
-       --build=$(BUILDTARGET) \
        --prefix=$(TOOLS_DIR) \
-       --with-lib-path=$(TOOLS_DIR)/lib
+       --with-lib-path=$(TOOLS_DIR)/lib \
+       --with-sysroot \
+       --disable-nls
   EXTRA_MAKE = 
   EXTRA_INSTALL = 
 endif
diff --git a/lfs/gcc b/lfs/gcc
index 96e58ddae2c11f90a9a259c9ec326939b8d5fac8..6bb1d170a8a9613805f022f25744fffd5cd03792 100644 (file)
--- a/lfs/gcc
+++ b/lfs/gcc
@@ -83,8 +83,10 @@ ifeq "$(PASS)" "1"
        --with-sysroot=$(ROOT) \
        --with-local-prefix=$(TOOLS_DIR) \
        --with-native-system-header-dir=$(TOOLS_DIR)/include \
+       --with-glibc-version=2.11 \
        --disable-nls \
        --disable-shared \
+       --disable-multilib \
        --disable-decimal-float \
        --disable-threads \
        --disable-libatomic \
@@ -114,13 +116,12 @@ ifeq "$(PASS)" "2"
        AR="$(CROSSTARGET)-ar" \
        RANLIB="$(CROSSTARGET)-ranlib"
   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++ \
        --disable-libstdcxx-pch \
+       --disable-multilib \
        --disable-libgomp
   EXTRA_MAKE = 
   EXTRA_INSTALL =