Skip to contentSkip to conversation

Misc recipe fixes and updates

PATCH In review Khem Raj 4 participants 14 messages Jun 12, 2017 – Jun 19, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

cover Misc recipe fixes and updates

* Upgrade binutils to latest on 2.28 release
* Add fixes to recipe to compile with upcoming glibc 2.26 release
* Prepare recipes to let gcc pass -pie flags itself when configured

The following changes since commit aea90e9ee6f34e7c1c08307080b1e29646668df6:

package.bbclass: Restore functionality to detect RPM dependencies (2017-06-12 15:24:21 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib kraj/pu
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=kraj/pu

Khem Raj (7):
mpg123: Upgrade to 1.25.0
binutils-2.28: Update to latest on release branch
ltp: Include stdint.h for uintptr_t
libnsl2: Include stdint.h
valgrind: Fix ptest build with musl
kexec-tools: Pass -no-pie to linker
ovmf: Update to latest

 ...g-UefiHiiLib-Fix-incorrect-comparison-exp.patch | 45 --------------------
 .../ovmf/ovmf/0001-ia32-Dont-use-pie.patch         | 37 ++++++++++++++++
 ...makefile-adjust-to-build-in-under-bitbake.patch | 25 ++++++-----
 .../ovmf/ovmf/no-stack-protector-all-archs.patch   | 19 +++++++++
 meta/recipes-core/ovmf/ovmf_git.bb                 |  6 ++-
 meta/recipes-devtools/binutils/binutils-2.28.inc   |  2 +-
 .../binutils/binutils/CVE-2017-6965.patch          | 15 -------
 .../binutils/binutils/CVE-2017-6966.patch          | 20 ---------
 .../binutils/binutils/CVE-2017-6969.patch          | 14 -------
 .../binutils/binutils/CVE-2017-6969_2.patch        | 18 --------
 .../binutils/binutils/CVE-2017-7209.patch          | 14 -------
 .../binutils/binutils/CVE-2017-7210.patch          | 15 -------
 ...e-Rename-_sifields-to-__si_fields-on-musl.patch | 31 ++++++++++++++
 ...tr_tester.c-Limit-rawmemchr-test-to-glibc.patch | 39 +++++++++++++++++
 ...02-context-APIs-are-not-available-on-musl.patch | 49 ++++++++++++++++++++++
 ...rrect-include-directive-path-for-config.h.patch | 45 ++++++++++++++++++++
 ...4-pth_atfork1.c-Define-error-API-for-musl.patch | 37 ++++++++++++++++
 ...erifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch | 30 +++++++++++++
 ...d3.c-Dereference-pthread_t-before-adding-.patch | 32 ++++++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.12.0.bb  | 12 ++++++
 ...Include-stdint.h-for-uintptr_t-definition.patch | 27 ++++++++++++
 meta/recipes-extended/libnsl/libnsl2_git.bb        |  1 +
 .../ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch   | 34 +++++++++++++++
 meta/recipes-extended/ltp/ltp_20170516.bb          |  1 +
 .../kexec-tools/0001-Disable-PIE-during-link.patch | 31 ++++++++++++++
 .../kexec/kexec-tools/0001-arm64-Disable-PIC.patch | 31 ++++++++++++++
 meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb    |  2 +
 .../mpg123/{mpg123_1.24.0.bb => mpg123_1.25.0.bb}  | 10 +----
 28 files changed, 477 insertions(+), 165 deletions(-)
 delete mode 100644 meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch
 create mode 100644 meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch
 create mode 100644 meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
 create mode 100644 meta/recipes-extended/libnsl/libnsl2/0001-nis_call.c-Include-stdint.h-for-uintptr_t-definition.patch
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-Disable-PIE-during-link.patch
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch
 rename meta/recipes-multimedia/mpg123/{mpg123_1.24.0.bb => mpg123_1.25.0.bb} (87%)
Signature · 1 line
2.13.1
author
#1 lore raw

PATCH 1/7 mpg123: Upgrade to 1.25.0

No need to skip textrel QA for x86 as it has
been fixed in 1.25.0

---
 .../mpg123/{mpg123_1.24.0.bb => mpg123_1.25.0.bb}              | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
 rename meta/recipes-multimedia/mpg123/{mpg123_1.24.0.bb => mpg123_1.25.0.bb} (87%)
meta/recipes-multimedia/mpg123/mpg123_1.25.0.bb renamed from meta/recipes-multimedia/mpg123/mpg123_1.24.0.bb +2 -8
similarity index 87%
rename from meta/recipes-multimedia/mpg123/mpg123_1.24.0.bb
rename to meta/recipes-multimedia/mpg123/mpg123_1.25.0.bb
index 587327b9ef..f86098ce20 100644
@@ -11,9 +11,8 @@ LICENSE_FLAGS = "commercial"
 LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
 
 SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "75d62ac0cb713a7bac5af4ded4af2bb4"
-SRC_URI[sha256sum] = "55fb169a7711938f5df0497d1ffe28419fbef50011dc01d00b216379e6a2256c"
+SRC_URI[md5sum] = "2ffbe29c99130215b0ee7d1b11c0ea4b"
+SRC_URI[sha256sum] = "552e3e1db045e00f474252917007795ac295863fc8b13891859b3382d2f24e48"
 
 inherit autotools pkgconfig
 
@@ -42,11 +41,6 @@ EXTRA_OECONF = " \
     ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
     ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
 "
-
-# The x86 assembler optimisations contains text relocations and there are no
-# upstream plans to fix them: http://sourceforge.net/p/mpg123/bugs/168/
-INSANE_SKIP_${PN}_append_x86 = " textrel"
-
 # Fails to build with thumb-1 (qemuarm)
 #| {standard input}: Assembler messages:
 #| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
Signature · 1 line
2.13.1
author
#2 lore raw

PATCH 2/7 binutils-2.28: Update to latest on release branch

In reply to Khem Raj

Drop patches to ChangeLog, they are in patch
header anyway

---
 meta/recipes-devtools/binutils/binutils-2.28.inc     |  2 +-
 .../binutils/binutils/CVE-2017-6965.patch            | 15 ---------------
 .../binutils/binutils/CVE-2017-6966.patch            | 20 --------------------
 .../binutils/binutils/CVE-2017-6969.patch            | 14 --------------
 .../binutils/binutils/CVE-2017-6969_2.patch          | 18 ------------------
 .../binutils/binutils/CVE-2017-7209.patch            | 14 --------------
 .../binutils/binutils/CVE-2017-7210.patch            | 15 ---------------
 7 files changed, 1 insertion(+), 97 deletions(-)
meta/recipes-devtools/binutils/binutils-2.28.inc +1 -1
index 40b518bf7a..b37bb0e03a 100644
@@ -18,7 +18,7 @@ BINUPV = "${@binutils_branch_version(d)}"
 
 UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
 
-SRCREV = "354199c7692c1bed53a2a15f0e4d531457e95f17"
+SRCREV = "cb44d42ce6ef0c7a4eed7e2a3c272ac102166850"
 SRC_URI = "\
      git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
      file://0003-gprof-add-uclibc-support-to-configure.patch \
meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch +0 -15
index 1334c9444d..6697d4bc95 100644
@@ -19,21 +19,6 @@ Signed-off-by: Yuanjie Huang <[email protected]>
  binutils/readelf.c | 30 +++++++++++++++++++++++++-----
  2 files changed, 32 insertions(+), 5 deletions(-)
 
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index f21867f98c..e789a3b99b 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,10 @@
-+2017-02-13  Nick Clifton  <[email protected]>
-+
-+	PR binutils/21137
-+	* readelf.c (target_specific_reloc_handling): Add end parameter.
-+	Check for buffer overflow before writing relocated values.
-+	(apply_relocations): Pass end to target_specific_reloc_handling.
-+
- 2017-03-02  Tristan Gingold  <[email protected]>
- 
- 	* configure: Regenerate.
 diff --git a/binutils/readelf.c b/binutils/readelf.c
 index b5f577f5a1..8cdaae3b8c 100644
 --- a/binutils/readelf.c
meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch +0 -20
index dd58df5fbf..206e493b6e 100644
@@ -22,26 +22,6 @@ Signed-off-by: Yuanjie Huang <[email protected]>
  binutils/readelf.c | 109 +++++++++++++++++++++++++++++++++++++++++------------
  2 files changed, 94 insertions(+), 25 deletions(-)
 
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index e789a3b99b..bd63c8a0d8 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,5 +1,15 @@
- 2017-02-13  Nick Clifton  <[email protected]>
- 
-+	PR binutils/21139
-+	* readelf.c (target_specific_reloc_handling): Add num_syms
-+	parameter.  Check for symbol table overflow before accessing
-+	symbol value.  If reloc pointer is NULL, discard all saved state.
-+	(apply_relocations): Pass num_syms to target_specific_reloc_handling.
-+	Call target_specific_reloc_handling with a NULL reloc pointer
-+	after processing all of the relocs.
-+
-+2017-02-13  Nick Clifton  <[email protected]>
-+
- 	PR binutils/21137
- 	* readelf.c (target_specific_reloc_handling): Add end parameter.
- 	Check for buffer overflow before writing relocated values.
 diff --git a/binutils/readelf.c b/binutils/readelf.c
 index 8cdaae3b8c..7c158c6342 100644
 --- a/binutils/readelf.c
meta/recipes-devtools/binutils/binutils/CVE-2017-6969.patch +0 -14
index ed5403430c..7dfa3d87c3 100644
@@ -17,20 +17,6 @@ Signed-off-by: Yuanjie Huang <[email protected]>
  binutils/readelf.c | 10 ++++++++--
  2 files changed, 14 insertions(+), 2 deletions(-)
 
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index bd63c8a0d8..1d840b42f9 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-02-17  Nick Clifton  <[email protected]>
-+
-+	PR binutils/21156
-+	* readelf.c (find_section_in_set): Test for invalid section
-+	indicies.
-+
- 2017-02-13  Nick Clifton  <[email protected]>
- 
- 	PR binutils/21139
 diff --git a/binutils/readelf.c b/binutils/readelf.c
 index 7c158c6342..4960491c5c 100644
 --- a/binutils/readelf.c
meta/recipes-devtools/binutils/binutils/CVE-2017-6969_2.patch +0 -18
index 59a5dec675..5409511a7c 100644
@@ -21,24 +21,6 @@ Signed-off-by: Yuanjie Huang <[email protected]>
  binutils/dwarf.c   | 34 ++++++++++++++++++++--------------
  2 files changed, 30 insertions(+), 14 deletions(-)
 
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index 1d840b42f9..53352c1801 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,13 @@
-+2017-02-20  Nick Clifton  <[email protected]>
-+
-+	PR binutils/21156
-+	* dwarf.c (cu_tu_indexes_read): Move into...
-+	(load_cu_tu_indexes): ... here.  Change the variable into
-+	tri-state.  Change the function into boolean, returning
-+	false if the indicies could not be loaded.
-+	(find_cu_tu_set): Return NULL if the indicies could not be
-+	loaded.
-+
- 2017-02-17  Nick Clifton  <[email protected]>
- 
- 	PR binutils/21156
 diff --git a/binutils/dwarf.c b/binutils/dwarf.c
 index 0184a7ab2e..6d879c9b61 100644
 --- a/binutils/dwarf.c
meta/recipes-devtools/binutils/binutils/CVE-2017-7209.patch +0 -14
index 2357a12836..b14441b4e3 100644
@@ -16,20 +16,6 @@ Signed-off-by: Yuanjie Huang <[email protected]>
  binutils/readelf.c | 16 ++++++++++++----
  2 files changed, 18 insertions(+), 4 deletions(-)
 
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index 53352c1801..cf92744c12 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-02-13  Nick Clifton  <[email protected]>
-+
-+	PR binutils/21135
-+	* readelf.c (dump_section_as_bytes): Handle the case where
-+	uncompress_section_contents returns false.
-+
- 2017-02-20  Nick Clifton  <[email protected]>
- 
- 	PR binutils/21156
 diff --git a/binutils/readelf.c b/binutils/readelf.c
 index 4960491c5c..f0e7b080e8 100644
 --- a/binutils/readelf.c
meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch +0 -15
index 8791792c7c..f8ad32f4f8 100644
@@ -17,21 +17,6 @@ Signed-off-by: Yuanjie Huang <[email protected]>
  binutils/stabs.c   | 14 +++++++++++++-
  2 files changed, 20 insertions(+), 1 deletion(-)
 
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index cf92744c12..0045fbaaa6 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,10 @@
-+2017-02-14  Nick Clifton  <[email protected]>
-+
-+	PR binutils/21157
-+	* stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE
-+	pairs.
-+	(parse_number): Exit early if passed an empty string.
-+
- 2017-02-13  Nick Clifton  <[email protected]>
- 
- 	PR binutils/21135
 diff --git a/binutils/stabs.c b/binutils/stabs.c
 index f5c5d2d8e0..5d013cc361 100644
 --- a/binutils/stabs.c
Signature · 1 line
2.13.1
author
#3 lore raw

PATCH 3/7 ltp: Include stdint.h for uintptr_t

In reply to Khem Raj

Fixes build with musl and upcoming glibc

---
 .../ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch   | 34 ++++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20170516.bb          |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch
meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch new file +34 -0
new file mode 100644
index 0000000000..5c73be440b
@@ -0,0 +1,34 @@
+From 1b30d8dac1a37dc0abbb3b545db2824d6489e23f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 9 Jun 2017 09:32:13 -0700
+Subject: [PATCH] dirtyc0w: Include stdint.h
+
+uintptr_t is defined in stdint.h
+
+Fixes
+| dirtyc0w_child.c:76:15: error: 'uintptr_t' undeclared (first use in this function); did you mean 'intptr_t'?
+|    lseek(mfd, (uintptr_t) map, SEEK_SET);
+|                ^~~~~~~~~
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Submitted
+
+ testcases/kernel/security/dirtyc0w/dirtyc0w_child.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c b/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
+index 5328a9bc4..49abdd6ba 100644
+--- a/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
++++ b/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
+@@ -23,6 +23,7 @@
+ #include <sys/stat.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <pwd.h>
+ 
+ #include "tst_safe_pthread.h"
+-- 
+2.13.1
+
meta/recipes-extended/ltp/ltp_20170516.bb +1 -0
index 012c43de35..31f339461f 100644
@@ -50,6 +50,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
            file://0034-periodic_output.patch \
            file://0035-fix-test_proc_kill-hang.patch \
            file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
+           file://0001-dirtyc0w-Include-stdint.h.patch \
            "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.13.1
author
#4 lore raw

PATCH 4/7 libnsl2: Include stdint.h

In reply to Khem Raj

uintptr_t is defined in stdint.h

---
 ...Include-stdint.h-for-uintptr_t-definition.patch | 27 ++++++++++++++++++++++
 meta/recipes-extended/libnsl/libnsl2_git.bb        |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 meta/recipes-extended/libnsl/libnsl2/0001-nis_call.c-Include-stdint.h-for-uintptr_t-definition.patch
meta/recipes-extended/libnsl/libnsl2/0001-nis_call.c-Include-stdint.h-for-uintptr_t-definition.patch new file +27 -0
new file mode 100644
index 0000000000..e9ae517107
@@ -0,0 +1,27 @@
+From d71cbeb3b76e54778a4d5eec6d387cce653537ca Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 9 Jun 2017 09:49:35 -0700
+Subject: [PATCH] nis_call.c: Include stdint.h for uintptr_t definition
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ src/nisplus/nis_call.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/nisplus/nis_call.c b/src/nisplus/nis_call.c
+index 1a2b90c..1dc982d 100644
+--- a/src/nisplus/nis_call.c
++++ b/src/nisplus/nis_call.c
+@@ -23,6 +23,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <string.h>
++#include <stdint.h>
+ #include <libintl.h>
+ #include <rpc/rpc.h>
+ #include <rpc/auth.h>
+-- 
+2.13.1
+
meta/recipes-extended/libnsl/libnsl2_git.bb +1 -0
index 1698f69edb..18e37a1ac9 100644
@@ -18,6 +18,7 @@ SRCREV = "dfa2f313524aff9243c4d8ce1bace73786478356"
 SRC_URI = "git://github.com/thkukuk/libnsl \
            file://0001-include-sys-cdefs.h-explicitly.patch \
            file://0002-Define-glibc-specific-macros.patch \
+           file://0001-nis_call.c-Include-stdint.h-for-uintptr_t-definition.patch \
           "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.13.1
author
#5 lore raw

PATCH 5/7 valgrind: Fix ptest build with musl

In reply to Khem Raj

musl unearthed a problem when building out of tree, config.h was being used from $(srcdir) instead of generated config.h in $(builddir) this assumed functions e.g. mallinfo() and more which are not in musl as a result tests broke.

Also add fixes to build remaining tests when building on musl

pass -fno-pie as it cant use PIE especially in ptests/x86_64

---
 ...e-Rename-_sifields-to-__si_fields-on-musl.patch | 31 ++++++++++++++
 ...tr_tester.c-Limit-rawmemchr-test-to-glibc.patch | 39 +++++++++++++++++
 ...02-context-APIs-are-not-available-on-musl.patch | 49 ++++++++++++++++++++++
 ...rrect-include-directive-path-for-config.h.patch | 45 ++++++++++++++++++++
 ...4-pth_atfork1.c-Define-error-API-for-musl.patch | 37 ++++++++++++++++
 ...erifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch | 30 +++++++++++++
 ...d3.c-Dereference-pthread_t-before-adding-.patch | 32 ++++++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.12.0.bb  | 12 ++++++
 8 files changed, 275 insertions(+)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch new file +31 -0
new file mode 100644
index 0000000000..27366153f7
@@ -0,0 +1,31 @@
+From 64ad2744acfb4fa40b1c114633a053f87125a203 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 10 Jun 2017 00:46:39 -0700
+Subject: [PATCH 1/6] sigqueue: Rename _sifields to __si_fields on musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ memcheck/tests/linux/sigqueue.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/memcheck/tests/linux/sigqueue.c b/memcheck/tests/linux/sigqueue.c
+index d18bd72..acb7cba 100644
+--- a/memcheck/tests/linux/sigqueue.c
++++ b/memcheck/tests/linux/sigqueue.c
+@@ -8,6 +8,11 @@
+ #include <syscall.h>
+ #include <unistd.h>
+ 
++/* musl libc defines siginfo_t __si_fields instead of _sifields */
++#if defined(__linux__) && !defined(__GLIBC__)
++#define _sifields __si_fields
++#endif
++
+ int main(int argc, char **argv)
+ {
+   siginfo_t *si;
+-- 
+2.13.1
+
meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch new file +39 -0
new file mode 100644
index 0000000000..185b8f9e60
@@ -0,0 +1,39 @@
+From de692e359801a1f0488c76267e4f904dd2efe754 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 10 Jun 2017 00:39:07 -0700
+Subject: [PATCH] str_tester.c: Limit rawmemchr() test to glibc
+
+rawmemchr() is a GNU extention therefore mark it so
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ memcheck/tests/str_tester.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/memcheck/tests/str_tester.c b/memcheck/tests/str_tester.c
+index 9f7790a..47e4b4a 100644
+--- a/memcheck/tests/str_tester.c
++++ b/memcheck/tests/str_tester.c
+@@ -504,7 +504,7 @@ test_strchrnul (void)
+ #endif
+ 
+ // DDD: better done by testing for the function.
+-#if !defined(__APPLE__) && !defined(__sun)
++#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
+ static void
+ test_rawmemchr (void)
+ {
+@@ -1442,7 +1442,7 @@ main (void)
+   test_strchrnul ();
+ # endif
+ 
+-# if !defined(__APPLE__) && !defined(__sun)
++# if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
+   /* rawmemchr.  */
+   test_rawmemchr ();
+ # endif
+-- 
+2.13.1
+
meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch new file +49 -0

49 lines not on this page · raw message

meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch new file +45 -0

45 lines not on this page · raw message

meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch new file +37 -0
new file mode 100644
index 0000000000..1cb7062545
@@ -0,0 +1,37 @@
+From fb77fef4f866dac7bcc6d1ae025da60564869f84 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 10 Jun 2017 01:06:11 -0700
+Subject: [PATCH 4/6] pth_atfork1.c: Define error() API for musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ none/tests/pth_atfork1.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/pth_atfork1.c b/none/tests/pth_atfork1.c
+index 34201ef..b7f5f2d 100644
+--- a/none/tests/pth_atfork1.c
++++ b/none/tests/pth_atfork1.c
+@@ -18,7 +18,7 @@
+    Boston, MA 02111-1307, USA.  */
+ 
+ #include <errno.h>
+-#if !defined(__APPLE__) && !defined(__sun)
++#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
+ # include <error.h>
+ #endif
+ #include <stdlib.h>
+@@ -27,7 +27,7 @@
+ #include <sys/wait.h>
+ #include <stdio.h>
+ 
+-#if defined(__APPLE__) || defined(__sun)
++#if defined(__APPLE__) || defined(__sun) || (defined(__linux__) && !defined(__GLIBC__))
+ #include <string.h>  /* strerror */
+ static void error (int status, int errnum, char* msg)
+ {
+-- 
+2.13.1
+
meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch new file +30 -0
new file mode 100644
index 0000000000..6176640e42
@@ -0,0 +1,30 @@
+From b4b9f072c22f96844e02cb9d68f7ff2408680817 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 10 Jun 2017 01:07:59 -0700
+Subject: [PATCH 5/6] tc20_verifywrap.c: Fake __GLIBC_PREREQ with musl
+
+similar to sun
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ helgrind/tests/tc20_verifywrap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/helgrind/tests/tc20_verifywrap.c b/helgrind/tests/tc20_verifywrap.c
+index c110000..a311a49 100644
+--- a/helgrind/tests/tc20_verifywrap.c
++++ b/helgrind/tests/tc20_verifywrap.c
+@@ -20,7 +20,7 @@
+ 
+ #if !defined(__APPLE__)
+ 
+-#if defined(__sun__)
++#if defined(__sun__) || (defined(__linux__) && !defined(__GLIBC__))
+ /* Fake __GLIBC_PREREQ on Solaris. Pretend glibc >= 2.4. */
+ # define __GLIBC_PREREQ
+ #else
+-- 
+2.13.1
+
meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch new file +32 -0
new file mode 100644
index 0000000000..05886c743d
@@ -0,0 +1,32 @@
+From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 10 Jun 2017 01:20:32 -0700
+Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding
+ offset to it
+
+Fixes
+error: invalid use of undefined type 'struct __pthread'
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ drd/tests/pth_detached3.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
+index c02eef1..35d43a6 100644
+--- a/drd/tests/pth_detached3.c
++++ b/drd/tests/pth_detached3.c
+@@ -21,7 +21,7 @@ int main(int argc, char** argv)
+   pthread_detach(thread);
+ 
+   /* Invoke pthread_detach() with an invalid thread ID. */
+-  pthread_detach(thread + 8);
++  pthread_detach((pthread_t*)(&thread + 8));
+ 
+   fprintf(stderr, "Finished.\n");
+ 
+-- 
+2.13.1
+
meta/recipes-devtools/valgrind/valgrind_3.12.0.bb +12 -0
index d5a8dda487..d7b6d77000 100644
@@ -24,6 +24,13 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
            file://avoid-neon-for-targets-which-don-t-support-it.patch \
            file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
            file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \
+           file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \
+           file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \
+           file://0002-context-APIs-are-not-available-on-musl.patch \
+           file://0003-correct-include-directive-path-for-config.h.patch \
+           file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \
+           file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \
+           file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \
            "
 SRC_URI_append_libc-musl = "\
            file://0001-fix-build-for-musl-targets.patch \
@@ -67,6 +74,7 @@ CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
 SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
 
 CFLAGS_append_libc-uclibc = " -D__UCLIBC__ "
+CFLAGS += "-no-pie"
 
 def get_mcpu(d):
     for arg in (d.getVar('TUNE_CCARGS') or '').split():
@@ -76,6 +84,10 @@ def get_mcpu(d):
             continue
     return ""
 
+do_configure_prepend () {
+    rm -rf ${S}/config.h
+}
+
 do_install_append () {
     install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
 }
Signature · 1 line
2.13.1
author
#6 lore raw

PATCH 6/7 kexec-tools: Pass -no-pie to linker

In reply to Khem Raj

- This matches the linker flags to compiler flags in purgatory
- Compile arm64 without PIC

---
 .../kexec-tools/0001-Disable-PIE-during-link.patch | 31 ++++++++++++++++++++++
 .../kexec/kexec-tools/0001-arm64-Disable-PIC.patch | 31 ++++++++++++++++++++++
 meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb    |  2 ++
 3 files changed, 64 insertions(+)
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-Disable-PIE-during-link.patch
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch
meta/recipes-kernel/kexec/kexec-tools/0001-Disable-PIE-during-link.patch new file +31 -0
new file mode 100644
index 0000000000..3f2f85e337
@@ -0,0 +1,31 @@
+From ea7be6d71b85880e8e8a2c8a4f49a696c5f31ae4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 10 Jun 2017 11:18:49 -0700
+Subject: [PATCH] Disable PIE during link
+
+We have explcitly disabled PIE during compile so we
+just need to match it with linker flags
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ purgatory/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/purgatory/Makefile b/purgatory/Makefile
+index 564bdb7..a08e41f 100644
+--- a/purgatory/Makefile
++++ b/purgatory/Makefile
+@@ -59,7 +59,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
+ 			-Iinclude \
+ 			-I$(shell $(CC) -print-file-name=include)
+ $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
+-			-Wl,--no-undefined -nostartfiles -nostdlib \
++			-Wl,--no-undefined -no-pie -nostartfiles -nostdlib \
+ 			-nodefaultlibs -e purgatory_start -Wl,-r \
+ 			-Wl,-Map=$(PURGATORY_MAP)
+ 
+-- 
+2.13.1
+
meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch new file +31 -0
new file mode 100644
index 0000000000..84e94d7d93
@@ -0,0 +1,31 @@
+From 3bb73e5e5649b455e15d5ca3a7ad1a90c4960972 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 10 Jun 2017 11:54:36 -0700
+Subject: [PATCH] arm64: Disable PIC
+
+Fix
+| cc1: sorry, unimplemented: code model 'large' with -fPIC
+| make: *** [Makefile:118: purgatory/arch/arm64/entry.o] Error 1
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ purgatory/arch/arm64/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/purgatory/arch/arm64/Makefile b/purgatory/arch/arm64/Makefile
+index 636abea..80068ca 100644
+--- a/purgatory/arch/arm64/Makefile
++++ b/purgatory/arch/arm64/Makefile
+@@ -1,6 +1,7 @@
+ 
+ arm64_PURGATORY_EXTRA_CFLAGS = \
+ 	-mcmodel=large \
++	-fno-PIC \
+ 	-fno-stack-protector \
+ 	-fno-asynchronous-unwind-tables \
+ 	-Wundef \
+-- 
+2.13.1
+
meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb +2 -0
index 90d5985801..4caca933c7 100644
@@ -19,6 +19,8 @@ SRC_URI += "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.g
             file://0001-x86-x86_64-Fix-format-warning-with-die.patch \
             file://0002-ppc-Fix-format-warning-with-die.patch \
             file://kexec-x32.patch \
+            file://0001-Disable-PIE-during-link.patch \
+            file://0001-arm64-Disable-PIC.patch \
          "
 
 SRC_URI[md5sum] = "b2b2c5e6b29d467d6e99d587fb6b7cf5"
Signature · 1 line
2.13.1
author
#7 lore raw

PATCH 7/7 ovmf: Update to latest

In reply to Khem Raj

Fix build with gcc7

clang can not compile it therefore mark it gcc only recipe

---
 ...g-UefiHiiLib-Fix-incorrect-comparison-exp.patch | 45 ----------------------
 .../ovmf/ovmf/0001-ia32-Dont-use-pie.patch         | 37 ++++++++++++++++++
 ...makefile-adjust-to-build-in-under-bitbake.patch | 25 ++++++------
 .../ovmf/ovmf/no-stack-protector-all-archs.patch   | 19 +++++++++
 meta/recipes-core/ovmf/ovmf_git.bb                 |  6 ++-
 5 files changed, 72 insertions(+), 60 deletions(-)
 delete mode 100644 meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch
 create mode 100644 meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch
 create mode 100644 meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch
meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch deleted +0 -45
deleted file mode 100644
index 0529a27b16..0000000000
@@ -1,45 +0,0 @@
-From 73692710d50da1f421b0e6ddff784ca3135389b3 Mon Sep 17 00:00:00 2001
-From: Dandan Bi <[email protected]>
-Date: Sat, 1 Apr 2017 10:31:14 +0800
-Subject: [PATCH] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression
-
-Fix the incorrect comparison between pointer and constant zero character.
-
-https://bugzilla.tianocore.org/show_bug.cgi?id=416
-
-V2: The pointer StringPtr points to a string returned
-by ExtractConfig/ExportConfig, if it is NULL, function
-InternalHiiIfrValueAction will return FALSE. So in
-current usage model, the StringPtr can not be NULL before
-using it, so we can add ASSERT here.
-
-Cc: Eric Dong <[email protected]>
-Cc: Liming Gao <[email protected]>
-Contributed-under: TianoCore Contribution Agreement 1.0
-Signed-off-by: Dandan Bi <[email protected]>
-Reviewed-by: Eric Dong <[email protected]>
----
-Upstream-Status: Backport
-
- MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
-index 8579501..46ca7bc 100644
---- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
-+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
-@@ -2180,8 +2180,9 @@ InternalHiiIfrValueAction (
-   }
-   
-   StringPtr = ConfigAltResp;
--  
--  while (StringPtr != L'\0') {
-+  ASSERT (StringPtr != NULL);
-+
-+  while (*StringPtr != L'\0') {
-     //
-     // 1. Find <ConfigHdr> GUID=...&NAME=...&PATH=...
-     //
--- 
-1.9.1
-
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +37 -0
new file mode 100644
index 0000000000..7ce20be54c
@@ -0,0 +1,37 @@
+From f65e9cc025278387b494c2383c5d9ff3bed98687 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 11 Jun 2017 00:47:24 -0700
+Subject: [PATCH] ia32: Dont use -pie
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ BaseTools/Conf/tools_def.template | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
+index 04a1bcb210..84c5f84f93 100755
+--- a/BaseTools/Conf/tools_def.template
++++ b/BaseTools/Conf/tools_def.template
+@@ -4336,7 +4336,7 @@ RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG   =
+ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG     = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
+ 
+ DEFINE GCC_ALL_CC_FLAGS            = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common
+-DEFINE GCC_IA32_CC_FLAGS           = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
++DEFINE GCC_IA32_CC_FLAGS           = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe -fno-PIE -no-pie
+ DEFINE GCC_X64_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe
+ DEFINE GCC_IPF_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency
+ DEFINE GCC_ARM_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie
+@@ -4369,7 +4369,7 @@ DEFINE GCC_ARM_RC_FLAGS            = -I binary -O elf32-littlearm     -B arm
+ DEFINE GCC_AARCH64_RC_FLAGS        = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
+ 
+ DEFINE GCC44_ALL_CC_FLAGS            = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
+-DEFINE GCC44_IA32_CC_FLAGS           = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables
++DEFINE GCC44_IA32_CC_FLAGS           = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie
+ DEFINE GCC44_X64_CC_FLAGS            = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables
+ DEFINE GCC44_IA32_X64_DLINK_COMMON   = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
+ DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
+-- 
+2.13.1
+
meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch +12 -13
index 0fdc278ce2..1f8332ef56 100644
@@ -11,29 +11,28 @@ Signed-off-by: Ricardo Neri <[email protected]>
  BaseTools/Source/C/Makefiles/header.makefile | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
-diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
-index 821d114..fe0f08b 100644
---- a/BaseTools/Source/C/Makefiles/header.makefile
-+++ b/BaseTools/Source/C/Makefiles/header.makefile
-@@ -44,14 +44,14 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/
+Index: git/BaseTools/Source/C/Makefiles/header.makefile
+===================================================================
+--- git.orig/BaseTools/Source/C/Makefiles/header.makefile
++++ git/BaseTools/Source/C/Makefiles/header.makefile
+@@ -44,15 +44,15 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AA
  endif
  
  INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) 
 -BUILD_CPPFLAGS = $(INCLUDE) -O2
-+BUILD_CPPFLAGS := $(BUILD_CPPFLAGS) $(INCLUDE) -O2
++BUILD_CPPFLAGS += $(INCLUDE) -O2
  ifeq ($(DARWIN),Darwin)
  # assume clang or clang compatible flags on OS X
 -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g
-+BUILD_CFLAGS := $(BUILD_CFLAGS) -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g
++BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g
  else
 -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g
-+BUILD_CFLAGS := $(BUILD_CFLAGS) -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g
++BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g
  endif
 -BUILD_LFLAGS =
-+BUILD_LFLAGS := $(LDFLAGS)
- BUILD_CXXFLAGS =
+-BUILD_CXXFLAGS = -Wno-unused-result
++BUILD_LFLAGS = $(LDFLAGS)
++BUILD_CXXFLAGS += -Wno-unused-result
  
  ifeq ($(ARCH), IA32)
--- 
-2.9.3
-
+ #
meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch new file +19 -0
new file mode 100644
index 0000000000..25a09c5ce3
@@ -0,0 +1,19 @@
+Author: Steve Langasek <[email protected]>
+Description: pass -fno-stack-protector to all GCC toolchains
+ The upstream build rules inexplicably pass -fno-stack-protector only
+ when building for i386 and amd64.  Add this essential argument to the
+ generic rules for gcc 4.4 and later.
+Last-Updated: 2016-04-12
+Index: git/BaseTools/Conf/tools_def.template
+===================================================================
+--- git.orig/BaseTools/Conf/tools_def.template
++++ git/BaseTools/Conf/tools_def.template
+@@ -4368,7 +4368,7 @@ DEFINE GCC_IPF_RC_FLAGS            = -I
+ DEFINE GCC_ARM_RC_FLAGS            = -I binary -O elf32-littlearm     -B arm     --rename-section .data=.hii
+ DEFINE GCC_AARCH64_RC_FLAGS        = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
+ 
+-DEFINE GCC44_ALL_CC_FLAGS            = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
++DEFINE GCC44_ALL_CC_FLAGS            = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-stack-protector -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
+ DEFINE GCC44_IA32_CC_FLAGS           = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie
+ DEFINE GCC44_X64_CC_FLAGS            = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables
+ DEFINE GCC44_IA32_X64_DLINK_COMMON   = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
meta/recipes-core/ovmf/ovmf_git.bb +4 -2
index 9d988e9d41..5d7216e80e 100644
@@ -14,7 +14,8 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \
 	file://0002-ovmf-update-path-to-native-BaseTools.patch \
 	file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
 	file://VfrCompile-increase-path-length-limit.patch \
-        file://0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch \
+	file://0001-ia32-Dont-use-pie.patch \
+	file://no-stack-protector-all-archs.patch \
         "
 
 SRC_URI_append_class-target = " \
@@ -22,7 +23,7 @@ SRC_URI_append_class-target = " \
 	file://0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch \
 "
 
-SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588"
+SRCREV="ec4910cd3336565fdb61dafdd9ec4ae7a6160ba3"
 SRC_URI[openssl.md5sum] = "96322138f0b69e61b7212bc53d5e912b"
 SRC_URI[openssl.sha256sum] = "e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431"
 
@@ -241,3 +242,4 @@ do_deploy_class-target() {
 addtask do_deploy after do_compile before do_build
 
 BBCLASSEXTEND = "native"
+TOOLCHAIN = "gcc"
Signature · 1 line
2.13.1
#8 lore raw

Re: [PATCH 7/7] ovmf: Update to latest

Quoted 4 lines · Khem Raj

Fix build with gcc7

clang can not compile it therefore mark it gcc only recipe

This doesn't apply to master, can you rebase?

Ross

author
#9 lore raw

Re: [PATCH 7/7] ovmf: Update to latest

Quoted 10 lines · Ross
Quoted 4 lines · Khem Raj

Fix build with gcc7

clang can not compile it therefore mark it gcc only recipe

This doesn't apply to master, can you rebase?

ok.

Quoted 1 line

Ross

author
#10 lore raw

Re: [PATCH 7/7] ovmf: Update to latest

Quoted 10 lines · Khem Raj
Quoted 9 lines · Ross
Quoted 4 lines · Khem Raj

Fix build with gcc7

clang can not compile it therefore mark it gcc only recipe

This doesn't apply to master, can you rebase?

applied the rebased patch to kraj/pu

Quoted 5 lines
Quoted 1 line

ok.

Quoted 1 line

Ross

#11 lore raw

Re: [PATCH 7/7] ovmf: Update to latest

In reply to Khem Raj

This seems to be in master now. I'm not sure if we have a new master build after that but ross/mut has some sort of linker failure in ofmv (in nightly-world-lsb only):

| GenFw: ERROR 3000: Invalid
| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/work/i586-poky-linux/ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/AcpiTables/AcpiTables/OUTPUT/./Madt.dll:
Bad definition for symbol '<unknown>'@0 or unsupported symbol type. For
example, absolute and undefined symbols are not supported.

https://autobuilder.yocto.io/builders/nightly-world-lsb/builds/304/steps/BuildImages/logs/stdio

Looks like a check for symbol table alignment is failing? The LSB distro configuration requires security_flags.inc so that may be related.

Jussi

Quoted 8 lines · Khem Raj

Fix build with gcc7

clang can not compile it therefore mark it gcc only recipe

---
 ...g-UefiHiiLib-Fix-incorrect-comparison-exp.patch | 45

----------------------

Quoted 1 line
 .../ovmf/ovmf/0001-ia32-Dont-use-pie.patch         | 37

++++++++++++++++++

Quoted 5 lines
 ...makefile-adjust-to-build-in-under-bitbake.patch | 25 ++++++------
 .../ovmf/ovmf/no-stack-protector-all-archs.patch   | 19 +++++++++
 meta/recipes-core/ovmf/ovmf_git.bb                 |  6 ++-
 5 files changed, 72 insertions(+), 60 deletions(-)
 delete mode 100644

meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch

Quoted 1 line
 create mode 100644

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch

Quoted 1 line
 create mode 100644

meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch

Quoted 2 lines

diff --git

a/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch b/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch

Quoted 3 lines

deleted file mode 100644
index 0529a27b16..0000000000
---

a/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch

meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch line 4

Quoted 6 lines

+++ /dev/null

meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch deleted +0 -4
@@ -1,45 +0,0 @@
-From 73692710d50da1f421b0e6ddff784ca3135389b3 Mon Sep 17 00:00:00 2001
-From: Dandan Bi <[email protected]>
-Date: Sat, 1 Apr 2017 10:31:14 +0800
-Subject: [PATCH] MdeModulePkg/UefiHiiLib:Fix incorrect comparison

expression

Quoted 13 lines
meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch deleted +0 -13
-
-Fix the incorrect comparison between pointer and constant zero character.
-
-https://bugzilla.tianocore.org/show_bug.cgi?id=416
-
-V2: The pointer StringPtr points to a string returned
-by ExtractConfig/ExportConfig, if it is NULL, function
-InternalHiiIfrValueAction will return FALSE. So in
-current usage model, the StringPtr can not be NULL before
-using it, so we can add ASSERT here.
-
-Cc: Eric Dong <[email protected]>
-Cc: Liming Gao <[email protected]>

meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch

Quoted 10 lines
meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch deleted +0 -10
-Contributed-under: TianoCore Contribution Agreement 1.0
-Signed-off-by: Dandan Bi <[email protected]>
-Reviewed-by: Eric Dong <[email protected]>
----
-Upstream-Status: Backport
-
- MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c

b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c

Review

Quoted 19 lines
meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch deleted +0 -18
-index 8579501..46ca7bc 100644
---- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
-+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
-@@ -2180,8 +2180,9 @@ InternalHiiIfrValueAction (
-   }
-
-   StringPtr = ConfigAltResp;
--
--  while (StringPtr != L'\0') {
-+  ASSERT (StringPtr != NULL);
-+
-+  while (*StringPtr != L'\0') {
-     //
-     // 1. Find <ConfigHdr> GUID=...&NAME=...&PATH=...
-     //
---
-1.9.1
-
(quoted diff) +0 -0

b/meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch

Quoted 8 lines

new file mode 100644
index 0000000000..7ce20be54c

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +3 -0
@@ -0,0 +1,37 @@
+From f65e9cc025278387b494c2383c5d9ff3bed98687 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 11 Jun 2017 00:47:24 -0700

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 13

Quoted 10 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +10 -0
+Subject: [PATCH] ia32: Dont use -pie
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ BaseTools/Conf/tools_def.template | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/BaseTools/Conf/tools_def.template

b/BaseTools/Conf/tools_def.template

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch

Quoted 5 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +5 -0
+index 04a1bcb210..84c5f84f93 100755
+--- a/BaseTools/Conf/tools_def.template
++++ b/BaseTools/Conf/tools_def.template
+@@ -4336,7 +4336,7 @@ RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG   =
+ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG     =

--add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 20

Quoted 2 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +2 -0
+
+ DEFINE GCC_ALL_CC_FLAGS            = -g -Os -fshort-wchar -fno-builtin

-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 21

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+-DEFINE GCC_IA32_CC_FLAGS           = DEF(GCC_ALL_CC_FLAGS) -m32

-malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 22

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
++DEFINE GCC_IA32_CC_FLAGS           = DEF(GCC_ALL_CC_FLAGS) -m32

-malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe -fno-PIE -no-pie

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 23

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+ DEFINE GCC_X64_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS)

-mno-red-zone -Wno-address -mno-stack-arg-probe

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 24

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+ DEFINE GCC_IPF_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS)

-minline-int-divide-min-latency

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 25

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+ DEFINE GCC_ARM_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS)

-mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 26

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+@@ -4369,7 +4369,7 @@ DEFINE GCC_ARM_RC_FLAGS            = -I binary -O

elf32-littlearm -B arm

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 27

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+ DEFINE GCC_AARCH64_RC_FLAGS        = -I binary -O elf64-littleaarch64

-B aarch64 --rename-section .data=.hii

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 29

Quoted 2 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +2 -0
+
+ DEFINE GCC44_ALL_CC_FLAGS            = -g -fshort-wchar -fno-builtin

-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 30

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+-DEFINE GCC44_IA32_CC_FLAGS           = DEF(GCC44_ALL_CC_FLAGS) -m32

-march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 31

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
++DEFINE GCC44_IA32_CC_FLAGS           = DEF(GCC44_ALL_CC_FLAGS) -m32

-march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 32

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+ DEFINE GCC44_X64_CC_FLAGS            = DEF(GCC44_ALL_CC_FLAGS) -m64

-fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 33

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+ DEFINE GCC44_IA32_X64_DLINK_COMMON   = -nostdlib

-Wl,-n,-q,--gc-sections -z common-page-size=0x20

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch line 34

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
+ DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON)

-Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable

Quoted 4 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +3 -0
+--
+2.13.1
+

diff --git

a/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch b/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch

Quoted 2 lines

index 0fdc278ce2..1f8332ef56 100644
---

a/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch

Quoted 1 line

+++

b/meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch Signed-off-by: Ricardo Neri <

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +0 -0
@@ -11,29 +11,28 @@ Signed-off-by: Ricardo Neri <

[email protected]>

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch Signed-off-by: Ricardo Neri < · line 14

Quoted 4 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +0 -1
  BaseTools/Source/C/Makefiles/header.makefile | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
-diff --git a/BaseTools/Source/C/Makefiles/header.makefile

b/BaseTools/Source/C/Makefiles/header.makefile

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch Signed-off-by: Ricardo Neri < · line 21

Quoted 12 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +5 -4
-index 821d114..fe0f08b 100644
---- a/BaseTools/Source/C/Makefiles/header.makefile
-+++ b/BaseTools/Source/C/Makefiles/header.makefile
-@@ -44,14 +44,14 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/
+Index: git/BaseTools/Source/C/Makefiles/header.makefile
+===================================================================
+--- git.orig/BaseTools/Source/C/Makefiles/header.makefile
++++ git/BaseTools/Source/C/Makefiles/header.makefile
+@@ -44,15 +44,15 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AA
  endif
 
  INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common

-I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch Signed-off-by: Ricardo Neri < · line 26

Quoted 6 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -1
 -BUILD_CPPFLAGS = $(INCLUDE) -O2
-+BUILD_CPPFLAGS := $(BUILD_CPPFLAGS) $(INCLUDE) -O2
++BUILD_CPPFLAGS += $(INCLUDE) -O2
  ifeq ($(DARWIN),Darwin)
  # assume clang or clang compatible flags on OS X
 -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror

-Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch Signed-off-by: Ricardo Neri < · line 27

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +0 -1
-+BUILD_CFLAGS := $(BUILD_CFLAGS) -MD -fshort-wchar -fno-strict-aliasing

-Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch Signed-off-by: Ricardo Neri < · line 27

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
++BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror

-Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch Signed-off-by: Ricardo Neri < · line 29

Quoted 2 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +0 -0
  else
 -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror

-Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch Signed-off-by: Ricardo Neri < · line 30

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +0 -1
-+BUILD_CFLAGS := $(BUILD_CFLAGS) -MD -fshort-wchar -fno-strict-aliasing

-Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g

meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch Signed-off-by: Ricardo Neri < · line 30

Quoted 1 line
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +1 -0
++BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror

-Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g

Quoted 13 lines
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch new file +4 -5
  endif
 -BUILD_LFLAGS =
-+BUILD_LFLAGS := $(LDFLAGS)
- BUILD_CXXFLAGS =
+-BUILD_CXXFLAGS = -Wno-unused-result
++BUILD_LFLAGS = $(LDFLAGS)
++BUILD_CXXFLAGS += -Wno-unused-result
 
  ifeq ($(ARCH), IA32)
---
-2.9.3
-
+ #
Quoted 1 line

diff --git

a/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch b/meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch

Quoted 7 lines

new file mode 100644
index 0000000000..25a09c5ce3

meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch new file +2 -0
@@ -0,0 +1,19 @@
+Author: Steve Langasek <[email protected]>
+Description: pass -fno-stack-protector to all GCC toolchains

meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch line 12

Quoted 10 lines
meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch new file +10 -0
+ The upstream build rules inexplicably pass -fno-stack-protector only
+ when building for i386 and amd64.  Add this essential argument to the
+ generic rules for gcc 4.4 and later.
+Last-Updated: 2016-04-12
+Index: git/BaseTools/Conf/tools_def.template
+===================================================================
+--- git.orig/BaseTools/Conf/tools_def.template
++++ git/BaseTools/Conf/tools_def.template
+@@ -4368,7 +4368,7 @@ DEFINE GCC_IPF_RC_FLAGS            = -I
+ DEFINE GCC_ARM_RC_FLAGS            = -I binary -O elf32-littlearm

-B arm --rename-section .data=.hii

meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch line 13

Quoted 1 line
meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch new file +1 -0
+ DEFINE GCC_AARCH64_RC_FLAGS        = -I binary -O elf64-littleaarch64

-B aarch64 --rename-section .data=.hii

meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch line 15

Quoted 2 lines
meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch new file +2 -0
+
+-DEFINE GCC44_ALL_CC_FLAGS            = -g -fshort-wchar -fno-builtin

-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings

meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch line 16

Quoted 1 line
meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch new file +1 -0
++DEFINE GCC44_ALL_CC_FLAGS            = -g -fshort-wchar -fno-builtin

-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-stack-protector -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings

meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch line 17

Quoted 1 line
meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch new file +1 -0
+ DEFINE GCC44_IA32_CC_FLAGS           = DEF(GCC44_ALL_CC_FLAGS) -m32

-march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie

meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch line 18

Quoted 1 line
meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch new file +1 -0
+ DEFINE GCC44_X64_CC_FLAGS            = DEF(GCC44_ALL_CC_FLAGS) -m64

-fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables

meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch line 19

Quoted 1 line
meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch new file +1 -0
+ DEFINE GCC44_IA32_X64_DLINK_COMMON   = -nostdlib

-Wl,-n,-q,--gc-sections -z common-page-size=0x20

meta/recipes-core/ovmf/

Quoted 1 line
meta/recipes-core/ovmf/ renamed from meta/recipes-core/ovmf/ovmf_git.bb +0 -0

ovmf_git.bb

meta/recipes-core/ovmf/ovmf_git.bb SRC_URI = "git://

Quoted 4 lines

index 9d988e9d41..5d7216e80e 100644

meta/recipes-core/ovmf/ovmf_git.bb +0 -0
@@ -14,7 +14,8 @@ SRC_URI = "git://

github.com/tianocore/edk2.git;branch=master \

meta/recipes-core/ovmf/ovmf_git.bb SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \ · line 20

Quoted 2 lines
meta/recipes-core/ovmf/ovmf_git.bb +0 -0
        file://0002-ovmf-update-path-to-native-BaseTools.patch \
 

file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \

meta/recipes-core/ovmf/ovmf_git.bb SRC_URI = "git:// · line 17

Quoted 2 lines
meta/recipes-core/ovmf/ovmf_git.bb +0 -1
        file://VfrCompile-increase-path-length-limit.patch \
-

file://0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch \

meta/recipes-core/ovmf/ovmf_git.bb SRC_URI_append_class-target = " \ · line 23

Quoted 7 lines
meta/recipes-core/ovmf/ovmf_git.bb +2 -0
+       file://0001-ia32-Dont-use-pie.patch \
+       file://no-stack-protector-all-archs.patch \
         "
 
 SRC_URI_append_class-target = " \
@@ -22,7 +23,7 @@ SRC_URI_append_class-target = " \
 

file://0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch \

meta/recipes-core/ovmf/ovmf_git.bb SRC_URI_append_class-target = " \

Quoted 6 lines
meta/recipes-core/ovmf/ovmf_git.bb +1 -1
 "
 
-SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588"
+SRCREV="ec4910cd3336565fdb61dafdd9ec4ae7a6160ba3"
 SRC_URI[openssl.md5sum] = "96322138f0b69e61b7212bc53d5e912b"
 SRC_URI[openssl.sha256sum] =

"e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431"

Quoted 14 lines
meta/recipes-core/ovmf/ovmf_git.bb +1 -1
@@ -241,3 +242,4 @@ do_deploy_class-target() {
 addtask do_deploy after do_compile before do_build
 
 BBCLASSEXTEND = "native"
+TOOLCHAIN = "gcc"
--

2.13.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#12 lore raw

Re: [PATCH 7/7] ovmf: Update to latest

Quoted 4 lines · Jussi Kukkonen

This seems to be in master now. I'm not sure if we have a new master build after that but ross/mut has some sort of linker failure in ofmv (in nightly-world-lsb only):

Quoted 9 lines

| GenFw: ERROR 3000: Invalid
| /home/pokybuild/yocto-autobuilder/yocto-worker/
nightly-world-lsb/build/build/tmp/work/i586-poky-linux/ovmf/ git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/ AcpiTables/AcpiTables/OUTPUT/./Madt.dll: Bad definition for symbol '<unknown>'@0 or unsupported symbol type. For example, absolute and undefined symbols are not supported.

Note that this is specific to 32-bit x86 as far as I can tell.

Ross

#13 lore raw

✗ patchtest: failure for Misc recipe fixes and updates

In reply to Khem Raj

== Series Details ==

Series: Misc recipe fixes and updates
Revision: 1
URL : https://patchwork.openembedded.org/series/7197/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Added patch file is missing Upstream-Status in the header [test_upstream_status_presence]
Suggested fix Add Upstream-Status: <status> to the header of meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch (possible values: Pending, Submitted, Accepted, Backport, Denied, Inappropriate)

* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at aea90e9ee6)

* Issue A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence]
Suggested fix Sign off the added patch file (meta/recipes-core/ovmf/ovmf/no-stack-protector-all-archs.patch)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe