• Thomas Petazzoni's avatar
    toolchain: add BR2_TOOLCHAIN_HAS_{SYNC_x, ATOMIC} hidden booleans · 6856e417
    Thomas Petazzoni authored
    Currently, Buildroot provides one BR2_ARCH_HAS_ATOMICS boolean option
    to indicate whether the architecture supports atomic operations or
    not. However, the reality of atomic operations support is much more
    complicated and requires more than one option to be expressed
    There are in fact two types of atomic built-ins provided by gcc:
     (1) The __sync_*() family of functions, which have been in gcc for a
         long time (probably gcc 4.1). They are available in variants
         operating on 1-byte, 2-byte, 4-byte and 8-byte integers. Some
         architectures implement a number of variants, some do not
         implement any, some implement all of them.
         They are now considered "legacy" by the gcc developers but are
         nonetheless still being used by a significant number of userspace
         libraries and applications.
     (2) The __atomic_*() family of functions, which hav...