xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Xen: don't warn about 2-byte wchar_t in efi
@ 2016-05-11 12:47 Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-05-11 12:47 UTC (permalink / raw)
  To: Boris Ostrovsky, David Vrabel, Juergen Gross
  Cc: Ian Campbell, Arnd Bergmann, Stefano Stabellini, linux-kernel,
	Shannon Zhao, xen-devel

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 <arnd@arndb.de>
Fixes: 37060935dc04 ("ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services")
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Xen: don't warn about 2-byte wchar_t in efi
       [not found] ` <alpine.DEB.2.10.1605161206310.2494@sstabellini-ThinkPad-X260>
@ 2016-05-18 10:08   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-05-18 10:08 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Juergen Gross, Ian Campbell, Stefano Stabellini, linux-kernel,
	Shannon Zhao, xen-devel, Boris Ostrovsky, David Vrabel

On Monday 16 May 2016 12:08:17 Stefano Stabellini wrote:
> 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 <arnd@arndb.de>
> > 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.

Right, I was wondering about that too, but it has been this way since the
code was first merged, so I couldn't figure out if removing the flag
had any side-effects.

	Arnd

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Xen: don't warn about 2-byte wchar_t in efi
       [not found] <1462970928-532144-1-git-send-email-arnd@arndb.de>
@ 2016-05-16 11:08 ` Stefano Stabellini
       [not found] ` <alpine.DEB.2.10.1605161206310.2494@sstabellini-ThinkPad-X260>
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2016-05-16 11:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Juergen Gross, Ian Campbell, Stefano Stabellini, linux-kernel,
	Shannon Zhao, xen-devel, Boris Ostrovsky, David Vrabel

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 <arnd@arndb.de>
> 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
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-18 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 12:47 [PATCH] Xen: don't warn about 2-byte wchar_t in efi Arnd Bergmann
     [not found] <1462970928-532144-1-git-send-email-arnd@arndb.de>
2016-05-16 11:08 ` Stefano Stabellini
     [not found] ` <alpine.DEB.2.10.1605161206310.2494@sstabellini-ThinkPad-X260>
2016-05-18 10:08   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).