1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/makefiles/tools/gdb.inc.mk
Benjamin Valentin 6e7414e220 makefiles/tools: Automatically detect gdb-multiarch
Modern versions of GDB support multiple targets with the same gdb binary.
At least Ubuntu and Debian have dropped the gdb-arm-none-eabi package in favour
of gdb-multiarch.
Here, no $(PREFIX)-gdb binary is availiable, instead gdb-multiarch should be used.

This patch tries to automatically detect the presense of gdb-multiarch and uses it
instead of arm-none-eabi-gdb.
2019-03-05 14:31:22 +01:00

8 lines
243 B
Makefile

# new versions of gdb will support all architectures in one binary
ifeq ($(shell gdb-multiarch -v 2>&1 > /dev/null; echo $$?),0)
export GDB ?= gdb-multiarch
else
export GDBPREFIX ?= $(PREFIX)
export GDB ?= $(GDBPREFIX)gdb
endif