blob: f39701a65e0fc18bcce3414dcda61852e972a067 [file] [log] [blame]
Patrick Williams520786c2023-06-25 16:20:36 -05001Upstream-Status: Pending
2
Andrew Geisslerac970dd2021-02-12 15:32:45 -06003--- a/scripts/Kbuild.klibc
4+++ b/scripts/Kbuild.klibc
5@@ -113,10 +113,8 @@ KLIBCCPPFLAGS := -nostdinc -iwithpref
6 -I$(KLIBCINC)/arch/$(KLIBCARCHDIR) \
7 -I$(KLIBCINC)/bits$(KLIBCBITSIZE) \
8 -I$(KLIBCOBJ)/../include \
9- -I$(KLIBCINC)
10-ifeq ($(cc-name),clang)
Patrick Williams92b42cb2022-09-03 06:53:57 -050011-KLIBCCPPFLAGS += -isystem $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-file-name=include)
Andrew Geisslerac970dd2021-02-12 15:32:45 -060012-endif
13+ -I$(KLIBCINC) \
14+ -I$(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-file-name=include)
15
16 # kernel include paths
17 KLIBCKERNELSRC ?= $(srctree)
18@@ -137,7 +135,7 @@ KLIBCCFLAGS += $(KLIBCCPPFLAGS) $(K
19 KLIBCAFLAGS += -D__ASSEMBLY__ $(KLIBCCFLAGS)
20 KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
21
22-KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) $(if $(filter gcc,$(cc-name)),--print-libgcc,--print-libgcc-file-name))
23+KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc-file-name)
24 KLIBCLIBGCC ?= $(KLIBCLIBGCC_DEF)
25 KLIBCCRT0 := $(KLIBCOBJ)/arch/$(KLIBCARCHDIR)/crt0.o
26 KLIBCLIBC := $(KLIBCOBJ)/libc.a