Hi Julien, > -----Original Message----- > From: Julien Grall <jul...@xen.org> > Sent: 2022年7月1日 20:58 > To: Jan Beulich <jbeul...@suse.com>; Wei Chen <wei.c...@arm.com> > Cc: Stefano Stabellini <sstabell...@kernel.org>; Bertrand Marquis > <bertrand.marq...@arm.com>; Volodymyr Babchuk <volodymyr_babc...@epam.com>; > xen-devel@lists.xenproject.org > Subject: Re: [PATCH] Xen: fix EFI stub wchar_t size warning of arm32 > building > > > > On 01/07/2022 11:34, Jan Beulich wrote: > >> Signed-off-by: Wei Chen <wei.c...@arm.com> > >> --- > >> xen/arch/arm/efi/Makefile | 4 ++++ > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/xen/arch/arm/efi/Makefile b/xen/arch/arm/efi/Makefile > >> index dffe72e589..b06fb96c1f 100644 > >> --- a/xen/arch/arm/efi/Makefile > >> +++ b/xen/arch/arm/efi/Makefile > >> @@ -1,5 +1,9 @@ > >> include $(srctree)/common/efi/efi-common.mk > >> > >> +ifeq ($(CONFIG_ARM_32),y) > >> +CFLAGS-y += -fno-short-wchar > >> +endif > > > > Simply > > > > CFLAGS-$(CONFIG_ARM_32) += -fno-short-wchar > > > > ? But, as suggested, perhaps further > > > > $(obj)/stub.o: CFLAGS-$(CONFIG_ARM_32) += -fno-short-wchar > > > > to make sure we'd notice any other uses / issues here. After all it > > is - at least in theory - possible that Arm32 would also gain EFI > > support, and then it would be a problem if the other ("real") files > > were compiled that way (albeit I think the issue would be easily > > noticeable, as I don't think things would build that way). > > Instead of CONFIG_ARM_32, I would use CONFIG_ARM_EFI. So this would also > work if we want to disable EFI on arm64 or enable on arm32. >
We have already used CONFIG_ARM_EFI to distinguish EFI objects and stub objects for Arm, so maybe we just need to add "$(obj)/stub.o: CFLAGS-y += -fno-short-wchar" to: ifeq ($(CONFIG_ARM_EFI),y) .. else ... $(obj)/stub.o: CFLAGS-y += -fno-short-wchar obj-y += stub.o endif Thanks, Wei Chen > Cheers, > > -- > Julien Grall