:: commit 31ad36ac51e91efbf5bd6f717acce1b34c2b6112

mintsuki <mintsuki@protonmail.com> — 2021-05-22 08:25

parents: 0602e40cce

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

diff --git a/Makefile b/Makefile
index be4091a2..6bcba42e 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,11 @@ ifeq ($(shell export "PATH=$(PATH)"; which $(TOOLCHAIN_AR)), )
 TOOLCHAIN_AR := ar
 endif
 
+ifneq ($(MAKECMDGOALS), toolchain)
 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")
 endif
+endif
 
 STAGE1_FILES := $(shell find -L ./stage1 -type f -name '*.asm' | sort)
 
tab: 248 wrap: offon