Skip to contentSkip to conversation

c-ares: enable the host variant

PATCH New Mark Fine 1 participant 2 messages Sep 19, 2018

lore
Share & tools
lore

Mark Fine

author
#0 lore raw

PATCH 1/2 c-ares: enable the host variant

gRPC needs a c-ares library for the plugins to compile against. Allow c-ares to be compiled as a host tool.

---
 package/c-ares/c-ares.mk | 1 +
 1 file changed, 1 insertion(+)
package/c-ares/c-ares.mk +1 -0
index 67254244a1..76e9687b37 100644
@@ -15,3 +15,4 @@ C_ARES_LICENSE = MIT
 C_ARES_LICENSE_FILES = ares_mkquery.c
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.14.3 (Apple Git-98)
author
#1 lore raw

PATCH 2/2 grpc: new package

Add the gRPC package from Google's gRPC github repo. Build and install the C and C++ libraries on the target installation.

---
 package/Config.in                                  |  1 +
 ...01-Update-HOST-flags-with-passed-in-flags.patch | 36 +++++++++++
 package/grpc/Config.in                             | 28 ++++++++
 package/grpc/grpc.hash                             |  2 +
 package/grpc/grpc.mk                               | 74 ++++++++++++++++++++++
 5 files changed, 141 insertions(+)
 create mode 100644 package/grpc/0001-Update-HOST-flags-with-passed-in-flags.patch
 create mode 100644 package/grpc/Config.in
 create mode 100644 package/grpc/grpc.hash
 create mode 100644 package/grpc/grpc.mk
package/Config.in +1 -0
index c04645a30b..1690c77929 100644
@@ -1452,6 +1452,7 @@ menu "Networking"
 	source "package/freeradius-client/Config.in"
 	source "package/geoip/Config.in"
 	source "package/glib-networking/Config.in"
+	source "package/grpc/Config.in"
 	source "package/gssdp/Config.in"
 	source "package/gupnp/Config.in"
 	source "package/gupnp-av/Config.in"
package/grpc/0001-Update-HOST-flags-with-passed-in-flags.patch new file +36 -0
new file mode 100644
index 0000000000..5207c471b4
@@ -0,0 +1,36 @@
+From 6b84168130b8ac4322aa612f7ef6aa726d085054 Mon Sep 17 00:00:00 2001
+From: Mark Fine <[email protected]>
+Date: Wed, 19 Sep 2018 13:47:52 -0700
+Subject: [PATCH 1/1] Update HOST flags with passed in flags.
+
+To better support cross compilation, update HOST flags with passed in flags.
+
+Signed-off-by: Mark Fine <[email protected]>
+---
+ Makefile | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4e993782ee..8bac7e3f91 100644
+--- a/Makefile
++++ b/Makefile
+@@ -455,11 +455,11 @@ LDFLAGS += $(EXTRA_LDFLAGS)
+ DEFINES += $(EXTRA_DEFINES)
+ LDLIBS += $(EXTRA_LDLIBS)
+ 
+-HOST_CPPFLAGS = $(CPPFLAGS)
+-HOST_CFLAGS = $(CFLAGS)
+-HOST_CXXFLAGS = $(CXXFLAGS)
+-HOST_LDFLAGS = $(LDFLAGS)
+-HOST_LDLIBS = $(LDLIBS)
++HOST_CPPFLAGS += $(CPPFLAGS)
++HOST_CFLAGS += $(CFLAGS)
++HOST_CXXFLAGS += $(CXXFLAGS)
++HOST_LDFLAGS += $(LDFLAGS)
++HOST_LDLIBS += $(LDLIBS)
+ 
+ # These are automatically computed variables.
+ # There shouldn't be any need to change anything from now on.
+-- 
+2.14.3 (Apple Git-98)
+
package/grpc/Config.in new file +28 -0
new file mode 100644
index 0000000000..fbde593cf9
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_GRPC
+	bool "grpc"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+  depends on BR2_USE_WCHAR
+  depends on BR2_USE_MMU
+  depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
+  depends on BR2_HOST_GCC_AT_LEAST_4_8 # C++11
+  depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+  depends on !BR2_STATIC_LIBS
+	select BR2_PACKAGE_C_ARES
+	select BR2_PACKAGE_GFLAGS
+	select BR2_PACKAGE_GTEST
+	select BR2_PACKAGE_GTEST_GMOCK
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_PROTOBUF
+	select BR2_PACKAGE_ZLIB
+	help
+	  gRPC is Google's protocol buffer based implementation of a
+	  remote procedure call protocol.
+
+	  http://www.grpc.io
+
+comment "grpc needs a toolchain w/ C++, threads, dynamic library, host and target gcc >= 4.8"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
+    || BR2_STATIC_LIBS || !BR2_HOST_GCC_AT_LEAST_4_8 \
+    || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR || !BR2_USE_MMU
+	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
package/grpc/grpc.hash new file +2 -0
new file mode 100644
index 0000000000..a3b0a4c3a4
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 013cc34f3c51c0f87e059a12ea203087a7a15dca2e453295345e1d02e2b9634b  grpc-v1.15.0.tar.gz
package/grpc/grpc.mk new file +74 -0

74 lines not on this page · raw message

Signature · 1 line
2.14.3 (Apple Git-98)