Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC PATCH 1/2] package/Makefile.in: microblaze: enable -mxl-barrel-shift as default
@ 2025-07-01  9:30 Neal Frager via buildroot
  2025-07-01  9:30 ` [Buildroot] [RFC PATCH 2/2] package/gcc: microblaze atomic support Neal Frager via buildroot
  2025-07-01 10:13 ` [Buildroot] [RFC PATCH 1/2] package/Makefile.in: microblaze: enable -mxl-barrel-shift as default Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 5+ messages in thread
From: Neal Frager via buildroot @ 2025-07-01  9:30 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Romain Naour, Thomas Petazzoni, Neal Frager

On microblaze architecture, barrel shift instructions are not enabled by
default, but they are required for enabling atomic support.  For this reason,
this patch enables the barrel shift instructions by default for Buildroot
target applications by enabling the -mxl-barrel-shift CFLAG.

Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 package/Makefile.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/Makefile.in b/package/Makefile.in
index 829636900b..32c1830399 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -205,6 +205,12 @@ TARGET_CFLAGS += -fno-dwarf2-cfi-asm
 TARGET_CXXFLAGS += -fno-dwarf2-cfi-asm
 endif
 
+# microblaze arch atomic extensions require barrel shift
+# instructions to be enabled, so make it default
+ifeq ($(BR2_microblaze),y)
+TARGET_CFLAGS += -mxl-barrel-shift
+endif
+
 ifeq ($(BR2_BINFMT_FLAT),y)
 ifeq ($(BR2_riscv),y)
 TARGET_CFLAGS += -fPIC
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2025-07-27 15:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01  9:30 [Buildroot] [RFC PATCH 1/2] package/Makefile.in: microblaze: enable -mxl-barrel-shift as default Neal Frager via buildroot
2025-07-01  9:30 ` [Buildroot] [RFC PATCH 2/2] package/gcc: microblaze atomic support Neal Frager via buildroot
2025-07-01  9:40   ` Frager, Neal via buildroot
2025-07-01 10:13 ` [Buildroot] [RFC PATCH 1/2] package/Makefile.in: microblaze: enable -mxl-barrel-shift as default Thomas Petazzoni via buildroot
2025-07-27 15:05   ` Frager, Neal via buildroot

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