1# Copyright 2016 The Fuchsia Authors 2# Copyright (c) 2008-2015 Travis Geiselbrecht 3# 4# Use of this source code is governed by a MIT-style 5# license that can be found in the LICENSE file or at 6# https://opensource.org/licenses/MIT 7 8ifndef ARCH_arm64_TOOLCHAIN_INCLUDED 9ARCH_arm64_TOOLCHAIN_INCLUDED := 1 10 11ifndef ARCH_arm64_TOOLCHAIN_PREFIX 12ARCH_arm64_TOOLCHAIN_PREFIX := aarch64-elf- 13FOUNDTOOL=$(shell which $(ARCH_arm64_TOOLCHAIN_PREFIX)gcc) 14ifeq ($(FOUNDTOOL),) 15ARCH_arm64_TOOLCHAIN_PREFIX := aarch64-linux-android- 16FOUNDTOOL=$(shell which $(ARCH_arm64_TOOLCHAIN_PREFIX)gcc) 17ifeq ($(FOUNDTOOL),) 18$(error cannot find toolchain, please set ARCH_arm64_TOOLCHAIN_PREFIX or add it to your path) 19endif 20endif 21endif 22 23endif 24 25# Clang 26ifeq ($(call TOBOOL,$(USE_CLANG)),true) 27FOUNDTOOL=$(shell which $(CLANG_TOOLCHAIN_PREFIX)clang) 28ifeq ($(FOUNDTOOL),) 29$(error cannot find toolchain, please set CLANG_TOOLCHAIN_PREFIX or add it to your path) 30endif 31endif 32