xref: /rk3399_ARM-atf/make_helpers/toolchain.mk (revision 4731c00bb60915c0d4b29c082a752e9925a244b4)
1cc277de8SChris Kay#
2cc277de8SChris Kay# Copyright (c) 2023-2024, Arm Limited and Contributors. All rights reserved.
3cc277de8SChris Kay#
4cc277de8SChris Kay# SPDX-License-Identifier: BSD-3-Clause
5cc277de8SChris Kay#
6cc277de8SChris Kay
7cc277de8SChris Kay#
8cc277de8SChris Kay# TF-A uses three toolchains:
9cc277de8SChris Kay#
10cc277de8SChris Kay#   - The host toolchain (`host`) for building native tools
11cc277de8SChris Kay#   - The AArch32 toolchain (`aarch32`) for building Arm AArch32 images
12cc277de8SChris Kay#   - The AArch64 toolchain (`aarch64`) for building Arm AArch64 images
13cc277de8SChris Kay#
14cc277de8SChris Kay# In the main Makefile only one of the two Arm toolchains is enabled in any
15cc277de8SChris Kay# given build, but individual tools and libraries may need access to both.
16cc277de8SChris Kay#
17cc277de8SChris Kay
18cc277de8SChris Kaytoolchains ?= host $(ARCH)
19cc277de8SChris Kay
20cc277de8SChris Kayifneq ($(filter host,$(toolchains)),)
21cc277de8SChris Kay        host-cc := $(HOSTCC)
22cc277de8SChris Kay        host-cpp := $(HOSTCPP)
23cc277de8SChris Kay
24cc277de8SChris Kay        host-as := $(HOSTAS)
25cc277de8SChris Kay
26cc277de8SChris Kay        host-ld := $(HOSTLD)
27cc277de8SChris Kay        host-oc := $(HOSTOC)
28cc277de8SChris Kay        host-od := $(HOSTOD)
29cc277de8SChris Kay        host-ar := $(HOSTAR)
30cc277de8SChris Kay
31cc277de8SChris Kay        host-dtc := $(HOSTDTC)
32cc277de8SChris Kayendif
33cc277de8SChris Kay
34cc277de8SChris Kayifneq ($(filter aarch32,$(toolchains)),)
35cc277de8SChris Kay        aarch32-cc := $(if $(filter-out default,$(origin CC)),$(CC))
36cc277de8SChris Kay        aarch32-cpp := $(if $(filter-out default,$(origin CPP)),$(CPP))
37cc277de8SChris Kay
38cc277de8SChris Kay        aarch32-as := $(if $(filter-out default,$(origin AS)),$(AS))
39cc277de8SChris Kay
40cc277de8SChris Kay        aarch32-ld := $(if $(filter-out default,$(origin LD)),$(LD))
41cc277de8SChris Kay        aarch32-oc := $(if $(filter-out default,$(origin OC)),$(OC))
42cc277de8SChris Kay        aarch32-od := $(if $(filter-out default,$(origin OD)),$(OD))
43cc277de8SChris Kay        aarch32-ar := $(if $(filter-out default,$(origin AR)),$(AR))
44cc277de8SChris Kay
45cc277de8SChris Kay        aarch32-dtc := $(if $(filter-out default,$(origin DTC)),$(DTC))
46cc277de8SChris Kayendif
47cc277de8SChris Kay
48cc277de8SChris Kayifneq ($(filter aarch64,$(toolchains)),)
49cc277de8SChris Kay        aarch64-cc := $(if $(filter-out default,$(origin CC)),$(CC))
50cc277de8SChris Kay        aarch64-cpp := $(if $(filter-out default,$(origin CPP)),$(CPP))
51cc277de8SChris Kay
52cc277de8SChris Kay        aarch64-as := $(if $(filter-out default,$(origin AS)),$(AS))
53cc277de8SChris Kay
54cc277de8SChris Kay        aarch64-ld := $(if $(filter-out default,$(origin LD)),$(LD))
55cc277de8SChris Kay        aarch64-oc := $(if $(filter-out default,$(origin OC)),$(OC))
56cc277de8SChris Kay        aarch64-od := $(if $(filter-out default,$(origin OD)),$(OD))
57cc277de8SChris Kay        aarch64-ar := $(if $(filter-out default,$(origin AR)),$(AR))
58cc277de8SChris Kay
59cc277de8SChris Kay        aarch64-dtc := $(if $(filter-out default,$(origin DTC)),$(DTC))
60cc277de8SChris Kayendif
61cc277de8SChris Kay
62cc277de8SChris Kayinclude $(dir $(lastword $(MAKEFILE_LIST)))build_env.mk
63*4731c00bSChris Kayinclude $(dir $(lastword $(MAKEFILE_LIST)))utilities.mk
64*4731c00bSChris Kay
65cc277de8SChris Kayinclude $(addprefix $(dir $(lastword $(MAKEFILE_LIST)))toolchains/, \
66cc277de8SChris Kay        $(addsuffix .mk,$(toolchains)))
67cc277de8SChris Kay
68cc277de8SChris Kay#
69cc277de8SChris Kay# Configure tool classes that we recognize.
70cc277de8SChris Kay#
71cc277de8SChris Kay# In the context of this build system, a tool class identifies a specific role
72cc277de8SChris Kay# or type of tool in the toolchain.
73cc277de8SChris Kay#
74cc277de8SChris Kay
75cc277de8SChris Kay# C-related tools
76cc277de8SChris Kaytool-classes := cc # C compilers
77cc277de8SChris Kaytool-classes += cpp # C preprocessors
78cc277de8SChris Kay
79cc277de8SChris Kay# Assembly-related tools
80cc277de8SChris Kaytool-classes += as # Assemblers
81cc277de8SChris Kay
82cc277de8SChris Kay# Linking and object-handling tools
83cc277de8SChris Kaytool-classes += ld # Linkers
84cc277de8SChris Kaytool-classes += oc # Object copiers
85cc277de8SChris Kaytool-classes += od # Object dumpers
86cc277de8SChris Kaytool-classes += ar # Archivers
87cc277de8SChris Kay
88cc277de8SChris Kay# Other tools
89cc277de8SChris Kaytool-classes += dtc # Device tree compilers
90cc277de8SChris Kay
91cc277de8SChris Kay#
92cc277de8SChris Kay# Configure tools that we recognize.
93cc277de8SChris Kay#
94cc277de8SChris Kay# Here we declare the list of specific toolchain tools that we know how to
95cc277de8SChris Kay# interact with. We don't organize these into tool classes yet - that happens
96cc277de8SChris Kay# further down.
97cc277de8SChris Kay#
98cc277de8SChris Kay
99cc277de8SChris Kay# Arm Compiler for Embedded
100cc277de8SChris Kaytools := arm-clang # armclang
101cc277de8SChris Kaytools += arm-link # armlink
102cc277de8SChris Kaytools += arm-ar # armar
103cc277de8SChris Kaytools += arm-fromelf # fromelf
104cc277de8SChris Kay
105cc277de8SChris Kay# LLVM Project
106cc277de8SChris Kaytools += llvm-clang # clang
107cc277de8SChris Kaytools += llvm-lld # lld
108cc277de8SChris Kaytools += llvm-objcopy # llvm-objcopy
109cc277de8SChris Kaytools += llvm-objdump # llvm-objdump
110cc277de8SChris Kaytools += llvm-ar # llvm-ar
111cc277de8SChris Kay
112cc277de8SChris Kay# GNU Compiler Collection & GNU Binary Utilities
113cc277de8SChris Kaytools += gnu-gcc # gcc
114cc277de8SChris Kaytools += gnu-ld # ld
115cc277de8SChris Kaytools += gnu-objcopy # objcopy
116cc277de8SChris Kaytools += gnu-objdump # objdump
117cc277de8SChris Kaytools += gnu-ar # gcc-ar
118cc277de8SChris Kay
119cc277de8SChris Kay# Other tools
120cc277de8SChris Kaytools += dtc # Device Tree Compiler
121cc277de8SChris Kay
122cc277de8SChris Kay#
123cc277de8SChris Kay# Assign tools to tool classes.
124cc277de8SChris Kay#
125cc277de8SChris Kay# Multifunctional tools, i.e. tools which can perform multiple roles in a
126cc277de8SChris Kay# toolchain, may be specified in multiple tool class lists. For example, a C
127cc277de8SChris Kay# compiler which can also perform the role of a linker may be placed in both
128cc277de8SChris Kay# `tools-cc` and `tools-ld`.
129cc277de8SChris Kay#
130cc277de8SChris Kay
131cc277de8SChris Kay# C-related tools
132cc277de8SChris Kaytools-cc := arm-clang llvm-clang gnu-gcc # C compilers
133cc277de8SChris Kaytools-cpp := arm-clang llvm-clang gnu-gcc # C preprocessors
134cc277de8SChris Kay
135cc277de8SChris Kay# Assembly-related tools
136cc277de8SChris Kaytools-as := arm-clang llvm-clang gnu-gcc # Assemblers
137cc277de8SChris Kay
138cc277de8SChris Kay# Linking and object-handling tools
139cc277de8SChris Kaytools-ld := arm-clang arm-link llvm-clang llvm-lld gnu-gcc gnu-ld # Linkers
140cc277de8SChris Kaytools-oc := arm-fromelf llvm-objcopy gnu-objcopy # Object copiers
141cc277de8SChris Kaytools-od := arm-fromelf llvm-objdump gnu-objdump # Object dumpers
142cc277de8SChris Kaytools-ar := arm-ar llvm-ar gnu-ar # Archivers
143cc277de8SChris Kay
144cc277de8SChris Kay# Other tools
145cc277de8SChris Kaytools-dtc := dtc # Device tree compilers
146cc277de8SChris Kay
147cc277de8SChris Kaydefine check-tool-class-tools
148cc277de8SChris Kay        $(eval tool-class := $(1))
149cc277de8SChris Kay
150cc277de8SChris Kay        ifndef tools-$(tool-class)
151cc277de8SChris Kay                $$(error no tools registered to handle tool class `$(tool-class)`)
152cc277de8SChris Kay        endif
153cc277de8SChris Kayendef
154cc277de8SChris Kay
155cc277de8SChris Kay$(foreach tool-class,$(tool-classes), \
156cc277de8SChris Kay        $(eval $(call check-tool-class-tools,$(tool-class))))
157cc277de8SChris Kay
158cc277de8SChris Kay#
159cc277de8SChris Kay# Default tools for each toolchain.
160cc277de8SChris Kay#
161cc277de8SChris Kay# Toolchains can specify a default path to any given tool with a tool class.
162cc277de8SChris Kay# These values are used in the absence of user-specified values, and are
1631c0d0252SChris Kay# configured by the makefile for each toolchain using variables of the form:
164cc277de8SChris Kay#
165cc277de8SChris Kay#   - $(toolchain)-$(tool-class)-default
166cc277de8SChris Kay#
167cc277de8SChris Kay# For example, the default C compiler for the AArch32 and AArch64 toolchains
168cc277de8SChris Kay# could be configured with:
169cc277de8SChris Kay#
170cc277de8SChris Kay#   - aarch32-cc-default
171cc277de8SChris Kay#   - aarch64-cc-default
172cc277de8SChris Kay#
173cc277de8SChris Kay
174cc277de8SChris Kaydefine check-toolchain-tool-class-default
175cc277de8SChris Kay        $(eval toolchain := $(1))
176cc277de8SChris Kay        $(eval tool-class := $(2))
177cc277de8SChris Kay
178cc277de8SChris Kay        ifndef $(toolchain)-$(tool-class)-default
179cc277de8SChris Kay                $$(error no default value specified for tool class `$(tool-class)` of toolchain `$(toolchain)`)
180cc277de8SChris Kay        endif
181cc277de8SChris Kayendef
182cc277de8SChris Kay
183cc277de8SChris Kaydefine check-toolchain-tool-class-defaults
184cc277de8SChris Kay        $(eval toolchain := $(1))
185cc277de8SChris Kay
186cc277de8SChris Kay        $(foreach tool-class,$(tool-classes), \
187cc277de8SChris Kay                $(eval $(call check-toolchain-tool-class-default,$(toolchain),$(tool-class))))
188cc277de8SChris Kayendef
189cc277de8SChris Kay
190cc277de8SChris Kay$(foreach toolchain,$(toolchains), \
191cc277de8SChris Kay        $(eval $(call check-toolchain-tool-class-defaults,$(toolchain))))
192cc277de8SChris Kay
193cc277de8SChris Kay#
194cc277de8SChris Kay# Helper functions to identify toolchain tools.
195cc277de8SChris Kay#
196cc277de8SChris Kay# The functions defined in this section return a tool identifier when given a
197cc277de8SChris Kay# path to a binary. We generally check a help or version string to more reliably
198cc277de8SChris Kay# identify tools than by looking at the path alone (e.g. `gcc` on macOS is
199cc277de8SChris Kay# actually Apple Clang).
200cc277de8SChris Kay#
201cc277de8SChris Kay# Each tool-guessing function (`guess-tool-$(tool)`) takes a single argument
202cc277de8SChris Kay# giving the path to the tool to guess, and returns a non-empty value if the
203cc277de8SChris Kay# tool corresponds to the tool identifier `$(tool)`:
204cc277de8SChris Kay#
205cc277de8SChris Kay#     $(call guess-tool-llvm-clang,aarch64-none-elf-gcc) # <empty>
206cc277de8SChris Kay#     $(call guess-tool-gnu-gcc,aarch64-none-elf-gcc) # <non-empty>
207cc277de8SChris Kay#
208cc277de8SChris Kay# The `guess-tool` function tries to find the corresponding tool identifier
209cc277de8SChris Kay# for a tool given its path. It takes two arguments:
210cc277de8SChris Kay#
211cc277de8SChris Kay#   - $(1): a list of candidate tool identifiers to check
212cc277de8SChris Kay#   - $(2): the path to the tool to identify
213cc277de8SChris Kay#
214cc277de8SChris Kay# If any of the guess functions corresponding to candidate tool identifiers
215cc277de8SChris Kay# return a non-empty value then the tool identifier of the first function to do
216cc277de8SChris Kay# so is returned:
217cc277de8SChris Kay#
218cc277de8SChris Kay#     $(call guess-tool,gnu-gcc llvm-clang,armclang) # <empty>
219cc277de8SChris Kay#     $(call guess-tool,gnu-gcc llvm-clang,clang-14) # llvm-clang
220cc277de8SChris Kay#     $(call guess-tool,gnu-gcc llvm-clang,aarch64-none-elf-gcc-12) # gnu-gcc
221cc277de8SChris Kay#
222cc277de8SChris Kay# Tools are checked in the order that they appear in `tools-$(tool-class)`, and
223cc277de8SChris Kay# the first match is returned.
224cc277de8SChris Kay#
225cc277de8SChris Kay
226cc277de8SChris Kay# Arm Compiler for Embedded
227*4731c00bSChris Kayguess-tool-arm-clang = $(shell $(call escape-shell,$(1)) --version 2>&1  <$(nul) | grep -o "Tool: armclang")
228*4731c00bSChris Kayguess-tool-arm-link = $(shell $(call escape-shell,$(1)) --help 2>&1  <$(nul) | grep -o "Tool: armlink")
229*4731c00bSChris Kayguess-tool-arm-fromelf = $(shell $(call escape-shell,$(1)) --help 2>&1  <$(nul) | grep -o "Tool: fromelf")
230*4731c00bSChris Kayguess-tool-arm-ar = $(shell $(call escape-shell,$(1)) --version 2>&1  <$(nul) | grep -o "Tool: armar")
231cc277de8SChris Kay
232cc277de8SChris Kay# LLVM Project
233*4731c00bSChris Kayguess-tool-llvm-clang = $(shell $(call escape-shell,$(1)) -v 2>&1  <$(nul) | grep -o "clang version")
234*4731c00bSChris Kayguess-tool-llvm-lld = $(shell $(call escape-shell,$(1)) --help 2>&1  <$(nul) | grep -o "OVERVIEW: lld")
235*4731c00bSChris Kayguess-tool-llvm-objcopy = $(shell $(call escape-shell,$(1)) --help 2>&1  <$(nul) | grep -o "llvm-objcopy tool")
236*4731c00bSChris Kayguess-tool-llvm-objdump = $(shell $(call escape-shell,$(1)) --help 2>&1  <$(nul) | grep -o "llvm object file dumper")
237*4731c00bSChris Kayguess-tool-llvm-ar = $(shell $(call escape-shell,$(1)) --help 2>&1  <$(nul) | grep -o "LLVM Archiver")
238cc277de8SChris Kay
239cc277de8SChris Kay# GNU Compiler Collection & GNU Binary Utilities
240*4731c00bSChris Kayguess-tool-gnu-gcc = $(shell $(call escape-shell,$(1)) -v 2>&1  <$(nul) | grep -o "gcc version")
241*4731c00bSChris Kayguess-tool-gnu-ld = $(shell $(call escape-shell,$(1)) -v 2>&1  <$(nul) | grep -o "GNU ld")
242*4731c00bSChris Kayguess-tool-gnu-objcopy = $(shell $(call escape-shell,$(1)) --version 2>&1  <$(nul) | grep -o "GNU objcopy")
243*4731c00bSChris Kayguess-tool-gnu-objdump = $(shell $(call escape-shell,$(1)) --version 2>&1  <$(nul) | grep -o "GNU objdump")
244*4731c00bSChris Kayguess-tool-gnu-ar = $(shell $(call escape-shell,$(1)) --version 2>&1  <$(nul) | grep -o "GNU ar")
245cc277de8SChris Kay
246cc277de8SChris Kay# Other tools
247*4731c00bSChris Kayguess-tool-dtc = $(shell $(call escape-shell,$(1)) --version 2>&1  <$(nul) | grep -o "Version: DTC")
248cc277de8SChris Kay
249cc277de8SChris Kayguess-tool = $(firstword $(foreach candidate,$(1), \
250cc277de8SChris Kay        $(if $(call guess-tool-$(candidate),$(2)),$(candidate))))
251cc277de8SChris Kay
252cc277de8SChris Kay#
253cc277de8SChris Kay# Locate and identify tools belonging to each toolchain.
254cc277de8SChris Kay#
255cc277de8SChris Kay# Each tool class in each toolchain receives a variable of the form
256cc277de8SChris Kay# `$(toolchain)-$(tool)` giving the associated path to the program. For example:
257cc277de8SChris Kay#
258cc277de8SChris Kay#   - `aarch64-ld` gives the linker for the AArch64 toolchain,
259cc277de8SChris Kay#   - `aarch32-oc` gives the object copier for the AArch32 toolchain, and
260cc277de8SChris Kay#   - `host-cc` gives the C compiler for the host toolchain.
261cc277de8SChris Kay#
262cc277de8SChris Kay# For each of these variables, if no program path is explicitly provided by the
263cc277de8SChris Kay# parent Makefile then the C compiler is queried (if supported) for its
264cc277de8SChris Kay# location. This is done via the `guess-$(tool)-$(tool-class)` set of functions.
265cc277de8SChris Kay# For example:
266cc277de8SChris Kay#
267cc277de8SChris Kay#   - `guess-arm-clang-ld` guesses the linker via Arm Clang,
268cc277de8SChris Kay#   - `guess-llvm-clang-as` guesses the assembler via LLVM Clang, and
269cc277de8SChris Kay#   - `guess-gnu-gcc-od` guesses the object dumper via GNU GCC.
270cc277de8SChris Kay#
271cc277de8SChris Kay# If the C compiler cannot provide the location (or the tool class is the C
272cc277de8SChris Kay# compiler), then it is assigned the value of the `$(toolchain)-$(tool)-default`
273cc277de8SChris Kay# variable.
274cc277de8SChris Kay#
275cc277de8SChris Kay
276*4731c00bSChris Kayguess-arm-clang-cpp = $(1)
277*4731c00bSChris Kayguess-arm-clang-as = $(1)
278cc277de8SChris Kayguess-arm-clang-ld = # Fall back to `$(toolchain)-ld-default`
279cc277de8SChris Kayguess-arm-clang-oc = # Fall back to `$(toolchain)-oc-default`
280cc277de8SChris Kayguess-arm-clang-od = # Fall back to `$(toolchain)-od-default`
281cc277de8SChris Kayguess-arm-clang-ar = # Fall back to `$(toolchain)-ar-default`
282cc277de8SChris Kay
283*4731c00bSChris Kayguess-llvm-clang-cpp = $(1)
284*4731c00bSChris Kayguess-llvm-clang-as = $(1)
285*4731c00bSChris Kayguess-llvm-clang-ld = $(shell $(call escape-shell,$(1)) --print-prog-name ld.lld 2>$(nul))
286*4731c00bSChris Kayguess-llvm-clang-oc = $(shell $(call escape-shell,$(1)) --print-prog-name llvm-objcopy 2>$(nul))
287*4731c00bSChris Kayguess-llvm-clang-od = $(shell $(call escape-shell,$(1)) --print-prog-name llvm-objdump 2>$(nul))
288*4731c00bSChris Kayguess-llvm-clang-ar = $(shell $(call escape-shell,$(1)) --print-prog-name llvm-ar 2>$(nul))
289cc277de8SChris Kay
290*4731c00bSChris Kayguess-gnu-gcc-cpp = $(1)
291*4731c00bSChris Kayguess-gnu-gcc-as = $(1)
292*4731c00bSChris Kayguess-gnu-gcc-ld = $(1)
293*4731c00bSChris Kayguess-gnu-gcc-oc = $(shell $(call escape-shell,$(1)) --print-prog-name objcopy 2>$(nul))
294*4731c00bSChris Kayguess-gnu-gcc-od = $(shell $(call escape-shell,$(1)) --print-prog-name objdump 2>$(nul))
295*4731c00bSChris Kayguess-gnu-gcc-ar = $(call which,$(call decompat-path,$(patsubst %$(call file-name,$(1)),%$(subst gcc,gcc-ar,$(call file-name,$(1))),$(call compat-path,$(1)))))
296cc277de8SChris Kay
297cc277de8SChris Kaydefine locate-toolchain-tool-cc
298cc277de8SChris Kay        $(eval toolchain := $(1))
299cc277de8SChris Kay
300*4731c00bSChris Kay        $(toolchain)-cc := $$(or $$($(toolchain)-cc),$$($(toolchain)-cc-default))
301*4731c00bSChris Kay        $(toolchain)-cc-id := $$(call guess-tool,$$(tools-cc),$$($(toolchain)-cc))
302cc277de8SChris Kayendef
303cc277de8SChris Kay
304cc277de8SChris Kaydefine locate-toolchain-tool
305cc277de8SChris Kay        $(eval toolchain := $(1))
306cc277de8SChris Kay        $(eval tool-class := $(2))
307cc277de8SChris Kay
308cc277de8SChris Kay        ifndef $(toolchain)-$(tool-class)
309*4731c00bSChris Kay                $(toolchain)-$(tool-class) := $$(call guess-$$($(toolchain)-cc-id)-$(tool-class),$$($(toolchain)-cc-path))
310cc277de8SChris Kay
311cc277de8SChris Kay                ifeq ($$($(toolchain)-$(tool-class)),)
312*4731c00bSChris Kay                        $(toolchain)-$(tool-class) := $$($(toolchain)-$(tool-class)-default)
313cc277de8SChris Kay                endif
314cc277de8SChris Kay        endif
315cc277de8SChris Kay
316*4731c00bSChris Kay        $(toolchain)-$(tool-class)-id := $$(call guess-tool,$$(tools-$(tool-class)),$$($$(toolchain)-$(tool-class)))
317cc277de8SChris Kayendef
318cc277de8SChris Kay
319cc277de8SChris Kaydefine canonicalize-toolchain-tool-path
320cc277de8SChris Kay        $(eval toolchain := $(1))
321cc277de8SChris Kay        $(eval tool-class := $(2))
322cc277de8SChris Kay
323*4731c00bSChris Kay        $(toolchain)-$(tool-class)-path := $$(call absolute-path,$$(call which,$$($(toolchain)-$(tool-class))))
324*4731c00bSChris Kay        $(toolchain)-$(tool-class)-path := $$(or $$($(toolchain)-$(tool-class)-path),$$($(toolchain)-$(tool-class)))
325*4731c00bSChris Kay
326*4731c00bSChris Kay        $(toolchain)-$(tool-class) := $(call escape-shell,$$($(toolchain)-$(tool-class)-path))
327cc277de8SChris Kayendef
328cc277de8SChris Kay
329cc277de8SChris Kaydefine locate-toolchain
330cc277de8SChris Kay        $(eval toolchain := $(1))
331cc277de8SChris Kay
332cc277de8SChris Kay        $$(eval $$(call locate-toolchain-tool-cc,$(toolchain)))
333cc277de8SChris Kay        $$(eval $$(call canonicalize-toolchain-tool-path,$(toolchain),cc))
334cc277de8SChris Kay
335cc277de8SChris Kay        $$(foreach tool-class,$$(filter-out cc,$$(tool-classes)), \
336cc277de8SChris Kay                $$(eval $$(call locate-toolchain-tool,$(toolchain),$$(tool-class))) \
337cc277de8SChris Kay                $$(eval $$(call canonicalize-toolchain-tool-path,$(toolchain),$$(tool-class))))
338cc277de8SChris Kayendef
339cc277de8SChris Kay
340cc277de8SChris Kay$(foreach toolchain,$(toolchains), \
341cc277de8SChris Kay        $(eval $(call locate-toolchain,$(toolchain))))
342