build: Ensure building toolchain does not fail due to a toolchain not being present already

This commit is contained in:
mintsuki 2021-05-22 10:25:05 +02:00
parent 0602e40cce
commit 31ad36ac51
1 changed files with 2 additions and 0 deletions

View File

@ -16,9 +16,11 @@ ifeq ($(shell export "PATH=$(PATH)"; which $(TOOLCHAIN_AR)), )
TOOLCHAIN_AR := ar TOOLCHAIN_AR := ar
endif endif
ifneq ($(MAKECMDGOALS), toolchain)
ifneq ($(shell export "PATH=$(PATH)"; $(TOOLCHAIN_CC) -dumpmachine | head -c 6), x86_64) ifneq ($(shell export "PATH=$(PATH)"; $(TOOLCHAIN_CC) -dumpmachine | head -c 6), x86_64)
$(error No suitable x86_64 GCC compiler found, please install an x86_64 GCC toolchain or run "make toolchain") $(error No suitable x86_64 GCC compiler found, please install an x86_64 GCC toolchain or run "make toolchain")
endif endif
endif
STAGE1_FILES := $(shell find -L ./stage1 -type f -name '*.asm' | sort) STAGE1_FILES := $(shell find -L ./stage1 -type f -name '*.asm' | sort)