diff options
| -rw-r--r-- | meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch | 107 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch | 55 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb (renamed from meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb) | 6 |
3 files changed, 110 insertions, 58 deletions
diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch new file mode 100644 index 0000000000..d9cfa009f9 --- /dev/null +++ b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | From 50d54458324c1a19eefb9968e4cb556dbd34b875 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Vyacheslav Yurkov <uvv.mail@gmail.com> | ||
| 3 | Date: Tue, 12 Oct 2021 19:11:40 +0200 | ||
| 4 | Subject: [PATCH] cmake: revert db88fb0ee826e73323e06ac6166ac038ee71f6a | ||
| 5 | (#27626) | ||
| 6 | |||
| 7 | Fix regression introduced by previous commit. Original problem that | ||
| 8 | commit was trying to fix was solved by modification of grpc recipe in | ||
| 9 | meta-openembedded project repository | ||
| 10 | |||
| 11 | Fixes #26857 | ||
| 12 | |||
| 13 | Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> | ||
| 14 | --- | ||
| 15 | CMakeLists.txt | 16 ++++++++-------- | ||
| 16 | templates/CMakeLists.txt.template | 2 -- | ||
| 17 | 2 files changed, 8 insertions(+), 10 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 20 | index 0e8fbdee8b..02cd48bee4 100644 | ||
| 21 | --- a/CMakeLists.txt | ||
| 22 | +++ b/CMakeLists.txt | ||
| 23 | @@ -3828,7 +3828,7 @@ foreach(_hdr | ||
| 24 | endforeach() | ||
| 25 | |||
| 26 | |||
| 27 | -if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) | ||
| 28 | +if(gRPC_INSTALL) | ||
| 29 | install(TARGETS grpc_plugin_support EXPORT gRPCTargets | ||
| 30 | RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} | ||
| 31 | LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} | ||
| 32 | @@ -11679,7 +11679,7 @@ target_link_libraries(grpc_cpp_plugin | ||
| 33 | |||
| 34 | |||
| 35 | |||
| 36 | -if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) | ||
| 37 | +if(gRPC_INSTALL) | ||
| 38 | install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets | ||
| 39 | RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} | ||
| 40 | LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} | ||
| 41 | @@ -11718,7 +11718,7 @@ target_link_libraries(grpc_csharp_plugin | ||
| 42 | |||
| 43 | |||
| 44 | |||
| 45 | -if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) | ||
| 46 | +if(gRPC_INSTALL) | ||
| 47 | install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets | ||
| 48 | RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} | ||
| 49 | LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} | ||
| 50 | @@ -11757,7 +11757,7 @@ target_link_libraries(grpc_node_plugin | ||
| 51 | |||
| 52 | |||
| 53 | |||
| 54 | -if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) | ||
| 55 | +if(gRPC_INSTALL) | ||
| 56 | install(TARGETS grpc_node_plugin EXPORT gRPCTargets | ||
| 57 | RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} | ||
| 58 | LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} | ||
| 59 | @@ -11796,7 +11796,7 @@ target_link_libraries(grpc_objective_c_plugin | ||
| 60 | |||
| 61 | |||
| 62 | |||
| 63 | -if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) | ||
| 64 | +if(gRPC_INSTALL) | ||
| 65 | install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets | ||
| 66 | RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} | ||
| 67 | LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} | ||
| 68 | @@ -11835,7 +11835,7 @@ target_link_libraries(grpc_php_plugin | ||
| 69 | |||
| 70 | |||
| 71 | |||
| 72 | -if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) | ||
| 73 | +if(gRPC_INSTALL) | ||
| 74 | install(TARGETS grpc_php_plugin EXPORT gRPCTargets | ||
| 75 | RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} | ||
| 76 | LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} | ||
| 77 | @@ -11874,7 +11874,7 @@ target_link_libraries(grpc_python_plugin | ||
| 78 | |||
| 79 | |||
| 80 | |||
| 81 | -if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) | ||
| 82 | +if(gRPC_INSTALL) | ||
| 83 | install(TARGETS grpc_python_plugin EXPORT gRPCTargets | ||
| 84 | RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} | ||
| 85 | LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} | ||
| 86 | @@ -11913,7 +11913,7 @@ target_link_libraries(grpc_ruby_plugin | ||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | -if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) | ||
| 91 | +if(gRPC_INSTALL) | ||
| 92 | install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets | ||
| 93 | RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} | ||
| 94 | LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} | ||
| 95 | diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template | ||
| 96 | index 0f0883e09c..b9a5bc4144 100644 | ||
| 97 | --- a/templates/CMakeLists.txt.template | ||
| 98 | +++ b/templates/CMakeLists.txt.template | ||
| 99 | @@ -695,8 +695,6 @@ | ||
| 100 | # grpcpp_channelz doesn't build with protobuf-lite, so no install required | ||
| 101 | # See https://github.com/grpc/grpc/issues/22826 | ||
| 102 | if(gRPC_INSTALL AND NOT gRPC_USE_PROTO_LITE) | ||
| 103 | - % elif tgt.build == 'protoc': | ||
| 104 | - if(gRPC_INSTALL AND NOT CMAKE_CROSSCOMPILING) | ||
| 105 | % else: | ||
| 106 | if(gRPC_INSTALL) | ||
| 107 | % endif | ||
diff --git a/meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch b/meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch deleted file mode 100644 index ce660f5cc1..0000000000 --- a/meta-oe/recipes-devtools/grpc/grpc/0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch +++ /dev/null | |||
| @@ -1,55 +0,0 @@ | |||
| 1 | From 83a66aa45d63d79cbccc47a65998723a7d2d7637 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Thomas De Schampheleire <patrickdepinguin@gmail.com> | ||
| 3 | Date: Wed, 23 Jun 2021 14:22:59 +0200 | ||
| 4 | Subject: [PATCH] cmake: fix cross-compilation with | ||
| 5 | gRPC_BUILD_GRPC_CPP_PLUGIN=OFF (#26292) | ||
| 6 | |||
| 7 | * cmake: fix cross-compilation with gRPC_BUILD_GRPC_CPP_PLUGIN=OFF | ||
| 8 | |||
| 9 | When cross-compiling gRPC, a _native_ version of 'grpc_cpp_plugin' is | ||
| 10 | searched in the environment. For most use cases, a _cross_ version of this | ||
| 11 | file is not needed and gRPC_BUILD_GRPC_CPP_PLUGIN can be set to OFF. | ||
| 12 | |||
| 13 | However, when cross-building with -DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF, there | ||
| 14 | are some build errors, for example: | ||
| 15 | |||
| 16 | make[3]: *** No rule to make target 'grpc_cpp_plugin', needed by 'gens/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc'. Stop. | ||
| 17 | |||
| 18 | This is because there is still a hard dependency on 'grpc_cpp_plugin' for | ||
| 19 | these targets, not taking into account the cross-compilation case. | ||
| 20 | |||
| 21 | Fix by depending on the variable gRPC_CPP_PLUGIN, which is set correctly for | ||
| 22 | either cross or native case. | ||
| 23 | |||
| 24 | * regenerate projects | ||
| 25 | --- | ||
| 26 | CMakeLists.txt | 2 +- | ||
| 27 | templates/CMakeLists.txt.template | 2 +- | ||
| 28 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 29 | |||
| 30 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 31 | index eeaf0b43c7..c60a64917a 100644 | ||
| 32 | --- a/CMakeLists.txt | ||
| 33 | +++ b/CMakeLists.txt | ||
| 34 | @@ -319,7 +319,7 @@ function(protobuf_generate_grpc_cpp) | ||
| 35 | --plugin=protoc-gen-grpc=${_gRPC_CPP_PLUGIN} | ||
| 36 | ${_protobuf_include_path} | ||
| 37 | ${REL_FIL} | ||
| 38 | - DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin | ||
| 39 | + DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} ${_gRPC_CPP_PLUGIN} | ||
| 40 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
| 41 | COMMENT "Running gRPC C++ protocol buffer compiler on ${FIL}" | ||
| 42 | VERBATIM) | ||
| 43 | diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template | ||
| 44 | index cef2534cbd..f0afe5108e 100644 | ||
| 45 | --- a/templates/CMakeLists.txt.template | ||
| 46 | +++ b/templates/CMakeLists.txt.template | ||
| 47 | @@ -389,7 +389,7 @@ | ||
| 48 | --plugin=protoc-gen-grpc=<%text>${_gRPC_CPP_PLUGIN}</%text> | ||
| 49 | <%text>${_protobuf_include_path}</%text> | ||
| 50 | <%text>${REL_FIL}</%text> | ||
| 51 | - DEPENDS <%text>${ABS_FIL}</%text> <%text>${_gRPC_PROTOBUF_PROTOC}</%text> grpc_cpp_plugin | ||
| 52 | + DEPENDS <%text>${ABS_FIL}</%text> <%text>${_gRPC_PROTOBUF_PROTOC}</%text> <%text>${_gRPC_CPP_PLUGIN}</%text> | ||
| 53 | WORKING_DIRECTORY <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text> | ||
| 54 | COMMENT "Running gRPC C++ protocol buffer compiler on <%text>${FIL}</%text>" | ||
| 55 | VERBATIM) | ||
diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb b/meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb index dfb44b819f..3385e2ada6 100644 --- a/meta-oe/recipes-devtools/grpc/grpc_1.38.1.bb +++ b/meta-oe/recipes-devtools/grpc/grpc_1.41.0.bb | |||
| @@ -20,10 +20,10 @@ RDEPENDS:${PN}-dev:class_native += "${PN}-compiler" | |||
| 20 | # RDEPENDS:${PN}-dev += "${PN}-compiler" | 20 | # RDEPENDS:${PN}-dev += "${PN}-compiler" |
| 21 | 21 | ||
| 22 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
| 23 | SRCREV_grpc = "96b73272eadc01afb5fb45b92b408c47e4387274" | 23 | SRCREV_grpc = "fc662b7964384b701af5bd3ce6994d2180080eb4" |
| 24 | BRANCH = "v1.38.x" | 24 | BRANCH = "v1.41.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://0002-cmake-fix-cross-compilation-with-gRPC_BUILD_GRPC_CPP.patch \ | 26 | file://0001-cmake-revert-db88fb0ee826e73323e06ac6166ac038ee71f6a.patch \ |
| 27 | " | 27 | " |
| 28 | # Fixes build with older compilers 4.8 especially on ubuntu 14.04 | 28 | # Fixes build with older compilers 4.8 especially on ubuntu 14.04 |
| 29 | CXXFLAGS:append:class-native = " -Wl,--no-as-needed" | 29 | CXXFLAGS:append:class-native = " -Wl,--no-as-needed" |
