Use host gcc for preprocessing in makefile

Signed-off-by: Harry Chen <i@harrychen.xyz>
master
Harry Chen 6 years ago
parent 801b2e609a
commit 9b5f7b8078

@ -219,6 +219,8 @@ strip := $(prefix)strip
dtc := dtc dtc := dtc
export CC = $(cc) export CC = $(cc)
hostcc := gcc
.PHONY: all clean build asm doc debug kernel sfsimg install run justrun runnet justrunnet runui justrunui runtest justruntest .PHONY: all clean build asm doc debug kernel sfsimg install run justrun runnet justrunnet runui justrunui runtest justruntest
all: kernel all: kernel
@ -333,7 +335,7 @@ else ifeq ($(arch), aarch64)
@cargo xbuild $(build_args) @cargo xbuild $(build_args)
else ifeq ($(arch), mipsel) else ifeq ($(arch), mipsel)
@for file in context entry trap ; do \ @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 done
@cargo xbuild $(build_args) @cargo xbuild $(build_args)
endif endif

Loading…
Cancel
Save