|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] tools/tests/x86_emulator: fix build on clang-21
commit 34e9c2151444ffc96f0be193445d3f6b146653d3
Author: Edwin Török <edwin.torok@xxxxxxxxxx>
AuthorDate: Wed Mar 4 08:25:19 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Mar 4 08:25:19 2026 +0100
tools/tests/x86_emulator: fix build on clang-21
clang-21's built-in assembler is enabled by default, but it doesn't
support some mnemonics:
```
test_x86_emulator.c:2636:36: error: invalid instruction mnemonic 'fsaves'
2636 | "fidivs %1\n\t"
test_x86_emulator.c:2640:24: error: invalid instruction mnemonic 'frstors'
2640 | asm volatile ( "frstors %0" :: "m" (res[25]) : "memory" );
| ^
test_x86_emulator.c:4251:24: error: invalid instruction mnemonic
'vpcmpestriq'
4251 | put_insn(vpcmpestri,
| ^
```
Use the external assembler with Clang for consistency with GCC.
Signed-off-by: Edwin Török <edwin.torok@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
tools/tests/x86_emulator/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/tests/x86_emulator/Makefile
b/tools/tests/x86_emulator/Makefile
index e18725d0c3..5003c464f3 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -297,6 +297,11 @@ x86_emulate:
HOSTCFLAGS-x86_64 := -fno-PIE
$(call cc-option-add,HOSTCFLAGS-x86_64,HOSTCC,-no-pie)
+
+# clang's integrated as does not support some mnemonics:
+# https://github.com/llvm/llvm-project/issues/183635
+$(call cc-option-add,HOSTCFLAGS-x86_64,HOSTCC,-no-integrated-as)
+
HOSTCFLAGS += $(CFLAGS_xeninclude) -I. $(HOSTCFLAGS-$(XEN_COMPILE_ARCH))
x86.h := $(addprefix $(XEN_ROOT)/tools/include/xen/asm/,\
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |