On 19.02.2025 18:56, Oleksii Kurochko wrote: > > On 2/18/25 6:03 PM, Jan Beulich wrote: >>> --- a/xen/arch/riscv/arch.mk >>> +++ b/xen/arch/riscv/arch.mk >>> @@ -6,8 +6,13 @@ $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) >>> riscv-abi-$(CONFIG_RISCV_32) := -mabi=ilp32 >>> riscv-abi-$(CONFIG_RISCV_64) := -mabi=lp64 >>> >>> -riscv-march-$(CONFIG_RISCV_ISA_RV64G) := rv64g >>> -riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c >>> +riscv-march-$(CONFIG_RISCV_64) := rv64 >>> + >>> +riscv-march-y := $(riscv-march-y)ima >>> + >>> +riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c >>> + >>> +riscv-march-y := $(riscv-march-y)_zicsr_zifencei >> The repeated use of := makes this longer than necessary, and hence harder to >> read. I understand using += isn't exactly ideal either, because then on the >> rhs >> no blanks may appear (aiui), being kind of against our style and potentially >> hampering readability. Still maybe: >> >> riscv-march-$(CONFIG_RISCV_64) := rv64 >> riscv-march-y+=ima >> riscv-march-$(CONFIG_RISCV_ISA_C)+=c >> riscv-march-y+=_zicsr_zifencei >> >> ? > > Btw, I think that we will still anyway strip spaces added by '+='. So it will > also need to do something like: > [1] riscv-generic-flags := $(riscv-abi-y) -march=$(subst > $(space),,$(riscv-march-y)) > > As without this I expect that -march will look like: > -march=rv64 ima c _zicsr_zifencei > > With the change [1] we could have spaces around "+=": > riscv-march-y += ima > riscv-march-$(CONFIG_RISCV_ISA_C) += c > riscv-march-y += _zicsr_zifencei > > riscv-generic-flags := $(riscv-abi-y) -march=$(subst > $(space),,$(riscv-march-y))
That would be fine with me of course, for being yet tidier (imo). Jan
