blob: 1ba05a811e32e349b1af02ae9d8f8c10fb65a030 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001From b6185401fc3daa7fa8ba2b84db3e4da3b94a9867 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 26 Jul 2017 16:13:16 -0700
4Subject: [PATCH] Kbuild.klibc: Use -print-libgcc-file-name instead of
5 --print-libgcc
6
7-print-libgcc-file-name works with clang and gcc unlike --print-libgcc
8which is gcc specific
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12---
13 scripts/Kbuild.klibc | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
17index f500d53..101f86f 100644
18--- a/scripts/Kbuild.klibc
19+++ b/scripts/Kbuild.klibc
20@@ -128,7 +128,7 @@ KLIBCCFLAGS += $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS) \
21 KLIBCAFLAGS += -D__ASSEMBLY__ $(KLIBCCFLAGS)
22 KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
23
24-KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc)
25+KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) -print-libgcc-file-name)
26 KLIBCLIBGCC ?= $(KLIBCLIBGCC_DEF)
27 KLIBCCRT0 := $(KLIBCOBJ)/arch/$(KLIBCARCHDIR)/crt0.o
28 KLIBCLIBC := $(KLIBCOBJ)/libc.a