summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-02-07 23:45:42 -0800
committerKhem Raj <raj.khem@gmail.com>2024-02-09 09:52:15 -0800
commit192f412b3d67858398f30bab98e8ed26afc98eeb (patch)
tree1f654e619a694748e734993e440711571c465343
parent59bffb68440c9099d724aa2f2b1e6366216f0f11 (diff)
downloadmeta-openembedded-192f412b3d67858398f30bab98e8ed26afc98eeb.tar.gz
ot-br-posix: upgrade to latest trunk
Fix build with clang and drop unneeded patch for unused variable 'i' Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-bn_mul.h-fix-x86-PIC-inline-ASM-compilation-with-GCC.patch13
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch9
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-br-posix/default-cxx-std.patch35
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-br-posix/mbedtls.patch17
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-br-posix/unused_var.patch12
-rw-r--r--meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb8
6 files changed, 56 insertions, 38 deletions
diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-bn_mul.h-fix-x86-PIC-inline-ASM-compilation-with-GCC.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-bn_mul.h-fix-x86-PIC-inline-ASM-compilation-with-GCC.patch
index 8122e725e..8b286dfd1 100644
--- a/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-bn_mul.h-fix-x86-PIC-inline-ASM-compilation-with-GCC.patch
+++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-bn_mul.h-fix-x86-PIC-inline-ASM-compilation-with-GCC.patch
@@ -36,7 +36,7 @@ Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
36 36
37--- a/third_party/openthread/repo/third_party/mbedtls/repo/include/mbedtls/bn_mul.h 37--- a/third_party/openthread/repo/third_party/mbedtls/repo/include/mbedtls/bn_mul.h
38+++ b/third_party/openthread/repo/third_party/mbedtls/repo/include/mbedtls/bn_mul.h 38+++ b/third_party/openthread/repo/third_party/mbedtls/repo/include/mbedtls/bn_mul.h
39@@ -55,12 +55,28 @@ 39@@ -95,12 +95,28 @@
40 ( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 ) 40 ( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 )
41 41
42 /* 42 /*
@@ -66,3 +66,14 @@ Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
66 66
67 #define MULADDC_INIT \ 67 #define MULADDC_INIT \
68 asm( \ 68 asm( \
69--- a/third_party/openthread/repo/third_party/mbedtls/repo/CMakeLists.txt
70+++ b/third_party/openthread/repo/third_party/mbedtls/repo/CMakeLists.txt
71@@ -210,7 +210,7 @@ if(CMAKE_COMPILER_IS_GNU)
72 endif(CMAKE_COMPILER_IS_GNU)
73
74 if(CMAKE_COMPILER_IS_CLANG)
75- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral")
76+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Wno-error=documentation")
77 set(CMAKE_C_FLAGS_RELEASE "-O2")
78 set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
79 set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage")
diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch
index f0bb392a9..7c3216679 100644
--- a/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch
+++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch
@@ -20,13 +20,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
20 CMakeLists.txt | 4 ++++ 20 CMakeLists.txt | 4 ++++
21 1 file changed, 4 insertions(+) 21 1 file changed, 4 insertions(+)
22 22
23diff --git a/CMakeLists.txt b/CMakeLists.txt
24index 59a567e729..3134740ff6 100644
25--- a/CMakeLists.txt 23--- a/CMakeLists.txt
26+++ b/CMakeLists.txt 24+++ b/CMakeLists.txt
27@@ -57,6 +57,10 @@ endif() 25@@ -59,6 +59,10 @@ endif()
28
29 set(CMAKE_CXX_EXTENSIONS OFF) 26 set(CMAKE_CXX_EXTENSIONS OFF)
27 set(CMAKE_EXE_LINKER_FLAGS "-rdynamic ${CMAKE_EXE_LINKER_FLAGS}")
30 28
31+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") 29+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
32+ add_compile_options(-Wno-error=nonnull-compare) 30+ add_compile_options(-Wno-error=nonnull-compare)
@@ -35,6 +33,3 @@ index 59a567e729..3134740ff6 100644
35 if (OTBR_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") 33 if (OTBR_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
36 message(STATUS "Coverage: ON") 34 message(STATUS "Coverage: ON")
37 target_compile_options(otbr-config INTERFACE -g -O0 --coverage) 35 target_compile_options(otbr-config INTERFACE -g -O0 --coverage)
38--
392.36.0
40
diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/default-cxx-std.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/default-cxx-std.patch
new file mode 100644
index 000000000..d6b3146a9
--- /dev/null
+++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix/default-cxx-std.patch
@@ -0,0 +1,35 @@
1Do not hardcode C std to C99 or C++ std to C++11 if not set
2OE compilers are using newer than these standards and absl needs C++14 minimum
3
4Upstream-Status: Pending
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6--- a/CMakeLists.txt
7+++ b/CMakeLists.txt
8@@ -46,16 +46,6 @@ set_property(CACHE OTBR_MDNS PROPERTY ST
9
10 include("${PROJECT_SOURCE_DIR}/etc/cmake/options.cmake")
11
12-if(NOT CMAKE_C_STANDARD)
13- set(CMAKE_C_STANDARD 99)
14- set(CMAKE_C_STANDARD_REQUIRED ON)
15-endif()
16-
17-if(NOT CMAKE_CXX_STANDARD)
18- set(CMAKE_CXX_STANDARD 11)
19- set(CMAKE_CXX_STANDARD_REQUIRED ON)
20-endif()
21-
22 set(CMAKE_CXX_EXTENSIONS OFF)
23 set(CMAKE_EXE_LINKER_FLAGS "-rdynamic ${CMAKE_EXE_LINKER_FLAGS}")
24
25@@ -63,6 +53,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
26 add_compile_options(-Wno-error=nonnull-compare)
27 endif()
28
29+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
30+ add_compile_options(-Wno-error=vla-cxx-extension)
31+endif()
32+
33 if (OTBR_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
34 message(STATUS "Coverage: ON")
35 target_compile_options(otbr-config INTERFACE -g -O0 --coverage)
diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/mbedtls.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/mbedtls.patch
index 23e4368d2..0824eb6b9 100644
--- a/meta-networking/recipes-connectivity/openthread/ot-br-posix/mbedtls.patch
+++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix/mbedtls.patch
@@ -12,23 +12,12 @@ Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13--- a/third_party/openthread/repo/third_party/mbedtls/repo/library/bignum.c 13--- a/third_party/openthread/repo/third_party/mbedtls/repo/library/bignum.c
14+++ b/third_party/openthread/repo/third_party/mbedtls/repo/library/bignum.c 14+++ b/third_party/openthread/repo/third_party/mbedtls/repo/library/bignum.c
15@@ -1544,7 +1544,7 @@ __attribute__ ((noinline)) 15@@ -1392,7 +1392,7 @@ void mpi_mul_hlp( size_t i,
16 #endif 16 mbedtls_mpi_uint *d,
17 void mpi_mul_hlp( size_t i, mbedtls_mpi_uint *s, mbedtls_mpi_uint *d, mbedtls_mpi_uint b ) 17 mbedtls_mpi_uint b )
18 { 18 {
19- mbedtls_mpi_uint c = 0, t = 0; 19- mbedtls_mpi_uint c = 0, t = 0;
20+ mbedtls_mpi_uint c = 0, t __attribute__ ((unused)) = 0; 20+ mbedtls_mpi_uint c = 0, t __attribute__ ((unused)) = 0;
21 21
22 #if defined(MULADDC_HUIT) 22 #if defined(MULADDC_HUIT)
23 for( ; i >= 8; i -= 8 ) 23 for( ; i >= 8; i -= 8 )
24--- a/third_party/openthread/repo/third_party/mbedtls/repo/CMakeLists.txt
25+++ b/third_party/openthread/repo/third_party/mbedtls/repo/CMakeLists.txt
26@@ -192,7 +192,7 @@ if(CMAKE_COMPILER_IS_GNU)
27 endif(CMAKE_COMPILER_IS_GNU)
28
29 if(CMAKE_COMPILER_IS_CLANG)
30- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla")
31+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wno-error=documentation")
32 set(CMAKE_C_FLAGS_RELEASE "-O2")
33 set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
34 set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage")
diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/unused_var.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/unused_var.patch
deleted file mode 100644
index f10cec2d6..000000000
--- a/meta-networking/recipes-connectivity/openthread/ot-br-posix/unused_var.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1Upstream-Status: Pending
2
3--- a/third_party/openthread/repo/src/cli/cli.cpp
4+++ b/third_party/openthread/repo/src/cli/cli.cpp
5@@ -1785,6 +1785,7 @@ template <> otError Interpreter::Process
6
7 for (uint8_t i = 0;; i++)
8 {
9+ OT_UNUSED_VARIABLE(i);
10 SuccessOrExit(otThreadGetNextCacheEntry(GetInstancePtr(), &entry, &iterator));
11 OutputEidCacheEntry(entry);
12 }
diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb b/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb
index 71e5a8d43..271340a25 100644
--- a/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb
+++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb
@@ -5,13 +5,13 @@ SUMMARY = "OpenThread Border Router"
5SECTION = "net" 5SECTION = "net"
6LICENSE = "BSD-3-Clause & MIT" 6LICENSE = "BSD-3-Clause & MIT"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=87109e44b2fda96a8991f27684a7349c \ 7LIC_FILES_CHKSUM = "file://LICENSE;md5=87109e44b2fda96a8991f27684a7349c \
8 file://third_party/Simple-web-server/repo/LICENSE;md5=852b3f7f320b19f6431487b8b2fb1d74 \ 8 file://third_party/Simple-web-server/repo/LICENSE;md5=091ac9fd29d87ad1ae5bf765d95278b0 \
9 file://third_party/cJSON/repo/LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0 \ 9 file://third_party/cJSON/repo/LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0 \
10 file://third_party/http-parser/repo/LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778 \ 10 file://third_party/http-parser/repo/LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778 \
11 file://third_party/openthread/repo/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \ 11 file://third_party/openthread/repo/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \
12 " 12 "
13DEPENDS = "autoconf-archive dbus readline avahi jsoncpp boost libnetfilter-queue" 13DEPENDS = "autoconf-archive dbus readline avahi jsoncpp boost libnetfilter-queue protobuf protobuf-native"
14SRCREV = "ad6822257ffddbac295db97186e4ab449a2ed32a" 14SRCREV = "4e937939ba6ce146fd98537cb63e0f4c41c8dbe1"
15PV = "0.3.0+git" 15PV = "0.3.0+git"
16 16
17SRC_URI = "gitsm://github.com/openthread/ot-br-posix.git;protocol=https;branch=main \ 17SRC_URI = "gitsm://github.com/openthread/ot-br-posix.git;protocol=https;branch=main \
@@ -19,7 +19,7 @@ SRC_URI = "gitsm://github.com/openthread/ot-br-posix.git;protocol=https;branch=m
19 file://0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch \ 19 file://0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch \
20 file://0001-bn_mul.h-fix-x86-PIC-inline-ASM-compilation-with-GCC.patch \ 20 file://0001-bn_mul.h-fix-x86-PIC-inline-ASM-compilation-with-GCC.patch \
21 file://mbedtls.patch \ 21 file://mbedtls.patch \
22 file://unused_var.patch \ 22 file://default-cxx-std.patch \
23 " 23 "
24 24
25S = "${WORKDIR}/git" 25S = "${WORKDIR}/git"