diff options
| author | Khem Raj <raj.khem@gmail.com> | 2019-07-27 00:04:10 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-08-08 10:04:23 -0700 |
| commit | cac734087e3c86a4f788c806bc07417f22bdacb9 (patch) | |
| tree | 7203563596abeee787ec06aa6c1ea094b5f89ed8 | |
| parent | 381508f909a1279a42dfb6e7a12a9da06a752312 (diff) | |
| download | meta-openembedded-cac734087e3c86a4f788c806bc07417f22bdacb9.tar.gz | |
grpc: Update to 1.22.0
Fix build with glibc 2.30
Forward port patches
Add versioiniing to grpcpp_channelz plugin
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch | 32 | ||||
| -rw-r--r-- | meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch | 44 | ||||
| -rw-r--r-- | meta-networking/recipes-devtools/grpc/grpc/0001-Define-gettid-only-for-glibc-2.30.patch | 53 | ||||
| -rw-r--r-- | meta-networking/recipes-devtools/grpc/grpc_1.22.0.bb (renamed from meta-networking/recipes-devtools/grpc/grpc_1.14.1.bb) | 8 |
4 files changed, 86 insertions, 51 deletions
diff --git a/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch index 54e0b99a46..6cad533964 100644 --- a/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch +++ b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | From 6d606f1101c1a172fb6d738d6f1865aa61849e68 Mon Sep 17 00:00:00 2001 | 1 | From 6d606f1101c1a172fb6d738d6f1865aa61849e68 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexey Firago <alexey_firago@mentor.com> | 2 | From: Alexey Firago <alexey_firago@mentor.com> |
| 3 | Date: Fri, 20 Oct 2017 00:04:19 +0300 | 3 | Date: Fri, 20 Oct 2017 00:04:19 +0300 |
| 4 | Subject: [PATCH] CMakeLists.txt: Fix grpc_cpp_plugin path during | 4 | Subject: [PATCH] CMakeLists.txt: Fix grpc_cpp_plugin path during cross-compiling or native build |
| 5 | cross-compiling or native build | ||
| 6 | 5 | ||
| 7 | Signed-off-by: Alexey Firago <alexey_firago@mentor.com> | 6 | Signed-off-by: Alexey Firago <alexey_firago@mentor.com> |
| 8 | Signed-off-by: Hiram Lew <lew@avast.com> | 7 | Signed-off-by: Hiram Lew <lew@avast.com> |
| @@ -12,11 +11,9 @@ Signed-off-by: Jan Kaisrlik <jan.kaisrlik@avast.com> | |||
| 12 | templates/CMakeLists.txt.template | 9 ++++++++- | 11 | templates/CMakeLists.txt.template | 9 ++++++++- |
| 13 | 2 files changed, 16 insertions(+), 2 deletions(-) | 12 | 2 files changed, 16 insertions(+), 2 deletions(-) |
| 14 | 13 | ||
| 15 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 16 | index a59fd81..cd90424 100644 | ||
| 17 | --- a/CMakeLists.txt | 14 | --- a/CMakeLists.txt |
| 18 | +++ b/CMakeLists.txt | 15 | +++ b/CMakeLists.txt |
| 19 | @@ -160,6 +160,13 @@ function(protobuf_generate_grpc_cpp) | 16 | @@ -193,6 +193,13 @@ function(protobuf_generate_grpc_cpp) |
| 20 | return() | 17 | return() |
| 21 | endif() | 18 | endif() |
| 22 | 19 | ||
| @@ -30,20 +27,9 @@ index a59fd81..cd90424 100644 | |||
| 30 | set(_protobuf_include_path -I . -I ${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}) | 27 | set(_protobuf_include_path -I . -I ${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}) |
| 31 | foreach(FIL ${ARGN}) | 28 | foreach(FIL ${ARGN}) |
| 32 | get_filename_component(ABS_FIL ${FIL} ABSOLUTE) | 29 | get_filename_component(ABS_FIL ${FIL} ABSOLUTE) |
| 33 | @@ -177,7 +184,7 @@ function(protobuf_generate_grpc_cpp) | ||
| 34 | COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE} | ||
| 35 | ARGS --grpc_out=generate_mock_code=true:${_gRPC_PROTO_GENS_DIR} | ||
| 36 | --cpp_out=${_gRPC_PROTO_GENS_DIR} | ||
| 37 | - --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin> | ||
| 38 | + --plugin=protoc-gen-grpc=${gRPC_CPP_PLUGIN} | ||
| 39 | ${_protobuf_include_path} | ||
| 40 | ${REL_FIL} | ||
| 41 | DEPENDS ${ABS_FIL} ${_gRPC_PROTOBUF_PROTOC} grpc_cpp_plugin | ||
| 42 | diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template | ||
| 43 | index de13d02..b22bd5c 100644 | ||
| 44 | --- a/templates/CMakeLists.txt.template | 30 | --- a/templates/CMakeLists.txt.template |
| 45 | +++ b/templates/CMakeLists.txt.template | 31 | +++ b/templates/CMakeLists.txt.template |
| 46 | @@ -209,6 +209,13 @@ | 32 | @@ -233,6 +233,13 @@ |
| 47 | return() | 33 | return() |
| 48 | endif() | 34 | endif() |
| 49 | 35 | ||
| @@ -57,15 +43,3 @@ index de13d02..b22bd5c 100644 | |||
| 57 | set(_protobuf_include_path -I . -I <%text>${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}</%text>) | 43 | set(_protobuf_include_path -I . -I <%text>${_gRPC_PROTOBUF_WELLKNOWN_INCLUDE_DIR}</%text>) |
| 58 | foreach(FIL <%text>${ARGN}</%text>) | 44 | foreach(FIL <%text>${ARGN}</%text>) |
| 59 | get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE) | 45 | get_filename_component(ABS_FIL <%text>${FIL}</%text> ABSOLUTE) |
| 60 | @@ -226,7 +233,7 @@ | ||
| 61 | COMMAND <%text>${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}</%text> | ||
| 62 | ARGS --grpc_out=<%text>generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}</%text> | ||
| 63 | --cpp_out=<%text>${_gRPC_PROTO_GENS_DIR}</%text> | ||
| 64 | - --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin> | ||
| 65 | + --plugin=protoc-gen-grpc=${gRPC_CPP_PLUGIN} | ||
| 66 | <%text>${_protobuf_include_path}</%text> | ||
| 67 | <%text>${REL_FIL}</%text> | ||
| 68 | DEPENDS <%text>${ABS_FIL}</%text> <%text>${_gRPC_PROTOBUF_PROTOC}</%text> grpc_cpp_plugin | ||
| 69 | -- | ||
| 70 | 2.7.4 | ||
| 71 | |||
diff --git a/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch index 459dc45a41..3282b5413e 100644 --- a/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch +++ b/meta-networking/recipes-devtools/grpc/grpc/0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch | |||
| @@ -7,16 +7,13 @@ Subject: [PATCH] CMakeLists.txt: Fix libraries installation for Linux | |||
| 7 | 7 | ||
| 8 | Signed-off-by: Alexey Firago <alexey_firago@mentor.com> | 8 | Signed-off-by: Alexey Firago <alexey_firago@mentor.com> |
| 9 | 9 | ||
| 10 | %% original patch: 0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch | ||
| 11 | --- | 10 | --- |
| 12 | CMakeLists.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ | 11 | CMakeLists.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 13 | 1 file changed, 59 insertions(+) | 12 | 1 file changed, 59 insertions(+) |
| 14 | 13 | ||
| 15 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 16 | index a59fd818e3..5066f44a32 100644 | ||
| 17 | --- a/CMakeLists.txt | 14 | --- a/CMakeLists.txt |
| 18 | +++ b/CMakeLists.txt | 15 | +++ b/CMakeLists.txt |
| 19 | @@ -30,6 +30,15 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") | 16 | @@ -30,6 +30,15 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-$ |
| 20 | set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") | 17 | set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") |
| 21 | project(${PACKAGE_NAME} C CXX) | 18 | project(${PACKAGE_NAME} C CXX) |
| 22 | 19 | ||
| @@ -32,7 +29,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 32 | set(gRPC_INSTALL_BINDIR "bin" CACHE STRING "Installation directory for executables") | 29 | set(gRPC_INSTALL_BINDIR "bin" CACHE STRING "Installation directory for executables") |
| 33 | set(gRPC_INSTALL_LIBDIR "lib" CACHE STRING "Installation directory for libraries") | 30 | set(gRPC_INSTALL_LIBDIR "lib" CACHE STRING "Installation directory for libraries") |
| 34 | set(gRPC_INSTALL_INCLUDEDIR "include" CACHE STRING "Installation directory for headers") | 31 | set(gRPC_INSTALL_INCLUDEDIR "include" CACHE STRING "Installation directory for headers") |
| 35 | @@ -702,6 +711,10 @@ if(WIN32 AND MSVC) | 32 | @@ -769,6 +778,10 @@ if(WIN32 AND MSVC) |
| 36 | endif() | 33 | endif() |
| 37 | endif() | 34 | endif() |
| 38 | 35 | ||
| @@ -43,7 +40,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 43 | 40 | ||
| 44 | target_include_directories(address_sorting | 41 | target_include_directories(address_sorting |
| 45 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 42 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 46 | @@ -825,6 +838,10 @@ if(WIN32 AND MSVC) | 43 | @@ -903,6 +916,10 @@ if(WIN32 AND MSVC) |
| 47 | endif() | 44 | endif() |
| 48 | endif() | 45 | endif() |
| 49 | 46 | ||
| @@ -54,7 +51,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 54 | 51 | ||
| 55 | target_include_directories(gpr | 52 | target_include_directories(gpr |
| 56 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 53 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 57 | @@ -1259,6 +1276,10 @@ if(WIN32 AND MSVC) | 54 | @@ -1333,6 +1350,10 @@ if(WIN32 AND MSVC) |
| 58 | endif() | 55 | endif() |
| 59 | endif() | 56 | endif() |
| 60 | 57 | ||
| @@ -65,7 +62,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 65 | 62 | ||
| 66 | target_include_directories(grpc | 63 | target_include_directories(grpc |
| 67 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 64 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 68 | @@ -1633,6 +1654,10 @@ if(WIN32 AND MSVC) | 65 | @@ -1731,6 +1752,10 @@ if(WIN32 AND MSVC) |
| 69 | endif() | 66 | endif() |
| 70 | endif() | 67 | endif() |
| 71 | 68 | ||
| @@ -76,7 +73,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 76 | 73 | ||
| 77 | target_include_directories(grpc_cronet | 74 | target_include_directories(grpc_cronet |
| 78 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 75 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 79 | @@ -2575,6 +2600,10 @@ if(WIN32 AND MSVC) | 76 | @@ -2744,6 +2769,10 @@ if(WIN32 AND MSVC) |
| 80 | endif() | 77 | endif() |
| 81 | endif() | 78 | endif() |
| 82 | 79 | ||
| @@ -87,7 +84,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 87 | 84 | ||
| 88 | target_include_directories(grpc_unsecure | 85 | target_include_directories(grpc_unsecure |
| 89 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 86 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 90 | @@ -2791,6 +2820,10 @@ if(WIN32 AND MSVC) | 87 | @@ -3083,6 +3112,10 @@ if(WIN32 AND MSVC) |
| 91 | endif() | 88 | endif() |
| 92 | endif() | 89 | endif() |
| 93 | 90 | ||
| @@ -98,7 +95,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 98 | 95 | ||
| 99 | target_include_directories(grpc++ | 96 | target_include_directories(grpc++ |
| 100 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 97 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 101 | @@ -3357,6 +3390,10 @@ if(WIN32 AND MSVC) | 98 | @@ -3703,6 +3736,10 @@ if(WIN32 AND MSVC) |
| 102 | endif() | 99 | endif() |
| 103 | endif() | 100 | endif() |
| 104 | 101 | ||
| @@ -109,7 +106,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 109 | 106 | ||
| 110 | target_include_directories(grpc++_cronet | 107 | target_include_directories(grpc++_cronet |
| 111 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 108 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 112 | @@ -3630,6 +3667,11 @@ protobuf_generate_grpc_cpp( | 109 | @@ -4013,6 +4050,11 @@ protobuf_generate_grpc_cpp( |
| 113 | src/proto/grpc/status/status.proto | 110 | src/proto/grpc/status/status.proto |
| 114 | ) | 111 | ) |
| 115 | 112 | ||
| @@ -121,7 +118,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 121 | target_include_directories(grpc++_error_details | 118 | target_include_directories(grpc++_error_details |
| 122 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 119 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 123 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} | 120 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} |
| 124 | @@ -3762,6 +3804,11 @@ protobuf_generate_grpc_cpp( | 121 | @@ -4147,6 +4189,11 @@ protobuf_generate_grpc_cpp( |
| 125 | src/proto/grpc/reflection/v1alpha/reflection.proto | 122 | src/proto/grpc/reflection/v1alpha/reflection.proto |
| 126 | ) | 123 | ) |
| 127 | 124 | ||
| @@ -133,7 +130,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 133 | target_include_directories(grpc++_reflection | 130 | target_include_directories(grpc++_reflection |
| 134 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 131 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 135 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} | 132 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} |
| 136 | @@ -4265,6 +4312,10 @@ if(WIN32 AND MSVC) | 133 | @@ -4704,6 +4751,10 @@ if(WIN32 AND MSVC) |
| 137 | endif() | 134 | endif() |
| 138 | endif() | 135 | endif() |
| 139 | 136 | ||
| @@ -144,7 +141,7 @@ index a59fd818e3..5066f44a32 100644 | |||
| 144 | 141 | ||
| 145 | target_include_directories(grpc++_unsecure | 142 | target_include_directories(grpc++_unsecure |
| 146 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 143 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 147 | @@ -4649,6 +4700,10 @@ if(WIN32 AND MSVC) | 144 | @@ -5124,6 +5175,10 @@ if(WIN32 AND MSVC) |
| 148 | endif() | 145 | endif() |
| 149 | endif() | 146 | endif() |
| 150 | 147 | ||
| @@ -155,7 +152,19 @@ index a59fd818e3..5066f44a32 100644 | |||
| 155 | 152 | ||
| 156 | target_include_directories(grpc_plugin_support | 153 | target_include_directories(grpc_plugin_support |
| 157 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 154 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 158 | @@ -5184,6 +5239,10 @@ if(WIN32 AND MSVC) | 155 | @@ -5190,6 +5245,11 @@ protobuf_generate_grpc_cpp( |
| 156 | src/proto/grpc/channelz/channelz.proto | ||
| 157 | ) | ||
| 158 | |||
| 159 | +if(_gRPC_PLATFORM_LINUX) | ||
| 160 | + set_property(TARGET grpcpp_channelz PROPERTY VERSION ${CPP_VERSION}) | ||
| 161 | + set_property(TARGET grpcpp_channelz PROPERTY SOVERSION ${CPP_VERSION_MAJOR}) | ||
| 162 | +endif() | ||
| 163 | + | ||
| 164 | target_include_directories(grpcpp_channelz | ||
| 165 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
| 166 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} | ||
| 167 | @@ -5728,6 +5788,10 @@ if(WIN32 AND MSVC) | ||
| 159 | endif() | 168 | endif() |
| 160 | endif() | 169 | endif() |
| 161 | 170 | ||
| @@ -166,6 +175,3 @@ index a59fd818e3..5066f44a32 100644 | |||
| 166 | 175 | ||
| 167 | target_include_directories(grpc_csharp_ext | 176 | target_include_directories(grpc_csharp_ext |
| 168 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | 177 | PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| 169 | -- | ||
| 170 | 2.17.1 | ||
| 171 | |||
diff --git a/meta-networking/recipes-devtools/grpc/grpc/0001-Define-gettid-only-for-glibc-2.30.patch b/meta-networking/recipes-devtools/grpc/grpc/0001-Define-gettid-only-for-glibc-2.30.patch new file mode 100644 index 0000000000..c6afff2d23 --- /dev/null +++ b/meta-networking/recipes-devtools/grpc/grpc/0001-Define-gettid-only-for-glibc-2.30.patch | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | From c27261a8bc1e45ff7d7a585c79b2b871d47217e4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 26 Jul 2019 18:56:26 -0700 | ||
| 4 | Subject: [PATCH] Define gettid() only for glibc < 2.30 | ||
| 5 | |||
| 6 | glibc 2.30 has added this API, so let us use that when possible | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | src/core/lib/gpr/log_linux.cc | 4 ++++ | ||
| 12 | src/core/lib/iomgr/ev_epollex_linux.cc | 7 +++++-- | ||
| 13 | 2 files changed, 9 insertions(+), 2 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc | ||
| 16 | index 561276f0c2..25a74864a1 100644 | ||
| 17 | --- a/src/core/lib/gpr/log_linux.cc | ||
| 18 | +++ b/src/core/lib/gpr/log_linux.cc | ||
| 19 | @@ -40,7 +40,11 @@ | ||
| 20 | #include <time.h> | ||
| 21 | #include <unistd.h> | ||
| 22 | |||
| 23 | +#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 29) | ||
| 24 | +#include <unistd.h> | ||
| 25 | +#else | ||
| 26 | static long gettid(void) { return syscall(__NR_gettid); } | ||
| 27 | +#endif | ||
| 28 | |||
| 29 | void gpr_log(const char* file, int line, gpr_log_severity severity, | ||
| 30 | const char* format, ...) { | ||
| 31 | diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc | ||
| 32 | index 08116b3ab5..d3d3025111 100644 | ||
| 33 | --- a/src/core/lib/iomgr/ev_epollex_linux.cc | ||
| 34 | +++ b/src/core/lib/iomgr/ev_epollex_linux.cc | ||
| 35 | @@ -1101,10 +1101,13 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker, | ||
| 36 | gpr_atm_no_barrier_fetch_add(&pollset->worker_count, -1); | ||
| 37 | } | ||
| 38 | |||
| 39 | -#ifndef NDEBUG | ||
| 40 | +#if !defined(DEBUG) | ||
| 41 | +#if defined(__GLIBC__) && (__GLIBC_MINOR__ >= 29) | ||
| 42 | +#include <unistd.h> | ||
| 43 | +#else | ||
| 44 | static long gettid(void) { return syscall(__NR_gettid); } | ||
| 45 | #endif | ||
| 46 | - | ||
| 47 | +#endif | ||
| 48 | /* pollset->mu lock must be held by the caller before calling this. | ||
| 49 | The function pollset_work() may temporarily release the lock (pollset->po.mu) | ||
| 50 | during the course of its execution but it will always re-acquire the lock and | ||
| 51 | -- | ||
| 52 | 2.22.0 | ||
| 53 | |||
diff --git a/meta-networking/recipes-devtools/grpc/grpc_1.14.1.bb b/meta-networking/recipes-devtools/grpc/grpc_1.22.0.bb index 0550866e5b..a80c574cc9 100644 --- a/meta-networking/recipes-devtools/grpc/grpc_1.14.1.bb +++ b/meta-networking/recipes-devtools/grpc/grpc_1.22.0.bb | |||
| @@ -11,12 +11,14 @@ DEPENDS_append_class-target = " googletest grpc-native " | |||
| 11 | DEPENDS_append_class-nativesdk = " grpc-native " | 11 | DEPENDS_append_class-nativesdk = " grpc-native " |
| 12 | 12 | ||
| 13 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
| 14 | SRCREV = "d8020cb6daa87f1a3bb3b0c299bc081c4a3de1e8" | 14 | SRCREV = "08fd59f039c7cf62614ab7741b3f34527af103c7" |
| 15 | BRANCH = "v1.14.x" | 15 | BRANCH = "v1.22.x" |
| 16 | SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;branch=${BRANCH} \ | 16 | SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;branch=${BRANCH} \ |
| 17 | file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \ | 17 | file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \ |
| 18 | " | 18 | " |
| 19 | SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch" | 19 | SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch \ |
| 20 | file://0001-Define-gettid-only-for-glibc-2.30.patch \ | ||
| 21 | " | ||
| 20 | SRC_URI_append_class-nativesdk = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch" | 22 | SRC_URI_append_class-nativesdk = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch" |
| 21 | 23 | ||
| 22 | # Fixes build with older compilers 4.8 especially on ubuntu 14.04 | 24 | # Fixes build with older compilers 4.8 especially on ubuntu 14.04 |
