summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2018-02-24 12:51:48 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-04 11:11:58 +0000
commitdd44b2c92f40d0b010336c8af8ea337763e55cf9 (patch)
tree90367b6eb805ffe8592f679d553bc7a206f4899b
parent927e4bbe49d78a4e3ade669843cbd4d4a01b53ca (diff)
downloadpoky-dd44b2c92f40d0b010336c8af8ea337763e55cf9.tar.gz
ovmf-native: fix compile issue on new OS like FC27 and Ubuntu 17
Fixed this error: | VfrUtilityLib.cpp:3375:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] | if (mStringFileName == '\0' ) { | ^~~~ | VfrUtilityLib.cpp:3398:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] | fread ((char *)StringPtr, sizeof (UINT8), Length, pInFile); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ../Makefiles/footer.makefile:30: recipe for target 'VfrUtilityLib.o' failed [Yocto #12530] (From OE-Core rev: ac0ec9936b54d46491c56af3e6c372ff670b585f) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/ovmf/ovmf/0001-VfrCompile-fix-invalid-comparison-between-pointer-an.patch32
-rw-r--r--meta/recipes-core/ovmf/ovmf_git.bb1
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-core/ovmf/ovmf/0001-VfrCompile-fix-invalid-comparison-between-pointer-an.patch b/meta/recipes-core/ovmf/ovmf/0001-VfrCompile-fix-invalid-comparison-between-pointer-an.patch
new file mode 100644
index 0000000000..43bfce4fe3
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/0001-VfrCompile-fix-invalid-comparison-between-pointer-an.patch
@@ -0,0 +1,32 @@
1From d37fa01fbbe2cf0cd8b49069a71706a33cb4a53e Mon Sep 17 00:00:00 2001
2From: Paolo Bonzini <pbonzini@redhat.com>
3Date: Mon, 13 Feb 2017 20:54:00 +0800
4Subject: [PATCH] VfrCompile: fix invalid comparison between pointer and
5 integer
6
7This would be valid C but is not valid C++, so change the comparison to do what it has always been doing.
8
9Contributed-under: TianoCore Contribution Agreement 1.0
10Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
12
13Upstream-Status: Backport
14Signed-off-by: Armin Kuster <akuster808@gmail.com>
15
16---
17 BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20Index: git/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
21===================================================================
22--- git.orig/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
23+++ git/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
24@@ -3372,7 +3372,7 @@ CVfrStringDB::GetVarStoreNameFormStringI
25 UINT8 BlockType;
26 EFI_HII_STRING_PACKAGE_HDR *PkgHeader;
27
28- if (mStringFileName == '\0' ) {
29+ if (mStringFileName == NULL) {
30 return NULL;
31 }
32
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index 9d988e9d41..4ddfb4797c 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -15,6 +15,7 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \
15 file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ 15 file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
16 file://VfrCompile-increase-path-length-limit.patch \ 16 file://VfrCompile-increase-path-length-limit.patch \
17 file://0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch \ 17 file://0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch \
18 file://0001-VfrCompile-fix-invalid-comparison-between-pointer-an.patch \
18 " 19 "
19 20
20SRC_URI_append_class-target = " \ 21SRC_URI_append_class-target = " \