diff --git a/pkg/openthread/Makefile b/pkg/openthread/Makefile index 0a60a971d3..1bdd7dcbf3 100644 --- a/pkg/openthread/Makefile +++ b/pkg/openthread/Makefile @@ -26,15 +26,26 @@ endif OT_COAP ?= ON OT_C_FLAGS = $(CFLAGS_CPU) -OT_C_FLAGS += -fdata-sections -ffunction-sections -Os -OT_C_FLAGS += -Wno-implicit-fallthrough -Wno-unused-parameter -OT_CXXFLAGS += -Wno-class-memaccess -DOPENTHREAD_TARGET_RIOT +OT_C_FLAGS += -fdata-sections +OT_C_FLAGS += -ffunction-sections -Os +OT_C_FLAGS += -ffunction-sections +OT_C_FLAGS += -fshort-enums +OT_C_FLAGS += -Wno-implicit-fallthrough +OT_C_FLAGS += -Wno-unused-parameter +OT_CXXFLAGS += -Wno-class-memaccess +OT_CXXFLAGS += -DOPENTHREAD_TARGET_RIOT OT_MODULES_ARCHIVES = $(addsuffix .a,$(addprefix $(BINDIR)/,$(OT_MODULES))) OT_CORE_LIB_DIR = $(PKG_BUILD_DIR)/src/core OT_CLI_LIB_DIR = $(PKG_BUILD_DIR)/src/cli OT_MBEDCRYPTO_LIB_DIR = $(PKG_BUILD_DIR)/third_party/mbedtls/repo/library +ifeq (llvm,$(TOOLCHAIN)) + OT_C_FLAGS += -target $(TARGET_ARCH_LLVM) + OT_C_FLAGS += $(GCC_C_INCLUDES) + OT_CXXFLAGS += $(GCC_CXX_INCLUDES) +endif + all: $(OT_MODULES_ARCHIVES) @: