From 30aec689d92e2a6ff967d55499660348995d7aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 1 Mar 2017 11:43:49 +0100 Subject: [PATCH] llvm: Fall back for missing objcopy Copied from Makefile.include.gnu --- cpu/Makefile.include.llvm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpu/Makefile.include.llvm b/cpu/Makefile.include.llvm index 222c27e907..f873011df2 100644 --- a/cpu/Makefile.include.llvm +++ b/cpu/Makefile.include.llvm @@ -17,7 +17,11 @@ export NM = $(LLVMPREFIX)nm #export LINKER = $(LLVMPREFIX)ld # objcopy does not have a clear substitute in LLVM, use GNU binutils #export OBJCOPY = $(LLVMPREFIX)objcopy -export OBJCOPY = $(PREFIX)objcopy +export OBJCOPY ?= $(shell command -v $(PREFIX)objcopy gobjcopy objcopy | head -n 1) +ifeq ($(OBJCOPY),) +$(warning objcopy not found. Hex file will not be created.) +export OBJCOPY = true +endif export OBJDUMP = $(LLVMPREFIX)objdump export SIZE = $(LLVMPREFIX)size export DBG = $(GDBPREFIX)gdb