]> git.baikalelectronics.ru Git - kernel.git/commit
Kbuild: use -fshort-wchar globally
authorArnd Bergmann <arnd@arndb.de>
Wed, 26 Jul 2017 13:36:23 +0000 (15:36 +0200)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 21 Aug 2017 00:05:59 +0000 (09:05 +0900)
commite965ec0f7b9c674af4c4d5499cc6475f745fe120
tree47d64b4872b39ddddee491bfbc95417ab7674444
parent32b35a69f3e2828a4532e68c5489ce93f9adcb14
Kbuild: use -fshort-wchar globally

Commit a66219ca5fa5 ("Xen: don't warn about 2-byte wchar_t in efi")
added the --no-wchar-size-warning to the Makefile to avoid this
harmless warning:

arm-linux-gnueabi-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

Changing kbuild to use thin archives instead of recursive linking
unfortunately brings the same warning back during the final link.

The kernel does not use wchar_t string literals at this point, and
xen does not use wchar_t at all (only efi_char16_t), so the flag
has no effect, but as pointed out by Jan Beulich, adding a wchar_t
string literal would be bad here.

Since wchar_t is always defined as u16, independent of the toolchain
default, always passing -fshort-wchar is correct and lets us
remove the Xen specific hack along with fixing the warning.

Link: https://patchwork.kernel.org/patch/9275217/
Fixes: a66219ca5fa5 ("Xen: don't warn about 2-byte wchar_t in efi")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile
drivers/xen/Makefile