8251d8c255
Currently, grpc depends on the full host-grpc, which in turn depends on host versions of many other libraries. One of these, host-libabseil-cpp, also requires a host gcc 4.9 or larger, a dependency which is not met on CentOS 7. But in fact, the target grpc only needs the 'grpc_cpp_plugin' binary from host-grpc. And that binary does not depend on host-libabseil-cpp or other libraries, only on host-protobuf. Given the above, simplify the grpc/host-grpc situation. - Add a patch to the (host-)grpc CMakeLists.txt file to add an option to only build grpc_cpp_plugin. - Update grpc.mk and Config.in to remove the unnecessary dependencies, and change the host-grpc configure options to make cmake happy. The advantages of these changes are: - making grpc available to older hosts with gcc < 4.8, like CentOS 7 - significantly reducing the build time of host-grpc and its dependencies The patch was proposed upstream but not accepted with below rationale. Perhaps input from others can help in persuading upstream in a future attempt. 'What you're doing sounds like quite a narrow use case. But we simply cannot provide a cmake option for every possible scenario in the world. Introducing a new cmake option isn't for free and requires careful design and maintenance.' Nevertheless, given the benefits in terms of build time and dependency reduction, it makes sense to apply this patch in spite of the disadvantage of a local non-upstreamed patch. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> [Arnout: propagate removed dependency to collectd] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
config BR2_PACKAGE_GRPC
|
|
bool "grpc"
|
|
depends on BR2_INSTALL_LIBSTDCPP
|
|
depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf, re2
|
|
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
|
|
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # protobuf, re2, libabseil-cpp
|
|
depends on !BR2_STATIC_LIBS # protobuf, libabseil-cpp
|
|
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
|
|
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
|
|
select BR2_PACKAGE_C_ARES
|
|
select BR2_PACKAGE_LIBABSEIL_CPP
|
|
select BR2_PACKAGE_OPENSSL
|
|
select BR2_PACKAGE_PROTOBUF
|
|
select BR2_PACKAGE_RE2
|
|
select BR2_PACKAGE_ZLIB
|
|
help
|
|
A language-neutral, platform-neutral, open source, remote
|
|
procedure call (RPC) system initially developed at Google.
|
|
|
|
http://github.com/grpc/grpc
|
|
|
|
comment "grpc needs a toolchain w/ C++, threads, dynamic library, gcc >= 4.9"
|
|
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
|
|
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
|
|
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
|
|
|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
|
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
|