diff options
| -rw-r--r-- | meta-oe/recipes-devtools/grpc/grpc/0001-cmake-Link-with-libatomic-on-rv32-rv64.patch | 32 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/grpc/grpc_1.45.2.bb | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-Link-with-libatomic-on-rv32-rv64.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-Link-with-libatomic-on-rv32-rv64.patch new file mode 100644 index 0000000000..c2afd4a92e --- /dev/null +++ b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-Link-with-libatomic-on-rv32-rv64.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 592a4aaba20818bcff9a1448c34b09aff9e0d2e9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 19 Apr 2022 16:07:19 -0700 | ||
| 4 | Subject: [PATCH] cmake: Link with libatomic on rv32/rv64 | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | riscv64-yoe-linux-musl/12.0.1/ld: libgrpc.so.23.0.0: undefined reference to `__atomic_exchange_1' | ||
| 8 | | collect2: error: ld returned 1 exit status | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | CMakeLists.txt | 3 +++ | ||
| 14 | 1 file changed, 3 insertions(+) | ||
| 15 | |||
| 16 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 17 | index a8fd3bf37b3..9f5b242683d 100644 | ||
| 18 | --- a/CMakeLists.txt | ||
| 19 | +++ b/CMakeLists.txt | ||
| 20 | @@ -303,6 +303,9 @@ if(UNIX) | ||
| 21 | if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) | ||
| 22 | set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} rt) | ||
| 23 | endif() | ||
| 24 | + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv32") | ||
| 25 | + set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} atomic) | ||
| 26 | + endif() | ||
| 27 | endif() | ||
| 28 | |||
| 29 | # configure ccache if requested | ||
| 30 | -- | ||
| 31 | 2.36.0 | ||
| 32 | |||
diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.45.2.bb b/meta-oe/recipes-devtools/grpc/grpc_1.45.2.bb index 48d0f58e20..c2f952fc64 100644 --- a/meta-oe/recipes-devtools/grpc/grpc_1.45.2.bb +++ b/meta-oe/recipes-devtools/grpc/grpc_1.45.2.bb | |||
| @@ -25,6 +25,7 @@ BRANCH = "v1.45.x" | |||
| 25 | SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ | 25 | SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ |
| 26 | file://0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch \ | 26 | file://0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch \ |
| 27 | file://0001-cmake-add-separate-export-for-plugin-targets.patch \ | 27 | file://0001-cmake-add-separate-export-for-plugin-targets.patch \ |
| 28 | file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ | ||
| 28 | " | 29 | " |
| 29 | # Fixes build with older compilers 4.8 especially on ubuntu 14.04 | 30 | # Fixes build with older compilers 4.8 especially on ubuntu 14.04 |
| 30 | CXXFLAGS:append:class-native = " -Wl,--no-as-needed" | 31 | CXXFLAGS:append:class-native = " -Wl,--no-as-needed" |
