mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
Makefile.include: move default TOOLCHAIN before global goals
This commit is contained in:
parent
7212ad7dbd
commit
d1deb6f3ef
@ -173,6 +173,27 @@ include $(RIOTMAKE)/boards.inc.mk
|
|||||||
# Debug targets for build system migration
|
# Debug targets for build system migration
|
||||||
include $(RIOTMAKE)/dependencies_debug.inc.mk
|
include $(RIOTMAKE)/dependencies_debug.inc.mk
|
||||||
|
|
||||||
|
# Use TOOLCHAIN environment variable to select the toolchain to use.
|
||||||
|
# If native, TOOLCHAIN for OSX is llvm
|
||||||
|
ifeq ($(BOARD),native)
|
||||||
|
ifeq ($(OS),Darwin)
|
||||||
|
TOOLCHAIN ?= llvm
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
# Use override so that we can redefine a variable set on the command line (as
|
||||||
|
# opposed to one set in the environment)
|
||||||
|
ifeq (clang,$(TOOLCHAIN))
|
||||||
|
# TOOLCHAIN = clang is an alias for TOOLCHAIN = llvm
|
||||||
|
override TOOLCHAIN := llvm
|
||||||
|
endif
|
||||||
|
ifeq (gcc,$(TOOLCHAIN))
|
||||||
|
# TOOLCHAIN = gcc is an alias for TOOLCHAIN = gnu
|
||||||
|
override TOOLCHAIN := gnu
|
||||||
|
endif
|
||||||
|
ifeq (,$(TOOLCHAIN))
|
||||||
|
override TOOLCHAIN := gnu
|
||||||
|
endif
|
||||||
|
|
||||||
GLOBAL_GOALS += buildtest \
|
GLOBAL_GOALS += buildtest \
|
||||||
buildtest-indocker \
|
buildtest-indocker \
|
||||||
info-boards-features-blacklisted \
|
info-boards-features-blacklisted \
|
||||||
@ -320,33 +341,6 @@ ifeq (, $(APPLICATION))
|
|||||||
$(error An application name must be specified as APPLICATION.)
|
$(error An application name must be specified as APPLICATION.)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Use TOOLCHAIN environment variable to select the toolchain to use.
|
|
||||||
# Default for macOS: llvm; for other OS: gnu
|
|
||||||
ifeq ($(BOARD),native)
|
|
||||||
ifeq ($(OS),Darwin)
|
|
||||||
TOOLCHAIN ?= llvm
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
TOOLCHAIN ?= gnu
|
|
||||||
|
|
||||||
# TOOLCHAIN = clang is an alias for TOOLCHAIN = llvm
|
|
||||||
ifeq (clang,$(TOOLCHAIN))
|
|
||||||
# use override so that we can redefine a variable set on the command line (as
|
|
||||||
# opposed to one set in the environment)
|
|
||||||
override TOOLCHAIN := llvm
|
|
||||||
endif
|
|
||||||
# TOOLCHAIN = gcc is an alias for TOOLCHAIN = gnu
|
|
||||||
ifeq (gcc,$(TOOLCHAIN))
|
|
||||||
# use override so that we can redefine a variable set on the command line (as
|
|
||||||
# opposed to one set in the environment)
|
|
||||||
override TOOLCHAIN := gnu
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (,$(TOOLCHAIN))
|
|
||||||
override TOOLCHAIN := gnu
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# default toolchain prefix, defaults to target triple followed by a dash, you
|
# default toolchain prefix, defaults to target triple followed by a dash, you
|
||||||
# will most likely not need to touch this.
|
# will most likely not need to touch this.
|
||||||
export PREFIX ?= $(if $(TARGET_ARCH),$(TARGET_ARCH)-)
|
export PREFIX ?= $(if $(TARGET_ARCH),$(TARGET_ARCH)-)
|
||||||
|
Loading…
Reference in New Issue
Block a user