mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #18935 from benpicco/makefiles/gnu-version
makefiles/gnu.inc.mk: set flags based on compiler version
This commit is contained in:
commit
6b759c2a7d
@ -52,5 +52,3 @@ LINKFLAGS += -Tesp8266.peripherals.ld
|
||||
|
||||
LINKFLAGS += -Wl,-wrap=pp_attach
|
||||
LINKFLAGS += -Wl,-wrap=pm_attach
|
||||
|
||||
OPTIONAL_CFLAGS_BLACKLIST += -fmacro-prefix-map=$(RIOTBASE)/=
|
||||
|
@ -38,7 +38,6 @@ endif
|
||||
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-overflow
|
||||
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-truncation
|
||||
OPTIONAL_CFLAGS_BLACKLIST += -gz
|
||||
OPTIONAL_CFLAGS_BLACKLIST += -fmacro-prefix-map=$(RIOTBASE)/=
|
||||
|
||||
ifeq ($(TOOLCHAIN),gnu)
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
|
||||
|
@ -22,5 +22,13 @@ endif
|
||||
# Default to the native (g)objdump, helps when using toolchain from docker
|
||||
_OBJDUMP := $(or $(shell command -v $(PREFIX)objdump || command -v gobjdump),objdump)
|
||||
OBJDUMP ?= $(_OBJDUMP)
|
||||
|
||||
GCC_VERSION := $(shell $(CC) -dumpversion | cut -d . -f 1)
|
||||
|
||||
# -fmacro-prefix-map requires GCC 8
|
||||
ifneq (8, $(firstword $(shell echo 8 $(GCC_VERSION) | tr ' ' '\n' | sort -n))))
|
||||
OPTIONAL_CFLAGS_BLACKLIST += -fmacro-prefix-map=$(RIOTBASE)/=
|
||||
endif
|
||||
|
||||
# We use GDB for debugging
|
||||
include $(RIOTMAKE)/tools/gdb.inc.mk
|
||||
|
Loading…
Reference in New Issue
Block a user