glog: fix atomic built-in problem

glog can optionally use atomic __sync built-ins. However, its
configure script only checks for the availability of the 4-byte
variant, but the code also uses the 1-byte variant. While this works
on most architectures, it does not on architectures that implement
only the 4-byte variant, such as Microblaze. So if the architecture
does not implement the 1-byte variant, we hint the configure script
that atomic built-ins should not be used.

Fixes:

  http://autobuild.buildroot.org/results/bedebd594c283adf39374c9a9f44432e5d6cbff7/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
Thomas Petazzoni 2016-02-02 16:31:33 +01:00
parent 4a3f597a0e
commit 8df95843ed

View File

@ -14,4 +14,15 @@ ifeq ($(BR2_PACKAGE_GFLAGS),y)
GLOG_DEPENDENCIES = gflags
endif
# glog can optionally use atomic __sync built-ins. However, its
# configure script only checks for the availability of the 4 bytes
# version, but the code also uses the 1 byte version. While this works
# on most architectures, it does not on architectures that implement
# only the 4 bytes version, such as Microblaze. So if the architecture
# does not implement the 1 byte version, we hint the configure script
# that atomic built-ins should not be used.
ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_1),)
GLOG_CONF_ENV += ac_cv___sync_val_compare_and_swap=no
endif
$(eval $(autotools-package))