From 9b5f7b8078051f137502dae6c5a538e6faa52753 Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Tue, 9 Apr 2019 17:06:33 +0800 Subject: [PATCH] Use host gcc for preprocessing in makefile Signed-off-by: Harry Chen --- kernel/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index f44ba3c..78fc4d3 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -219,6 +219,8 @@ strip := $(prefix)strip dtc := dtc export CC = $(cc) +hostcc := gcc + .PHONY: all clean build asm doc debug kernel sfsimg install run justrun runnet justrunnet runui justrunui runtest justruntest all: kernel @@ -333,7 +335,7 @@ else ifeq ($(arch), aarch64) @cargo xbuild $(build_args) else ifeq ($(arch), mipsel) @for file in context entry trap ; do \ - $(cc) -E src/arch/$(arch)/boot/$${file}.S -o src/arch/$(arch)/boot/$${file}.gen.s ; \ + $(hostcc) -E src/arch/$(arch)/boot/$${file}.S -o src/arch/$(arch)/boot/$${file}.gen.s ; \ done @cargo xbuild $(build_args) endif