Skip to contentSkip to conversation

package/protobuf: add additional supported host architectures

PATCH Applied James Hilliard 2 participants 2 messages Apr 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/protobuf: add additional supported host architectures

Move supported host architectures under BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS and propagate the reverse dependency.

Add additional supported host architectures based on current src/google/protobuf/stubs/platform_macros.h

---
 package/collectd/Config.in         |  6 +++---
 package/kismet/Config.in           |  4 ++--
 package/protobuf-c/Config.in       |  4 ++--
 package/protobuf/Config.in         | 16 +++++++++++++++-
 package/python-protobuf/Config.in  |  2 +-
 package/riemann-c-client/Config.in |  4 ++--
 6 files changed, 25 insertions(+), 11 deletions(-)
package/collectd/Config.in +3 -3
index 67413ffde0..43eef3bf66 100644
@@ -725,7 +725,7 @@ config BR2_PACKAGE_COLLECTD_RIEMANN
 	bool "riemann"
 	# riemann-c-client -> protobuf-c
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
 	select BR2_PACKAGE_RIEMANN_C_CLIENT
 	select BR2_PACKAGE_LIBTOOL
 	help
@@ -759,7 +759,7 @@ config BR2_PACKAGE_COLLECTD_WRITELOG
 config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS
 	bool "write_prometheus"
 	depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf-c
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
 	select BR2_PACKAGE_LIBMICROHTTPD
 	select BR2_PACKAGE_PROTOBUF_C
 	help
@@ -768,7 +768,7 @@ config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS
 
 comment "write_prometheus needs a toolchain w/ C++"
 	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
 
 config BR2_PACKAGE_COLLECTD_WRITEREDIS
 	bool "write_redis"
package/kismet/Config.in +2 -2
index 961d5f230e..7bde6c92af 100644
@@ -3,14 +3,14 @@ comment "kismet needs a toolchain w/ threads, C++, gcc >= 5"
 	depends on !BR2_INSTALL_LIBSTDCPP || \
 		!BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
 
 config BR2_PACKAGE_KISMET
 	bool "kismet"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf-c
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++14
 	select BR2_PACKAGE_LIBPCAP
 	select BR2_PACKAGE_PROTOBUF_C
package/protobuf-c/Config.in +2 -2
index a32e6cd9e8..d96cd7b382 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_PROTOBUF_C
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	# host-protobuf only builds on certain architectures
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
 	help
 	  Code generator and runtime libraries to use Protocol Buffers
 	  from pure C (not C++).
@@ -12,4 +12,4 @@ config BR2_PACKAGE_PROTOBUF_C
 
 comment "protobuf-c needs a toolchain w/ C++, threads"
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
package/protobuf/Config.in +15 -1
index 46c820b9cf..47e987fa2b 100644
@@ -14,6 +14,20 @@
 # and we can live with requiring gcc 4.8 on PowerPC to build protobuf.
 #
 # host-protobuf only builds on certain architectures
+config BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
+	bool
+	default y if BR2_HOSTARCH = "aarch64"
+	default y if BR2_HOSTARCH = "arm"
+	default y if BR2_HOSTARCH = "mips"
+	default y if BR2_HOSTARCH = "mipsel"
+	default y if BR2_HOSTARCH = "powerpc"
+	default y if BR2_HOSTARCH = "powerpc64"
+	default y if BR2_HOSTARCH = "powerpc64le"
+	default y if BR2_HOSTARCH = "sparc"
+	default y if BR2_HOSTARCH = "sparc64"
+	default y if BR2_HOSTARCH = "x86"
+	default y if BR2_HOSTARCH = "x86_64"
+
 config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
 	bool
 	default y if BR2_arm
@@ -22,7 +36,7 @@ config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
 	default y if BR2_x86_64
 	default y if BR2_sparc64
 	default y if BR2_TOOLCHAIN_HAS_ATOMIC
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
 	depends on BR2_USE_MMU # fork()
 
 config BR2_PACKAGE_PROTOBUF
package/python-protobuf/Config.in +1 -1
index 1af82112b4..7de463520d 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_PYTHON_PROTOBUF
 	bool "python-protobuf"
 	# host-protobuf only builds on certain architectures
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
 	select BR2_PACKAGE_PYTHON_SIX # runtime
 	help
 	  Python implementation of the Google Protocol Buffers.
package/riemann-c-client/Config.in +2 -2
index e9982b2fb0..6c3c35caf8 100644
@@ -2,7 +2,7 @@ config BR2_PACKAGE_RIEMANN_C_CLIENT
 	bool "riemann-c-client"
 	depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
 	depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf-c
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf-c
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
 	select BR2_PACKAGE_PROTOBUF_C
 	help
 	  Riemann-c-client is a C client library for the Riemann
@@ -14,4 +14,4 @@ config BR2_PACKAGE_RIEMANN_C_CLIENT
 
 comment "riemann-c-client needs a toolchain w/ C++, threads"
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 8 lines · James Hilliard

Move supported host architectures under BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS and propagate the reverse dependency.

Add additional supported host architectures based on current src/google/protobuf/stubs/platform_macros.h

Applied to master, thanks.

Regards,
Arnout

