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