]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
arch: add an option to specify if the arch has atomic ops
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 17 Aug 2014 19:29:40 +0000 (21:29 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 18 Aug 2014 08:56:35 +0000 (10:56 +0200)
The fact that atomic operations are available is not really a
specificity of the toolchain, but rather of the architecture.

So, add a new option that architectures that have atomic operations
can select. This in turn selects the current toolchain atomic option,
until all packages have been converted, at which point the old
toolchain option can be removed.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Anton Kolesov <Anton.Kolesov@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
arch/Config.in
arch/Config.in.arc
toolchain/toolchain-common.in

index 9cd85a589a0b1b42d4f54a780d16063c7285fd77..5cee0d7839dc3e73f215aafc26d0e32e4f0e7e79 100644 (file)
@@ -250,6 +250,12 @@ config BR2_GCC_TARGET_FLOAT_ABI
 config BR2_GCC_TARGET_MODE
        string
 
+# If the architecture has atomic operations, select this:
+config BR2_ARCH_HAS_ATOMICS
+       bool
+       default y if !BR2_arc
+       select BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
 # Set up target binary format
 choice
        prompt "Target Binary Format"
index 836cfef638e228217233eacf26a589bc31f26be1..8a7f290f5252f33e714483a3518204aa65ef9a51 100644 (file)
@@ -1,7 +1,7 @@
 # Choise of atomic instructions presence
 config BR2_ARC_ATOMIC_EXT
        bool "Atomic extension (LLOCK/SCOND instructions)"
-       select BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+       select BR2_ARCH_HAS_ATOMICS
 
 config BR2_ARCH
        default "arc"   if BR2_arcle
index 6d4370034e226dc618c417d60993b5e348e2146b..2fa4f61a092eccab69824061ef32b662fc37f3b1 100644 (file)
@@ -46,7 +46,6 @@ config BR2_TOOLCHAIN_HAS_SSP
 
 config BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
        bool
-       default y if !BR2_arc
 
 config BR2_ENABLE_LOCALE_PURGE
        bool "Purge unwanted locales"