mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
826b2ae232
When trying to compile `examples/hello-world` on my 465 MHz Mendocino I got /home/benpicco/dev/RIOT/makefiles/toolchain/gnu.inc.mk:29: extraneous text after 'ifneq' directive Turns out the version of `make` on Archlinux32 is newer than that in Ubuntu 22.04, which somehow ignored the extra parenthesis. Turns out this (t)rusty old machine is still good for writing patches :D
35 lines
1.1 KiB
Makefile
35 lines
1.1 KiB
Makefile
CC = $(PREFIX)gcc
|
|
CXX = $(PREFIX)g++
|
|
CCAS ?= $(CC)
|
|
ifeq ($(LTO),1)
|
|
AR = $(PREFIX)gcc-ar
|
|
RANLIB = $(PREFIX)gcc-ranlib
|
|
else
|
|
AR = $(PREFIX)ar
|
|
RANLIB = $(PREFIX)ranlib
|
|
endif
|
|
AS = $(PREFIX)as
|
|
NM = $(PREFIX)nm
|
|
LINK = $(PREFIX)gcc
|
|
LINKXX = $(PREFIX)g++
|
|
SIZE = $(PREFIX)size
|
|
_OBJCOPY := $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy)
|
|
OBJCOPY ?= $(_OBJCOPY)
|
|
ifeq ($(OBJCOPY),)
|
|
$(warning objcopy not found. Hex file will not be created.)
|
|
OBJCOPY = true
|
|
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
|