[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] xen/arm64: Add support Clang build on arm64





On 11/12/2025 02:39, Saman Dehghan wrote:
This patch enables building Xen on arm64 architecture using the Clang compiler.
Changes include:
- Add explicit -march=armv8 flag for arm64 builds.
- Add `__attribute__((target("fp-armv8")))` to `vfp_save_state` and
   `vfp_restore_state` functions when building with Clang to allow
   FP instructions despite `-mgeneral-regs-only`.

Signed-off-by: Saman Dehghan <samaan.dehghan@xxxxxxxxx>
---
  README                   | 2 ++
  xen/arch/arm/arch.mk     | 1 +
  xen/arch/arm/arm64/vfp.c | 6 ++++++
  3 files changed, 9 insertions(+)

diff --git a/README b/README
index 889a4ea906..67c1aa7fe6 100644
--- a/README
+++ b/README
@@ -45,6 +45,8 @@ provided by your OS distributor:
        - For ARM:
          - GCC 5.1 or later
          - GNU Binutils 2.25 or later
+        or
+        - Clang/LLVM 11 or later

I forgot to ask. Is this cross-compiling or native? Or both?

And OOI, how did you chose Clang 11?

Cheers,

--
Julien Grall




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.