aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2019-07-18 22:52:49 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-07-18 22:54:36 +0200
commitc568b4f37fa6d7f51e6d14d33d7eb75dfe26d7bf (patch)
treeeca0a8736b20a25245acfff14fc6636cc44e3bb2 /arch
parent4281288d2d568d5ce748a0e66e0872f54fbe956c (diff)
downloadbuildroot-c568b4f37fa6d7f51e6d14d33d7eb75dfe26d7bf.tar.gz
buildroot-c568b4f37fa6d7f51e6d14d33d7eb75dfe26d7bf.tar.bz2
arch/arc: always needs -matomic with atomic extensions
As reported by Alexey in: https://patchwork.ozlabs.org/patch/1087480/ https://patchwork.ozlabs.org/patch/1087471/ when BR2_ARC_ATOMIC_EXT is enabled, -matomic needs to always be passed to the compiler to allow atomic instructions to be used. So instead of passing them through the command-line CFLAGS, we enforce them in the toolchain wrapper directly. Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Arnout Vandecappelle <arnout@mind.be> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arch.mk.arc4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arch.mk.arc b/arch/arch.mk.arc
new file mode 100644
index 0000000000..5fcffb7f4b
--- /dev/null
+++ b/arch/arch.mk.arc
@@ -0,0 +1,4 @@
+# -matomic is always required when the ARC core has the atomic extensions
+ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy)
+ARCH_TOOLCHAIN_WRAPPER_OPTS = -matomic
+endif