1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/gnu.inc.mk: Use simple expansion for OBJCOPY and OBJDUMP

This commit is contained in:
Leandro Lanzieri 2020-02-04 15:21:24 +01:00
parent d1fcc17c09
commit a262ae4c57

View File

@ -13,12 +13,14 @@ export NM = $(PREFIX)nm
export LINK = $(PREFIX)gcc
export LINKXX = $(PREFIX)g++
export SIZE = $(PREFIX)size
export OBJCOPY ?= $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy)
_OBJCOPY := $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy)
export OBJCOPY ?= $(_OBJCOPY)
ifeq ($(OBJCOPY),)
$(warning objcopy not found. Hex file will not be created.)
export OBJCOPY = true
endif
# Default to the native (g)objdump, helps when using toolchain from docker
export OBJDUMP ?= $(or $(shell command -v $(PREFIX)objdump || command -v gobjdump),objdump)
_OBJDUMP := $(or $(shell command -v $(PREFIX)objdump || command -v gobjdump),objdump)
export OBJDUMP ?= $(_OBJDUMP)
# We use GDB for debugging
include $(RIOTMAKE)/tools/gdb.inc.mk