[Buildroot] [git commit] arch/arc: always needs -matomic with atomic extensions

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Jul 18 20:54:36 UTC 2019

commit: https://git.buildroot.net/buildroot/commit/?id=c568b4f37fa6d7f51e6d14d33d7eb75dfe26d7bf
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

As reported by Alexey in:

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 at synopsys.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
Cc: Alexey Brodkin <Alexey.Brodkin at synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Cc: Arnout Vandecappelle <arnout at mind.be>
Acked-by: Alexey Brodkin <abrodkin at synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
 arch/arch.mk.arc    | 4 ++++
 package/Makefile.in | 4 ----
 2 files changed, 4 insertions(+), 4 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)
diff --git a/package/Makefile.in b/package/Makefile.in
index f05b9cc3aa..0a7899c852 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -112,10 +112,6 @@ ifeq ($(BR2_xtensa),y)
 TARGET_ABI += -mlongcalls -mauto-litpools
-ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy)
-TARGET_ABI += -matomic

More information about the buildroot mailing list