![Romain Naour](/assets/img/avatar_default.png)
Even with an upstream patch from protobuf v3.3 [1], the build fail with another issue:
In file included from google/protobuf/dynamic_message.cc:80:
./google/protobuf/map_field.h: In member function 'void google::protobuf::internal::MapField<Key, T, key_wire_type, value_wire_type, default_enum_value>::Swap(google::protobuf::internal::MapFieldLite<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>*)':
./google/protobuf/map_field.h:139: error: object missing in reference to 'google::protobuf::internal::MapFieldBase::repeated_field_'
./google/protobuf/map_field_inl.h:342: error: from this location
./google/protobuf/map_field.h:150: error: object missing in reference to 'google::protobuf::internal::MapFieldBase::state_'
./google/protobuf/map_field_inl.h:344: error: from this location
Add a dependency on gcc >= 4.5.
[1] a83ac8663f
Fixes:
http://autobuild.buildroot.org/results/77d/77dbb6bbbc0ea9e9bcdd22b10011ef9728c20d54
http://autobuild.buildroot.org/results/21f/21f5e1ea4f37e1d174604d6da78c0e916c89f1e3
http://autobuild.buildroot.org/results/24e/24e880086c87d40b5d79a90d805acc75b33d484c
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Mario J. Rugiero <mrugiero@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
47 lines
1.8 KiB
Plaintext
47 lines
1.8 KiB
Plaintext
# See src/google/protobuf/stubs/platform_macros.h for supported archs.
|
|
#
|
|
# On PowerPC, the __atomic_*() built-ins for 1-byte, 2-byte and 4-byte
|
|
# types are available built-in. However, the __atomic_*() built-ins for
|
|
# 8-byte types is implemented via libatomic, so only available since gcc
|
|
# 4.8.
|
|
#
|
|
# In Buildroot, to simplify things, we've decided to simply require gcc
|
|
# 4.8 as soon as the architectures has at least one __atomic_*() built-in
|
|
# variant that requires libatomic.
|
|
#
|
|
# Since protobuf most likely only uses the 1, 2 and 4-byte variants, it
|
|
# *could* technically build with gcc 4.7. This is probably not a big deal,
|
|
# and we can live with requiring gcc 4.8 on PowerPC to build protobuf.
|
|
#
|
|
# host-protobuf only builds on certain architectures
|
|
config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
|
|
bool
|
|
default y if BR2_arm
|
|
default y if BR2_i386
|
|
default y if BR2_mipsel
|
|
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_USE_MMU # fork()
|
|
|
|
config BR2_PACKAGE_PROTOBUF
|
|
bool "protobuf"
|
|
depends on BR2_INSTALL_LIBSTDCPP
|
|
depends on BR2_TOOLCHAIN_HAS_THREADS
|
|
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
|
|
depends on BR2_HOST_GCC_AT_LEAST_4_5
|
|
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
|
|
depends on !BR2_STATIC_LIBS
|
|
help
|
|
Protocol buffers are Google's language-neutral, platform-neutral,
|
|
extensible mechanism for serializing structured data.
|
|
|
|
https://developers.google.com/protocol-buffers
|
|
|
|
comment "protobuf needs a toolchain w/ C++, threads, dynamic library, host and target gcc >= 4.5"
|
|
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
|
|
|| BR2_STATIC_LIBS || !BR2_HOST_GCC_AT_LEAST_4_5 \
|
|
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
|
|
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
|