在 2026/3/29 下午8:52, Wu Haotian 写道:
Bare-metal LoongArch target triple loongarch*-*-elf* contains references
to "loongarch/linux.h" and "loongarch/t-linux", causing build failure for
GCC targeting loongarch32-*-elf*.
This commit removes the extra Linux references, and is tested by building
a cross compiler for the loongarch32-picolibc-elf target.
gcc/ChangeLog:
* config.gcc: removed linux.h and t-linux for loongarch*-*-elf* targets
This line should be started with a tab.
Others LGTM.
I will merge this patch after I complete this testing.
Thanks!
Signed-off-by: Wu Haotian <[email protected]>
---
gcc/config.gcc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 036baa714d7..34591bff970 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2672,8 +2672,8 @@ loongarch*-*-linux*)
loongarch*-*-elf*)
tm_file="elfos.h newlib-stdint.h ${tm_file}"
- tm_file="${tm_file} loongarch/elf.h loongarch/linux.h
loongarch/loongarch-driver.h"
- tmake_file="${tmake_file} loongarch/t-multilib loongarch/t-linux"
+ tm_file="${tm_file} loongarch/elf.h loongarch/loongarch-driver.h"
+ tmake_file="${tmake_file} loongarch/t-multilib"
gnu_ld=yes
gas=yes