Blame SOURCES/0003-Build-with-fshort-wchar-so-toggle-passwords-work-rig.patch

89397c
From 9eb111a7f7b897ba4ae19a68708e010a5c384260 Mon Sep 17 00:00:00 2001
89397c
From: Peter Jones <pjones@redhat.com>
89397c
Date: Fri, 19 Jun 2015 16:53:36 -0400
89397c
Subject: [PATCH 3/7] Build with -fshort-wchar so toggle passwords work right.
89397c
89397c
This source tree uses:
89397c
89397c
typedef wchar_t efi_char16_t;
89397c
89397c
to define UEFI's UCS-2 character type.  On many platforms, wchar_t is
89397c
32-bits by default.  As a result, efichar_from_char winds up writing
89397c
4-byte characters instead of 2-byte characters.  In the case where we
89397c
hash the password in mokutil, this works fine, because the same datatype
89397c
is used, and the values are the same.  But for our feature toggles,
89397c
where we store the raw data and shim is interpretting the character
89397c
array, every other character winds up being L'\0', and verification
89397c
fails.
89397c
89397c
So always build with -fshort-wchar to ensure we get 2-byte character
89397c
storage.
89397c
89397c
Signed-off-by: Peter Jones <pjones@redhat.com>
89397c
---
89397c
 configure.ac | 2 +-
89397c
 1 file changed, 1 insertion(+), 1 deletion(-)
89397c
89397c
diff --git a/configure.ac b/configure.ac
89397c
index fe28fb9..69d412a 100644
89397c
--- a/configure.ac
89397c
+++ b/configure.ac
89397c
@@ -37,7 +37,7 @@ else
89397c
 	default_strict=no
89397c
 fi
89397c
 
89397c
-WARNINGFLAGS_C="$WARNINGFLAGS_C -std=gnu11"
89397c
+WARNINGFLAGS_C="$WARNINGFLAGS_C -std=gnu11 -fshort-wchar"
89397c
 
89397c
 AC_ARG_ENABLE(strict, AS_HELP_STRING([--enable-strict],[Enable strict compilation options]), enable_strict=$enableval,
89397c
 		enable_strict=$default_strict)
89397c
-- 
89397c
2.7.4
89397c