1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

llvm: Only add -target to CFLAGS if TARGET_ARCH is set

This commit is contained in:
Joakim Nohlgård 2016-12-21 13:54:35 +01:00
parent fd7a1de9c4
commit e9f8608307

View File

@ -43,10 +43,12 @@ ifeq ($(GCC_MULTI_DIR),)
GCC_MULTI_DIR := $(shell $(PREFIX)gcc $(CFLAGS) -print-multi-directory 2>/dev/null)
endif
# Tell clang to cross compile
export CFLAGS += -target $(TARGET_ARCH)
export CXXFLAGS += -target $(TARGET_ARCH)
export LINKFLAGS += -target $(TARGET_ARCH)
ifneq (,$(TARGET_ARCH))
# Tell clang to cross compile
export CFLAGS += -target $(TARGET_ARCH)
export CXXFLAGS += -target $(TARGET_ARCH)
export LINKFLAGS += -target $(TARGET_ARCH)
endif
# Use the wildcard Makefile function to search for existing directories matching
# the patterns above. We use the -isystem gcc/clang argument to add the include