aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGravatar Anton Kolesov <anton.kolesov@synopsys.com>2014-07-31 17:24:42 +0400
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-08-03 11:20:47 +0200
commitcbffd50561f7ce595296bddaf108031e501b2063 (patch)
tree9a2a41c311852e692e43ca1afba17446d94fe1e2 /arch
parent21205fced532ff875b32e9492e67e0a1908598d5 (diff)
downloadbuildroot-cbffd50561f7ce595296bddaf108031e501b2063.tar.gz
buildroot-cbffd50561f7ce595296bddaf108031e501b2063.tar.bz2
toolchain: Add config option for atomic intrinsics
GCC has several builtin functions that implement atomic operations. Those functions are architecture specific and may not be implemented by the specific toolchain. In case of GCC for ARC those functions rely on LLOCK/SCOND instructions which are optional in ARC CPU's. If ARC CPU doesn't support those instructions but software tries to use them, then application will be aborted with Illegal instruction exception. To avoid confusion user should first specify that their CPU supports atomic extension, which will allow selection of packages that use builtin atomic functions. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/Config.in.arc5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/Config.in.arc b/arch/Config.in.arc
index 60b59f0319..836cfef638 100644
--- a/arch/Config.in.arc
+++ b/arch/Config.in.arc
@@ -1,3 +1,8 @@
+# Choise of atomic instructions presence
+config BR2_ARC_ATOMIC_EXT
+ bool "Atomic extension (LLOCK/SCOND instructions)"
+ select BR2_TOOLCHAIN_HAS_ATOMIC_INTRINSICS
+
config BR2_ARCH
default "arc" if BR2_arcle
default "arceb" if BR2_arceb