1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #15832 from fjmolinas/pr_TOOLCHAIN_cleanup

Makefile.include: change to account for TOOLCHAIN having dependencies
This commit is contained in:
Alexandre Abadie 2021-01-27 11:56:44 +01:00 committed by GitHub
commit dd9ff31878
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 33 deletions

View File

@ -1,5 +1,6 @@
# include board specific application dependencies
-include $(APPDIR)/Makefile.board.dep
-include $(APPDIR)/Makefile.$(TOOLCHAIN).dep
# include board dependencies
-include $(BOARDDIR)/Makefile.dep

View File

@ -173,6 +173,27 @@ include $(RIOTMAKE)/boards.inc.mk
# Debug targets for build system migration
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 \
buildtest-indocker \
info-boards-features-blacklisted \
@ -320,33 +341,6 @@ ifeq (, $(APPLICATION))
$(error An application name must be specified as APPLICATION.)
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
# will most likely not need to touch this.
export PREFIX ?= $(if $(TARGET_ARCH),$(TARGET_ARCH)-)

View File

@ -26,12 +26,6 @@ USEMODULE += gnrc_icmpv6_echo
# Use minimal standard PRNG
USEMODULE += prng_minstd
# llvm compatibility requires yet to be released picolibc 1.4.7
ifneq (llvm, $(TOOLCHAIN))
# Use picolibc when available
FEATURES_OPTIONAL += picolibc
endif
CFLAGS += -DLOG_LEVEL=LOG_NONE # disable log output
CFLAGS += -DCONFIG_GNRC_NETIF_IPV6_ADDRS_NUMOF=2 \
-DGNRC_NETIF_IPV6_GROUPS_NUMOF=2 -DCONFIG_GNRC_IPV6_NIB_NUMOF=1 \

View File

@ -0,0 +1,3 @@
# llvm compatibility requires yet to be released picolibc 1.4.7
# Use picolibc when available
FEATURES_OPTIONAL += picolibc

View File

@ -49,6 +49,7 @@ FEATURES_PROVIDED_KCONFIG = $(call lowercase,$(patsubst CONFIG_HAS_%,%,$(filter
DEPENDENCY_DEBUG_OUTPUT_DIR ?= $(CURDIR)
# Save variables that are used for parsing dependencies
_DEPS_DEBUG_VARS += TOOLCHAIN
_DEPS_DEBUG_VARS += BOARD CPU CPU_MODEL CPU_FAM CPU_CORE CPU_ARCH
_DEPS_DEBUG_VARS += FEATURES_PROVIDED _FEATURES_PROVIDED_SORTED
_DEPS_DEBUG_VARS += FEATURES_REQUIRED _FEATURES_REQUIRED_SORTED