From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753419AbcEPLI2 (ORCPT ); Mon, 16 May 2016 07:08:28 -0400 Received: from mail.kernel.org ([198.145.29.136]:54791 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752049AbcEPLI1 (ORCPT ); Mon, 16 May 2016 07:08:27 -0400 Date: Mon, 16 May 2016 12:08:17 +0100 (BST) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: Arnd Bergmann cc: Boris Ostrovsky , David Vrabel , Juergen Gross , Stefano Stabellini , Ian Campbell , Shannon Zhao , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Xen: don't warn about 2-byte wchar_t in efi In-Reply-To: <1462970928-532144-1-git-send-email-arnd@arndb.de> Message-ID: References: <1462970928-532144-1-git-send-email-arnd@arndb.de> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 May 2016, Arnd Bergmann wrote: > The XEN UEFI code has become available on the ARM architecture > recently, but now causes a link-time warning: > > ld: warning: drivers/xen/efi.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail > > This seems harmless, because the efi code only uses 2-byte > characters when interacting with EFI, so we don't pass on those > strings to elsewhere in the system, and we just need to > silence the warning. > > It is not clear to me whether we actually need to build the file > with the -fshort-wchar flag, but if we do, then we should also > pass --no-wchar-size-warning to the linker, to avoid the warning. > > Signed-off-by: Arnd Bergmann > Fixes: 37060935dc04 ("ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services") Given that drivers/xen/efi.c doesn't actually use any wchar_t, it is not clear to me whether we need to pass -fshort-wchar either. However this patch is correct any, so I committed it to xentip. > drivers/xen/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile > index 415f2869054b..8feab810aed9 100644 > --- a/drivers/xen/Makefile > +++ b/drivers/xen/Makefile > @@ -8,6 +8,7 @@ nostackp := $(call cc-option, -fno-stack-protector) > CFLAGS_features.o := $(nostackp) > > CFLAGS_efi.o += -fshort-wchar > +LDFLAGS += $(call ld-option, --no-wchar-size-warning) > > dom0-$(CONFIG_ARM64) += arm-device.o > dom0-$(CONFIG_PCI) += pci.o > -- > 2.7.0 >