mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles/toolchain: fix command -v multiple commands
`command -v first second third` only works in `bash` and not in `sh`. So replace with multiple calls to `command`. This fixes using `objcopy` when the toolchain `objcopy` is not available.
This commit is contained in:
parent
579925b81d
commit
566c990eba
@ -13,7 +13,7 @@ export NM = $(PREFIX)nm
|
||||
export LINK = $(PREFIX)gcc
|
||||
export LINKXX = $(PREFIX)g++
|
||||
export SIZE = $(PREFIX)size
|
||||
export OBJCOPY ?= $(shell command -v $(PREFIX)objcopy gobjcopy objcopy | head -n 1)
|
||||
export OBJCOPY ?= $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy)
|
||||
ifeq ($(OBJCOPY),)
|
||||
$(warning objcopy not found. Hex file will not be created.)
|
||||
export OBJCOPY = true
|
||||
|
@ -20,7 +20,7 @@ export LINK = $(PREFIX)gcc
|
||||
export LINKXX = $(PREFIX)g++
|
||||
# objcopy does not have a clear substitute in LLVM, use GNU binutils
|
||||
#export OBJCOPY = $(LLVMPREFIX)objcopy
|
||||
export OBJCOPY ?= $(shell command -v $(PREFIX)objcopy gobjcopy objcopy | head -n 1)
|
||||
export OBJCOPY ?= $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy)
|
||||
ifeq ($(OBJCOPY),)
|
||||
$(warning objcopy not found. Hex file will not be created.)
|
||||
export OBJCOPY = true
|
||||
|
Loading…
Reference in New Issue
Block a user