Skip to content
Snippets Groups Projects
Unverified Commit 43172e20 authored by Juan I Carrano's avatar Juan I Carrano Committed by GitHub
Browse files

Merge pull request #10889 from cladmi/pr/objcopy/fallback

makefiles/toolchain: fix command -v multiple commands
parents 3c9130ec 566c990e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment