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

makefiles/toolchain: fallback to 'objdump'

When '$(PREFIX)objdump' is not present fallback to native '(g)objdump'.
'objdump' is used when flashing for some boards but the toolchain may
not be installed when building in docker.

This will allow using 'objdump' in 'cpu/kinetis/dist/check-fcfield.sh'.
This commit is contained in:
Gaëtan Harter 2019-01-25 16:55:37 +01:00
parent 0f8372fac4
commit f47b09faa4
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B
2 changed files with 4 additions and 2 deletions

View File

@ -18,6 +18,7 @@ ifeq ($(OBJCOPY),)
$(warning objcopy not found. Hex file will not be created.)
export OBJCOPY = true
endif
export OBJDUMP = $(PREFIX)objdump
# Default to the native (g)objdump, helps when using toolchain from docker
export OBJDUMP ?= $(or $(shell command -v $(PREFIX)objdump || command -v gobjdump),objdump)
# We use GDB for debugging
include $(RIOTMAKE)/tools/gdb.inc.mk

View File

@ -25,7 +25,8 @@ ifeq ($(OBJCOPY),)
$(warning objcopy not found. Hex file will not be created.)
export OBJCOPY = true
endif
export OBJDUMP = $(LLVMPREFIX)objdump
# Default to the native (g)objdump, helps when using toolchain from docker
export OBJDUMP ?= $(or $(shell command -v $(LLVMPREFIX)objdump || command -v gobjdump),objdump)
export SIZE = $(LLVMPREFIX)size
# LLVM lacks a binutils strip tool as well...
#export STRIP = $(LLVMPREFIX)strip