Skip to content

Commit

Permalink
pkg/openthread: fix compilation with LLVM
Browse files Browse the repository at this point in the history
  • Loading branch information
Marian Buschsieweke committed May 20, 2023
1 parent bc5dc58 commit 70598df
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions pkg/openthread/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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_C_INCLUDES)
endif

all: $(OT_MODULES_ARCHIVES)
@:

Expand Down

0 comments on commit 70598df

Please sign in to comment.