Quoted 141 lines
---
  package/collectd/Config.in         |  6 +++---
  package/kismet/Config.in           |  4 ++--
  package/protobuf-c/Config.in       |  4 ++--
  package/protobuf/Config.in         | 16 +++++++++++++++-
  package/python-protobuf/Config.in  |  2 +-
  package/riemann-c-client/Config.in |  4 ++--
  6 files changed, 25 insertions(+), 11 deletions(-)
package/collectd/Config.in +3 -3
index 67413ffde0..43eef3bf66 100644
@@ -725,7 +725,7 @@ config BR2_PACKAGE_COLLECTD_RIEMANN
  	bool "riemann"
  	# riemann-c-client -> protobuf-c
  	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
  	select BR2_PACKAGE_RIEMANN_C_CLIENT
  	select BR2_PACKAGE_LIBTOOL
  	help
@@ -759,7 +759,7 @@ config BR2_PACKAGE_COLLECTD_WRITELOG
  config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS
  	bool "write_prometheus"
  	depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf-c
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
  	select BR2_PACKAGE_LIBMICROHTTPD
  	select BR2_PACKAGE_PROTOBUF_C
  	help
@@ -768,7 +768,7 @@ config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS
 
  comment "write_prometheus needs a toolchain w/ C++"
  	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
 
  config BR2_PACKAGE_COLLECTD_WRITEREDIS
  	bool "write_redis"
package/kismet/Config.in +2 -2
index 961d5f230e..7bde6c92af 100644
@@ -3,14 +3,14 @@ comment "kismet needs a toolchain w/ threads, C++, gcc >= 5"
  	depends on !BR2_INSTALL_LIBSTDCPP || \
  		!BR2_TOOLCHAIN_HAS_THREADS || \
  		!BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
 
  config BR2_PACKAGE_KISMET
  	bool "kismet"
  	depends on BR2_INSTALL_LIBSTDCPP
  	depends on BR2_TOOLCHAIN_HAS_THREADS
  	depends on BR2_USE_MMU # fork()
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf-c
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # C++14
  	select BR2_PACKAGE_LIBPCAP
  	select BR2_PACKAGE_PROTOBUF_C
package/protobuf-c/Config.in +2 -2
index a32e6cd9e8..d96cd7b382 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_PROTOBUF_C
  	depends on BR2_INSTALL_LIBSTDCPP
  	depends on BR2_TOOLCHAIN_HAS_THREADS
  	# host-protobuf only builds on certain architectures
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
  	help
  	  Code generator and runtime libraries to use Protocol Buffers
  	  from pure C (not C++).
@@ -12,4 +12,4 @@ config BR2_PACKAGE_PROTOBUF_C
 
  comment "protobuf-c needs a toolchain w/ C++, threads"
  	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
package/protobuf/Config.in +15 -1
index 46c820b9cf..47e987fa2b 100644
@@ -14,6 +14,20 @@
  # and we can live with requiring gcc 4.8 on PowerPC to build protobuf.
  #
  # host-protobuf only builds on certain architectures
+config BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
+	bool
+	default y if BR2_HOSTARCH = "aarch64"
+	default y if BR2_HOSTARCH = "arm"
+	default y if BR2_HOSTARCH = "mips"
+	default y if BR2_HOSTARCH = "mipsel"
+	default y if BR2_HOSTARCH = "powerpc"
+	default y if BR2_HOSTARCH = "powerpc64"
+	default y if BR2_HOSTARCH = "powerpc64le"
+	default y if BR2_HOSTARCH = "sparc"
+	default y if BR2_HOSTARCH = "sparc64"
+	default y if BR2_HOSTARCH = "x86"
+	default y if BR2_HOSTARCH = "x86_64"
+
  config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
  	bool
  	default y if BR2_arm
@@ -22,7 +36,7 @@ config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
  	default y if BR2_x86_64
  	default y if BR2_sparc64
  	default y if BR2_TOOLCHAIN_HAS_ATOMIC
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
  	depends on BR2_USE_MMU # fork()
 
  config BR2_PACKAGE_PROTOBUF
package/python-protobuf/Config.in +1 -1
index 1af82112b4..7de463520d 100644
@@ -1,7 +1,7 @@
  config BR2_PACKAGE_PYTHON_PROTOBUF
  	bool "python-protobuf"
  	# host-protobuf only builds on certain architectures
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
  	select BR2_PACKAGE_PYTHON_SIX # runtime
  	help
  	  Python implementation of the Google Protocol Buffers.
package/riemann-c-client/Config.in +1 -1
index e9982b2fb0..6c3c35caf8 100644
@@ -2,7 +2,7 @@ config BR2_PACKAGE_RIEMANN_C_CLIENT
  	bool "riemann-c-client"
  	depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
  	depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf-c
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf-c
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
  	select BR2_PACKAGE_PROTOBUF_C
  	help
  	  Riemann-c-client is a C client library for the Riemann

package/riemann-c-client/Config.in config BR2_PACKAGE_RIEMANN_C_CLIENT · line 17

Quoted 5 lines
package/riemann-c-client/Config.in +1 -1
@@ -14,4 +14,4 @@ config BR2_PACKAGE_RIEMANN_C_CLIENT
 
  comment "riemann-c-client needs a toolchain w/ C++, threads"
  	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot