Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/9] arc: Support option of atomic extension
@ 2014-07-28 18:02 Anton Kolesov
  2014-07-28 18:02 ` [Buildroot] [PATCH 2/9] cairo: arc: Disable if ARC atomics are disabled Anton Kolesov
                   ` (8 more replies)
  0 siblings, 9 replies; 42+ messages in thread
From: Anton Kolesov @ 2014-07-28 18:02 UTC (permalink / raw)
  To: buildroot

GCC has several builtin functions that implement atomic operations. In GCC
for ARC those functions rely on LLOCK/SCOND instructions which are optional
in ARC CPU's. If software uses those functions and as a result those
instructions, it will be abort 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>
---
 arch/Config.in.arc  | 4 ++++
 package/Makefile.in | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/arch/Config.in.arc b/arch/Config.in.arc
index 60b59f0..9edcbd4 100644
--- a/arch/Config.in.arc
+++ b/arch/Config.in.arc
@@ -1,3 +1,7 @@
+# Choise of atomic instructions presence
+config BR2_ARC_ATOMIC_EXT
+	bool "Atomic extension (LLOCK/SCOND instructions)"
+
 config BR2_ARCH
 	default "arc"	if BR2_arcle
 	default "arceb"	if BR2_arceb
diff --git a/package/Makefile.in b/package/Makefile.in
index fc55850..3d25d2a 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -102,6 +102,10 @@ ifeq ($(BR2_xtensa),y)
 TARGET_ABI += -mlongcalls -mtext-section-literals
 endif
 
+ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy)
+TARGET_ABI += -matomic
+endif
+
 STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot
 STAGING_DIR    = $(HOST_DIR)/$(STAGING_SUBDIR)
 
-- 
1.8.4.1

^ permalink raw reply related	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2014-08-16 15:26 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <In-Reply-To: <CAAXf6LURyGxEfQR+3g6xriwqUeE1E91Oav2X=r_C3YD66JzpEA@mail.gmail.com>
2014-08-08 15:09 ` [Buildroot] [PATCH v4 1/4] cairo: Add dependency on atomic intrinsics Anton Kolesov
2014-08-08 15:09   ` [Buildroot] [PATCH v4 2/4] pulseaudio: " Anton Kolesov
2014-08-15 20:54     ` Yann E. MORIN
2014-08-08 15:09   ` [Buildroot] [PATCH v4 3/4] libftdi: " Anton Kolesov
2014-08-15 20:58     ` Yann E. MORIN
2014-08-08 15:09   ` [Buildroot] [PATCH v4 4/4] msgpack: " Anton Kolesov
2014-08-15 21:04     ` Yann E. MORIN
2014-08-15 12:49   ` [Buildroot] [PATCH v4 1/4] cairo: " Anton Kolesov
2014-08-15 20:46   ` Yann E. MORIN
2014-07-28 18:02 [Buildroot] [PATCH 1/9] arc: Support option of atomic extension Anton Kolesov
2014-07-28 18:02 ` [Buildroot] [PATCH 2/9] cairo: arc: Disable if ARC atomics are disabled Anton Kolesov
2014-07-28 18:02 ` [Buildroot] [PATCH 3/9] jack2: " Anton Kolesov
2014-07-28 18:02 ` [Buildroot] [PATCH 4/9] pulseaudio: " Anton Kolesov
2014-07-28 18:02 ` [Buildroot] [PATCH 5/9] libftdi: " Anton Kolesov
2014-07-28 18:02 ` [Buildroot] [PATCH 6/9] msgpack: " Anton Kolesov
2014-07-28 18:02 ` [Buildroot] [PATCH 7/9] icu: " Anton Kolesov
2014-07-28 18:02 ` [Buildroot] [PATCH 8/9] libtorrent: " Anton Kolesov
2014-07-28 18:02 ` [Buildroot] [PATCH 9/9] thrift: " Anton Kolesov
2014-07-30  6:45 ` [Buildroot] [PATCH 1/9] arc: Support option of atomic extension Thomas Petazzoni
2014-07-31 13:24   ` [Buildroot] [PATCH v2 1/9] toolchain: Add config option for atomic intrinsics Anton Kolesov
2014-07-31 13:24     ` [Buildroot] [PATCH v2 2/9] cairo: Add dependency on " Anton Kolesov
2014-07-31 13:24     ` [Buildroot] [PATCH v2 3/9] jack2: " Anton Kolesov
2014-07-31 13:24     ` [Buildroot] [PATCH v2 4/9] pulseaudio: " Anton Kolesov
2014-07-31 13:24     ` [Buildroot] [PATCH v2 5/9] libftdi: " Anton Kolesov
2014-07-31 13:24     ` [Buildroot] [PATCH v2 6/9] msgpack: " Anton Kolesov
2014-07-31 13:24     ` [Buildroot] [PATCH v2 7/9] icu: " Anton Kolesov
2014-07-31 13:24     ` [Buildroot] [PATCH v2 8/9] libtorrent: " Anton Kolesov
2014-07-31 13:24     ` [Buildroot] [PATCH v2 9/9] thrift: " Anton Kolesov
2014-07-31 17:25     ` [Buildroot] [PATCH v2 1/9] toolchain: Add config option for " Yann E. MORIN
2014-07-31 18:05       ` Thomas Petazzoni
2014-08-03  9:32     ` Thomas Petazzoni
2014-08-04 12:16       ` [Buildroot] [PATCH v3 1/4] cairo: Add dependency on " Anton Kolesov
2014-08-04 12:16         ` [Buildroot] [PATCH v3 2/4] pulseaudio: " Anton Kolesov
2014-08-04 12:16         ` [Buildroot] [PATCH v3 3/4] libftdi: " Anton Kolesov
2014-08-04 12:16         ` [Buildroot] [PATCH v3 4/4] msgpack: " Anton Kolesov
2014-08-07 15:42         ` [Buildroot] [PATCH v3 1/4] cairo: " Thomas De Schampheleire
2014-08-04 12:17       ` [Buildroot] [PATCH] manual: Add atomic intrinsics to the dependencies section Anton Kolesov
2014-08-15 20:40         ` Yann E. MORIN
2014-08-15 22:17         ` Thomas Petazzoni
2014-08-15 22:23           ` Yann E. MORIN
2014-08-16  7:40             ` Thomas Petazzoni
2014-08-16 15:26               ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox