mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-08 05:43:53 +00:00
build: properly namespace toolchain.mk
variables
This is a simple change to ensure that everything in the `toolchain.mk` makefile is adequately namespaced to avoid collisions. Change-Id: I0b45966527e1a03200bbc6694fd6c7133e349314 Signed-off-by: Chris Kay <chris.kay@arm.com>
This commit is contained in:
parent
eb366ee769
commit
14260dbfc2
1 changed files with 122 additions and 142 deletions
|
@ -33,29 +33,29 @@ ifndef toolchain-mk
|
|||
# specific role or type of tool in the toolchain.
|
||||
#
|
||||
|
||||
tool-classes := cc
|
||||
tool-class-name-cc := C compiler
|
||||
toolchain-tool-classes := cc
|
||||
toolchain-tool-class-name-cc := C compiler
|
||||
|
||||
tool-classes += cpp
|
||||
tool-class-name-cpp := C preprocessor
|
||||
toolchain-tool-classes += cpp
|
||||
toolchain-tool-class-name-cpp := C preprocessor
|
||||
|
||||
tool-classes += as
|
||||
tool-class-name-as := assembler
|
||||
toolchain-tool-classes += as
|
||||
toolchain-tool-class-name-as := assembler
|
||||
|
||||
tool-classes += ld
|
||||
tool-class-name-ld := linker
|
||||
toolchain-tool-classes += ld
|
||||
toolchain-tool-class-name-ld := linker
|
||||
|
||||
tool-classes += oc
|
||||
tool-class-name-oc := object copier
|
||||
toolchain-tool-classes += oc
|
||||
toolchain-tool-class-name-oc := object copier
|
||||
|
||||
tool-classes += od
|
||||
tool-class-name-od := object dumper
|
||||
toolchain-tool-classes += od
|
||||
toolchain-tool-class-name-od := object dumper
|
||||
|
||||
tool-classes += ar
|
||||
tool-class-name-ar := archiver
|
||||
toolchain-tool-classes += ar
|
||||
toolchain-tool-class-name-ar := archiver
|
||||
|
||||
tool-classes += dtc
|
||||
tool-class-name-dtc := device tree compiler
|
||||
toolchain-tool-classes += dtc
|
||||
toolchain-tool-class-name-dtc := device tree compiler
|
||||
|
||||
#
|
||||
# Configure tools that we recognize.
|
||||
|
@ -66,53 +66,53 @@ ifndef toolchain-mk
|
|||
#
|
||||
|
||||
# Arm® Compiler for Embedded
|
||||
tools := arm-clang
|
||||
tool-name-arm-clang := Arm® Compiler for Embedded `armclang`
|
||||
toolchain-tools := arm-clang
|
||||
toolchain-tool-name-arm-clang := Arm® Compiler for Embedded `armclang`
|
||||
|
||||
tools += arm-link
|
||||
tool-name-arm-link := Arm® Compiler for Embedded `armlink`
|
||||
toolchain-tools += arm-link
|
||||
toolchain-tool-name-arm-link := Arm® Compiler for Embedded `armlink`
|
||||
|
||||
tools += arm-ar
|
||||
tool-name-arm-ar := Arm® Compiler for Embedded `armar`
|
||||
toolchain-tools += arm-ar
|
||||
toolchain-tool-name-arm-ar := Arm® Compiler for Embedded `armar`
|
||||
|
||||
tools += arm-fromelf
|
||||
tool-name-arm-fromelf := Arm® Compiler for Embedded `fromelf`
|
||||
toolchain-tools += arm-fromelf
|
||||
toolchain-tool-name-arm-fromelf := Arm® Compiler for Embedded `fromelf`
|
||||
|
||||
# LLVM Project
|
||||
tools += llvm-clang
|
||||
tool-name-llvm-clang := LLVM Clang (`clang`)
|
||||
toolchain-tools += llvm-clang
|
||||
toolchain-tool-name-llvm-clang := LLVM Clang (`clang`)
|
||||
|
||||
tools += llvm-lld
|
||||
tool-name-llvm-lld := LLVM LLD (`lld`)
|
||||
toolchain-tools += llvm-lld
|
||||
toolchain-tool-name-llvm-lld := LLVM LLD (`lld`)
|
||||
|
||||
tools += llvm-objcopy
|
||||
tool-name-llvm-objcopy := LLVM `llvm-objcopy`
|
||||
toolchain-tools += llvm-objcopy
|
||||
toolchain-tool-name-llvm-objcopy := LLVM `llvm-objcopy`
|
||||
|
||||
tools += llvm-objdump
|
||||
tool-name-llvm-objdump := LLVM `llvm-objdump`
|
||||
toolchain-tools += llvm-objdump
|
||||
toolchain-tool-name-llvm-objdump := LLVM `llvm-objdump`
|
||||
|
||||
tools += llvm-ar
|
||||
tool-name-llvm-ar := LLVM `llvm-ar`
|
||||
toolchain-tools += llvm-ar
|
||||
toolchain-tool-name-llvm-ar := LLVM `llvm-ar`
|
||||
|
||||
# GNU Compiler Collection & GNU Binary Utilities
|
||||
tools += gnu-gcc
|
||||
tool-name-gnu-gcc := GNU GCC (`gcc`)
|
||||
toolchain-tools += gnu-gcc
|
||||
toolchain-tool-name-gnu-gcc := GNU GCC (`gcc`)
|
||||
|
||||
tools += gnu-ld
|
||||
tool-name-gnu-ld := GNU LD (`ld.bfd`)
|
||||
toolchain-tools += gnu-ld
|
||||
toolchain-tool-name-gnu-ld := GNU LD (`ld.bfd`)
|
||||
|
||||
tools += gnu-objcopy
|
||||
tool-name-gnu-objcopy := GNU `objcopy`
|
||||
toolchain-tools += gnu-objcopy
|
||||
toolchain-tool-name-gnu-objcopy := GNU `objcopy`
|
||||
|
||||
tools += gnu-objdump
|
||||
tool-name-gnu-objdump := GNU `objdump`
|
||||
toolchain-tools += gnu-objdump
|
||||
toolchain-tool-name-gnu-objdump := GNU `objdump`
|
||||
|
||||
tools += gnu-ar
|
||||
tool-name-gnu-ar := GNU `ar`
|
||||
toolchain-tools += gnu-ar
|
||||
toolchain-tool-name-gnu-ar := GNU `ar`
|
||||
|
||||
# Other tools
|
||||
tools += generic-dtc
|
||||
tool-name-generic-dtc := Device Tree Compiler (`dtc`)
|
||||
toolchain-tools += generic-dtc
|
||||
toolchain-tool-name-generic-dtc := Device Tree Compiler (`dtc`)
|
||||
|
||||
#
|
||||
# Assign tools to tool classes.
|
||||
|
@ -120,35 +120,24 @@ ifndef toolchain-mk
|
|||
# Multifunctional tools, i.e. tools which can perform multiple roles in
|
||||
# a toolchain, may be specified in multiple tool class lists. For
|
||||
# example, a C compiler which can also perform the role of a linker may
|
||||
# be placed in both `tools-cc` and `tools-ld`.
|
||||
# be placed in both `toolchain-tools-cc` and `toolchain-tools-ld`.
|
||||
#
|
||||
|
||||
# C-related tools
|
||||
tools-cc := arm-clang llvm-clang gnu-gcc # C compilers
|
||||
tools-cpp := arm-clang llvm-clang gnu-gcc # C preprocessors
|
||||
toolchain-tools-cc := arm-clang llvm-clang gnu-gcc # C compilers
|
||||
toolchain-tools-cpp := arm-clang llvm-clang gnu-gcc # C preprocessors
|
||||
|
||||
# Assembly-related tools
|
||||
tools-as := arm-clang llvm-clang gnu-gcc # Assemblers
|
||||
toolchain-tools-as := arm-clang llvm-clang gnu-gcc # Assemblers
|
||||
|
||||
# Linking and object-handling tools
|
||||
tools-ld := arm-clang arm-link llvm-clang llvm-lld gnu-gcc gnu-ld # Linkers
|
||||
tools-oc := arm-fromelf llvm-objcopy gnu-objcopy # Object copiers
|
||||
tools-od := arm-fromelf llvm-objdump gnu-objdump # Object dumpers
|
||||
tools-ar := arm-ar llvm-ar gnu-ar # Archivers
|
||||
toolchain-tools-ld := arm-clang arm-link llvm-clang llvm-lld gnu-gcc gnu-ld # Linkers
|
||||
toolchain-tools-oc := arm-fromelf llvm-objcopy gnu-objcopy # Object copiers
|
||||
toolchain-tools-od := arm-fromelf llvm-objdump gnu-objdump # Object dumpers
|
||||
toolchain-tools-ar := arm-ar llvm-ar gnu-ar # Archivers
|
||||
|
||||
# Other tools
|
||||
tools-dtc := generic-dtc # Device tree compilers
|
||||
|
||||
define check-tool-class-tools
|
||||
$(eval tool-class := $(1))
|
||||
|
||||
ifndef tools-$(tool-class)
|
||||
$$(error no tools registered to handle tool class `$(tool-class)`)
|
||||
endif
|
||||
endef
|
||||
|
||||
$(foreach tool-class,$(tool-classes), \
|
||||
$(eval $(call check-tool-class-tools,$(tool-class))))
|
||||
toolchain-tools-dtc := generic-dtc # Device tree compilers
|
||||
|
||||
#
|
||||
# Default tools for each toolchain.
|
||||
|
@ -167,24 +156,19 @@ ifndef toolchain-mk
|
|||
# - aarch64-cc-default
|
||||
#
|
||||
|
||||
define check-toolchain-tool-class-default
|
||||
$(eval toolchain := $(1))
|
||||
$(eval tool-class := $(2))
|
||||
|
||||
ifndef $(toolchain)-$(tool-class)-default
|
||||
$$(error no default value specified for tool class `$(tool-class)` of toolchain `$(toolchain)`)
|
||||
define toolchain-check-tool-class-default
|
||||
ifndef $(1)-$(tool-class)-default
|
||||
$$(error no default value specified for tool class `$(2)` of toolchain `$(1)`)
|
||||
endif
|
||||
endef
|
||||
|
||||
define check-toolchain-tool-class-defaults
|
||||
$(eval toolchain := $(1))
|
||||
|
||||
$(foreach tool-class,$(tool-classes), \
|
||||
$(eval $(call check-toolchain-tool-class-default,$(toolchain),$(tool-class))))
|
||||
define toolchain-check-tool-class-defaults
|
||||
$(foreach tool-class,$(toolchain-tool-classes), \
|
||||
$(eval $(call toolchain-check-tool-class-default,$(1),$(tool-class))))
|
||||
endef
|
||||
|
||||
$(foreach toolchain,$(toolchains), \
|
||||
$(eval $(call check-toolchain-tool-class-defaults,$(toolchain))))
|
||||
$(eval $(call toolchain-check-tool-class-defaults,$(toolchain))))
|
||||
|
||||
#
|
||||
# Helper functions to identify toolchain tools.
|
||||
|
@ -194,14 +178,15 @@ ifndef toolchain-mk
|
|||
# to more reliably identify tools than by looking at the path alone
|
||||
# (e.g. `gcc` on macOS is actually Apple Clang).
|
||||
#
|
||||
# Each tool-guessing function (`guess-tool-$(tool)`) takes a single
|
||||
# argument giving the path to the tool to guess, and returns a non-empty
|
||||
# value if the tool corresponds to the tool identifier `$(tool)`:
|
||||
# Each tool-guessing function (`toolchain-guess-tool-$(tool)`) takes a
|
||||
# single argument giving the path to the tool to guess, and returns a
|
||||
# non-empty value if the tool corresponds to the tool identifier
|
||||
# `$(tool)`:
|
||||
#
|
||||
# $(call guess-tool-llvm-clang,aarch64-none-elf-gcc) # <empty>
|
||||
# $(call guess-tool-gnu-gcc,aarch64-none-elf-gcc) # <non-empty>
|
||||
# $(call toolchain-guess-tool-llvm-clang,aarch64-none-elf-gcc) # <empty>
|
||||
# $(call toolchain-guess-tool-gnu-gcc,aarch64-none-elf-gcc) # <non-empty>
|
||||
#
|
||||
# The `guess-tool` function tries to find the corresponding tool
|
||||
# The `toolchain-guess-tool` function tries to find the corresponding tool
|
||||
# identifier for a tool given its path. It takes two arguments:
|
||||
#
|
||||
# - $(1): a list of candidate tool identifiers to check
|
||||
|
@ -211,39 +196,39 @@ ifndef toolchain-mk
|
|||
# identifiers return a non-empty value then the tool identifier of the
|
||||
# first function to do so is returned:
|
||||
#
|
||||
# $(call guess-tool,gnu-gcc llvm-clang,armclang) # <empty>
|
||||
# $(call guess-tool,gnu-gcc llvm-clang,clang-14) # llvm-clang
|
||||
# $(call guess-tool,gnu-gcc llvm-clang,aarch64-none-elf-gcc-12) # gnu-gcc
|
||||
# $(call toolchain-guess-tool,gnu-gcc llvm-clang,armclang) # <empty>
|
||||
# $(call toolchain-guess-tool,gnu-gcc llvm-clang,clang-14) # llvm-clang
|
||||
# $(call toolchain-guess-tool,gnu-gcc llvm-clang,aarch64-none-elf-gcc-12) # gnu-gcc
|
||||
#
|
||||
# Tools are checked in the order that they appear in
|
||||
# `tools-$(tool-class)`, and the first match is returned.
|
||||
# Tools are checked in the order that they are provided, and the first
|
||||
# match is returned.
|
||||
#
|
||||
|
||||
# Arm Compiler for Embedded
|
||||
guess-tool-arm-clang = $(shell $(1) --version 2>&1 <$(nul) | grep -o "Tool: armclang")
|
||||
guess-tool-arm-link = $(shell $(1) --help 2>&1 <$(nul) | grep -o "Tool: armlink")
|
||||
guess-tool-arm-fromelf = $(shell $(1) --help 2>&1 <$(nul) | grep -o "Tool: fromelf")
|
||||
guess-tool-arm-ar = $(shell $(1) --version 2>&1 <$(nul) | grep -o "Tool: armar")
|
||||
toolchain-guess-tool-arm-clang = $(shell $(1) --version 2>&1 <$(nul) | grep -o "Tool: armclang")
|
||||
toolchain-guess-tool-arm-link = $(shell $(1) --help 2>&1 <$(nul) | grep -o "Tool: armlink")
|
||||
toolchain-guess-tool-arm-fromelf = $(shell $(1) --help 2>&1 <$(nul) | grep -o "Tool: fromelf")
|
||||
toolchain-guess-tool-arm-ar = $(shell $(1) --version 2>&1 <$(nul) | grep -o "Tool: armar")
|
||||
|
||||
# LLVM Project
|
||||
guess-tool-llvm-clang = $(shell $(1) -v 2>&1 <$(nul) | grep -o "clang version")
|
||||
guess-tool-llvm-lld = $(shell $(1) --help 2>&1 <$(nul) | grep -o "OVERVIEW: lld")
|
||||
guess-tool-llvm-objcopy = $(shell $(1) --help 2>&1 <$(nul) | grep -o "llvm-objcopy tool")
|
||||
guess-tool-llvm-objdump = $(shell $(1) --help 2>&1 <$(nul) | grep -o "llvm object file dumper")
|
||||
guess-tool-llvm-ar = $(shell $(1) --help 2>&1 <$(nul) | grep -o "LLVM Archiver")
|
||||
toolchain-guess-tool-llvm-clang = $(shell $(1) -v 2>&1 <$(nul) | grep -o "clang version")
|
||||
toolchain-guess-tool-llvm-lld = $(shell $(1) --help 2>&1 <$(nul) | grep -o "OVERVIEW: lld")
|
||||
toolchain-guess-tool-llvm-objcopy = $(shell $(1) --help 2>&1 <$(nul) | grep -o "llvm-objcopy tool")
|
||||
toolchain-guess-tool-llvm-objdump = $(shell $(1) --help 2>&1 <$(nul) | grep -o "llvm object file dumper")
|
||||
toolchain-guess-tool-llvm-ar = $(shell $(1) --help 2>&1 <$(nul) | grep -o "LLVM Archiver")
|
||||
|
||||
# GNU Compiler Collection & GNU Binary Utilities
|
||||
guess-tool-gnu-gcc = $(shell $(1) -v 2>&1 <$(nul) | grep -o "gcc version")
|
||||
guess-tool-gnu-ld = $(shell $(1) -v 2>&1 <$(nul) | grep -o "GNU ld")
|
||||
guess-tool-gnu-objcopy = $(shell $(1) --version 2>&1 <$(nul) | grep -o "GNU objcopy")
|
||||
guess-tool-gnu-objdump = $(shell $(1) --version 2>&1 <$(nul) | grep -o "GNU objdump")
|
||||
guess-tool-gnu-ar = $(shell $(1) --version 2>&1 <$(nul) | grep -o "GNU ar")
|
||||
toolchain-guess-tool-gnu-gcc = $(shell $(1) -v 2>&1 <$(nul) | grep -o "gcc version")
|
||||
toolchain-guess-tool-gnu-ld = $(shell $(1) -v 2>&1 <$(nul) | grep -o "GNU ld")
|
||||
toolchain-guess-tool-gnu-objcopy = $(shell $(1) --version 2>&1 <$(nul) | grep -o "GNU objcopy")
|
||||
toolchain-guess-tool-gnu-objdump = $(shell $(1) --version 2>&1 <$(nul) | grep -o "GNU objdump")
|
||||
toolchain-guess-tool-gnu-ar = $(shell $(1) --version 2>&1 <$(nul) | grep -o "GNU ar")
|
||||
|
||||
# Other tools
|
||||
guess-tool-generic-dtc = $(shell $(1) --version 2>&1 <$(nul) | grep -o "Version: DTC")
|
||||
toolchain-guess-tool-generic-dtc = $(shell $(1) --version 2>&1 <$(nul) | grep -o "Version: DTC")
|
||||
|
||||
guess-tool = $(firstword $(foreach candidate,$(1), \
|
||||
$(if $(call guess-tool-$(candidate),$(2)),$(candidate))))
|
||||
toolchain-guess-tool = $(firstword $(foreach candidate,$(1), \
|
||||
$(if $(call toolchain-guess-tool-$(candidate),$(2)),$(candidate))))
|
||||
|
||||
#
|
||||
# Locate and identify tools belonging to each toolchain.
|
||||
|
@ -258,63 +243,58 @@ ifndef toolchain-mk
|
|||
#
|
||||
# For each of these variables, if no program path is explicitly provided
|
||||
# by the parent Makefile then the C compiler is queried (if supported)
|
||||
# for its location. This is done via the `guess-$(tool)-$(tool-class)`
|
||||
# set of functions. For example:
|
||||
# for its location.
|
||||
#
|
||||
# - `guess-arm-clang-ld` guesses the linker via Arm Clang,
|
||||
# - `guess-llvm-clang-as` guesses the assembler via LLVM Clang, and
|
||||
# - `guess-gnu-gcc-od` guesses the object dumper via GNU GCC.
|
||||
#
|
||||
# If the C compiler cannot provide the location (or the tool class is
|
||||
# the C compiler), then it is assigned the value of the
|
||||
# `$(toolchain)-$(tool)-default` variable.
|
||||
# If the C compiler cannot provide the location (or the tool class *is*
|
||||
# the C compiler), then it is assigned a default value specific for that
|
||||
# toolchain.
|
||||
#
|
||||
|
||||
guess-arm-clang-cpp = $(1)
|
||||
guess-arm-clang-as = $(1)
|
||||
guess-arm-clang-ld = # Fall back to `$(toolchain)-ld-default`
|
||||
guess-arm-clang-oc = # Fall back to `$(toolchain)-oc-default`
|
||||
guess-arm-clang-od = # Fall back to `$(toolchain)-od-default`
|
||||
guess-arm-clang-ar = # Fall back to `$(toolchain)-ar-default`
|
||||
toolchain-guess-arm-clang-cpp = $(1)
|
||||
toolchain-guess-arm-clang-as = $(1)
|
||||
toolchain-guess-arm-clang-ld = # Fall back to `$(toolchain)-ld-default`
|
||||
toolchain-guess-arm-clang-oc = # Fall back to `$(toolchain)-oc-default`
|
||||
toolchain-guess-arm-clang-od = # Fall back to `$(toolchain)-od-default`
|
||||
toolchain-guess-arm-clang-ar = # Fall back to `$(toolchain)-ar-default`
|
||||
|
||||
guess-llvm-clang-cpp = $(1)
|
||||
guess-llvm-clang-as = $(1)
|
||||
guess-llvm-clang-ld = $(shell $(1) --print-prog-name ld.lld 2>$(nul))
|
||||
guess-llvm-clang-oc = $(shell $(1) --print-prog-name llvm-objcopy 2>$(nul))
|
||||
guess-llvm-clang-od = $(shell $(1) --print-prog-name llvm-objdump 2>$(nul))
|
||||
guess-llvm-clang-ar = $(shell $(1) --print-prog-name llvm-ar 2>$(nul))
|
||||
toolchain-guess-llvm-clang-cpp = $(1)
|
||||
toolchain-guess-llvm-clang-as = $(1)
|
||||
toolchain-guess-llvm-clang-ld = $(shell $(1) --print-prog-name ld.lld 2>$(nul))
|
||||
toolchain-guess-llvm-clang-oc = $(shell $(1) --print-prog-name llvm-objcopy 2>$(nul))
|
||||
toolchain-guess-llvm-clang-od = $(shell $(1) --print-prog-name llvm-objdump 2>$(nul))
|
||||
toolchain-guess-llvm-clang-ar = $(shell $(1) --print-prog-name llvm-ar 2>$(nul))
|
||||
|
||||
guess-gnu-gcc-cpp = $(1)
|
||||
guess-gnu-gcc-as = $(1)
|
||||
guess-gnu-gcc-ld = $(1)
|
||||
guess-gnu-gcc-oc = $(shell $(1) --print-prog-name objcopy 2>$(nul))
|
||||
guess-gnu-gcc-od = $(shell $(1) --print-prog-name objdump 2>$(nul))
|
||||
guess-gnu-gcc-ar = $(shell $(1) --print-prog-name ar 2>$(nul))
|
||||
toolchain-guess-gnu-gcc-cpp = $(1)
|
||||
toolchain-guess-gnu-gcc-as = $(1)
|
||||
toolchain-guess-gnu-gcc-ld = $(1)
|
||||
toolchain-guess-gnu-gcc-oc = $(shell $(1) --print-prog-name objcopy 2>$(nul))
|
||||
toolchain-guess-gnu-gcc-od = $(shell $(1) --print-prog-name objdump 2>$(nul))
|
||||
toolchain-guess-gnu-gcc-ar = $(shell $(1) --print-prog-name ar 2>$(nul))
|
||||
|
||||
define toolchain-warn-unrecognized
|
||||
$$(warning )
|
||||
$$(warning The configured $$($(1)-name) $$(tool-class-name-$(2)) could not be identified and may not be supported:)
|
||||
$$(warning The configured $$($(1)-name) $$(toolchain-tool-class-name-$(2)) could not be identified and may not be supported:)
|
||||
$$(warning )
|
||||
$$(warning $$(space) $$($(1)-$(2)))
|
||||
$$(warning )
|
||||
$$(warning The default $$($(1)-name) $$(tool-class-name-$(2)) is:)
|
||||
$$(warning The default $$($(1)-name) $$(toolchain-tool-class-name-$(2)) is:)
|
||||
$$(warning )
|
||||
$$(warning $$(space) $$($(1)-$(2)-default))
|
||||
$$(warning )
|
||||
$$(warning The following tools are supported:)
|
||||
$$(warning )
|
||||
|
||||
$$(foreach tool,$$(tools-$(2)), \
|
||||
$$(warning $$(space) - $$(tool-name-$$(tool))))
|
||||
$$(foreach tool,$$(toolchain-tools-$(2)), \
|
||||
$$(warning $$(space) - $$(toolchain-tool-name-$$(tool))))
|
||||
|
||||
$$(warning )
|
||||
$$(warning The build system will treat this $$(tool-class-name-$(2)) as $$(tool-name-$$($(1)-$(2)-id-default)).)
|
||||
$$(warning The build system will treat this $$(toolchain-tool-class-name-$(2)) as $$(toolchain-tool-name-$$($(1)-$(2)-id-default)).)
|
||||
$$(warning )
|
||||
endef
|
||||
|
||||
define toolchain-determine-tool
|
||||
$(1)-$(2)-guess = $$(if $$(filter-out cc,$(2)),$\
|
||||
$$(call guess-$$($(1)-cc-id)-$(2),$$($(1)-cc)))
|
||||
$$(call toolchain-guess-$$($(1)-cc-id)-$(2),$$($(1)-cc)))
|
||||
|
||||
$(1)-$(2) := $$(or $$($(1)-$(2)),$$($(1)-$(2)-guess))
|
||||
$(1)-$(2) := $$(or $$($(1)-$(2)),$$($(1)-$(2)-default))
|
||||
|
@ -322,12 +302,12 @@ ifndef toolchain-mk
|
|||
ifneq ($$(call which,$$($(1)-$(2))),)
|
||||
# If we can resolve this tool to a program on the `PATH`
|
||||
# then escape it for use in a shell, which allows us to
|
||||
# preserve spaces.
|
||||
# preserve spaces.
|
||||
|
||||
$(1)-$(2) := $$(call escape-shell,$$($(1)-$(2)))
|
||||
endif
|
||||
|
||||
$(1)-$(2)-id := $$(call guess-tool,$$(tools-$(2)),$$($(1)-$(2)))
|
||||
$(1)-$(2)-id := $$(call toolchain-guess-tool,$$(toolchain-tools-$(2)),$$($(1)-$(2)))
|
||||
|
||||
ifndef $(1)-$(2)-id
|
||||
$(1)-$(2)-id := $$($(1)-$(2)-id-default)
|
||||
|
@ -337,7 +317,7 @@ ifndef toolchain-mk
|
|||
endef
|
||||
|
||||
define toolchain-determine
|
||||
$$(foreach tool-class,$$(tool-classes), \
|
||||
$$(foreach tool-class,$$(toolchain-tool-classes), \
|
||||
$$(eval $$(call toolchain-determine-tool,$(1),$$(tool-class))))
|
||||
endef
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue