Files
lk/arch/x86/toolchain.mk
Travis Geiselbrecht 6973ff8bee [build][arch] have arm, arm64, and x86 resort to a default toolchain
Previously if they couldn't find the toolchain they would full stop the
build. Change to print a warning and then go with the default prefix.

Hopefully this doesn't break anyone downstream but it's helpful for the
CI builder which wants to read from the build system which toolchain to
grab prior to having it in the path.
2021-09-18 16:52:38 -07:00

37 lines
818 B
Makefile

# x86-32 toolchain
ifeq ($(SUBARCH),x86-32)
ifndef ARCH_x86_TOOLCHAIN_INCLUDED
ARCH_x86_TOOLCHAIN_INCLUDED := 1
ifndef ARCH_x86_TOOLCHAIN_PREFIX
ARCH_x86_TOOLCHAIN_PREFIX := i386-elf-
FOUNDTOOL=$(shell which $(ARCH_x86_TOOLCHAIN_PREFIX)gcc)
endif
ifeq ($(FOUNDTOOL),)
$(warning cannot find toolchain in path, assuming i386-elf- prefix)
ARCH_x86_TOOLCHAIN_PREFIX := i386-elf-
endif
endif
endif
# x86-64 toolchain
ifeq ($(SUBARCH),x86-64)
ifndef ARCH_x86_64_TOOLCHAIN_INCLUDED
ARCH_x86_64_TOOLCHAIN_INCLUDED := 1
ifndef ARCH_x86_64_TOOLCHAIN_PREFIX
ARCH_x86_64_TOOLCHAIN_PREFIX := x86_64-elf-
FOUNDTOOL=$(shell which $(ARCH_x86_64_TOOLCHAIN_PREFIX)gcc)
endif
ifeq ($(FOUNDTOOL),)
$(warning cannot find toolchain in path, assuming x86_64-elf- prefix)
ARCH_x86_64_TOOLCHAIN_PREFIX := x86_64-elf-
endif
endif
endif