diff mbox series

[v3,1/7] tests/tcg/aarch64: Use -fno-integrated-as

Message ID 20240629-tcg-v3-1-fa57918bdf09@daynix.com (mailing list archive)
State New, archived
Headers show
Series tests/tcg/aarch64: Fix inline assemblies for clang | expand

Commit Message

Akihiko Odaki June 29, 2024, 8:56 a.m. UTC
clang version 18.1.6 does not respect -Wa,-march=armv9-a+sme without
-fno-integrated-as. Use it when available.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
 tests/tcg/aarch64/Makefile.target | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
index 70d728ae9af7..05f98c80c88d 100644
--- a/tests/tcg/aarch64/Makefile.target
+++ b/tests/tcg/aarch64/Makefile.target
@@ -20,6 +20,9 @@  run-fcvt: fcvt
 
 config-cc.mak: Makefile
 	$(quiet-@)( \
+		if $(call cc-test, -fno-integrated-as); then fno_integrated_as=-fno-integrated-as; else \
+		fno_integrated_as=; fi; \
+		$(call cc-option,-fno-integrated-as,            CROSS_CC_HAS_FNO_INTEGRATED_AS); \
 	    $(call cc-option,-march=armv8.1-a+sve,          CROSS_CC_HAS_SVE); \
 	    $(call cc-option,-march=armv8.1-a+sve2,         CROSS_CC_HAS_SVE2); \
 	    $(call cc-option,-march=armv8.2-a,              CROSS_CC_HAS_ARMV8_2); \
@@ -27,7 +30,7 @@  config-cc.mak: Makefile
 	    $(call cc-option,-march=armv8.5-a,              CROSS_CC_HAS_ARMV8_5); \
 	    $(call cc-option,-mbranch-protection=standard,  CROSS_CC_HAS_ARMV8_BTI); \
 	    $(call cc-option,-march=armv8.5-a+memtag,       CROSS_CC_HAS_ARMV8_MTE); \
-	    $(call cc-option,-Wa$(COMMA)-march=armv9-a+sme, CROSS_AS_HAS_ARMV9_SME)) 3> config-cc.mak
+	    $(call cc-option,-Wa$(COMMA)-march=armv9-a+sme $$fno_integrated_as, CROSS_AS_HAS_ARMV9_SME)) 3> config-cc.mak
 -include config-cc.mak
 
 ifneq ($(CROSS_CC_HAS_ARMV8_2),)
@@ -69,6 +72,9 @@  endif
 # SME Tests
 ifneq ($(CROSS_AS_HAS_ARMV9_SME),)
 AARCH64_TESTS += sme-outprod1 sme-smopa-1 sme-smopa-2
+ifneq ($(CROSS_CC_HAS_FNO_INTEGRATED_AS),)
+sme-%: CFLAGS += -fno-integrated-as
+endif
 endif
 
 # System Registers Tests