On 29.11.2024 02:49, Volodymyr Babchuk wrote: > Provide -target and -march explicitly when building with clang. This > makes cross-compilation much easier, because clang accept this > parameters regardless of host platform. Basically, > > make XEN_TARGET_ARCH=arm64 clang=y llvm=y > > will behave in the same way if building Xen on x86, or on arm64 or on > any other platform. > > -march is required because with default value, clang will not > recognize EL2 registers. > > Signed-off-by: Volodymyr Babchuk <volodymyr_babc...@epam.com> > --- > config/arm64.mk | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/config/arm64.mk b/config/arm64.mk > index c4662f67d0..97eb9a82e7 100644 > --- a/config/arm64.mk > +++ b/config/arm64.mk > @@ -5,6 +5,10 @@ CONFIG_XEN_INSTALL_SUFFIX := > > CFLAGS += #-marm -march= -mcpu= etc > > +ifeq ($(clang),y) > +CFLAGS += -target aarch64 -march=armv8-a > +endif
Why is this dependent on (just?) $(clang), not (also?) $(llvm)? Also this affects both toolstack builds and hypervisor. Is applying -march like this actually appropriate for the toolstack? Jan