From d4f2070e8b6a9c6d86149826aa00a87b1d5a4adf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= <joakim.nohlgard@eistec.se>
Date: Wed, 21 Dec 2016 13:03:58 +0100
Subject: [PATCH] make: Correct multilib detection when using LLVM

The LLVM makefile needs to be included _after_ the CPU makefiles have
set their CFLAGS in order to get the right multilib directory from GCC.
---
 Makefile.include | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.include b/Makefile.include
index 004d90f900..7fc769c714 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -175,9 +175,6 @@ export TOOLCHAIN
 # will most likely not need to touch this.
 export PREFIX ?= $(if $(TARGET_ARCH),$(TARGET_ARCH)-)
 
-# Import all toolchain settings
-include $(RIOTCPU)/Makefile.include.$(TOOLCHAIN)
-
 # Add standard include directories
 INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include
 INCLUDES += -I$(RIOTCPU)/$(CPU)/include
@@ -189,6 +186,9 @@ include $(RIOTBASE)/Makefile.defaultmodules
 include $(RIOTBOARD)/$(BOARD)/Makefile.include
 include $(RIOTCPU)/$(CPU)/Makefile.include
 
+# Import all toolchain settings
+include $(RIOTCPU)/Makefile.include.$(TOOLCHAIN)
+
 # get number of interfaces straight before resolving dependencies
 GNRC_NETIF_NUMOF ?= 1
 
-- 
GitLab