toolchain: add BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS hidden option
Add BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS variable and use it in BR2_TOOLCHAIN_HAS_GCC_BUG_64735. This new variable will be used to select boost atomic when lock-free atomic ints are not available Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
6d37231476
commit
5f6f910cc9
@ -69,18 +69,35 @@ comment "Toolchain Generic Options"
|
|||||||
config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
|
config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
|
||||||
bool
|
bool
|
||||||
|
|
||||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
|
# Atomic types can be:
|
||||||
# exception_ptr, nested_exception, and future from libstdc++ are not
|
# - never lock-free
|
||||||
# available for architectures not supporting always lock-free atomic
|
# - sometimes lock-free
|
||||||
# ints before GCC 7
|
# - always lock-free
|
||||||
|
# see https://en.cppreference.com/w/c/atomic/ATOMIC_LOCK_FREE_consts
|
||||||
|
#
|
||||||
|
# On most architectures, gcc provides "always lock-free" atomic types,
|
||||||
|
# but a few architectures are limited to "sometimes lock-free"
|
||||||
|
# types. This hidden option allows to know if the architecture
|
||||||
|
# provides "always lock-free" atomic types.
|
||||||
|
config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on !BR2_nios2
|
||||||
|
depends on !BR2_ARM_CPU_ARMV4
|
||||||
|
depends on !BR2_ARM_CPU_ARMV5
|
||||||
|
depends on !BR2_sparc_v8
|
||||||
|
depends on !BR2_m68k_cf5208
|
||||||
|
|
||||||
|
# Prior to gcc 7.x, exception_ptr, nested_exception and future from
|
||||||
|
# libstdc++ would only be provided on architectures that support
|
||||||
|
# always lock-free atomic ints. See
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735. This issue has
|
||||||
|
# been removed in GCC 7.x, where exception propagation is now
|
||||||
|
# supported without lock-free atomic int.
|
||||||
config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||||
bool
|
bool
|
||||||
default y if BR2_nios2
|
default y if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && \
|
||||||
default y if BR2_ARM_CPU_ARMV4
|
!BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||||
default y if BR2_ARM_CPU_ARMV5
|
|
||||||
default y if BR2_sparc_v8
|
|
||||||
default y if BR2_m68k_cf5208
|
|
||||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
|
||||||
|
|
||||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no
|
||||||
# longer exists in gcc 8.x.
|
# longer exists in gcc 8.x.
|
||||||
|
Loading…
Reference in New Issue
Block a user