mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
make: always include toolchain dependent Makefile
This commit is contained in:
parent
b9824b9e49
commit
a82556d818
@ -136,6 +136,32 @@ ifneq (0,$(shell test -d $(RIOTBOARD)/$(BOARD); echo $$?))
|
||||
$(error The specified board $(BOARD) does not exist.)
|
||||
endif
|
||||
|
||||
# Use TOOLCHAIN environment variable to select the toolchain to use.
|
||||
# Default: gnu
|
||||
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
|
||||
|
||||
export TOOLCHAIN
|
||||
|
||||
# Import all toolchain settings
|
||||
include $(RIOTCPU)/Makefile.include.$(TOOLCHAIN)
|
||||
|
||||
# mandatory includes!
|
||||
include $(RIOTBASE)/Makefile.modules
|
||||
include $(RIOTBOARD)/$(BOARD)/Makefile.include
|
||||
|
@ -1,29 +1,6 @@
|
||||
# Target triple for the build. Use arm-none-eabi if you are unsure.
|
||||
export TARGET_TRIPLE ?= arm-none-eabi
|
||||
|
||||
# Use TOOLCHAIN environment variable to select the toolchain to use.
|
||||
# Default: gnu
|
||||
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
|
||||
|
||||
export TOOLCHAIN
|
||||
|
||||
# default toolchain prefix, defaults to target triple followed by a dash, you
|
||||
# will most likely not need to touch this.
|
||||
export PREFIX ?= $(if $(TARGET_TRIPLE),$(TARGET_TRIPLE)-)
|
||||
@ -116,9 +93,6 @@ endif
|
||||
# CPU depends on the cortex-m common module, so include it:
|
||||
include $(RIOTCPU)/cortexm_common/Makefile.include
|
||||
|
||||
# Import all toolchain settings
|
||||
include $(RIOTCPU)/Makefile.include.$(TOOLCHAIN)
|
||||
|
||||
# use the nano-specs of Newlib when available
|
||||
ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
|
||||
export LINKFLAGS += -specs=nano.specs -lc -lnosys
|
||||
|
Loading…
Reference in New Issue
Block a user