1 # See src/google/protobuf/stubs/platform_macros.h for supported archs.
3 # On PowerPC, the __atomic_*() built-ins for 1-byte, 2-byte and 4-byte
4 # types are available built-in. However, the __atomic_*() built-ins for
5 # 8-byte types is implemented via libatomic, so only available since gcc
8 # In Buildroot, to simplify things, we've decided to simply require gcc
9 # 4.8 as soon as the architectures has at least one __atomic_*() built-in
10 # variant that requires libatomic.
12 # Since protobuf most likely only uses the 1, 2 and 4-byte variants, it
13 # *could* technically build with gcc 4.7. This is probably not a big deal,
14 # and we can live with requiring gcc 4.8 on PowerPC to build protobuf.
16 # The SPARC64 build fails due to a missing definition of Atomic64. This
17 # has been fixed on the master branch but the build still breaks due to
18 # undefined references to internal NoBarrier_Atomic*() functions.
20 # host-protobuf only builds on certain architectures
21 config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
25 default y if BR2_mipsel
26 default y if BR2_x86_64
27 default y if BR2_TOOLCHAIN_HAS_ATOMIC
28 depends on !BR2_sparc64 # missing definition of Atomic64
29 depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
30 depends on BR2_USE_MMU # fork()
32 config BR2_PACKAGE_PROTOBUF
34 depends on BR2_INSTALL_LIBSTDCPP
35 depends on BR2_TOOLCHAIN_HAS_THREADS
36 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
37 depends on !BR2_STATIC_LIBS
39 Protocol buffers are Google's language-neutral, platform-neutral,
40 extensible mechanism for serializing structured data.
42 https://developers.google.com/protocol-buffers
44 comment "protobuf needs a toolchain w/ C++, threads, dynamic library"
45 depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
47 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS