Config.in 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # See src/google/protobuf/stubs/platform_macros.h for supported archs.
  2. #
  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
  6. # 4.8.
  7. #
  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.
  11. #
  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.
  15. #
  16. # host-protobuf only builds on certain architectures
  17. config BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
  18. bool
  19. default y if BR2_HOSTARCH = "aarch64"
  20. default y if BR2_HOSTARCH = "arm"
  21. default y if BR2_HOSTARCH = "mips"
  22. default y if BR2_HOSTARCH = "mipsel"
  23. default y if BR2_HOSTARCH = "powerpc"
  24. default y if BR2_HOSTARCH = "powerpc64"
  25. default y if BR2_HOSTARCH = "powerpc64le"
  26. default y if BR2_HOSTARCH = "sparc"
  27. default y if BR2_HOSTARCH = "sparc64"
  28. default y if BR2_HOSTARCH = "x86"
  29. default y if BR2_HOSTARCH = "x86_64"
  30. config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
  31. bool
  32. default y if BR2_arm
  33. default y if BR2_i386
  34. default y if BR2_mipsel
  35. default y if BR2_x86_64
  36. default y if BR2_sparc64
  37. default y if BR2_TOOLCHAIN_HAS_ATOMIC
  38. depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
  39. depends on BR2_USE_MMU # fork()
  40. config BR2_PACKAGE_PROTOBUF
  41. bool "protobuf"
  42. depends on BR2_INSTALL_LIBSTDCPP
  43. depends on BR2_TOOLCHAIN_HAS_THREADS
  44. depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
  45. depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
  46. depends on !BR2_STATIC_LIBS
  47. help
  48. Protocol buffers are Google's language-neutral,
  49. platform-neutral, extensible mechanism for serializing
  50. structured data.
  51. https://developers.google.com/protocol-buffers
  52. comment "protobuf needs a toolchain w/ C++, threads, dynamic library, gcc >= 4.8"
  53. depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
  54. || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
  55. depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS