xref: /OK3568_Linux_fs/buildroot/package/protobuf/Config.in (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# See src/google/protobuf/stubs/platform_macros.h for supported archs.
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# On PowerPC, the __atomic_*() built-ins for 1-byte, 2-byte and 4-byte
4*4882a593Smuzhiyun# types are available built-in. However, the __atomic_*() built-ins for
5*4882a593Smuzhiyun# 8-byte types is implemented via libatomic, so only available since gcc
6*4882a593Smuzhiyun# 4.8.
7*4882a593Smuzhiyun#
8*4882a593Smuzhiyun# In Buildroot, to simplify things, we've decided to simply require gcc
9*4882a593Smuzhiyun# 4.8 as soon as the architectures has at least one __atomic_*() built-in
10*4882a593Smuzhiyun# variant that requires libatomic.
11*4882a593Smuzhiyun#
12*4882a593Smuzhiyun# Since protobuf most likely only uses the 1, 2 and 4-byte variants, it
13*4882a593Smuzhiyun# *could* technically build with gcc 4.7. This is probably not a big deal,
14*4882a593Smuzhiyun# and we can live with requiring gcc 4.8 on PowerPC to build protobuf.
15*4882a593Smuzhiyun#
16*4882a593Smuzhiyun# host-protobuf only builds on certain architectures
17*4882a593Smuzhiyunconfig BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
18*4882a593Smuzhiyun	bool
19*4882a593Smuzhiyun	default y if BR2_arm
20*4882a593Smuzhiyun	default y if BR2_i386
21*4882a593Smuzhiyun	default y if BR2_mipsel
22*4882a593Smuzhiyun	default y if BR2_x86_64
23*4882a593Smuzhiyun	default y if BR2_sparc64
24*4882a593Smuzhiyun	default y if BR2_TOOLCHAIN_HAS_ATOMIC
25*4882a593Smuzhiyun	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
26*4882a593Smuzhiyun	depends on BR2_USE_MMU # fork()
27*4882a593Smuzhiyun	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
28*4882a593Smuzhiyun
29*4882a593Smuzhiyunconfig BR2_PACKAGE_PROTOBUF
30*4882a593Smuzhiyun	bool "protobuf"
31*4882a593Smuzhiyun	depends on BR2_INSTALL_LIBSTDCPP
32*4882a593Smuzhiyun	depends on BR2_TOOLCHAIN_HAS_THREADS
33*4882a593Smuzhiyun	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
34*4882a593Smuzhiyun	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
35*4882a593Smuzhiyun	depends on !BR2_STATIC_LIBS
36*4882a593Smuzhiyun	help
37*4882a593Smuzhiyun	  Protocol buffers are Google's language-neutral,
38*4882a593Smuzhiyun	  platform-neutral, extensible mechanism for serializing
39*4882a593Smuzhiyun	  structured data.
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun	  https://developers.google.com/protocol-buffers
42*4882a593Smuzhiyun
43*4882a593Smuzhiyuncomment "protobuf needs a toolchain w/ C++, threads, dynamic library, gcc >= 4.8"
44*4882a593Smuzhiyun	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
45*4882a593Smuzhiyun		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
46*4882a593Smuzhiyun	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
47