Skip to content

Commit

Permalink
makefiles: Split GDB settings from toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
Joakim Nohlgård committed Oct 18, 2017
1 parent 7713bed commit 0ad0a39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions makefiles/toolchain/gnu.inc.mk
@@ -1,4 +1,3 @@
export GDBPREFIX ?= $(PREFIX)
export CC = $(PREFIX)gcc
export CXX = $(PREFIX)g++
export CCAS ?= $(CC)
Expand All @@ -16,4 +15,5 @@ $(warning objcopy not found. Hex file will not be created.)
export OBJCOPY = true
endif
export OBJDUMP = $(PREFIX)objdump
export GDB = $(GDBPREFIX)gdb
# We use GDB for debugging
include $(RIOTMAKE)/tools/gdb.inc.mk
4 changes: 2 additions & 2 deletions makefiles/toolchain/llvm.inc.mk
@@ -1,4 +1,3 @@
export GDBPREFIX ?= $(PREFIX)
export LLVMPREFIX ?= llvm-
# Apple XCode doesn't prefix its tools with llvm-, but manually installed LLVM
# on OSX might have the llvm- prefix, we can't simply test against uname -s.
Expand All @@ -25,9 +24,10 @@ export OBJCOPY = true
endif
export OBJDUMP = $(LLVMPREFIX)objdump
export SIZE = $(LLVMPREFIX)size
export GDB = $(GDBPREFIX)gdb
# LLVM lacks a binutils strip tool as well...
#export STRIP = $(LLVMPREFIX)strip
# We use GDB for debugging for now, maybe LLDB will be supported in the future.
include $(RIOTMAKE)/tools/gdb.inc.mk

ifneq (,$(TARGET_ARCH))
# Clang on Linux uses GCC's C++ headers and libstdc++ (installed with GCC)
Expand Down
2 changes: 2 additions & 0 deletions makefiles/tools/gdb.inc.mk
@@ -0,0 +1,2 @@
export GDBPREFIX ?= $(PREFIX)
export GDB ?= $(GDBPREFIX)gdb

0 comments on commit 0ad0a39

Please sign in to comment.