[coreboot-gerrit] Change in coreboot[master]: tianocore: Add more patches

Patrick Rudolph (Code Review) gerrit at coreboot.org
Sun Jun 17 11:06:47 CEST 2018


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/27137


Change subject: tianocore: Add more patches
......................................................................

tianocore: Add more patches

* Fix building BaseTools in hostgcc v8.1.0+
* Fix buidling tianocore on gcc v7.0.0+

Change-Id: I7e2efea930b27749b1097607ab143ce2f91e79ec
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
A payloads/external/tianocore/patches/08_BaseTools-Fix-building-with-Werror-stringop-truncati.patch
A payloads/external/tianocore/patches/09_gcc7-Fix-building-with-fpermissive.patch
2 files changed, 78 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/27137/1

diff --git a/payloads/external/tianocore/patches/08_BaseTools-Fix-building-with-Werror-stringop-truncati.patch b/payloads/external/tianocore/patches/08_BaseTools-Fix-building-with-Werror-stringop-truncati.patch
new file mode 100644
index 0000000..06ddd56
--- /dev/null
+++ b/payloads/external/tianocore/patches/08_BaseTools-Fix-building-with-Werror-stringop-truncati.patch
@@ -0,0 +1,38 @@
+From b652262ed0dd554c44e7b1bf7134d3458f5edef1 Mon Sep 17 00:00:00 2001
+From: Patrick Rudolph <siro at das-labor.org>
+Date: Sun, 17 Jun 2018 08:44:51 +0200
+Subject: [PATCH] BaseTools: Fix building with -Werror=stringop-truncation
+
+Signed-off-by: Patrick Rudolph <siro at das-labor.org>
+---
+ BaseTools/Source/C/GenVtf/GenVtf.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/BaseTools/Source/C/GenVtf/GenVtf.c b/BaseTools/Source/C/GenVtf/GenVtf.c
+index acc142a6d1..5d77016eba 100644
+--- a/BaseTools/Source/C/GenVtf/GenVtf.c
++++ b/BaseTools/Source/C/GenVtf/GenVtf.c
+@@ -129,9 +129,9 @@ Returns:
+   } else {
+     Length = strlen(Str);
+     if (Length < 4) {
+-      strncpy (TemStr + 4 - Length, Str, Length);
++      memcpy (TemStr + 4 - Length, Str, Length);
+     } else {
+-      strncpy (TemStr, Str + Length - 4, 4);
++      memcpy (TemStr, Str + Length - 4, 4);
+     }
+   
+     sscanf (
+@@ -1529,7 +1529,7 @@ Returns:
+   //
+   FitStartPtr = (FIT_TABLE *) RelativeAddress;
+ 
+-  strncpy ((CHAR8 *) &FitStartPtr->CompAddress, FIT_SIGNATURE, 8);  // "_FIT_   "
++  memcpy ((CHAR8 *) &FitStartPtr->CompAddress, FIT_SIGNATURE, 8);  // "_FIT_   "
+   assert (((VtfInfo->CompSize & 0x00FFFFFF) % 16) == 0);
+   FitStartPtr->CompSize     = (VtfInfo->CompSize & 0x00FFFFFF) / 16;
+   FitStartPtr->CompVersion  = MAKE_VERSION (VtfInfo->MajorVer, VtfInfo->MinorVer);
+-- 
+2.17.0
+
diff --git a/payloads/external/tianocore/patches/09_gcc7-Fix-building-with-fpermissive.patch b/payloads/external/tianocore/patches/09_gcc7-Fix-building-with-fpermissive.patch
new file mode 100644
index 0000000..7016759
--- /dev/null
+++ b/payloads/external/tianocore/patches/09_gcc7-Fix-building-with-fpermissive.patch
@@ -0,0 +1,40 @@
+From 5546ab29b2c0c2fc3a963bc71221918dc77b6152 Mon Sep 17 00:00:00 2001
+From: Patrick Rudolph <siro at das-labor.org>
+Date: Sun, 17 Jun 2018 08:53:25 +0200
+Subject: [PATCH] gcc7: Fix building with -fpermissive
+
+Signed-off-by: Patrick Rudolph <siro at das-labor.org>
+---
+ BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 2 +-
+ MdeModulePkg/Library/UefiHiiLib/HiiLib.c        | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
+index 3ca57ed741..4fa066dd9f 100644
+--- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
++++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
+@@ -3372,7 +3372,7 @@ CVfrStringDB::GetVarStoreNameFormStringId (
+   UINT8       BlockType;
+   EFI_HII_STRING_PACKAGE_HDR *PkgHeader;
+   
+-  if (mStringFileName == '\0' ) {
++  if (mStringFileName == NULL ) {
+     return NULL;
+   }
+ 
+diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
+index 857950118f..de0aa5f7bc 100644
+--- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
++++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
+@@ -2181,7 +2181,7 @@ InternalHiiIfrValueAction (
+   
+   StringPtr = ConfigAltResp;
+   
+-  while (StringPtr != L'\0') {
++  while (StringPtr != NULL) {
+     //
+     // 1. Find <ConfigHdr> GUID=...&NAME=...&PATH=...
+     //
+-- 
+2.17.0
+

-- 
To view, visit https://review.coreboot.org/27137
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e2efea930b27749b1097607ab143ce2f91e79ec
Gerrit-Change-Number: 27137
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180617/0c24463d/attachment-0001.html>


More information about the coreboot-gerrit mailing list