[U-Boot] [PATCH v0 03/20] short-wchar

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Aug 4 20:28:06 UTC 2017


On 08/04/2017 09:31 PM, Rob Clark wrote:
> For now, pending conclusion on proposal about using c11 and u"string"
> instead of L"string" plus -fshort-wchar.
> 
> Background: UEFI uses utf16 strings universally.  An UEFI implementation
> that does not use -fshort-wchar has to do a lot of cumbersome charset
> conversion back/forth.  Mixing object files that use -fshort-wchar and
> others that do not is a bad idea (and gcc will warn about it).  There
> are 3 reasonable solutions that I can think of:
> 
>  1) Use -fshort-wchar across the board.  We don't dynamically link
>     against other shared libraries at runtime, so there isn't much
>     downside to this approach.  Heinrich brought up ext4, which uses
>     utf32, but I guess this mostly matters for fs_ls(), and it does
>     not seem so bad for it to do utf32->utf8 conversion.
> 
>  2) Use -fshort-wchar only if CONFIG_EFI_LOADER=y.. UEFI only requires
>     fat/vfat so we don't need ext4 and efi loader at the same time.
> 
>  3) Go with Heinrich's suggestion of requiring c11.  Possibly this
>     requirement could be loosened to only require c11 for efi loader.
>     This seems like the best approach, and at least no one has so
>     far brought up any objection to his proposal.
> 
> Not-signed-off-by: Rob Clark <robdclark at gmail.com>

Do I understand you right?
You do not want the current version of the patch series merged?

It might have been better to replace [PATCH] by [RFC] in the subject
lines of the patch set in this case.

I am currently trying to find out if the switch to C11 is possible, cf.
https://travis-ci.org/xypron2/u-boot/builds/261098363.

Unfortunately Travis uses gcc 4.8.2 for some jobs which does not yet
support C11.

Furthermore there seems to be some problem in disk/part_efi.c with
PARTITION_SYSTEM_GUID.

Best regards

Heinrich

> ---
>  config.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/config.mk b/config.mk
> index b77d58903c..5ad9e7198d 100644
> --- a/config.mk
> +++ b/config.mk
> @@ -74,7 +74,7 @@ endif
>  RELFLAGS := $(PLATFORM_RELFLAGS)
>  
>  PLATFORM_CPPFLAGS += $(RELFLAGS)
> -PLATFORM_CPPFLAGS += -pipe
> +PLATFORM_CPPFLAGS += -pipe -fshort-wchar
>  
>  LDFLAGS += $(PLATFORM_LDFLAGS)
>  LDFLAGS_FINAL += -Bstatic
> 



More information about the U-Boot mailing list