]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
gcc: Fix limits.h in first toolchain pass
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Jul 2024 08:46:30 +0000 (08:46 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Jul 2024 09:51:25 +0000 (09:51 +0000)
This is necessary so that the compiler is using the correct glibc
headers.

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

diff --git a/lfs/gcc b/lfs/gcc
index 00250e271a4df0a1b1044f23422f244e0c1df5fe..5d233d5b792ec5eaf85097d0e2e4bd4657253fed 100644 (file)
--- a/lfs/gcc
+++ b/lfs/gcc
@@ -231,11 +231,6 @@ ifeq "$(TOOLCHAIN)" "1"
        cd $(DIR_APP) && tar xfa $(DIR_DL)/mpc-$(MPC_VER).tar.gz
        cd $(DIR_APP) && mv -v mpc-$(MPC_VER) mpc
 
-ifeq "$(PASS)" "2"
-       cd $(DIR_APP) && cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
-                       `dirname $$($(TOOLS_DIR)/bin/$(CROSSTARGET)-gcc -print-libgcc-file-name)`/include-fixed/limits.h
-endif
-
        for file in $$(find $(DIR_APP)/gcc/config -name linux64.h -o -name linux.h \
                        -o -name sysv4.h -o -name linux-eabi.h -o -name linux-elf.h -o -name aarch64-linux.h); do \
                echo "Processing $${file}..."; \
@@ -279,6 +274,10 @@ endif
 
 ifeq "$(TOOLCHAIN)" "1"
  ifeq "$(PASS)" "1"
+       # Fix limits.h
+       cd $(DIR_APP) && cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
+               `dirname $$($(TOOLS_DIR)/bin/$(CROSSTARGET)-gcc -print-libgcc-file-name)`/include/limits.h
+
        ln -svf libgcc.a $$($(TOOLS_DIR)/bin/$(CROSSTARGET)-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/')
  endif