summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-07-31 20:59:18 +0300
committerEd Tanous <ed.tanous@intel.com>2019-07-31 20:59:18 +0300
commitb4f66bacb1b8e661d794fa7a189e2f66f5092e2e (patch)
tree5a8302cd349fdb68dadca003483c61917d4a6add /poky/meta/recipes-devtools
parent43a183cc0926da36e3a218efa02ab4838ace316f (diff)
parentdd755025e33af27b059ea7ef3afbe850e4880b08 (diff)
downloadopenbmc-b4f66bacb1b8e661d794fa7a189e2f66f5092e2e.tar.xz
Merge branch 'master' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into intel
Diffstat (limited to 'poky/meta/recipes-devtools')
-rw-r--r--poky/meta/recipes-devtools/apt/apt-native.inc2
-rw-r--r--poky/meta/recipes-devtools/apt/apt-package.inc2
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch74
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch43
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils_2.32.bb6
-rw-r--r--poky/meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch16
-rw-r--r--poky/meta/recipes-devtools/bison/bison_3.3.2.bb (renamed from poky/meta/recipes-devtools/bison/bison_3.1.bb)4
-rw-r--r--poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch35
-rw-r--r--poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.1.1.bb (renamed from poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.2.bb)8
-rw-r--r--poky/meta/recipes-devtools/ccache/ccache.inc1
-rw-r--r--poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.14.2.bb (renamed from poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.12.2.bb)4
-rw-r--r--poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch40
-rw-r--r--poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch100
-rw-r--r--poky/meta/recipes-devtools/dpkg/dpkg/pager.patch21
-rw-r--r--poky/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb4
-rw-r--r--poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.5.bb3
-rw-r--r--poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb37
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch38
-rw-r--r--poky/meta/recipes-devtools/file/file_5.37.bb (renamed from poky/meta/recipes-devtools/file/file_5.36.bb)2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-8.3.inc3
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-8.3/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch59
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-8.3/0042-PR-debug-86964.patch94
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-8.3/0043-PR85434-Prevent-spilling-of-stack-protector-guard-s-.patch813
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-9.1.inc1
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-9.1/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch59
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-runtime.inc29
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-8.3.inc (renamed from poky/meta/recipes-devtools/gdb/gdb-8.2.1.inc)12
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc1
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.bb (renamed from poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.2.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-cross_8.3.bb (renamed from poky/meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb.inc3
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch50
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch (renamed from poky/meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch)0
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch23
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch16
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch52
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch99
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb_8.3.bb (renamed from poky/meta/recipes-devtools/gdb/gdb_8.2.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb4
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11.inc23
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11/0001-allow-CC-and-CXX-to-have-multiple-words.patch31
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch218
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch48
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11/0004-ld-add-soname-to-shareable-objects.patch45
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch37
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11/0006-cmd-dist-separate-host-and-target-builds.patch282
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11/0007-cmd-go-make-GOROOT-precious-by-default.patch106
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11/0008-use-GOBUILDMODE-to-set-buildmode.patch37
-rw-r--r--poky/meta/recipes-devtools/go/go-1.11/0009-ld-replace-glibc-dynamic-linker-with-musl.patch128
-rw-r--r--poky/meta/recipes-devtools/go/go-1.12.inc6
-rw-r--r--poky/meta/recipes-devtools/go/go-cross-canadian_1.11.bb2
-rw-r--r--poky/meta/recipes-devtools/go/go-cross.inc1
-rw-r--r--poky/meta/recipes-devtools/go/go-cross_1.11.bb2
-rw-r--r--poky/meta/recipes-devtools/go/go-crosssdk_1.11.bb2
-rw-r--r--poky/meta/recipes-devtools/go/go-dep_0.5.0.bb10
-rw-r--r--poky/meta/recipes-devtools/go/go-native_1.11.bb2
-rw-r--r--poky/meta/recipes-devtools/go/go-runtime.inc1
-rw-r--r--poky/meta/recipes-devtools/go/go-runtime_1.11.bb2
-rw-r--r--poky/meta/recipes-devtools/go/go-target.inc1
-rw-r--r--poky/meta/recipes-devtools/go/go_1.11.bb14
-rw-r--r--poky/meta/recipes-devtools/json-c/json-c/add-disable-werror-option-to-configure.patch45
-rw-r--r--poky/meta/recipes-devtools/json-c/json-c_0.13.1.bb8
-rw-r--r--poky/meta/recipes-devtools/libmodulemd/libmodulemd/0001-v1-meson.build-explicitly-specify-the-v1-library-in-.patch28
-rw-r--r--poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb7
-rw-r--r--poky/meta/recipes-devtools/librepo/librepo_1.10.3.bb (renamed from poky/meta/recipes-devtools/librepo/librepo_1.9.6.bb)2
-rw-r--r--poky/meta/recipes-devtools/m4/m4-1.4.18.inc3
-rw-r--r--poky/meta/recipes-devtools/m4/m4/remove-gets.patch24
-rw-r--r--poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch2
-rw-r--r--poky/meta/recipes-devtools/mtd/mtd-utils/0001-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch92
-rw-r--r--poky/meta/recipes-devtools/mtd/mtd-utils_git.bb14
-rw-r--r--poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch33
-rw-r--r--poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb (renamed from poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.0.bb)5
-rw-r--r--poky/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch (renamed from poky/meta/recipes-devtools/perl-sanity/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch (renamed from poky/meta/recipes-devtools/perl-sanity/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch (renamed from poky/meta/recipes-devtools/perl-sanity/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch (renamed from poky/meta/recipes-devtools/perl-sanity/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch30
-rw-r--r--poky/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch (renamed from poky/meta/recipes-devtools/perl-sanity/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch32
-rw-r--r--poky/meta/recipes-devtools/perl/files/errno_ver.diff (renamed from poky/meta/recipes-devtools/perl-sanity/files/errno_ver.diff)0
-rw-r--r--poky/meta/recipes-devtools/perl/files/fix-setgroup.patch49
-rw-r--r--poky/meta/recipes-devtools/perl/files/native-perlinc.patch (renamed from poky/meta/recipes-devtools/perl-sanity/files/native-perlinc.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch (renamed from poky/meta/recipes-devtools/perl-sanity/files/perl-configpm-switch.patch)21
-rw-r--r--poky/meta/recipes-devtools/perl/files/perl-dynloader.patch (renamed from poky/meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl/files/perl-rdepends.txt (renamed from poky/meta/recipes-devtools/perl-sanity/files/perl-rdepends.txt)171
-rw-r--r--poky/meta/recipes-devtools/perl/files/run-ptest (renamed from poky/meta/recipes-devtools/perl-sanity/files/run-ptest)0
-rw-r--r--poky/meta/recipes-devtools/perl/libmodule-build-perl/run-ptest16
-rw-r--r--poky/meta/recipes-devtools/perl/libmodule-build-perl_0.4229.bb103
-rw-r--r--poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb2
-rw-r--r--poky/meta/recipes-devtools/perl/liburi-perl_1.74.bb14
-rw-r--r--poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb2
-rw-r--r--poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb2
-rw-r--r--poky/meta/recipes-devtools/perl/perl-ptest.inc (renamed from poky/meta/recipes-devtools/perl-sanity/perl-ptest.inc)9
-rw-r--r--poky/meta/recipes-devtools/perl/perl_5.30.0.bb (renamed from poky/meta/recipes-devtools/perl-sanity/perl_5.28.2.bb)32
-rw-r--r--poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.1.bb (renamed from poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.0.bb)4
-rw-r--r--poky/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb4
-rw-r--r--poky/meta/recipes-devtools/python/python-mako.inc4
-rw-r--r--poky/meta/recipes-devtools/python/python-nose_1.3.7.bb4
-rw-r--r--poky/meta/recipes-devtools/python/python-setuptools.inc11
-rw-r--r--poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948-fix.patch55
-rw-r--r--poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948.patch55
-rw-r--r--poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636-fix.patch28
-rw-r--r--poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636.patch111
-rw-r--r--poky/meta/recipes-devtools/python/python3-mako_1.0.10.bb (renamed from poky/meta/recipes-devtools/python/python3-mako_1.0.9.bb)0
-rw-r--r--poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb4
-rw-r--r--poky/meta/recipes-devtools/python/python3-pbr_5.1.3.bb5
-rw-r--r--poky/meta/recipes-devtools/python/python3-pbr_5.2.0.bb5
-rw-r--r--poky/meta/recipes-devtools/python/python3-pip_19.1.1.bb (renamed from poky/meta/recipes-devtools/python/python3-pip_19.0.3.bb)4
-rw-r--r--poky/meta/recipes-devtools/python/python3-pygments_2.4.2.bb20
-rw-r--r--poky/meta/recipes-devtools/python/python3-scons-native_3.0.5.bb8
-rw-r--r--poky/meta/recipes-devtools/python/python3-scons_3.0.5.bb29
-rw-r--r--poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch201
-rw-r--r--poky/meta/recipes-devtools/python/python3/crosspythonpath.patch25
-rw-r--r--poky/meta/recipes-devtools/python/python3/reformat_sysconfig.py21
-rw-r--r--poky/meta/recipes-devtools/python/python3_3.7.3.bb20
-rw-r--r--poky/meta/recipes-devtools/python/python_2.7.16.bb8
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu-system-native_4.0.0.bb2
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu.inc9
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0013-Revert-target-arm-Use-vector-operations-for-saturati.patch493
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0013-target-arm-Fix-vector-operation-segfault.patch66
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu_4.0.0.bb3
-rw-r--r--poky/meta/recipes-devtools/quilt/quilt.inc2
-rw-r--r--poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch46
-rw-r--r--poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb3
-rw-r--r--poky/meta/recipes-devtools/strace/strace/ptest-spacesave.patch19
-rw-r--r--poky/meta/recipes-devtools/strace/strace_4.26.bb1
-rw-r--r--poky/meta/recipes-devtools/vala/vala_0.44.5.bb (renamed from poky/meta/recipes-devtools/vala/vala_0.44.3.bb)4
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb3
128 files changed, 2347 insertions, 2432 deletions
diff --git a/poky/meta/recipes-devtools/apt/apt-native.inc b/poky/meta/recipes-devtools/apt/apt-native.inc
index ef232c1eb..d82678632 100644
--- a/poky/meta/recipes-devtools/apt/apt-native.inc
+++ b/poky/meta/recipes-devtools/apt/apt-native.inc
@@ -7,8 +7,6 @@ USE_NLS = "yes"
SRC_URI += "file://db_linking_hack.patch \
file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \
- file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \
- file://0001-fix-the-gcc-version-check.patch \
"
python do_install () {
diff --git a/poky/meta/recipes-devtools/apt/apt-package.inc b/poky/meta/recipes-devtools/apt/apt-package.inc
index 6a01f99c6..da91451d7 100644
--- a/poky/meta/recipes-devtools/apt/apt-package.inc
+++ b/poky/meta/recipes-devtools/apt/apt-package.inc
@@ -83,7 +83,7 @@ do_install () {
install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
install -d ${D}${systemd_unitdir}/system/
- install -m 0644 ${S}/debian/apt.systemd.daily ${D}${libdir}/apt/
+ install -m 0755 ${S}/debian/apt.systemd.daily ${D}${libdir}/apt/
install -m 0644 ${S}/debian/apt-daily.service ${D}${systemd_unitdir}/system/
sed -i 's#/usr/lib/apt/#${libdir}/apt/#g' ${D}${systemd_unitdir}/system/apt-daily.service
install -m 0644 ${S}/debian/apt-daily.timer ${D}${systemd_unitdir}/system/
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch b/poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch
deleted file mode 100644
index 3ac92462c..000000000
--- a/poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 53c5d0982f03fd0e24c4195d6e1e42b9ade9d500 Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Wed, 27 May 2015 14:30:28 +0800
-Subject: [PATCH] fix the gcc version check
-
-Upstream-Status: pending
-
-"GCC diagnostic push" is gcc 4.6 feature, gcc 4.4.7 on centos did not know it
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- apt-pkg/contrib/macros.h | 2 +-
- apt-pkg/deb/debsrcrecords.cc | 4 ++--
- apt-pkg/srcrecords.cc | 4 ++--
- 3 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
-index 2727fd8..0ecae50 100644
---- a/apt-pkg/contrib/macros.h
-+++ b/apt-pkg/contrib/macros.h
-@@ -136,7 +136,7 @@
- #endif
- #endif
-
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #define APT_IGNORE_DEPRECATED_PUSH \
- _Pragma("GCC diagnostic push") \
- _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
-index e8295de..40160b2 100644
---- a/apt-pkg/deb/debsrcrecords.cc
-+++ b/apt-pkg/deb/debsrcrecords.cc
-@@ -139,13 +139,13 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F)
- for (std::vector<pkgSrcRecords::File2>::const_iterator f2 = F2.begin(); f2 != F2.end(); ++f2)
- {
- pkgSrcRecords::File2 f;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- #endif
- f.MD5Hash = f2->MD5Hash;
- f.Size = f2->Size;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic pop
- #endif
- f.Path = f2->Path;
-diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc
-index 53d7e60..1484828 100644
---- a/apt-pkg/srcrecords.cc
-+++ b/apt-pkg/srcrecords.cc
-@@ -157,7 +157,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
- for (std::vector<pkgSrcRecords::File>::const_iterator f = F.begin(); f != F.end(); ++f)
- {
- pkgSrcRecords::File2 f2;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- #endif
-@@ -165,7 +165,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
- f2.Size = f->Size;
- f2.Hashes.push_back(HashString("MD5Sum", f->MD5Hash));
- f2.FileSize = f->Size;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic pop
- #endif
- f2.Path = f->Path;
---
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch b/poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch
deleted file mode 100644
index 47870e3c8..000000000
--- a/poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 9fdf50d63df08ee65e7d8e62c35f19ac4841bca9 Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Wed, 27 May 2015 09:48:45 +0800
-Subject: [PATCH] remove Wsuggest-attribute from CXXFLAGS
-
-Upstream-Status: Inappropriate
-
-Wsuggest-attribute is GCC 4.6 feature, centos6 is using GCC
-4.4.7 which unknown this flag, so remove it from CXXFLAGS
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- buildlib/environment.mak.in | 1 -
- test/libapt/makefile | 1 -
- 2 files changed, 2 deletions(-)
-
-diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in
-index 9620722..c344d01 100644
---- a/buildlib/environment.mak.in
-+++ b/buildlib/environment.mak.in
-@@ -14,7 +14,6 @@ CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra
- CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations
- CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef
- # suggests methods which already have such an attribute
--#CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
- # sanitize options to be enabled for testing
- #CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr
- # a bit too pedantic to be run by default
-diff --git a/test/libapt/makefile b/test/libapt/makefile
-index 5ff9cf6..c5b5190 100644
---- a/test/libapt/makefile
-+++ b/test/libapt/makefile
-@@ -40,7 +40,6 @@ CXXFLAGS += -pthread
- # disable some flags for gtest again
- CXXFLAGS+= -Wno-missing-declarations
- CXXFLAGS+= -Wno-missing-field-initializers
--CXXFLAGS+= -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wno-suggest-attribute=noreturn
- CXXFLAGS+= -Wno-undef
-
- # All Google Test headers. Usually you shouldn't change this definition.
---
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/binutils/binutils_2.32.bb b/poky/meta/recipes-devtools/binutils/binutils_2.32.bb
index 51a974890..89315915c 100644
--- a/poky/meta/recipes-devtools/binutils/binutils_2.32.bb
+++ b/poky/meta/recipes-devtools/binutils/binutils_2.32.bb
@@ -20,6 +20,11 @@ EXTRA_OECONF_class-native = "--enable-targets=all \
--enable-install-libbfd \
--disable-werror"
+# gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target
+# So remove -O2 and use -Os as workaround
+SELECTED_OPTIMIZATION_remove_mipsarch = "-O2"
+SELECTED_OPTIMIZATION_append_mipsarch = " -Os"
+
do_install_class-native () {
autotools_do_install
@@ -47,3 +52,4 @@ PACKAGE_BEFORE_PN += "libbfd"
FILES_libbfd = "${libdir}/libbfd-*.so"
BBCLASSEXTEND = "native nativesdk"
+
diff --git a/poky/meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch b/poky/meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch
index ac16c5770..8a41a3a76 100644
--- a/poky/meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch
+++ b/poky/meta/recipes-devtools/bison/bison/dont-depend-on-help2man.patch.patch
@@ -1,4 +1,4 @@
-From 4c0d7733f30903f8d7c7cd7433f5c8a7505e35f5 Mon Sep 17 00:00:00 2001
+From 31bb81ef15c42b10844eb8af8738f672076edf0e Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Tue, 21 Apr 2015 00:48:45 -0700
Subject: [PATCH] doc/local.mk: dont-depend-on-help2man.patch
@@ -10,15 +10,16 @@ Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Updated for bison 3.0.4
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
---
- doc/local.mk | 9 +--------
+ doc/local.mk | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/doc/local.mk b/doc/local.mk
-index c340452..642f385 100644
+index d12836e..f9bf332 100644
--- a/doc/local.mk
+++ b/doc/local.mk
-@@ -98,10 +98,7 @@ endif ! CROSS_COMPILING
+@@ -101,10 +101,7 @@ endif ! CROSS_COMPILING
## Man Pages. ##
## ----------- ##
@@ -30,9 +31,9 @@ index c340452..642f385 100644
# Differences to ignore when comparing the man page (the date).
remove_time_stamp = \
-@@ -124,10 +121,6 @@ $(top_srcdir)/doc/bison.1: $(MAN_DEPS)
+@@ -127,10 +124,6 @@ $(top_srcdir)/doc/bison.1: $(MAN_DEPS)
fi
- $(AM_V_at)rm -f $@*.t
+ $(AM_V_at)rm -f $@*.tmp
-if ENABLE_YACC
-nodist_man_MANS = doc/yacc.1
@@ -41,6 +42,3 @@ index c340452..642f385 100644
## ----------------------------- ##
## Graphviz examples generation. ##
## ----------------------------- ##
---
-1.7.9.5
-
diff --git a/poky/meta/recipes-devtools/bison/bison_3.1.bb b/poky/meta/recipes-devtools/bison/bison_3.3.2.bb
index a743bfdb8..adb9d48e9 100644
--- a/poky/meta/recipes-devtools/bison/bison_3.1.bb
+++ b/poky/meta/recipes-devtools/bison/bison_3.3.2.bb
@@ -17,8 +17,8 @@ SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
# No point in hardcoding path to m4, just use PATH
EXTRA_OECONF += "M4=m4"
-SRC_URI[md5sum] = "db7e431785ad96870bfa570a15cab079"
-SRC_URI[sha256sum] = "7c2464ad6cb7b513b2c350a092d919327e1f63d12ff024836acbb504475da5c6"
+SRC_URI[md5sum] = "c9b552dee234b2f6b66e56b27e5234c9"
+SRC_URI[sha256sum] = "039ee45b61d95e5003e7e8376f9080001b4066ff357bde271b7faace53b9d804"
inherit autotools gettext texinfo
diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch
deleted file mode 100644
index a8fcfc0f7..000000000
--- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From eecc48ecad359cd4fab650ce49cfe57e99d1859d Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 17 May 2018 12:21:31 +0300
-Subject: [PATCH] Add LDFLAGS when building libbtrfsutil.so and python
- bindings.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 10f0e3b0..1697794c 100644
---- a/Makefile
-+++ b/Makefile
-@@ -402,7 +402,7 @@ libbtrfsutil/%.o: libbtrfsutil/%.c
-
- libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects)
- @echo " [LD] $@"
-- $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) $(libbtrfsutil_objects) \
-+ $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) $(LDFLAGS) $(libbtrfsutil_objects) \
- -shared -Wl,-soname,libbtrfsutil.so.$(libbtrfsutil_major) -o $@
-
- libbtrfsutil.a: $(libbtrfsutil_objects)
-@@ -417,7 +417,7 @@ ifeq ($(PYTHON_BINDINGS),1)
- libbtrfsutil_python: libbtrfsutil.so.$(libbtrfsutil_major) libbtrfsutil.so libbtrfsutil/btrfsutil.h
- @echo " [PY] libbtrfsutil"
- $(Q)cd libbtrfsutil/python; \
-- CFLAGS= LDFLAGS= $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
-+ CFLAGS= $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
-
- .PHONY: libbtrfsutil_python
- endif
diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.2.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.1.1.bb
index a1e730966..2cd99706b 100644
--- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.2.bb
+++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.1.1.bb
@@ -14,9 +14,8 @@ DEPENDS = "util-linux attr e2fsprogs lzo acl python3-setuptools-native"
DEPENDS_append_class-target = " udev"
RDEPENDS_${PN} = "libgcc"
-SRCREV = "5c748404b97035463c79ba4e5fd41b6858535509"
+SRCREV = "781e36a784faa58a4f0515eef124af860d59e2c0"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
- file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \
file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
"
@@ -27,7 +26,10 @@ CLEANBROKEN = "1"
PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
EXTRA_OECONF = " --disable-zstd"
EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
-EXTRA_OEMAKE = "V=1"
+EXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}"
+EXTRA_PYTHON_CFLAGS_class-native = ""
+EXTRA_PYTHON_LDFLAGS = "${LDFLAGS}"
+EXTRA_OEMAKE = "V=1 'EXTRA_PYTHON_CFLAGS=${EXTRA_PYTHON_CFLAGS}' 'EXTRA_PYTHON_LDFLAGS=${EXTRA_PYTHON_LDFLAGS}'"
do_configure_prepend() {
# Upstream doesn't ship this and autoreconf won't install it as automake isn't used.
diff --git a/poky/meta/recipes-devtools/ccache/ccache.inc b/poky/meta/recipes-devtools/ccache/ccache.inc
index a31acada5..dcbbf0ca7 100644
--- a/poky/meta/recipes-devtools/ccache/ccache.inc
+++ b/poky/meta/recipes-devtools/ccache/ccache.inc
@@ -10,6 +10,7 @@ LICENSE = "GPLv3+"
DEPENDS = "zlib"
SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
+UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
inherit autotools
diff --git a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.12.2.bb b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.14.2.bb
index c70523dca..80c559fef 100644
--- a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.12.2.bb
+++ b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.14.2.bb
@@ -8,11 +8,11 @@ SRC_URI = "git://github.com/rpm-software-management/createrepo_c \
file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
"
-SRCREV = "5b4c06f6af24633f667da37455281f24a4abd461"
+SRCREV = "f390af98c8f1bb04010e293ea864eae160f75879"
S = "${WORKDIR}/git"
-DEPENDS = "expat curl glib-2.0 libxml2 openssl bzip2 zlib file sqlite3 xz rpm"
+DEPENDS = "expat curl glib-2.0 libxml2 openssl bzip2 zlib file sqlite3 xz rpm libmodulemd"
DEPENDS_append_class-native = " file-replacement-native"
inherit cmake pkgconfig bash-completion distutils3-base
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch
deleted file mode 100644
index b36850886..000000000
--- a/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 0ad7bba80d5b9035089ff2b2f77a774b5b201915 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 26 Aug 2015 16:28:59 +0300
-Subject: [PATCH 5/5] dpkg-compiler.m4: remove -Wvla
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Remove the -Wvla flag from the set of compiler warning flags, since gcc
-on old host systems such as CentOS 5.8 doesn't support it, and it
-causes a build error for dpkg-native.
-
-Upstream-Status: Pending
-
-Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-
-Update patch context for dpkg 1.19.4.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- m4/dpkg-compiler.m4 | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4
-index a6192f6..4c7bf2e 100644
---- a/m4/dpkg-compiler.m4
-+++ b/m4/dpkg-compiler.m4
-@@ -67,7 +67,6 @@ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [
- DPKG_CHECK_COMPILER_FLAG([-Wshift-negative-value])
- DPKG_CHECK_COMPILER_FLAG([-Wsizeof-array-argument])
- DPKG_CHECK_COMPILER_FLAG([-Wswitch-bool])
-- DPKG_CHECK_COMPILER_FLAG([-Wvla])
- DPKG_CHECK_COMPILER_FLAG([-Wwrite-strings])
-
- AC_LANG_CASE(
---
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch b/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
deleted file mode 100644
index 5debcc520..000000000
--- a/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 9d260d408f9e17abd1d1dccd685bd7e80a3655a9 Mon Sep 17 00:00:00 2001
-From: Donn Seeley <donn.seeley@windriver.com>
-Date: Tue, 25 Feb 2014 17:44:04 +0800
-Subject: [PATCH] dpkg: fix a link problem for dpkg-native on CentOS 5.8
-
-CentOS 5.8 kernels and headers support the sync_file_range() system call,
-but glibc 2.5 doesn't provide the syscall stub. It appears that this
-problem is known but will never be fixed:
-
- https://bugzilla.redhat.com/show_bug.cgi?id=518581
-
- Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface
-
- Status: CLOSED CANTFIX
- Last Closed: 2009-11-22 22:19:55
-
- Kirby Zhou 2009-08-20 23:37:55 EDT
-
- Description of problem:
-
- glibc misses sync_file_range syscall interface. The header file and
- man page both say 'sync_file_range' should exist. From man page,
- sync_file_range should exist sinc kernel-2.6.17
-
- Andreas Schwab 2009-08-21 03:24:24 EDT
-
- It has only been added to glibc 2.6, and cannot be backported due to
- ABI breakage. You can always fall back to syscall(3).
-
- Ulrich Drepper 2009-11-22 22:19:55 EST
-
- As comment #1 says, no chance to backport this.
-
- See the syscall man page for instructions.
-
- Jon E 2010-03-19 10:32:37 EDT
-
- then why document it if it's broken and you're not going to fix it?
- .. might want to FTFM over at sync_file_range(2) - in the meantime -
- borrowing from glibc 2.6 .. any thoughts on this implementation for a
- hacky workaround for those still on your "ancient releases" .. (eg:
- RHEL5.3)?:
-
- #ifdef ULI_WONT_FIX_THIS_IN_GLIBC2.5
- #define NR_sync_file_range 277
- int sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
- {
- return syscall (NR_sync_file_range, fd,
- __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
- __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
- flags);
- }
- #endif
-
- assuming of course that you're on an x86_64 and include/asm-
- x86_64/unistd.h has the correct entry
-
- (fwiw - fio is starting to use this now)
-
-Rather than attempting to provide an implementation using syscall(),
-we take the more conservative route and ignore header support for
-sync_file_range() flags when the glibc version is <= 2.5.
-
-Upstream-Status: Inappropriate [everyone else builds on newer hosts :-)]
-
-Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
-Signed-off-by: Lei Liu <lei.liu2@windriver.com>
-
-Update patch context for dpkg 1.19.4.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- src/archives.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/archives.c b/src/archives.c
-index 8476a5c..b05a63f 100644
---- a/src/archives.c
-+++ b/src/archives.c
-@@ -68,7 +68,7 @@ fd_writeback_init(int fd)
- /* Ignore the return code as it should be considered equivalent to an
- * asynchronous hint for the kernel, we are doing an fsync() later on
- * anyway. */
--#if defined(SYNC_FILE_RANGE_WRITE)
-+#if defined(SYNC_FILE_RANGE_WRITE) && __GLIBC_PREREQ(2, 6)
- sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
- #elif defined(HAVE_POSIX_FADVISE)
- posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
-@@ -1093,7 +1093,7 @@ tarobject(struct tar_archive *tar, struct tar_entry *ti)
- return 0;
- }
-
--#if defined(SYNC_FILE_RANGE_WAIT_BEFORE)
-+#if defined(SYNC_FILE_RANGE_WAIT_BEFORE) && __GLIBC_PREREQ(2, 6)
- static void
- tar_writeback_barrier(struct fsys_namenode_list *files, struct pkginfo *pkg)
- {
---
-2.16.2
-
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/pager.patch b/poky/meta/recipes-devtools/dpkg/dpkg/pager.patch
new file mode 100644
index 000000000..e56b9d28a
--- /dev/null
+++ b/poky/meta/recipes-devtools/dpkg/dpkg/pager.patch
@@ -0,0 +1,21 @@
+pager: Use less instead of pager
+
+pager is a Debianism. Istead use directly pager.
+
+Upstream-Status: Inappropriate [OE-Core integration specific]
+
+Suggested-by: Burton, Ross <ross.burton@intel.com>
+Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
+diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
+index 2bb067a..6cbce80 100644
+--- a/lib/dpkg/dpkg.h
++++ b/lib/dpkg/dpkg.h
+@@ -95,7 +95,7 @@ DPKG_BEGIN_DECLS
+ #define MAXUPDATES 250
+
+ #define DEFAULTSHELL "sh"
+-#define DEFAULTPAGER "pager"
++#define DEFAULTPAGER "less"
+
+ #define MD5HASHLEN 32
+ #define MAXTRIGDIRECTIVE 256
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb b/poky/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb
index c3dbda77a..b83868fec 100644
--- a/poky/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb
+++ b/poky/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb
@@ -9,12 +9,12 @@ SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \
file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \
file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \
- file://0005-dpkg-compiler.m4-remove-Wvla.patch \
file://0006-add-musleabi-to-known-target-tripets.patch \
file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \
file://0001-dpkg-Support-muslx32-build.patch \
+ file://pager.patch \
"
-SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch \
+SRC_URI_append_class-native = " \
file://tweak-options-require-tar-1.27.patch \
"
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.5.bb b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.5.bb
index 0695ee9dc..ed946159b 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.5.bb
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.5.bb
@@ -113,7 +113,8 @@ ALTERNATIVE_LINK_NAME[mkfs.ext2] = "${base_sbindir}/mkfs.ext2"
ALTERNATIVE_${PN}-tune2fs = "tune2fs"
ALTERNATIVE_LINK_NAME[tune2fs] = "${base_sbindir}/tune2fs"
-RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash bzip2 diffutils perl"
+RDEPENDS_${PN}-ptest += "coreutils procps bash bzip2 diffutils perl sed"
+RDEPENDS_${PN}-ptest += "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
do_compile_ptest() {
oe_runmake -C ${B}/tests
diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb
index 157551e6a..5b8049f53 100644
--- a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb
+++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb
@@ -44,7 +44,7 @@ inherit autotools gettext ptest
EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
EXTRA_OECONF_append_class-native = " --without-bzlib"
-RDEPENDS_${PN}-ptest = "libasm libelf bash make coreutils ${PN}-binutils ${PN}"
+RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
@@ -61,6 +61,18 @@ do_compile_ptest() {
do_install_ptest() {
if [ ${PTEST_ENABLED} = "1" ]; then
+ # copy the files which needed by the cases
+ TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint"
+ install -d -m 755 ${D}${PTEST_PATH}/src
+ install -d -m 755 ${D}${PTEST_PATH}/libelf
+ install -d -m 755 ${D}${PTEST_PATH}/libdw
+ for test_file in ${TEST_FILES}; do
+ if [ -f ${B}/src/${test_file} ]; then
+ cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src
+ fi
+ done
+ cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so
+ cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so
cp -r ${S}/tests/ ${D}${PTEST_PATH}
cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
cp -r ${B}/config.h ${D}${PTEST_PATH}
@@ -109,3 +121,26 @@ FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils
# The package contains symlinks that trip up insane
INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
+
+# avoid stripping some generated binaries otherwise some of the tests such as test-nlist,
+# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
+INHIBIT_PACKAGE_STRIP_FILES = "\
+ ${PKGD}${PTEST_PATH}/tests/test-nlist \
+ ${PKGD}${PTEST_PATH}/tests/elfstrmerge \
+ ${PKGD}${PTEST_PATH}/tests/backtrace-child \
+ ${PKGD}${PTEST_PATH}/tests/backtrace-data \
+ ${PKGD}${PTEST_PATH}/tests/deleted \
+ ${PKGD}${PTEST_PATH}/src/strip \
+ ${PKGD}${PTEST_PATH}/src/addr2line \
+ ${PKGD}${PTEST_PATH}/src/elfcmp \
+ ${PKGD}${PTEST_PATH}/src/objdump \
+ ${PKGD}${PTEST_PATH}/src/readelf \
+ ${PKGD}${PTEST_PATH}/src/nm \
+ ${PKGD}${PTEST_PATH}/src/elflint \
+ ${PKGD}${PTEST_PATH}/libelf/libelf.so \
+ ${PKGD}${PTEST_PATH}/libdw/libdw.so \
+ ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \
+ ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \
+"
+
+EXCLUDE_PACKAGES_FROM_SHLIBS = "${PN}-ptest"
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch b/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
index 67ca0e4c7..de8c05f11 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
@@ -1,19 +1,47 @@
-From 61939d2e552e7645ecd671fa01cf1c7a72caa82a Mon Sep 17 00:00:00 2001
+From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001
From: Mingli Yu <Mingli.Yu@windriver.com>
-Date: Fri, 12 Apr 2019 16:29:58 +0800
-Subject: [PATCH] skip the test when gcc not deployed
+Date: Tue, 21 May 2019 15:20:34 +0800
+Subject: [PATCH v2] skip the test when gcc not deployed
Skip the tests which depend on gcc when
gcc not deployed.
-Upstream-Status: Inappropriate [oe specific]
+Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html]
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
+ tests/run-disasm-x86-64.sh | 2 ++
+ tests/run-disasm-x86.sh | 2 ++
tests/run-strip-g.sh | 2 ++
tests/run-strip-nothing.sh | 2 ++
- 2 files changed, 4 insertions(+)
+ 4 files changed, 8 insertions(+)
+diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh
+index a6be62b..c3ef238 100755
+--- a/tests/run-disasm-x86-64.sh
++++ b/tests/run-disasm-x86-64.sh
+@@ -22,6 +22,8 @@ case "`uname -m`" in
+ x86_64)
+ tempfiles testfile45.o
+ testfiles testfile45.S testfile45.expect
++ # skip the case if no gcc deployed
++ which gcc || exit 77
+ gcc -m64 -c -o testfile45.o testfile45.S
+ testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect
+ ;;
+diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh
+index 28a3df7..544fc28 100755
+--- a/tests/run-disasm-x86.sh
++++ b/tests/run-disasm-x86.sh
+@@ -22,6 +22,8 @@ case "`uname -m`" in
+ x86_64 | i?86 )
+ tempfiles testfile44.o
+ testfiles testfile44.S testfile44.expect
++ # skip the case if no gcc deployed
++ which gcc || exit 77
+ gcc -m32 -c -o testfile44.o testfile44.S
+ testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect
+ ;;
diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh
index 1303819..a943dec 100755
--- a/tests/run-strip-g.sh
diff --git a/poky/meta/recipes-devtools/file/file_5.36.bb b/poky/meta/recipes-devtools/file/file_5.37.bb
index 9a0e5bd22..803aa9a27 100644
--- a/poky/meta/recipes-devtools/file/file_5.36.bb
+++ b/poky/meta/recipes-devtools/file/file_5.37.bb
@@ -16,7 +16,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)"
SRC_URI = "git://github.com/file/file.git"
-SRCREV = "f3a4b9ada3ca99e62c62b9aa78eee4935a8094fe"
+SRCREV = "a0d5b0e4e9f97d74a9911e95cedd579852e25398"
S = "${WORKDIR}/git"
inherit autotools update-alternatives
diff --git a/poky/meta/recipes-devtools/gcc/gcc-8.3.inc b/poky/meta/recipes-devtools/gcc/gcc-8.3.inc
index fe9c7c360..1781ff5b5 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-8.3.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-8.3.inc
@@ -36,7 +36,6 @@ SRC_URI = "\
file://0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
file://0004-64-bit-multilib-hack.patch \
file://0005-optional-libstdc.patch \
- file://0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
file://0007-COLLECT_GCC_OPTIONS.patch \
file://0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
file://0009-fortran-cross-compile-hack.patch \
@@ -72,6 +71,8 @@ SRC_URI = "\
file://0039-riscv-Disable-multilib-for-OE.patch \
file://0040-powerpc-powerpc64-Add-support-for-musl-ldso.patch \
file://0041-Add-a-recursion-limit-to-libiberty-s-demangling-code.patch \
+ file://0042-PR-debug-86964.patch \
+ file://0043-PR85434-Prevent-spilling-of-stack-protector-guard-s-.patch \
"
SRC_URI[md5sum] = "65b210b4bfe7e060051f799e0f994896"
SRC_URI[sha256sum] = "64baadfe6cc0f4947a84cb12d7f0dfaf45bb58b7e92461639596c21e02d97d2c"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-8.3/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/poky/meta/recipes-devtools/gcc/gcc-8.3/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index 0cea228c8..000000000
--- a/poky/meta/recipes-devtools/gcc/gcc-8.3/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 1dba090a11c40b0926f9707a543d658c95e1f156 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:14:20 +0400
-Subject: [PATCH 06/40] gcc: disable MASK_RELAX_PIC_CALLS bit
-
-The new feature added after 4.3.3
-"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
-will cause cc1plus eat up all the system memory when build webkit-gtk.
-The function mips_get_pic_call_symbol keeps on recursively calling itself.
-Disable this feature to walk aside the bug.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 7 -------
- gcc/configure.ac | 7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 3901722400c..0c9b8ac5f55 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27553,13 +27553,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
- $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 1b1362f70fe..53840363115 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4798,13 +4798,6 @@ x:
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
-
- AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
---
-2.21.0
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc-8.3/0042-PR-debug-86964.patch b/poky/meta/recipes-devtools/gcc/gcc-8.3/0042-PR-debug-86964.patch
new file mode 100644
index 000000000..d9b5d39b7
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-8.3/0042-PR-debug-86964.patch
@@ -0,0 +1,94 @@
+From beb921e1106b5bcbb0c6e2be84b241327e2ffc51 Mon Sep 17 00:00:00 2001
+From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 25 Mar 2019 21:19:09 +0000
+Subject: [PATCH] PR debug/86964 * dwarf2out.c
+ (premark_used_variables): New function. (prune_unused_types_walk): Do
+ not mark not premarked external variables. (prune_unused_types):
+ Call premark_used_variables.
+
+ * gcc.dg/debug/dwarf2/pr86964.c: New testcase.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269925 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+---
+ gcc/ChangeLog | 8 ++++++
+ gcc/dwarf2out.c | 32 +++++++++++++++++++++
+ 2 files changed, 40 insertions(+)
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index 2075480ca2b..cdce539ac6f 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1,3 +1,11 @@
++2019-03-25 Johan Karlsson <johan.karlsson@enea.com>
++
++ PR debug/86964
++ * dwarf2out.c (premark_used_variables): New function.
++ (prune_unused_types_walk): Do not mark not premarked external
++ variables.
++ (prune_unused_types): Call premark_used_variables.
++
+ 2019-02-22 Release Manager
+
+ * GCC 8.3.0 released.
+diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
+index ae8bdee9981..b9a624e1ac7 100644
+--- a/gcc/dwarf2out.c
++++ b/gcc/dwarf2out.c
+@@ -22658,6 +22658,21 @@ premark_types_used_by_global_vars (void)
+ ->traverse<void *, premark_types_used_by_global_vars_helper> (NULL);
+ }
+
++/* Mark all variables used by the symtab as perennial. */
++
++static void
++premark_used_variables (void)
++{
++ /* Mark DIEs in the symtab as used. */
++ varpool_node *var;
++ FOR_EACH_VARIABLE (var)
++ {
++ dw_die_ref die = lookup_decl_die (var->decl);
++ if (die)
++ die->die_perennial_p = 1;
++ }
++}
++
+ /* Generate a DW_TAG_call_site DIE in function DECL under SUBR_DIE
+ for CA_LOC call arg loc node. */
+
+@@ -29264,6 +29279,19 @@ prune_unused_types_walk (dw_die_ref die)
+
+ return;
+
++ case DW_TAG_variable:
++ if (flag_debug_only_used_symbols)
++ {
++ if (die->die_perennial_p)
++ break;
++
++ /* premark_used_variables marks external variables --- don't mark
++ them here. */
++ if (get_AT (die, DW_AT_external))
++ return;
++ }
++ /* FALLTHROUGH */
++
+ default:
+ /* Mark everything else. */
+ break;
+@@ -29390,6 +29418,10 @@ prune_unused_types (void)
+ /* Mark types that are used in global variables. */
+ premark_types_used_by_global_vars ();
+
++ /* Mark variables used in the symtab. */
++ if (flag_debug_only_used_symbols)
++ premark_used_variables ();
++
+ /* Set the mark on nodes that are actually used. */
+ prune_unused_types_walk (comp_unit_die ());
+ for (node = limbo_die_list; node; node = node->next)
+--
+2.21.0
diff --git a/poky/meta/recipes-devtools/gcc/gcc-8.3/0043-PR85434-Prevent-spilling-of-stack-protector-guard-s-.patch b/poky/meta/recipes-devtools/gcc/gcc-8.3/0043-PR85434-Prevent-spilling-of-stack-protector-guard-s-.patch
new file mode 100644
index 000000000..f15207f58
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc-8.3/0043-PR85434-Prevent-spilling-of-stack-protector-guard-s-.patch
@@ -0,0 +1,813 @@
+From f98495d90ba66f67fe922a4b9229ea787041c418 Mon Sep 17 00:00:00 2001
+From: thopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 22 Nov 2018 14:46:17 +0000
+Subject: [PATCH] PR85434: Prevent spilling of stack protector guard's address
+ on ARM
+
+In case of high register pressure in PIC mode, address of the stack
+protector's guard can be spilled on ARM targets as shown in PR85434,
+thus allowing an attacker to control what the canary would be compared
+against. ARM does lack stack_protect_set and stack_protect_test insn
+patterns, defining them does not help as the address is expanded
+regularly and the patterns only deal with the copy and test of the
+guard with the canary.
+
+This problem does not occur for x86 targets because the PIC access and
+the test can be done in the same instruction. Aarch64 is exempt too
+because PIC access insn pattern are mov of UNSPEC which prevents it from
+the second access in the epilogue being CSEd in cse_local pass with the
+first access in the prologue.
+
+The approach followed here is to create new "combined" set and test
+standard pattern names that take the unexpanded guard and do the set or
+test. This allows the target to use an opaque pattern (eg. using UNSPEC)
+to hide the individual instructions being generated to the compiler and
+split the pattern into generic load, compare and branch instruction
+after register allocator, therefore avoiding any spilling. This is here
+implemented for the ARM targets. For targets not implementing these new
+standard pattern names, the existing stack_protect_set and
+stack_protect_test pattern names are used.
+
+To be able to split PIC access after register allocation, the functions
+had to be augmented to force a new PIC register load and to control
+which register it loads into. This is because sharing the PIC register
+between prologue and epilogue could lead to spilling due to CSE again
+which an attacker could use to control what the canary gets compared
+against.
+
+2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
+
+ gcc/
+ PR target/85434
+ * target-insns.def (stack_protect_combined_set): Define new standard
+ pattern name.
+ (stack_protect_combined_test): Likewise.
+ * cfgexpand.c (stack_protect_prologue): Try new
+ stack_protect_combined_set pattern first.
+ * function.c (stack_protect_epilogue): Try new
+ stack_protect_combined_test pattern first.
+ * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
+ parameters to control which register to use as PIC register and force
+ reloading PIC register respectively. Insert in the stream of insns if
+ possible.
+ (legitimize_pic_address): Expose above new parameters in prototype and
+ adapt recursive calls accordingly. Use pic_reg if non null instead of
+ cached one.
+ (arm_load_pic_register): Add pic_reg parameter and use it if non null.
+ (arm_legitimize_address): Adapt to new legitimize_pic_address
+ prototype.
+ (thumb_legitimize_address): Likewise.
+ (arm_emit_call_insn): Adapt to require_pic_register prototype change.
+ (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
+ (thumb1_expand_prologue): Likewise.
+ * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
+ change.
+ (arm_load_pic_register): Likewise.
+ * config/arm/predicated.md (guard_addr_operand): New predicate.
+ (guard_operand): New predicate.
+ * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
+ prototype change.
+ (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
+ prototype change.
+ (stack_protect_combined_set): New expander..
+ (stack_protect_combined_set_insn): New insn_and_split pattern.
+ (stack_protect_set_insn): New insn pattern.
+ (stack_protect_combined_test): New expander.
+ (stack_protect_combined_test_insn): New insn_and_split pattern.
+ (arm_stack_protect_test_insn): New insn pattern.
+ * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
+ * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
+ (UNSPEC_SP_TEST): Likewise.
+ * doc/md.texi (stack_protect_combined_set): Document new standard
+ pattern name.
+ (stack_protect_set): Clarify that the operand for guard's address is
+ legal.
+ (stack_protect_combined_test): Document new standard pattern name.
+ (stack_protect_test): Clarify that the operand for guard's address is
+ legal.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266379 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+CVE: CVE-2018-12886
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+---
+ gcc/ChangeLog | 49 ++++++
+ gcc/cfgexpand.c | 17 +++
+ gcc/config/arm/arm-protos.h | 4 +-
+ gcc/config/arm/arm.c | 87 ++++++++---
+ gcc/config/arm/arm.md | 163 +++++++++++++++++++-
+ gcc/config/arm/predicates.md | 17 +++
+ gcc/config/arm/thumb1.md | 13 ++
+ gcc/config/arm/unspecs.md | 3 +
+ gcc/doc/md.texi | 55 ++++++-
+ gcc/function.c | 32 +++-
+ gcc/target-insns.def | 2 +
+ 11 files changed, 399 insertions(+), 43 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/arm/pr85434.c
+
+diff --git a/gcc/ChangeLog b/gcc/ChangeLog
+index e2ebfd34214..fa41e7112e0 100644
+--- a/gcc/ChangeLog
++++ b/gcc/ChangeLog
+@@ -1537,6 +1537,55 @@
+ * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
+ (mov<mov>): ..this and enable unconditionally.
+
++2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
++
++ * target-insns.def (stack_protect_combined_set): Define new standard
++ pattern name.
++ (stack_protect_combined_test): Likewise.
++ * cfgexpand.c (stack_protect_prologue): Try new
++ stack_protect_combined_set pattern first.
++ * function.c (stack_protect_epilogue): Try new
++ stack_protect_combined_test pattern first.
++ * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
++ parameters to control which register to use as PIC register and force
++ reloading PIC register respectively. Insert in the stream of insns if
++ possible.
++ (legitimize_pic_address): Expose above new parameters in prototype and
++ adapt recursive calls accordingly. Use pic_reg if non null instead of
++ cached one.
++ (arm_load_pic_register): Add pic_reg parameter and use it if non null.
++ (arm_legitimize_address): Adapt to new legitimize_pic_address
++ prototype.
++ (thumb_legitimize_address): Likewise.
++ (arm_emit_call_insn): Adapt to require_pic_register prototype change.
++ (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
++ (thumb1_expand_prologue): Likewise.
++ * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
++ change.
++ (arm_load_pic_register): Likewise.
++ * config/arm/predicated.md (guard_addr_operand): New predicate.
++ (guard_operand): New predicate.
++ * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
++ prototype change.
++ (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
++ prototype change.
++ (stack_protect_combined_set): New expander..
++ (stack_protect_combined_set_insn): New insn_and_split pattern.
++ (stack_protect_set_insn): New insn pattern.
++ (stack_protect_combined_test): New expander.
++ (stack_protect_combined_test_insn): New insn_and_split pattern.
++ (arm_stack_protect_test_insn): New insn pattern.
++ * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
++ * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
++ (UNSPEC_SP_TEST): Likewise.
++ * doc/md.texi (stack_protect_combined_set): Document new standard
++ pattern name.
++ (stack_protect_set): Clarify that the operand for guard's address is
++ legal.
++ (stack_protect_combined_test): Document new standard pattern name.
++ (stack_protect_test): Clarify that the operand for guard's address is
++ legal.
++
+ 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
+index 8fa392fcd8a..21bdcdaeaa3 100644
+--- a/gcc/cfgexpand.c
++++ b/gcc/cfgexpand.c
+@@ -6185,6 +6185,23 @@ stack_protect_prologue (void)
+ rtx x, y;
+
+ x = expand_normal (crtl->stack_protect_guard);
++
++ if (targetm.have_stack_protect_combined_set () && guard_decl)
++ {
++ gcc_assert (DECL_P (guard_decl));
++ y = DECL_RTL (guard_decl);
++
++ /* Allow the target to compute address of Y and copy it to X without
++ leaking Y into a register. This combined address + copy pattern
++ allows the target to prevent spilling of any intermediate results by
++ splitting it after register allocator. */
++ if (rtx_insn *insn = targetm.gen_stack_protect_combined_set (x, y))
++ {
++ emit_insn (insn);
++ return;
++ }
++ }
++
+ if (guard_decl)
+ y = expand_normal (guard_decl);
+ else
+diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
+index 8d6d2395b84..00f5f16ed02 100644
+--- a/gcc/config/arm/arm-protos.h
++++ b/gcc/config/arm/arm-protos.h
+@@ -28,7 +28,7 @@ extern enum unwind_info_type arm_except_unwind_info (struct gcc_options *);
+ extern int use_return_insn (int, rtx);
+ extern bool use_simple_return_p (void);
+ extern enum reg_class arm_regno_class (int);
+-extern void arm_load_pic_register (unsigned long);
++extern void arm_load_pic_register (unsigned long, rtx);
+ extern int arm_volatile_func (void);
+ extern void arm_expand_prologue (void);
+ extern void arm_expand_epilogue (bool);
+@@ -69,7 +69,7 @@ extern int const_ok_for_dimode_op (HOST_WIDE_INT, enum rtx_code);
+ extern int arm_split_constant (RTX_CODE, machine_mode, rtx,
+ HOST_WIDE_INT, rtx, rtx, int);
+ extern int legitimate_pic_operand_p (rtx);
+-extern rtx legitimize_pic_address (rtx, machine_mode, rtx);
++extern rtx legitimize_pic_address (rtx, machine_mode, rtx, rtx, bool);
+ extern rtx legitimize_tls_address (rtx, rtx);
+ extern bool arm_legitimate_address_p (machine_mode, rtx, bool);
+ extern int arm_legitimate_address_outer_p (machine_mode, rtx, RTX_CODE, int);
+diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
+index 8393f0b87f3..12417de5102 100644
+--- a/gcc/config/arm/arm.c
++++ b/gcc/config/arm/arm.c
+@@ -7379,21 +7379,34 @@ legitimate_pic_operand_p (rtx x)
+ return 1;
+ }
+
+-/* Record that the current function needs a PIC register. Initialize
+- cfun->machine->pic_reg if we have not already done so. */
++/* Record that the current function needs a PIC register. If PIC_REG is null,
++ a new pseudo is allocated as PIC register, otherwise PIC_REG is used. In
++ both case cfun->machine->pic_reg is initialized if we have not already done
++ so. COMPUTE_NOW decide whether and where to set the PIC register. If true,
++ PIC register is reloaded in the current position of the instruction stream
++ irregardless of whether it was loaded before. Otherwise, it is only loaded
++ if not already done so (crtl->uses_pic_offset_table is null). Note that
++ nonnull PIC_REG is only supported iff COMPUTE_NOW is true and null PIC_REG
++ is only supported iff COMPUTE_NOW is false. */
+
+ static void
+-require_pic_register (void)
++require_pic_register (rtx pic_reg, bool compute_now)
+ {
++ gcc_assert (compute_now == (pic_reg != NULL_RTX));
++
+ /* A lot of the logic here is made obscure by the fact that this
+ routine gets called as part of the rtx cost estimation process.
+ We don't want those calls to affect any assumptions about the real
+ function; and further, we can't call entry_of_function() until we
+ start the real expansion process. */
+- if (!crtl->uses_pic_offset_table)
++ if (!crtl->uses_pic_offset_table || compute_now)
+ {
+- gcc_assert (can_create_pseudo_p ());
++ gcc_assert (can_create_pseudo_p ()
++ || (pic_reg != NULL_RTX
++ && REG_P (pic_reg)
++ && GET_MODE (pic_reg) == Pmode));
+ if (arm_pic_register != INVALID_REGNUM
++ && !compute_now
+ && !(TARGET_THUMB1 && arm_pic_register > LAST_LO_REGNUM))
+ {
+ if (!cfun->machine->pic_reg)
+@@ -7409,8 +7422,10 @@ require_pic_register (void)
+ {
+ rtx_insn *seq, *insn;
+
++ if (pic_reg == NULL_RTX)
++ pic_reg = gen_reg_rtx (Pmode);
+ if (!cfun->machine->pic_reg)
+- cfun->machine->pic_reg = gen_reg_rtx (Pmode);
++ cfun->machine->pic_reg = pic_reg;
+
+ /* Play games to avoid marking the function as needing pic
+ if we are being called as part of the cost-estimation
+@@ -7421,11 +7436,12 @@ require_pic_register (void)
+ start_sequence ();
+
+ if (TARGET_THUMB1 && arm_pic_register != INVALID_REGNUM
+- && arm_pic_register > LAST_LO_REGNUM)
++ && arm_pic_register > LAST_LO_REGNUM
++ && !compute_now)
+ emit_move_insn (cfun->machine->pic_reg,
+ gen_rtx_REG (Pmode, arm_pic_register));
+ else
+- arm_load_pic_register (0UL);
++ arm_load_pic_register (0UL, pic_reg);
+
+ seq = get_insns ();
+ end_sequence ();
+@@ -7438,16 +7454,33 @@ require_pic_register (void)
+ we can't yet emit instructions directly in the final
+ insn stream. Queue the insns on the entry edge, they will
+ be committed after everything else is expanded. */
+- insert_insn_on_edge (seq,
+- single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
++ if (currently_expanding_to_rtl)
++ insert_insn_on_edge (seq,
++ single_succ_edge
++ (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
++ else
++ emit_insn (seq);
+ }
+ }
+ }
+ }
+
++/* Legitimize PIC load to ORIG into REG. If REG is NULL, a new pseudo is
++ created to hold the result of the load. If not NULL, PIC_REG indicates
++ which register to use as PIC register, otherwise it is decided by register
++ allocator. COMPUTE_NOW forces the PIC register to be loaded at the current
++ location in the instruction stream, irregardless of whether it was loaded
++ previously. Note that nonnull PIC_REG is only supported iff COMPUTE_NOW is
++ true and null PIC_REG is only supported iff COMPUTE_NOW is false.
++
++ Returns the register REG into which the PIC load is performed. */
++
+ rtx
+-legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
++legitimize_pic_address (rtx orig, machine_mode mode, rtx reg, rtx pic_reg,
++ bool compute_now)
+ {
++ gcc_assert (compute_now == (pic_reg != NULL_RTX));
++
+ if (GET_CODE (orig) == SYMBOL_REF
+ || GET_CODE (orig) == LABEL_REF)
+ {
+@@ -7480,9 +7513,12 @@ legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
+ rtx mem;
+
+ /* If this function doesn't have a pic register, create one now. */
+- require_pic_register ();
++ require_pic_register (pic_reg, compute_now);
++
++ if (pic_reg == NULL_RTX)
++ pic_reg = cfun->machine->pic_reg;
+
+- pat = gen_calculate_pic_address (reg, cfun->machine->pic_reg, orig);
++ pat = gen_calculate_pic_address (reg, pic_reg, orig);
+
+ /* Make the MEM as close to a constant as possible. */
+ mem = SET_SRC (pat);
+@@ -7531,9 +7567,11 @@ legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
+
+ gcc_assert (GET_CODE (XEXP (orig, 0)) == PLUS);
+
+- base = legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, reg);
++ base = legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, reg,
++ pic_reg, compute_now);
+ offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
+- base == reg ? 0 : reg);
++ base == reg ? 0 : reg, pic_reg,
++ compute_now);
+
+ if (CONST_INT_P (offset))
+ {
+@@ -7633,16 +7671,17 @@ static GTY(()) int pic_labelno;
+ low register. */
+
+ void
+-arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED)
++arm_load_pic_register (unsigned long saved_regs ATTRIBUTE_UNUSED, rtx pic_reg)
+ {
+- rtx l1, labelno, pic_tmp, pic_rtx, pic_reg;
++ rtx l1, labelno, pic_tmp, pic_rtx;
+
+ if (crtl->uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE)
+ return;
+
+ gcc_assert (flag_pic);
+
+- pic_reg = cfun->machine->pic_reg;
++ if (pic_reg == NULL_RTX)
++ pic_reg = cfun->machine->pic_reg;
+ if (TARGET_VXWORKS_RTP)
+ {
+ pic_rtx = gen_rtx_SYMBOL_REF (Pmode, VXWORKS_GOTT_BASE);
+@@ -8718,7 +8757,8 @@ arm_legitimize_address (rtx x, rtx orig_x, machine_mode mode)
+ {
+ /* We need to find and carefully transform any SYMBOL and LABEL
+ references; so go back to the original address expression. */
+- rtx new_x = legitimize_pic_address (orig_x, mode, NULL_RTX);
++ rtx new_x = legitimize_pic_address (orig_x, mode, NULL_RTX, NULL_RTX,
++ false /*compute_now*/);
+
+ if (new_x != orig_x)
+ x = new_x;
+@@ -8786,7 +8826,8 @@ thumb_legitimize_address (rtx x, rtx orig_x, machine_mode mode)
+ {
+ /* We need to find and carefully transform any SYMBOL and LABEL
+ references; so go back to the original address expression. */
+- rtx new_x = legitimize_pic_address (orig_x, mode, NULL_RTX);
++ rtx new_x = legitimize_pic_address (orig_x, mode, NULL_RTX, NULL_RTX,
++ false /*compute_now*/);
+
+ if (new_x != orig_x)
+ x = new_x;
+@@ -18074,7 +18115,7 @@ arm_emit_call_insn (rtx pat, rtx addr, bool sibcall)
+ ? !targetm.binds_local_p (SYMBOL_REF_DECL (addr))
+ : !SYMBOL_REF_LOCAL_P (addr)))
+ {
+- require_pic_register ();
++ require_pic_register (NULL_RTX, false /*compute_now*/);
+ use_reg (&CALL_INSN_FUNCTION_USAGE (insn), cfun->machine->pic_reg);
+ }
+
+@@ -22006,7 +22047,7 @@ arm_expand_prologue (void)
+ mask &= THUMB2_WORK_REGS;
+ if (!IS_NESTED (func_type))
+ mask |= (1 << IP_REGNUM);
+- arm_load_pic_register (mask);
++ arm_load_pic_register (mask, NULL_RTX);
+ }
+
+ /* If we are profiling, make sure no instructions are scheduled before
+@@ -25237,7 +25278,7 @@ thumb1_expand_prologue (void)
+ /* Load the pic register before setting the frame pointer,
+ so we can use r7 as a temporary work register. */
+ if (flag_pic && arm_pic_register != INVALID_REGNUM)
+- arm_load_pic_register (live_regs_mask);
++ arm_load_pic_register (live_regs_mask, NULL_RTX);
+
+ if (!frame_pointer_needed && CALLER_INTERWORKING_SLOT_SIZE > 0)
+ emit_move_insn (gen_rtx_REG (Pmode, ARM_HARD_FRAME_POINTER_REGNUM),
+diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
+index c8dc9474b1b..f6196e93168 100644
+--- a/gcc/config/arm/arm.md
++++ b/gcc/config/arm/arm.md
+@@ -6021,7 +6021,8 @@
+ operands[1] = legitimize_pic_address (operands[1], SImode,
+ (!can_create_pseudo_p ()
+ ? operands[0]
+- : 0));
++ : NULL_RTX), NULL_RTX,
++ false /*compute_now*/);
+ }
+ "
+ )
+@@ -6309,7 +6310,7 @@
+ /* r3 is clobbered by set/longjmp, so we can use it as a scratch
+ register. */
+ if (arm_pic_register != INVALID_REGNUM)
+- arm_load_pic_register (1UL << 3);
++ arm_load_pic_register (1UL << 3, NULL_RTX);
+ DONE;
+ }")
+
+@@ -8634,6 +8635,164 @@
+ (set_attr "conds" "clob")]
+ )
+
++;; Named patterns for stack smashing protection.
++(define_expand "stack_protect_combined_set"
++ [(parallel
++ [(set (match_operand:SI 0 "memory_operand" "")
++ (unspec:SI [(match_operand:SI 1 "guard_operand" "")]
++ UNSPEC_SP_SET))
++ (clobber (match_scratch:SI 2 ""))
++ (clobber (match_scratch:SI 3 ""))])]
++ ""
++ ""
++)
++
++;; Use a separate insn from the above expand to be able to have the mem outside
++;; the operand #1 when register allocation comes. This is needed to avoid LRA
++;; try to reload the guard since we need to control how PIC access is done in
++;; the -fpic/-fPIC case (see COMPUTE_NOW parameter when calling
++;; legitimize_pic_address ()).
++(define_insn_and_split "*stack_protect_combined_set_insn"
++ [(set (match_operand:SI 0 "memory_operand" "=m,m")
++ (unspec:SI [(mem:SI (match_operand:SI 1 "guard_addr_operand" "X,X"))]
++ UNSPEC_SP_SET))
++ (clobber (match_scratch:SI 2 "=&l,&r"))
++ (clobber (match_scratch:SI 3 "=&l,&r"))]
++ ""
++ "#"
++ "reload_completed"
++ [(parallel [(set (match_dup 0) (unspec:SI [(mem:SI (match_dup 2))]
++ UNSPEC_SP_SET))
++ (clobber (match_dup 2))])]
++ "
++{
++ if (flag_pic)
++ {
++ /* Forces recomputing of GOT base now. */
++ legitimize_pic_address (operands[1], SImode, operands[2], operands[3],
++ true /*compute_now*/);
++ }
++ else
++ {
++ if (address_operand (operands[1], SImode))
++ operands[2] = operands[1];
++ else
++ {
++ rtx mem = XEXP (force_const_mem (SImode, operands[1]), 0);
++ emit_move_insn (operands[2], mem);
++ }
++ }
++}"
++ [(set_attr "arch" "t1,32")]
++)
++
++(define_insn "*stack_protect_set_insn"
++ [(set (match_operand:SI 0 "memory_operand" "=m,m")
++ (unspec:SI [(mem:SI (match_operand:SI 1 "register_operand" "+&l,&r"))]
++ UNSPEC_SP_SET))
++ (clobber (match_dup 1))]
++ ""
++ "@
++ ldr\\t%1, [%1]\;str\\t%1, %0\;movs\t%1,#0
++ ldr\\t%1, [%1]\;str\\t%1, %0\;mov\t%1,#0"
++ [(set_attr "length" "8,12")
++ (set_attr "conds" "clob,nocond")
++ (set_attr "type" "multiple")
++ (set_attr "arch" "t1,32")]
++)
++
++(define_expand "stack_protect_combined_test"
++ [(parallel
++ [(set (pc)
++ (if_then_else
++ (eq (match_operand:SI 0 "memory_operand" "")
++ (unspec:SI [(match_operand:SI 1 "guard_operand" "")]
++ UNSPEC_SP_TEST))
++ (label_ref (match_operand 2))
++ (pc)))
++ (clobber (match_scratch:SI 3 ""))
++ (clobber (match_scratch:SI 4 ""))
++ (clobber (reg:CC CC_REGNUM))])]
++ ""
++ ""
++)
++
++;; Use a separate insn from the above expand to be able to have the mem outside
++;; the operand #1 when register allocation comes. This is needed to avoid LRA
++;; try to reload the guard since we need to control how PIC access is done in
++;; the -fpic/-fPIC case (see COMPUTE_NOW parameter when calling
++;; legitimize_pic_address ()).
++(define_insn_and_split "*stack_protect_combined_test_insn"
++ [(set (pc)
++ (if_then_else
++ (eq (match_operand:SI 0 "memory_operand" "m,m")
++ (unspec:SI [(mem:SI (match_operand:SI 1 "guard_addr_operand" "X,X"))]
++ UNSPEC_SP_TEST))
++ (label_ref (match_operand 2))
++ (pc)))
++ (clobber (match_scratch:SI 3 "=&l,&r"))
++ (clobber (match_scratch:SI 4 "=&l,&r"))
++ (clobber (reg:CC CC_REGNUM))]
++ ""
++ "#"
++ "reload_completed"
++ [(const_int 0)]
++{
++ rtx eq;
++
++ if (flag_pic)
++ {
++ /* Forces recomputing of GOT base now. */
++ legitimize_pic_address (operands[1], SImode, operands[3], operands[4],
++ true /*compute_now*/);
++ }
++ else
++ {
++ if (address_operand (operands[1], SImode))
++ operands[3] = operands[1];
++ else
++ {
++ rtx mem = XEXP (force_const_mem (SImode, operands[1]), 0);
++ emit_move_insn (operands[3], mem);
++ }
++ }
++ if (TARGET_32BIT)
++ {
++ emit_insn (gen_arm_stack_protect_test_insn (operands[4], operands[0],
++ operands[3]));
++ rtx cc_reg = gen_rtx_REG (CC_Zmode, CC_REGNUM);
++ eq = gen_rtx_EQ (CC_Zmode, cc_reg, const0_rtx);
++ emit_jump_insn (gen_arm_cond_branch (operands[2], eq, cc_reg));
++ }
++ else
++ {
++ emit_insn (gen_thumb1_stack_protect_test_insn (operands[4], operands[0],
++ operands[3]));
++ eq = gen_rtx_EQ (VOIDmode, operands[4], const0_rtx);
++ emit_jump_insn (gen_cbranchsi4 (eq, operands[4], const0_rtx,
++ operands[2]));
++ }
++ DONE;
++}
++ [(set_attr "arch" "t1,32")]
++)
++
++(define_insn "arm_stack_protect_test_insn"
++ [(set (reg:CC_Z CC_REGNUM)
++ (compare:CC_Z (unspec:SI [(match_operand:SI 1 "memory_operand" "m,m")
++ (mem:SI (match_operand:SI 2 "register_operand" "+l,r"))]
++ UNSPEC_SP_TEST)
++ (const_int 0)))
++ (clobber (match_operand:SI 0 "register_operand" "=&l,&r"))
++ (clobber (match_dup 2))]
++ "TARGET_32BIT"
++ "ldr\t%0, [%2]\;ldr\t%2, %1\;eors\t%0, %2, %0"
++ [(set_attr "length" "8,12")
++ (set_attr "conds" "set")
++ (set_attr "type" "multiple")
++ (set_attr "arch" "t,32")]
++)
++
+ (define_expand "casesi"
+ [(match_operand:SI 0 "s_register_operand" "") ; index to jump on
+ (match_operand:SI 1 "const_int_operand" "") ; lower bound
+diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md
+index 7e198f9bce4..69718ee9c7a 100644
+--- a/gcc/config/arm/predicates.md
++++ b/gcc/config/arm/predicates.md
+@@ -31,6 +31,23 @@
+ || REGNO_REG_CLASS (REGNO (op)) != NO_REGS));
+ })
+
++; Predicate for stack protector guard's address in
++; stack_protect_combined_set_insn and stack_protect_combined_test_insn patterns
++(define_predicate "guard_addr_operand"
++ (match_test "true")
++{
++ return (CONSTANT_ADDRESS_P (op)
++ || !targetm.cannot_force_const_mem (mode, op));
++})
++
++; Predicate for stack protector guard in stack_protect_combined_set and
++; stack_protect_combined_test patterns
++(define_predicate "guard_operand"
++ (match_code "mem")
++{
++ return guard_addr_operand (XEXP (op, 0), mode);
++})
++
+ (define_predicate "imm_for_neon_inv_logic_operand"
+ (match_code "const_vector")
+ {
+diff --git a/gcc/config/arm/thumb1.md b/gcc/config/arm/thumb1.md
+index 19dcdbcdd73..cd199c9c529 100644
+--- a/gcc/config/arm/thumb1.md
++++ b/gcc/config/arm/thumb1.md
+@@ -1962,4 +1962,17 @@
+ }"
+ [(set_attr "type" "mov_reg")]
+ )
++
++(define_insn "thumb1_stack_protect_test_insn"
++ [(set (match_operand:SI 0 "register_operand" "=&l")
++ (unspec:SI [(match_operand:SI 1 "memory_operand" "m")
++ (mem:SI (match_operand:SI 2 "register_operand" "+l"))]
++ UNSPEC_SP_TEST))
++ (clobber (match_dup 2))]
++ "TARGET_THUMB1"
++ "ldr\t%0, [%2]\;ldr\t%2, %1\;eors\t%0, %2, %0"
++ [(set_attr "length" "8")
++ (set_attr "conds" "set")
++ (set_attr "type" "multiple")]
++)
+
+diff --git a/gcc/config/arm/unspecs.md b/gcc/config/arm/unspecs.md
+index 19416736ef9..8f9dbcb08dc 100644
+--- a/gcc/config/arm/unspecs.md
++++ b/gcc/config/arm/unspecs.md
+@@ -86,6 +86,9 @@
+ UNSPEC_PROBE_STACK ; Probe stack memory reference
+ UNSPEC_NONSECURE_MEM ; Represent non-secure memory in ARMv8-M with
+ ; security extension
++ UNSPEC_SP_SET ; Represent the setting of stack protector's canary
++ UNSPEC_SP_TEST ; Represent the testing of stack protector's canary
++ ; against the guard.
+ ])
+
+ (define_c_enum "unspec" [
+diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
+index 295fc1f1143..895309b2f3c 100644
+--- a/gcc/doc/md.texi
++++ b/gcc/doc/md.texi
+@@ -7450,22 +7450,61 @@ builtins.
+ The get/set patterns have a single output/input operand respectively,
+ with @var{mode} intended to be @code{Pmode}.
+
++@cindex @code{stack_protect_combined_set} instruction pattern
++@item @samp{stack_protect_combined_set}
++This pattern, if defined, moves a @code{ptr_mode} value from an address
++whose declaration RTX is given in operand 1 to the memory in operand 0
++without leaving the value in a register afterward. If several
++instructions are needed by the target to perform the operation (eg. to
++load the address from a GOT entry then load the @code{ptr_mode} value
++and finally store it), it is the backend's responsibility to ensure no
++intermediate result gets spilled. This is to avoid leaking the value
++some place that an attacker might use to rewrite the stack guard slot
++after having clobbered it.
++
++If this pattern is not defined, then the address declaration is
++expanded first in the standard way and a @code{stack_protect_set}
++pattern is then generated to move the value from that address to the
++address in operand 0.
++
+ @cindex @code{stack_protect_set} instruction pattern
+ @item @samp{stack_protect_set}
+-This pattern, if defined, moves a @code{ptr_mode} value from the memory
+-in operand 1 to the memory in operand 0 without leaving the value in
+-a register afterward. This is to avoid leaking the value some place
+-that an attacker might use to rewrite the stack guard slot after
+-having clobbered it.
++This pattern, if defined, moves a @code{ptr_mode} value from the valid
++memory location in operand 1 to the memory in operand 0 without leaving
++the value in a register afterward. This is to avoid leaking the value
++some place that an attacker might use to rewrite the stack guard slot
++after having clobbered it.
++
++Note: on targets where the addressing modes do not allow to load
++directly from stack guard address, the address is expanded in a standard
++way first which could cause some spills.
+
+ If this pattern is not defined, then a plain move pattern is generated.
+
++@cindex @code{stack_protect_combined_test} instruction pattern
++@item @samp{stack_protect_combined_test}
++This pattern, if defined, compares a @code{ptr_mode} value from an
++address whose declaration RTX is given in operand 1 with the memory in
++operand 0 without leaving the value in a register afterward and
++branches to operand 2 if the values were equal. If several
++instructions are needed by the target to perform the operation (eg. to
++load the address from a GOT entry then load the @code{ptr_mode} value
++and finally store it), it is the backend's responsibility to ensure no
++intermediate result gets spilled. This is to avoid leaking the value
++some place that an attacker might use to rewrite the stack guard slot
++after having clobbered it.
++
++If this pattern is not defined, then the address declaration is
++expanded first in the standard way and a @code{stack_protect_test}
++pattern is then generated to compare the value from that address to the
++value at the memory in operand 0.
++
+ @cindex @code{stack_protect_test} instruction pattern
+ @item @samp{stack_protect_test}
+ This pattern, if defined, compares a @code{ptr_mode} value from the
+-memory in operand 1 with the memory in operand 0 without leaving the
+-value in a register afterward and branches to operand 2 if the values
+-were equal.
++valid memory location in operand 1 with the memory in operand 0 without
++leaving the value in a register afterward and branches to operand 2 if
++the values were equal.
+
+ If this pattern is not defined, then a plain compare pattern and
+ conditional branch pattern is used.
+diff --git a/gcc/function.c b/gcc/function.c
+index 85a5d9f43f7..69523c1d723 100644
+--- a/gcc/function.c
++++ b/gcc/function.c
+@@ -4937,18 +4937,34 @@ stack_protect_epilogue (void)
+ tree guard_decl = targetm.stack_protect_guard ();
+ rtx_code_label *label = gen_label_rtx ();
+ rtx x, y;
+- rtx_insn *seq;
++ rtx_insn *seq = NULL;
+
+ x = expand_normal (crtl->stack_protect_guard);
+- if (guard_decl)
+- y = expand_normal (guard_decl);
++
++ if (targetm.have_stack_protect_combined_test () && guard_decl)
++ {
++ gcc_assert (DECL_P (guard_decl));
++ y = DECL_RTL (guard_decl);
++ /* Allow the target to compute address of Y and compare it with X without
++ leaking Y into a register. This combined address + compare pattern
++ allows the target to prevent spilling of any intermediate results by
++ splitting it after register allocator. */
++ seq = targetm.gen_stack_protect_combined_test (x, y, label);
++ }
+ else
+- y = const0_rtx;
++ {
++ if (guard_decl)
++ y = expand_normal (guard_decl);
++ else
++ y = const0_rtx;
++
++ /* Allow the target to compare Y with X without leaking either into
++ a register. */
++ if (targetm.have_stack_protect_test ())
++ seq = targetm.gen_stack_protect_test (x, y, label);
++ }
+
+- /* Allow the target to compare Y with X without leaking either into
+- a register. */
+- if (targetm.have_stack_protect_test ()
+- && ((seq = targetm.gen_stack_protect_test (x, y, label)) != NULL_RTX))
++ if (seq)
+ emit_insn (seq);
+ else
+ emit_cmp_and_jump_insns (x, y, EQ, NULL_RTX, ptr_mode, 1, label);
+diff --git a/gcc/target-insns.def b/gcc/target-insns.def
+index 9a552c3d11c..d39889b3522 100644
+--- a/gcc/target-insns.def
++++ b/gcc/target-insns.def
+@@ -96,7 +96,9 @@ DEF_TARGET_INSN (sibcall_value, (rtx x0, rtx x1, rtx opt2, rtx opt3,
+ DEF_TARGET_INSN (simple_return, (void))
+ DEF_TARGET_INSN (split_stack_prologue, (void))
+ DEF_TARGET_INSN (split_stack_space_check, (rtx x0, rtx x1))
++DEF_TARGET_INSN (stack_protect_combined_set, (rtx x0, rtx x1))
+ DEF_TARGET_INSN (stack_protect_set, (rtx x0, rtx x1))
++DEF_TARGET_INSN (stack_protect_combined_test, (rtx x0, rtx x1, rtx x2))
+ DEF_TARGET_INSN (stack_protect_test, (rtx x0, rtx x1, rtx x2))
+ DEF_TARGET_INSN (store_multiple, (rtx x0, rtx x1, rtx x2))
+ DEF_TARGET_INSN (tablejump, (rtx x0, rtx x1))
+--
+2.21.0
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1.inc b/poky/meta/recipes-devtools/gcc/gcc-9.1.inc
index eb2538020..4c648a169 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-9.1.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1.inc
@@ -33,7 +33,6 @@ SRC_URI = "\
file://0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
file://0004-64-bit-multilib-hack.patch \
file://0005-optional-libstdc.patch \
- file://0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
file://0007-COLLECT_GCC_OPTIONS.patch \
file://0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
file://0009-fortran-cross-compile-hack.patch \
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index 4a552d516..000000000
--- a/poky/meta/recipes-devtools/gcc/gcc-9.1/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From ca3b3ac12d9b6e1065333dec89e7be2c733509d9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:14:20 +0400
-Subject: [PATCH 06/37] gcc: disable MASK_RELAX_PIC_CALLS bit
-
-The new feature added after 4.3.3
-"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
-will cause cc1plus eat up all the system memory when build webkit-gtk.
-The function mips_get_pic_call_symbol keeps on recursively calling itself.
-Disable this feature to walk aside the bug.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 7 -------
- gcc/configure.ac | 7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 2e08396622e..d36cb51bc2c 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27509,13 +27509,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
- $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 7d34911573e..dfa88c35f3f 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4816,13 +4816,6 @@ x:
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
-
- AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
---
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
index 3d03d8e57..a5c2600d7 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -86,10 +86,6 @@ do_install () {
if [ -d ${D}${infodir} ]; then
rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
fi
- if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
- ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
- fi
-
}
do_install_append_class-target () {
@@ -98,20 +94,29 @@ do_install_append_class-target () {
fi
if [ "${TARGET_OS}" = "linux-gnun32" ]; then
- if [ "${MULTILIBS}" != "" ]; then
- mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux
- ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux/32
+ if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32
+ elif [ "${MULTILIB_VARIANTS}" != "" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
else
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
fi
- fi
- if [ "${TARGET_OS}" = "linux-gnux32" ]; then
- if [ "${MULTILIBS}" != "" ]; then
- mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-poky-linux
- ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-poky-linux/x32
+ elif [ "${TARGET_OS}" = "linux-gnux32" ]; then
+ if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32
+ elif [ "${MULTILIB_VARIANTS}" != "" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
else
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
fi
+ elif [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
+ ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits
+ ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext
fi
if [ "${TCLIBC}" != "glibc" ]; then
diff --git a/poky/meta/recipes-devtools/gdb/gdb-8.2.1.inc b/poky/meta/recipes-devtools/gdb/gdb-8.3.inc
index f28b57439..db8d5f349 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-8.2.1.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-8.3.inc
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
+ file://0001-gdbserver-ctrl-c-handling.patch \
file://0002-make-man-install-relative-to-DESTDIR.patch \
file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
@@ -15,11 +16,6 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0009-Change-order-of-CFLAGS.patch \
file://0010-resolve-restrict-keyword-conflict.patch \
file://0011-Fix-invalid-sigprocmask-call.patch \
- file://gdbserver-ctrl-c-handling.patch \
- file://0001-Fix-build-with-latest-GCC-9.0-tree.patch \
- file://CVE-2017-9778.patch \
- file://0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch \
-"
-SRC_URI[md5sum] = "f8b2562e830a4098dd5b5ea9e9296c70"
-SRC_URI[sha256sum] = "0a6a432907a03c5c8eaad3c3cffd50c00a40c3a5e3c4039440624bae703f2202"
-
+ "
+SRC_URI[md5sum] = "bbd95b2f9b34621ad7a19a3965476314"
+SRC_URI[sha256sum] = "802f7ee309dcc547d65a68d61ebd6526762d26c3051f52caebe2189ac1ffd72e"
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index 475e4f08e..c9daf25a4 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -40,4 +40,3 @@ do_install_append() {
rm -rf ${D}${exec_prefix}/lib
cross_canadian_bindirlinks
}
-
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.2.1.bb b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.bb
index 301035940..301035940 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.2.1.bb
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.3.bb
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb b/poky/meta/recipes-devtools/gdb/gdb-cross_8.3.bb
index 50cf159fd..50cf159fd 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross_8.2.1.bb
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross_8.3.bb
diff --git a/poky/meta/recipes-devtools/gdb/gdb.inc b/poky/meta/recipes-devtools/gdb/gdb.inc
index 52119a0aa..0f10b4173 100644
--- a/poky/meta/recipes-devtools/gdb/gdb.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb.inc
@@ -8,3 +8,6 @@ inherit gettext
# cross-canadian must not see this
PACKAGES =+ "gdbserver"
FILES_gdbserver = "${bindir}/gdbserver"
+
+ALLOW_EMPTY_gdbserver_riscv64 = "1"
+
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch b/poky/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch
deleted file mode 100644
index 2a962929d..000000000
--- a/poky/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 7406a50077773e78282a495cb32ef5b8179f6a33 Mon Sep 17 00:00:00 2001
-From: Dimitar Dimitrov <dimitar@dinux.eu>
-Date: Mon, 17 Dec 2018 21:30:52 +0200
-Subject: [PATCH] Fix build with latest GCC 9.0 tree
-
-A recent patch [1] to fix a GCC PR [2] actually broke the GDB build.
-To fix, remove the stack pointer clobber. GCC will ignore the clobber
-marker, and will not save or restore the stack pointer.
-
-I ran "make check-gdb" on x86_64 to ensure there are no regressions.
-
-gdb/ChangeLog:
-
-2018-12-17 Dimitar Dimitrov <dimitar@dinux.eu>
-
- * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove sp clobbers.
-
-[1] https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00532.html
-[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
-
-Upstream-Status: Backport
-Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
----
- gdb/ChangeLog | 5 +++++
- gdb/nat/linux-ptrace.c | 4 ++--
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
-index d4c1b8f9fd..187cfeb9bc 100644
---- a/gdb/nat/linux-ptrace.c
-+++ b/gdb/nat/linux-ptrace.c
-@@ -161,14 +161,14 @@ linux_ptrace_test_ret_to_nx (void)
- ".globl linux_ptrace_test_ret_to_nx_instr;"
- "linux_ptrace_test_ret_to_nx_instr:"
- "ret"
-- : : "r" (return_address) : "%esp", "memory");
-+ : : "r" (return_address) : "memory");
- #elif defined __x86_64__
- asm volatile ("pushq %0;"
- ".globl linux_ptrace_test_ret_to_nx_instr;"
- "linux_ptrace_test_ret_to_nx_instr:"
- "ret"
- : : "r" ((uint64_t) (uintptr_t) return_address)
-- : "%rsp", "memory");
-+ : "memory");
- #else
- # error "!__i386__ && !__x86_64__"
- #endif
---
-2.20.1
diff --git a/poky/meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch b/poky/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch
index 71fe7f83b..71fe7f83b 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0001-gdbserver-ctrl-c-handling.patch
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
index bbe0020bf..170d512ef 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
@@ -1,24 +1,24 @@
-From 1dd5c44474b01d84de60faded960fef4a0a87e41 Mon Sep 17 00:00:00 2001
+From da30370c1e3ff7728a857e119e0529a9f097086e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 18:32:14 -0700
-Subject: [PATCH 04/11] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
- systems
+Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
gdb/gdbserver/linux-ppc-low.c | 6 ++++++
gdb/nat/ppc-linux.h | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
-index 47428c1529..841a5e02b9 100644
+index 1b695e53..1978347c 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
-@@ -21,7 +21,13 @@
- #include "linux-low.h"
-
+@@ -23,7 +23,13 @@
+ #include "elf/common.h"
+ #include <sys/uio.h>
#include <elf.h>
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
@@ -31,12 +31,12 @@ index 47428c1529..841a5e02b9 100644
#include "arch/ppc-linux-common.h"
#include "arch/ppc-linux-tdesc.h"
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
-index 3d4d4fdc56..5b93af8d3a 100644
+index f1561b3b..40399361 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,13 @@
- #ifndef PPC_LINUX_H
- #define PPC_LINUX_H 1
+ #ifndef NAT_PPC_LINUX_H
+ #define NAT_PPC_LINUX_H
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
@@ -48,6 +48,3 @@ index 3d4d4fdc56..5b93af8d3a 100644
#include <asm/cputable.h>
/* This sometimes isn't defined. */
---
-2.18.0
-
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch b/poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
index d32352b81..95bec5fd6 100644
--- a/poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
+++ b/poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
@@ -1,7 +1,7 @@
-From d97878b272bd7c4993f4205983ae8b7ecddbcf82 Mon Sep 17 00:00:00 2001
+From bab0b34672727c50313eb98b8522355cbe1bde36 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 15:31:40 -0700
-Subject: [PATCH 08/11] Use exorted definitions of SIGRTMIN
+Subject: [PATCH] Use exorted definitions of SIGRTMIN
Define W_STOPCODE if not defined already
@@ -14,16 +14,17 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=13012
Upstream-Status: Submitted
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
gdb/linux-nat.c | 4 ++--
gdb/nat/linux-nat.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
-index 64015e7520..acf950c38b 100644
+index 063afe26..fb1d2d5d 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
-@@ -4724,6 +4724,6 @@ lin_thread_get_thread_signals (sigset_t *set)
+@@ -4713,6 +4713,6 @@ lin_thread_get_thread_signals (sigset_t *set)
/* NPTL reserves the first two RT signals, but does not provide any
way for the debugger to query the signal numbers - fortunately
they don't change. */
@@ -33,7 +34,7 @@ index 64015e7520..acf950c38b 100644
+ sigaddset (set, SIGRTMIN + 1);
}
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
-index a90a124d3a..4f3e681962 100644
+index 1e32dd9e..b886305d 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
@@ -90,4 +90,8 @@ extern void linux_stop_lwp (struct lwp_info *lwp);
@@ -44,7 +45,4 @@ index a90a124d3a..4f3e681962 100644
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
+
- #endif /* LINUX_NAT_H */
---
-2.18.0
-
+ #endif /* NAT_LINUX_NAT_H */
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch b/poky/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch
deleted file mode 100644
index f35033c12..000000000
--- a/poky/meta/recipes-devtools/gdb/gdb/0012-AArch64-Fix-the-gdb-build-with-musl-libc.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From cbbf1a8ba7f037ba3b83f090829edcbab542c285 Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <szabolcs.nagy@arm.com>
-Date: Thu, 13 Dec 2018 17:47:17 +0000
-Subject: [PATCH] AArch64: Fix the gdb build with musl libc
-
-Including asm/sigcontext.h together with libc headers is not valid. In
-general linux headers may not work with libc headers, so mixing them
-should be avoided, especially when the linux header defines types that
-are also exposed in libc headers.
-
-In case of asm/sigcontext.h glibc happens to work because glibc signal.h
-directly includes it, but e.g. in musl libc signal.h replicates the
-sigcontext.h definitions in an abi compatible way which are in conflict
-with the linux definitions when both headers are included.
-
-Since old linux headers or old libc headers may not have the necessary
-definitions, gdb has to replicate the definitions it relies on anyway.
-Which is fine since all definitions must be ABI stable. For linux apis
-that are not available via libc headers, replicating the definitions in
-gdb is the most reliable way to use them.
-
-Note: asm/ptrace.h includes asm/sigcontext.h in some versions of linux
-headers, which is just as problematic and should be fixed in linux.
-
-gdb/ChangeLog:
-
- * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
- asm/sigcontext.h.
-
-[ChangeLog entry stripped so that patch applies cleanly]
-Upstream-Status: Backport
-Signed-off-by: Paul Barker <paul@betafive.co.uk>
----
- gdb/nat/aarch64-sve-linux-ptrace.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h
-index 029e753ffe..172ae39432 100644
---- a/gdb/nat/aarch64-sve-linux-ptrace.h
-+++ b/gdb/nat/aarch64-sve-linux-ptrace.h
-@@ -20,7 +20,7 @@
- #ifndef AARCH64_SVE_LINUX_PTRACE_H
- #define AARCH64_SVE_LINUX_PTRACE_H
-
--#include <asm/sigcontext.h>
-+#include <signal.h>
- #include <sys/utsname.h>
- #include <sys/ptrace.h>
- #include <asm/ptrace.h>
---
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch b/poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch
deleted file mode 100644
index 935f2661f..000000000
--- a/poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From a608b79f30ab3f670095e14ba3d3b5b24a19fe68 Mon Sep 17 00:00:00 2001
-From: Sandra Loosemore <sandra@codesourcery.com>
-Date: Thu, 25 Apr 2019 07:27:02 -0700
-Subject: [PATCH] Detect invalid length field in debug frame FDE header.
-
-GDB was failing to catch cases where a corrupt ELF or core file
-contained an invalid length value in a Dwarf debug frame FDE header.
-It was checking for buffer overflow but not cases where the length was
-negative or caused pointer wrap-around.
-
-In addition to the additional validity check, this patch cleans up the
-multiple signed/unsigned conversions on the length field so that an
-unsigned representation is used consistently throughout.
-
-This patch fixes CVE-2017-9778 and PR gdb/21600.
-
-2019-04-25 Sandra Loosemore <sandra@codesourcery.com>
- Kang Li <kanglictf@gmail.com>
-
- PR gdb/21600
-
- * dwarf2-frame.c (read_initial_length): Be consistent about using
- unsigned representation of length.
- (decode_frame_entry_1): Likewise. Check for wraparound of
- end pointer as well as buffer overflow.
-
-Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=723adb650a31859d7cc45832cb8adca0206455ed]
-CVE: CVE-2017-9778
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- gdb/ChangeLog | 11 +++++++++++
- gdb/dwarf2-frame.c | 14 +++++++-------
- 2 files changed, 18 insertions(+), 7 deletions(-)
-
-diff --git a/gdb/ChangeLog b/gdb/ChangeLog
-index 3711dc7..0a9720b 100644
---- a/gdb/ChangeLog
-+++ b/gdb/ChangeLog
-@@ -1,3 +1,14 @@
-+2019-04-25 Sandra Loosemore <sandra@codesourcery.com>
-+ Kang Li <kanglictf@gmail.com>
-+
-+ PR gdb/21600
-+
-+ * dwarf2-frame.c (read_initial_length): Be consistent about using
-+ unsigned representation of length.
-+ (decode_frame_entry_1): Likewise. Check for wraparound of
-+ end pointer as well as buffer overflow.
-+
-+
- 2018-12-23 Joel Brobecker <brobecker@adacore.com>
-
- * version.in: Set GDB version number to 8.2.1.
-diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
-index 91e16cf..a7b99fd 100644
---- a/gdb/dwarf2-frame.c
-+++ b/gdb/dwarf2-frame.c
-@@ -1477,7 +1477,7 @@ static ULONGEST
- read_initial_length (bfd *abfd, const gdb_byte *buf,
- unsigned int *bytes_read_ptr)
- {
-- LONGEST result;
-+ ULONGEST result;
-
- result = bfd_get_32 (abfd, buf);
- if (result == 0xffffffff)
-@@ -1780,7 +1780,7 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start,
- {
- struct gdbarch *gdbarch = get_objfile_arch (unit->objfile);
- const gdb_byte *buf, *end;
-- LONGEST length;
-+ ULONGEST length;
- unsigned int bytes_read;
- int dwarf64_p;
- ULONGEST cie_id;
-@@ -1791,15 +1791,15 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start,
- buf = start;
- length = read_initial_length (unit->abfd, buf, &bytes_read);
- buf += bytes_read;
-- end = buf + length;
--
-- /* Are we still within the section? */
-- if (end > unit->dwarf_frame_buffer + unit->dwarf_frame_size)
-- return NULL;
-+ end = buf + (size_t) length;
-
- if (length == 0)
- return end;
-
-+ /* Are we still within the section? */
-+ if (end <= buf || end > unit->dwarf_frame_buffer + unit->dwarf_frame_size)
-+ return NULL;
-+
- /* Distinguish between 32 and 64-bit encoded frame info. */
- dwarf64_p = (bytes_read == 12);
-
---
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/gdb/gdb_8.2.1.bb b/poky/meta/recipes-devtools/gdb/gdb_8.3.bb
index c6eac84dd..c6eac84dd 100644
--- a/poky/meta/recipes-devtools/gdb/gdb_8.2.1.bb
+++ b/poky/meta/recipes-devtools/gdb/gdb_8.3.bb
diff --git a/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index e597ebedb..1630c1282 100644
--- a/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -8,8 +8,8 @@ DEPENDS_class-native = "hostperl-runtime-native"
INHIBIT_DEFAULT_DEPS = "1"
-SRCREV = "058639be227bbe8f03cc39f79f7ce84918012143"
-PV = "20181128+git${SRCPV}"
+SRCREV = "b98424c249119b79d3f709e26eb86f2fd4d5e5f3"
+PV = "20190501+git${SRCPV}"
SRC_URI = "git://git.savannah.gnu.org/config.git \
file://gnu-configize.in"
diff --git a/poky/meta/recipes-devtools/go/go-1.11.inc b/poky/meta/recipes-devtools/go/go-1.11.inc
deleted file mode 100644
index d03e26cea..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-require go-common.inc
-
-GO_BASEVERSION = "1.11"
-GO_MINOR = ".4"
-PV .= "${GO_MINOR}"
-FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
-
-SRC_URI += "\
- file://0001-allow-CC-and-CXX-to-have-multiple-words.patch \
- file://0002-cmd-go-make-content-based-hash-generation-less-pedan.patch \
- file://0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch \
- file://0004-ld-add-soname-to-shareable-objects.patch \
- file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \
- file://0006-cmd-dist-separate-host-and-target-builds.patch \
- file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
- file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
-"
-SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
-
-SRC_URI[main.md5sum] = "a77697673215be465d1b583680ef2318"
-SRC_URI[main.sha256sum] = "4cfd42720a6b1e79a8024895fa6607b69972e8e32446df76d6ce79801bbadb15"
diff --git a/poky/meta/recipes-devtools/go/go-1.11/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/poky/meta/recipes-devtools/go/go-1.11/0001-allow-CC-and-CXX-to-have-multiple-words.patch
deleted file mode 100644
index 4442858c8..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11/0001-allow-CC-and-CXX-to-have-multiple-words.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7cc519aa5f84cf8fc7ac8c10fc69aa8040330ea0 Mon Sep 17 00:00:00 2001
-From: Matt Madison <matt@madison.systems>
-Date: Mon, 19 Feb 2018 08:49:33 -0800
-Subject: [PATCH] allow CC and CXX to have multiple words
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Matt Madison <matt@madison.systems>
-
----
- src/cmd/go/internal/envcmd/env.go | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
-index afadbad..cedbfbf 100644
---- a/src/cmd/go/internal/envcmd/env.go
-+++ b/src/cmd/go/internal/envcmd/env.go
-@@ -85,11 +85,11 @@ func MkEnv() []cfg.EnvVar {
-
- cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch)
- if env := strings.Fields(os.Getenv("CC")); len(env) > 0 {
-- cc = env[0]
-+ cc = strings.Join(env, " ")
- }
- cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch)
- if env := strings.Fields(os.Getenv("CXX")); len(env) > 0 {
-- cxx = env[0]
-+ cxx = strings.Join(env, " ")
- }
- env = append(env, cfg.EnvVar{Name: "CC", Value: cc})
- env = append(env, cfg.EnvVar{Name: "CXX", Value: cxx})
diff --git a/poky/meta/recipes-devtools/go/go-1.11/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/poky/meta/recipes-devtools/go/go-1.11/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
deleted file mode 100644
index 66b856187..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-From 47db69e20ed66fb62b01affd83d829654b829893 Mon Sep 17 00:00:00 2001
-From: Matt Madison <matt@madison.systems>
-Date: Mon, 19 Feb 2018 08:50:59 -0800
-Subject: [PATCH] cmd/go: make content-based hash generation less pedantic
-
-Go 1.10's build tool now uses content-based hashes to
-determine when something should be built or re-built.
-This same mechanism is used to maintain a built-artifact
-cache for speeding up builds.
-
-However, the hashes it generates include information that
-doesn't work well with OE, nor with using a shared runtime
-library.
-
-First, it embeds path names to source files, unless
-building within GOROOT. This prevents the building
-of a package in GOPATH for later staging into GOROOT.
-
-This patch adds support for the environment variable
-GOPATH_OMIT_IN_ACTIONID. If present, path name
-embedding is disabled.
-
-Second, if cgo is enabled, the build ID for cgo-related
-packages will include the current value of the environment
-variables for invoking the compiler (CC, CXX, FC) and
-any CGO_xxFLAGS variables. Only if the settings used
-during a compilation exactly match, character for character,
-the values used for compiling runtime/cgo or any other
-cgo-enabled package being imported, will the tool
-decide that the imported package is up-to-date.
-
-This is done to help ensure correctness, but is overly
-simplistic and effectively prevents the reuse of built
-artifacts that use cgo (or shared runtime, which includes
-runtime/cgo).
-
-This patch filters out all compiler flags except those
-beginning with '-m'. The default behavior can be restored
-by setting the CGO_PEDANTIC environment variable.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Matt Madison <matt@madison.systems>
-
----
- src/cmd/go/internal/envcmd/env.go | 2 +-
- src/cmd/go/internal/work/exec.go | 63 ++++++++++++++++++++++---------
- 2 files changed, 46 insertions(+), 19 deletions(-)
-
-diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
-index cedbfbf..5763a0d 100644
---- a/src/cmd/go/internal/envcmd/env.go
-+++ b/src/cmd/go/internal/envcmd/env.go
-@@ -128,7 +128,7 @@ func ExtraEnvVars() []cfg.EnvVar {
- func ExtraEnvVarsCostly() []cfg.EnvVar {
- var b work.Builder
- b.Init()
-- cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{})
-+ cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{}, false)
- if err != nil {
- // Should not happen - b.CFlags was given an empty package.
- fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err)
-diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
-index 12e1527..e41bfac 100644
---- a/src/cmd/go/internal/work/exec.go
-+++ b/src/cmd/go/internal/work/exec.go
-@@ -174,6 +174,8 @@ func (b *Builder) Do(root *Action) {
- wg.Wait()
- }
-
-+var omitGopath = os.Getenv("GOPATH_OMIT_IN_ACTIONID") != ""
-+
- // buildActionID computes the action ID for a build action.
- func (b *Builder) buildActionID(a *Action) cache.ActionID {
- p := a.Package
-@@ -190,7 +192,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
- // but it does not hide the exact value of $GOPATH.
- // Include the full dir in that case.
- // Assume b.WorkDir is being trimmed properly.
-- if !p.Goroot && !strings.HasPrefix(p.Dir, b.WorkDir) {
-+ if !p.Goroot && !omitGopath && !strings.HasPrefix(p.Dir, b.WorkDir) {
- fmt.Fprintf(h, "dir %s\n", p.Dir)
- }
- fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch)
-@@ -201,13 +203,13 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
- }
- if len(p.CgoFiles)+len(p.SwigFiles) > 0 {
- fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
-- cppflags, cflags, cxxflags, fflags, ldflags, _ := b.CFlags(p)
-- fmt.Fprintf(h, "CC=%q %q %q %q\n", b.ccExe(), cppflags, cflags, ldflags)
-+ cppflags, cflags, cxxflags, fflags, ldflags, _ := b.CFlags(p, true)
-+ fmt.Fprintf(h, "CC=%q %q %q %q\n", b.ccExe(true), cppflags, cflags, ldflags)
- if len(p.CXXFiles)+len(p.SwigFiles) > 0 {
-- fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(), cxxflags)
-+ fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(true), cxxflags)
- }
- if len(p.FFiles) > 0 {
-- fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(), fflags)
-+ fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(true), fflags)
- }
- // TODO(rsc): Should we include the SWIG version or Fortran/GCC/G++/Objective-C compiler versions?
- }
-@@ -2096,33 +2098,33 @@ var (
- // gccCmd returns a gcc command line prefix
- // defaultCC is defined in zdefaultcc.go, written by cmd/dist.
- func (b *Builder) GccCmd(incdir, workdir string) []string {
-- return b.compilerCmd(b.ccExe(), incdir, workdir)
-+ return b.compilerCmd(b.ccExe(false), incdir, workdir)
- }
-
- // gxxCmd returns a g++ command line prefix
- // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
- func (b *Builder) GxxCmd(incdir, workdir string) []string {
-- return b.compilerCmd(b.cxxExe(), incdir, workdir)
-+ return b.compilerCmd(b.cxxExe(false), incdir, workdir)
- }
-
- // gfortranCmd returns a gfortran command line prefix.
- func (b *Builder) gfortranCmd(incdir, workdir string) []string {
-- return b.compilerCmd(b.fcExe(), incdir, workdir)
-+ return b.compilerCmd(b.fcExe(false), incdir, workdir)
- }
-
- // ccExe returns the CC compiler setting without all the extra flags we add implicitly.
--func (b *Builder) ccExe() []string {
-- return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch))
-+func (b *Builder) ccExe(filtered bool) []string {
-+ return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch), filtered)
- }
-
- // cxxExe returns the CXX compiler setting without all the extra flags we add implicitly.
--func (b *Builder) cxxExe() []string {
-- return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch))
-+func (b *Builder) cxxExe(filtered bool) []string {
-+ return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch), filtered)
- }
-
- // fcExe returns the FC compiler setting without all the extra flags we add implicitly.
--func (b *Builder) fcExe() []string {
-- return b.compilerExe(os.Getenv("FC"), "gfortran")
-+func (b *Builder) fcExe(filtered bool) []string {
-+ return b.compilerExe(os.Getenv("FC"), "gfortran", filtered)
- }
-
- // compilerExe returns the compiler to use given an
-@@ -2131,11 +2133,14 @@ func (b *Builder) fcExe() []string {
- // of the compiler but can have additional arguments if they
- // were present in the environment value.
- // For example if CC="gcc -DGOPHER" then the result is ["gcc", "-DGOPHER"].
--func (b *Builder) compilerExe(envValue string, def string) []string {
-+func (b *Builder) compilerExe(envValue string, def string, filtered bool) []string {
- compiler := strings.Fields(envValue)
- if len(compiler) == 0 {
- compiler = []string{def}
- }
-+ if filtered {
-+ return append(compiler[0:1], filterCompilerFlags(compiler[1:])...)
-+ }
- return compiler
- }
-
-@@ -2285,8 +2290,23 @@ func envList(key, def string) []string {
- return strings.Fields(v)
- }
-
-+var filterFlags = os.Getenv("CGO_PEDANTIC") == ""
-+
-+func filterCompilerFlags(flags []string) []string {
-+ var newflags []string
-+ if !filterFlags {
-+ return flags
-+ }
-+ for _, flag := range flags {
-+ if strings.HasPrefix(flag, "-m") {
-+ newflags = append(newflags, flag)
-+ }
-+ }
-+ return newflags
-+}
-+
- // CFlags returns the flags to use when invoking the C, C++ or Fortran compilers, or cgo.
--func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) {
-+func (b *Builder) CFlags(p *load.Package, filtered bool) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) {
- defaults := "-g -O2"
-
- if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil {
-@@ -2304,6 +2324,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
- if ldflags, err = buildFlags("LDFLAGS", defaults, p.CgoLDFLAGS, checkLinkerFlags); err != nil {
- return
- }
-+ if filtered {
-+ cppflags = filterCompilerFlags(cppflags)
-+ cflags = filterCompilerFlags(cflags)
-+ cxxflags = filterCompilerFlags(cxxflags)
-+ fflags = filterCompilerFlags(fflags)
-+ ldflags = filterCompilerFlags(ldflags)
-+ }
-
- return
- }
-@@ -2319,7 +2346,7 @@ var cgoRe = regexp.MustCompile(`[/\\:]`)
-
- func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) {
- p := a.Package
-- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p)
-+ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p, false)
- if err != nil {
- return nil, nil, err
- }
-@@ -2679,7 +2706,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) {
-
- // Run SWIG on one SWIG input file.
- func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) {
-- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p)
-+ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p, false)
- if err != nil {
- return "", "", err
- }
diff --git a/poky/meta/recipes-devtools/go/go-1.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/poky/meta/recipes-devtools/go/go-1.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
deleted file mode 100644
index b6ca40ede..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 5c32c38bf19b24f0aadd78012d17ff5caa82151e Mon Sep 17 00:00:00 2001
-From: Matt Madison <matt@madison.systems>
-Date: Sat, 17 Feb 2018 05:24:20 -0800
-Subject: [PATCH] allow GOTOOLDIR to be overridden in the environment
-
-to allow for split host/target build roots
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Matt Madison <matt@madison.systems>
-
----
- src/cmd/dist/build.go | 4 +++-
- src/cmd/go/internal/cfg/cfg.go | 7 +++++--
- 2 files changed, 8 insertions(+), 3 deletions(-)
-
-Index: go/src/cmd/dist/build.go
-===================================================================
---- go.orig/src/cmd/dist/build.go
-+++ go/src/cmd/dist/build.go
-@@ -228,7 +228,9 @@ func xinit() {
- workdir = xworkdir()
- xatexit(rmworkdir)
-
-- tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
-+ if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
-+ tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
-+ }
- }
-
- // compilerEnv returns a map from "goos/goarch" to the
-Index: go/src/cmd/go/internal/cfg/cfg.go
-===================================================================
---- go.orig/src/cmd/go/internal/cfg/cfg.go
-+++ go/src/cmd/go/internal/cfg/cfg.go
-@@ -116,7 +116,11 @@ func init() {
- // variables. This matches the initialization of ToolDir in
- // go/build, except for using GOROOT rather than
- // runtime.GOROOT.
-- build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
-+ if s := os.Getenv("GOTOOLDIR"); s != "" {
-+ build.ToolDir = filepath.Clean(s)
-+ } else {
-+ build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
-+ }
- }
- }
-
diff --git a/poky/meta/recipes-devtools/go/go-1.11/0004-ld-add-soname-to-shareable-objects.patch b/poky/meta/recipes-devtools/go/go-1.11/0004-ld-add-soname-to-shareable-objects.patch
deleted file mode 100644
index 004a33a02..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11/0004-ld-add-soname-to-shareable-objects.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 55eb8c95a89f32aec16b7764e78e8cf75169dc81 Mon Sep 17 00:00:00 2001
-From: Matt Madison <matt@madison.systems>
-Date: Sat, 17 Feb 2018 06:26:10 -0800
-Subject: [PATCH] ld: add soname to shareable objects
-
-so that OE's shared library dependency handling
-can find them.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Matt Madison <matt@madison.systems>
-
----
- src/cmd/link/internal/ld/lib.go | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
-index 220aab3..703925f 100644
---- a/src/cmd/link/internal/ld/lib.go
-+++ b/src/cmd/link/internal/ld/lib.go
-@@ -1135,6 +1135,7 @@ func (ctxt *Link) hostlink() {
- argv = append(argv, "-Wl,-z,relro")
- }
- argv = append(argv, "-shared")
-+ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
- if ctxt.HeadType != objabi.Hwindows {
- // Pass -z nodelete to mark the shared library as
- // non-closeable: a dlclose will do nothing.
-@@ -1146,6 +1147,8 @@ func (ctxt *Link) hostlink() {
- argv = append(argv, "-Wl,-z,relro")
- }
- argv = append(argv, "-shared")
-+ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
-+
- case BuildModePlugin:
- if ctxt.HeadType == objabi.Hdarwin {
- argv = append(argv, "-dynamiclib")
-@@ -1154,6 +1157,7 @@ func (ctxt *Link) hostlink() {
- argv = append(argv, "-Wl,-z,relro")
- }
- argv = append(argv, "-shared")
-+ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
- }
- }
-
diff --git a/poky/meta/recipes-devtools/go/go-1.11/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/poky/meta/recipes-devtools/go/go-1.11/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
deleted file mode 100644
index ace8de9ea..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 1bf15aa8fb773604b2524cfdab493fa4d8fa9285 Mon Sep 17 00:00:00 2001
-From: Matt Madison <matt@madison.systems>
-Date: Sat, 17 Feb 2018 06:32:45 -0800
-Subject: [PATCH] make.bash: override CC when building dist and go_bootstrap
-
-for handling OE cross-canadian builds.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Matt Madison <matt@madison.systems>
-
----
- src/make.bash | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/make.bash b/src/make.bash
-index 78882d9..25943d0 100755
---- a/src/make.bash
-+++ b/src/make.bash
-@@ -163,7 +163,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
- exit 1
- fi
- rm -f cmd/dist/dist
--GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
-+CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
-
- # -e doesn't propagate out of eval, so check success by hand.
- eval $(./cmd/dist/dist env -p || echo FAIL=true)
-@@ -194,7 +194,7 @@ fi
- # Run dist bootstrap to complete make.bash.
- # Bootstrap installs a proper cmd/dist, built with the new toolchain.
- # Throw ours, built with Go 1.4, away after bootstrap.
--./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
-+CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
- rm -f ./cmd/dist/dist
-
- # DO NOT ADD ANY NEW CODE HERE.
diff --git a/poky/meta/recipes-devtools/go/go-1.11/0006-cmd-dist-separate-host-and-target-builds.patch b/poky/meta/recipes-devtools/go/go-1.11/0006-cmd-dist-separate-host-and-target-builds.patch
deleted file mode 100644
index 0c0d5da80..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11/0006-cmd-dist-separate-host-and-target-builds.patch
+++ /dev/null
@@ -1,282 +0,0 @@
-From fe0fcaf43ef3aab81541dad2a71b46254dc4cf6a Mon Sep 17 00:00:00 2001
-From: Matt Madison <matt@madison.systems>
-Date: Sat, 17 Feb 2018 10:03:48 -0800
-Subject: [PATCH] cmd/dist: separate host and target builds
-
-Change the dist tool to allow for OE-style cross-
-and cross-canadian builds:
-
- - command flags --host-only and --target only are added;
- if one is present, the other changes mentioned below
- take effect, and arguments may also be specified on
- the command line to enumerate the package(s) to be
- built.
-
- - for OE cross builds, go_bootstrap is always built for
- the current build host, and is moved, along with the supporting
- toolchain (asm, compile, etc.) to a separate 'native_native'
- directory under GOROOT/pkg/tool.
-
- - go_bootstrap is not automatically removed after the build,
- so it can be reused later (e.g., building both static and
- shared runtime).
-
-Note that for --host-only builds, it would be nice to specify
-just the "cmd" package to build only the go commands/tools,
-the staleness checks in the dist tool will fail if the "std"
-library has not also been built. So host-only builds have to
-build everything anyway.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Matt Madison <matt@madison.systems>
-
-more dist cleanup
-
----
- src/cmd/dist/build.go | 153 ++++++++++++++++++++++++++++++------------
- 1 file changed, 111 insertions(+), 42 deletions(-)
-
-Index: go/src/cmd/dist/build.go
-===================================================================
---- go.orig/src/cmd/dist/build.go
-+++ go/src/cmd/dist/build.go
-@@ -39,6 +39,7 @@ var (
- goldflags string
- workdir string
- tooldir string
-+ build_tooldir string
- oldgoos string
- oldgoarch string
- exe string
-@@ -50,6 +51,7 @@ var (
-
- rebuildall bool
- defaultclang bool
-+ crossBuild bool
-
- vflag int // verbosity
- )
-@@ -231,6 +233,8 @@ func xinit() {
- if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
- tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
- }
-+ build_tooldir = pathf("%s/pkg/tool/native_native", goroot)
-+
- }
-
- // compilerEnv returns a map from "goos/goarch" to the
-@@ -260,7 +264,6 @@ func compilerEnv(envName, def string) ma
- if gohostos != goos || gohostarch != goarch {
- m[gohostos+"/"+gohostarch] = m[""]
- }
-- m[""] = env
- }
-
- for _, goos := range okgoos {
-@@ -487,8 +490,10 @@ func setup() {
- // We keep it in pkg/, just like the object directory above.
- if rebuildall {
- xremoveall(tooldir)
-+ xremoveall(build_tooldir)
- }
- xmkdirall(tooldir)
-+ xmkdirall(build_tooldir)
-
- // Remove tool binaries from before the tool/gohostos_gohostarch
- xremoveall(pathf("%s/bin/tool", goroot))
-@@ -1155,11 +1160,29 @@ func cmdbootstrap() {
-
- var noBanner bool
- var debug bool
-+ var hostOnly bool
-+ var targetOnly bool
-+ var toBuild = []string { "std", "cmd" }
-+
- flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all")
- flag.BoolVar(&debug, "d", debug, "enable debugging of bootstrap process")
- flag.BoolVar(&noBanner, "no-banner", noBanner, "do not print banner")
-+ flag.BoolVar(&hostOnly, "host-only", hostOnly, "build only host binaries, not target")
-+ flag.BoolVar(&targetOnly, "target-only", targetOnly, "build only target binaries, not host")
-
-- xflagparse(0)
-+ xflagparse(-1)
-+
-+ if (hostOnly && targetOnly) {
-+ fatalf("specify only one of --host-only or --target-only\n")
-+ }
-+ crossBuild = hostOnly || targetOnly
-+ if flag.NArg() > 0 {
-+ if crossBuild {
-+ toBuild = flag.Args()
-+ } else {
-+ fatalf("package names not permitted without --host-only or --target-only\n")
-+ }
-+ }
-
- if debug {
- // cmd/buildid is used in debug mode.
-@@ -1207,8 +1230,13 @@ func cmdbootstrap() {
- xprintf("\n")
- }
-
-- gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
-- goldflags = os.Getenv("GO_LDFLAGS")
-+ // For split host/target cross/cross-canadian builds, we don't
-+ // want to be setting these flags until after we have compiled
-+ // the toolchain that runs on the build host.
-+ if ! crossBuild {
-+ gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
-+ goldflags = os.Getenv("GO_LDFLAGS")
-+ }
- goBootstrap := pathf("%s/go_bootstrap", tooldir)
- cmdGo := pathf("%s/go", gobin)
- if debug {
-@@ -1237,7 +1265,11 @@ func cmdbootstrap() {
- xprintf("\n")
- }
- xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n")
-- os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
-+ if crossBuild {
-+ os.Setenv("CC", defaultcc[""])
-+ } else {
-+ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
-+ }
- goInstall(goBootstrap, append([]string{"-i"}, toolchain...)...)
- if debug {
- run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
-@@ -1274,50 +1306,84 @@ func cmdbootstrap() {
- }
- checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
-
-- if goos == oldgoos && goarch == oldgoarch {
-- // Common case - not setting up for cross-compilation.
-- timelog("build", "toolchain")
-- if vflag > 0 {
-- xprintf("\n")
-+ if crossBuild {
-+ gogcflags = os.Getenv("GO_GCFLAGS")
-+ goldflags = os.Getenv("GO_LDFLAGS")
-+ tool_files, _ := filepath.Glob(pathf("%s/*", tooldir))
-+ for _, f := range tool_files {
-+ copyfile(pathf("%s/%s", build_tooldir, filepath.Base(f)), f, writeExec)
-+ xremove(f)
-+ }
-+ os.Setenv("GOTOOLDIR", build_tooldir)
-+ goBootstrap = pathf("%s/go_bootstrap", build_tooldir)
-+ if hostOnly {
-+ timelog("build", "host toolchain")
-+ if vflag > 0 {
-+ xprintf("\n")
-+ }
-+ xprintf("Building %s for host, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
-+ goInstall(goBootstrap, toBuild...)
-+ checkNotStale(goBootstrap, toBuild...)
-+ // Skip cmdGo staleness checks here, since we can't necessarily run the cmdGo binary
-+
-+ timelog("build", "target toolchain")
-+ if vflag > 0 {
-+ xprintf("\n")
-+ }
-+ } else if targetOnly {
-+ goos = oldgoos
-+ goarch = oldgoarch
-+ os.Setenv("GOOS", goos)
-+ os.Setenv("GOARCH", goarch)
-+ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
-+ xprintf("Building %s for target, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
-+ goInstall(goBootstrap, toBuild...)
-+ checkNotStale(goBootstrap, toBuild...)
-+ // Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary
- }
-- xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
- } else {
-- // GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
-- // Finish GOHOSTOS/GOHOSTARCH installation and then
-- // run GOOS/GOARCH installation.
-- timelog("build", "host toolchain")
-- if vflag > 0 {
-- xprintf("\n")
-+
-+ if goos == oldgoos && goarch == oldgoarch {
-+ // Common case - not setting up for cross-compilation.
-+ timelog("build", "toolchain")
-+ if vflag > 0 {
-+ xprintf("\n")
-+ }
-+ xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
-+ } else {
-+ // GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
-+ // Finish GOHOSTOS/GOHOSTARCH installation and then
-+ // run GOOS/GOARCH installation.
-+ timelog("build", "host toolchain")
-+ if vflag > 0 {
-+ xprintf("\n")
-+ }
-+ xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
-+ goInstall(goBootstrap, "std", "cmd")
-+ checkNotStale(goBootstrap, "std", "cmd")
-+ checkNotStale(cmdGo, "std", "cmd")
-+
-+ timelog("build", "target toolchain")
-+ if vflag > 0 {
-+ xprintf("\n")
-+ }
-+ goos = oldgoos
-+ goarch = oldgoarch
-+ os.Setenv("GOOS", goos)
-+ os.Setenv("GOARCH", goarch)
-+ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
-+ xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
- }
-- xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
- goInstall(goBootstrap, "std", "cmd")
- checkNotStale(goBootstrap, "std", "cmd")
- checkNotStale(cmdGo, "std", "cmd")
-
-- timelog("build", "target toolchain")
-- if vflag > 0 {
-- xprintf("\n")
-- }
-- goos = oldgoos
-- goarch = oldgoarch
-- os.Setenv("GOOS", goos)
-- os.Setenv("GOARCH", goarch)
-- os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
-- xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
-- }
-- targets := []string{"std", "cmd"}
-- if goos == "js" && goarch == "wasm" {
-- // Skip the cmd tools for js/wasm. They're not usable.
-- targets = targets[:1]
-- }
-- goInstall(goBootstrap, targets...)
-- checkNotStale(goBootstrap, targets...)
-- checkNotStale(cmdGo, targets...)
-- if debug {
-- run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
-- run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
-- checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
-- copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
-+ if debug {
-+ run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
-+ run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
-+ checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
-+ copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
-+ }
- }
-
- // Check that there are no new files in $GOROOT/bin other than
-@@ -1335,7 +1401,11 @@ func cmdbootstrap() {
- }
-
- // Remove go_bootstrap now that we're done.
-- xremove(pathf("%s/go_bootstrap", tooldir))
-+ // Except that for split host/target cross-builds, we need to
-+ // keep it.
-+ if ! crossBuild {
-+ xremove(pathf("%s/go_bootstrap", tooldir))
-+ }
-
- // Print trailing banner unless instructed otherwise.
- if !noBanner {
diff --git a/poky/meta/recipes-devtools/go/go-1.11/0007-cmd-go-make-GOROOT-precious-by-default.patch b/poky/meta/recipes-devtools/go/go-1.11/0007-cmd-go-make-GOROOT-precious-by-default.patch
deleted file mode 100644
index 29ef947ab..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11/0007-cmd-go-make-GOROOT-precious-by-default.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 7cc60b3887be2d5674b9f5d422d022976cf205e5 Mon Sep 17 00:00:00 2001
-From: Matt Madison <matt@madison.systems>
-Date: Fri, 2 Mar 2018 06:00:20 -0800
-Subject: [PATCH] cmd/go: make GOROOT precious by default
-
-The go build tool normally rebuilds whatever it detects is
-stale. This can be a problem when GOROOT is intended to
-be read-only and the go runtime has been built as a shared
-library, since we don't want every application to be rebuilding
-the shared runtime - particularly in cross-build/packaging
-setups, since that would lead to 'abi mismatch' runtime errors.
-
-This patch prevents the install and linkshared actions from
-installing to GOROOT unless overridden with the GOROOT_OVERRIDE
-environment variable.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Matt Madison <matt@madison.systems>
-
----
- src/cmd/go/internal/work/action.go | 3 +++
- src/cmd/go/internal/work/build.go | 5 +++++
- src/cmd/go/internal/work/exec.go | 25 +++++++++++++++++++++++++
- 3 files changed, 33 insertions(+)
-
-Index: go/src/cmd/go/internal/work/action.go
-===================================================================
---- go.orig/src/cmd/go/internal/work/action.go
-+++ go/src/cmd/go/internal/work/action.go
-@@ -600,6 +600,9 @@ func (b *Builder) addTransitiveLinkDeps(
- if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] {
- continue
- }
-+ if goRootPrecious && (p1.Standard || p1.Goroot) {
-+ continue
-+ }
- haveShlib[filepath.Base(p1.Shlib)] = true
- // TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild,
- // we'll end up building an overall library or executable that depends at runtime
-Index: go/src/cmd/go/internal/work/build.go
-===================================================================
---- go.orig/src/cmd/go/internal/work/build.go
-+++ go/src/cmd/go/internal/work/build.go
-@@ -147,6 +147,7 @@ See also: go install, go get, go clean.
- }
-
- const concurrentGCBackendCompilationEnabledByDefault = true
-+var goRootPrecious bool = true
-
- func init() {
- // break init cycle
-@@ -160,6 +161,10 @@ func init() {
-
- AddBuildFlags(CmdBuild)
- AddBuildFlags(CmdInstall)
-+
-+ if x := os.Getenv("GOROOT_OVERRIDE"); x != "" {
-+ goRootPrecious = false
-+ }
- }
-
- // Note that flags consulted by other parts of the code
-Index: go/src/cmd/go/internal/work/exec.go
-===================================================================
---- go.orig/src/cmd/go/internal/work/exec.go
-+++ go/src/cmd/go/internal/work/exec.go
-@@ -436,6 +436,23 @@ func (b *Builder) build(a *Action) (err
- return fmt.Errorf("missing or invalid binary-only package; expected file %q", a.Package.Target)
- }
-
-+ if goRootPrecious && (a.Package.Standard || a.Package.Goroot) {
-+ _, err := os.Stat(a.Package.Target)
-+ if err == nil {
-+ a.built = a.Package.Target
-+ a.Target = a.Package.Target
-+ a.buildID = b.fileHash(a.Package.Target)
-+ a.Package.Stale = false
-+ a.Package.StaleReason = "GOROOT-resident package"
-+ return nil
-+ }
-+ a.Package.Stale = true
-+ a.Package.StaleReason = "missing or invalid GOROOT-resident package"
-+ if b.IsCmdList {
-+ return nil
-+ }
-+ }
-+
- if err := b.Mkdir(a.Objdir); err != nil {
- return err
- }
-@@ -1438,6 +1455,14 @@ func BuildInstallFunc(b *Builder, a *Act
- return nil
- }
-
-+ if goRootPrecious && a.Package != nil {
-+ p := a.Package
-+ if p.Standard || p.Goroot {
-+ err := fmt.Errorf("attempting to install package %s into read-only GOROOT", p.ImportPath)
-+ return err
-+ }
-+ }
-+
- if err := b.Mkdir(a.Objdir); err != nil {
- return err
- }
diff --git a/poky/meta/recipes-devtools/go/go-1.11/0008-use-GOBUILDMODE-to-set-buildmode.patch b/poky/meta/recipes-devtools/go/go-1.11/0008-use-GOBUILDMODE-to-set-buildmode.patch
deleted file mode 100644
index 225cf439c..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11/0008-use-GOBUILDMODE-to-set-buildmode.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 0e0c247f0caec23528889ff09d98348cba9028f1 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Fri, 26 Oct 2018 15:02:32 +0800
-Subject: [PATCH] use GOBUILDMODE to set buildmode
-
-While building go itself, the go build system does not support
-to set `-buildmode=pie' from environment.
-
-Add GOBUILDMODE to support it which make PIE executables the default
-build mode, as PIE executables are required as of Yocto
-
-Refers: https://groups.google.com/forum/#!topic/golang-dev/gRCe5URKewI
-Upstream-Status: Denied [upstream choose antoher solution: `17a256b
-cmd/go: -buildmode=pie for android/arm']
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- src/cmd/go/internal/work/build.go | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-Index: go/src/cmd/go/internal/work/build.go
-===================================================================
---- go.orig/src/cmd/go/internal/work/build.go
-+++ go/src/cmd/go/internal/work/build.go
-@@ -223,7 +223,11 @@ func AddBuildFlags(cmd *base.Command) {
-
- cmd.Flag.Var(&load.BuildAsmflags, "asmflags", "")
- cmd.Flag.Var(buildCompiler{}, "compiler", "")
-- cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "")
-+ if bm := os.Getenv("GOBUILDMODE"); bm != "" {
-+ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", bm, "")
-+ } else {
-+ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "")
-+ }
- cmd.Flag.Var(&load.BuildGcflags, "gcflags", "")
- cmd.Flag.Var(&load.BuildGccgoflags, "gccgoflags", "")
- cmd.Flag.StringVar(&cfg.BuildMod, "mod", "", "")
diff --git a/poky/meta/recipes-devtools/go/go-1.11/0009-ld-replace-glibc-dynamic-linker-with-musl.patch b/poky/meta/recipes-devtools/go/go-1.11/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
deleted file mode 100644
index fd67375c7..000000000
--- a/poky/meta/recipes-devtools/go/go-1.11/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 35ea4be34e94912b00837e0f7c7385f2e98fe769 Mon Sep 17 00:00:00 2001
-From: Matt Madison <matt@madison.systems>
-Date: Sun, 18 Feb 2018 08:24:05 -0800
-Subject: [PATCH] ld: replace glibc dynamic linker with musl
-
-Rework of patch by Khem Raj <raj.khem@gmail.com>
-for go 1.10. Should be applied conditionally on
-musl being the system C library.
-
-Upstream-Status: Inappropriate [Real fix should be portable across libcs]
-
-Signed-off-by: Matt Madison <matt@madison.systems>
-
----
- src/cmd/link/internal/amd64/obj.go | 2 +-
- src/cmd/link/internal/arm/obj.go | 2 +-
- src/cmd/link/internal/arm64/obj.go | 2 +-
- src/cmd/link/internal/mips/obj.go | 2 +-
- src/cmd/link/internal/mips64/obj.go | 2 +-
- src/cmd/link/internal/ppc64/obj.go | 2 +-
- src/cmd/link/internal/s390x/obj.go | 2 +-
- src/cmd/link/internal/x86/obj.go | 2 +-
- 8 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go
-index 87e8091..f522a63 100644
---- a/src/cmd/link/internal/amd64/obj.go
-+++ b/src/cmd/link/internal/amd64/obj.go
-@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
- PEreloc1: pereloc1,
- TLSIEtoLE: tlsIEtoLE,
-
-- Linuxdynld: "/lib64/ld-linux-x86-64.so.2",
-+ Linuxdynld: "/lib64/ld-musl-x86-64.so.1",
- Freebsddynld: "/libexec/ld-elf.so.1",
- Openbsddynld: "/usr/libexec/ld.so",
- Netbsddynld: "/libexec/ld.elf_so",
-diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go
-index 788be68..1d2b90e 100644
---- a/src/cmd/link/internal/arm/obj.go
-+++ b/src/cmd/link/internal/arm/obj.go
-@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
- Gentext: gentext,
- Machoreloc1: machoreloc1,
-
-- Linuxdynld: "/lib/ld-linux.so.3", // 2 for OABI, 3 for EABI
-+ Linuxdynld: "/lib/ld-musl-armhf.so.1",
- Freebsddynld: "/usr/libexec/ld-elf.so.1",
- Openbsddynld: "/usr/libexec/ld.so",
- Netbsddynld: "/libexec/ld.elf_so",
-diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go
-index 405d22d..b115659 100644
---- a/src/cmd/link/internal/arm64/obj.go
-+++ b/src/cmd/link/internal/arm64/obj.go
-@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
- Gentext: gentext,
- Machoreloc1: machoreloc1,
-
-- Linuxdynld: "/lib/ld-linux-aarch64.so.1",
-+ Linuxdynld: "/lib/ld-musl-aarch64.so.1",
-
- Freebsddynld: "XXX",
- Openbsddynld: "XXX",
-diff --git a/src/cmd/link/internal/mips/obj.go b/src/cmd/link/internal/mips/obj.go
-index c5d3451..fd85e63 100644
---- a/src/cmd/link/internal/mips/obj.go
-+++ b/src/cmd/link/internal/mips/obj.go
-@@ -60,7 +60,7 @@ func Init() (*sys.Arch, ld.Arch) {
- Gentext: gentext,
- Machoreloc1: machoreloc1,
-
-- Linuxdynld: "/lib/ld.so.1",
-+ Linuxdynld: "/lib/ld-musl-mipsle.so.1",
-
- Freebsddynld: "XXX",
- Openbsddynld: "XXX",
-diff --git a/src/cmd/link/internal/mips64/obj.go b/src/cmd/link/internal/mips64/obj.go
-index 83974e5..097224f 100644
---- a/src/cmd/link/internal/mips64/obj.go
-+++ b/src/cmd/link/internal/mips64/obj.go
-@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) {
- Gentext: gentext,
- Machoreloc1: machoreloc1,
-
-- Linuxdynld: "/lib64/ld64.so.1",
-+ Linuxdynld: "/lib64/ld-musl-mips64le.so.1",
- Freebsddynld: "XXX",
- Openbsddynld: "XXX",
- Netbsddynld: "XXX",
-diff --git a/src/cmd/link/internal/ppc64/obj.go b/src/cmd/link/internal/ppc64/obj.go
-index 273d9b4..a503abe 100644
---- a/src/cmd/link/internal/ppc64/obj.go
-+++ b/src/cmd/link/internal/ppc64/obj.go
-@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
- Machoreloc1: machoreloc1,
-
- // TODO(austin): ABI v1 uses /usr/lib/ld.so.1,
-- Linuxdynld: "/lib64/ld64.so.1",
-+ Linuxdynld: "/lib64/ld-musl-powerpc64le.so.1",
-
- Freebsddynld: "XXX",
- Openbsddynld: "XXX",
-diff --git a/src/cmd/link/internal/s390x/obj.go b/src/cmd/link/internal/s390x/obj.go
-index 9ac7eb8..3825ff7 100644
---- a/src/cmd/link/internal/s390x/obj.go
-+++ b/src/cmd/link/internal/s390x/obj.go
-@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
- Gentext: gentext,
- Machoreloc1: machoreloc1,
-
-- Linuxdynld: "/lib64/ld64.so.1",
-+ Linuxdynld: "/lib64/ld-musl-s390x.so.1",
-
- // not relevant for s390x
- Freebsddynld: "XXX",
-diff --git a/src/cmd/link/internal/x86/obj.go b/src/cmd/link/internal/x86/obj.go
-index 6a744dc..d81f392 100644
---- a/src/cmd/link/internal/x86/obj.go
-+++ b/src/cmd/link/internal/x86/obj.go
-@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
- Machoreloc1: machoreloc1,
- PEreloc1: pereloc1,
-
-- Linuxdynld: "/lib/ld-linux.so.2",
-+ Linuxdynld: "/lib/ld-musl-i386.so.1",
- Freebsddynld: "/usr/libexec/ld-elf.so.1",
- Openbsddynld: "/usr/libexec/ld.so",
- Netbsddynld: "/usr/libexec/ld.elf_so",
diff --git a/poky/meta/recipes-devtools/go/go-1.12.inc b/poky/meta/recipes-devtools/go/go-1.12.inc
index 0cf0a63ff..3f23f06f0 100644
--- a/poky/meta/recipes-devtools/go/go-1.12.inc
+++ b/poky/meta/recipes-devtools/go/go-1.12.inc
@@ -1,7 +1,7 @@
require go-common.inc
GO_BASEVERSION = "1.12"
-GO_MINOR = ".1"
+GO_MINOR = ".6"
PV .= "${GO_MINOR}"
FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
@@ -19,5 +19,5 @@ SRC_URI += "\
"
SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
-SRC_URI[main.md5sum] = "09fe592343465560b4b8431d870b3df3"
-SRC_URI[main.sha256sum] = "0be127684df4b842a64e58093154f9d15422f1405f1fcff4b2c36ffc6a15818a"
+SRC_URI[main.md5sum] = "48a4141fc718dd742d106431294f08bf"
+SRC_URI[main.sha256sum] = "c96c5ccc7455638ae1a8b7498a030fe653731c8391c5f8e79590bce72f92b4ca"
diff --git a/poky/meta/recipes-devtools/go/go-cross-canadian_1.11.bb b/poky/meta/recipes-devtools/go/go-cross-canadian_1.11.bb
deleted file mode 100644
index 7ac9449e4..000000000
--- a/poky/meta/recipes-devtools/go/go-cross-canadian_1.11.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require go-cross-canadian.inc
-require go-${PV}.inc
diff --git a/poky/meta/recipes-devtools/go/go-cross.inc b/poky/meta/recipes-devtools/go/go-cross.inc
index 29ce7f6e8..3d344a74d 100644
--- a/poky/meta/recipes-devtools/go/go-cross.inc
+++ b/poky/meta/recipes-devtools/go/go-cross.inc
@@ -14,6 +14,7 @@ export GO386 = "${TARGET_GO386}"
export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
+export GOCACHE = "${B}/.cache"
CC = "${@d.getVar('BUILD_CC').strip()}"
do_configure[noexec] = "1"
diff --git a/poky/meta/recipes-devtools/go/go-cross_1.11.bb b/poky/meta/recipes-devtools/go/go-cross_1.11.bb
deleted file mode 100644
index 80b5a03f6..000000000
--- a/poky/meta/recipes-devtools/go/go-cross_1.11.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require go-cross.inc
-require go-${PV}.inc
diff --git a/poky/meta/recipes-devtools/go/go-crosssdk_1.11.bb b/poky/meta/recipes-devtools/go/go-crosssdk_1.11.bb
deleted file mode 100644
index 1857c8a57..000000000
--- a/poky/meta/recipes-devtools/go/go-crosssdk_1.11.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require go-crosssdk.inc
-require go-${PV}.inc
diff --git a/poky/meta/recipes-devtools/go/go-dep_0.5.0.bb b/poky/meta/recipes-devtools/go/go-dep_0.5.0.bb
index cfc2186b3..a4d631f8e 100644
--- a/poky/meta/recipes-devtools/go/go-dep_0.5.0.bb
+++ b/poky/meta/recipes-devtools/go/go-dep_0.5.0.bb
@@ -19,16 +19,6 @@ RDEPENDS_${PN}-dev += "bash"
BBCLASSEXTEND = "native nativesdk"
-# for x86 ends with textrel in ${PN}
-# http://errors.yoctoproject.org/Errors/Details/185630/
-# ERROR: QA Issue: ELF binary '/work/i586-oe-linux/go-dep/0.4.1-r0/packages-split/go-dep/usr/bin/dep' has relocations in .text [textrel]
-INSANE_SKIP_${PN} += "textrel"
-
-# for aarch64 ends with textrel in ${PN}-ptest
-# http://errors.yoctoproject.org/Errors/Details/185632/
-# ERROR: QA Issue: ELF binary '/work/aarch64-oe-linux/go-dep/0.4.1-r0/packages-split/go-dep-ptest/usr/lib/go-dep/ptest/github.com/golang/dep/cmd/dep/dep.test' has relocations in .text [textrel]
-INSANE_SKIP_${PN}-ptest += "textrel"
-
# For compiling ptest on mips and mips64, the current go-dep version fails with the go 1.11 toolchain.
# error message: vet config not found
PTEST_ENABLED_mips = "0"
diff --git a/poky/meta/recipes-devtools/go/go-native_1.11.bb b/poky/meta/recipes-devtools/go/go-native_1.11.bb
deleted file mode 100644
index bbf3c0dd7..000000000
--- a/poky/meta/recipes-devtools/go/go-native_1.11.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require ${PN}.inc
-require go-${PV}.inc
diff --git a/poky/meta/recipes-devtools/go/go-runtime.inc b/poky/meta/recipes-devtools/go/go-runtime.inc
index c219aa378..e28219561 100644
--- a/poky/meta/recipes-devtools/go/go-runtime.inc
+++ b/poky/meta/recipes-devtools/go/go-runtime.inc
@@ -15,6 +15,7 @@ export CGO_CFLAGS = "${CFLAGS}"
export CGO_CPPFLAGS = "${CPPFLAGS}"
export CGO_CXXFLAGS = "${CXXFLAGS}"
export CGO_LDFLAGS = "${LDFLAGS}"
+export GOCACHE = "${B}/.cache"
GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"'
diff --git a/poky/meta/recipes-devtools/go/go-runtime_1.11.bb b/poky/meta/recipes-devtools/go/go-runtime_1.11.bb
deleted file mode 100644
index 43b68b4e4..000000000
--- a/poky/meta/recipes-devtools/go/go-runtime_1.11.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require go-${PV}.inc
-require go-runtime.inc
diff --git a/poky/meta/recipes-devtools/go/go-target.inc b/poky/meta/recipes-devtools/go/go-target.inc
index 379f87b49..91efd3e97 100644
--- a/poky/meta/recipes-devtools/go/go-target.inc
+++ b/poky/meta/recipes-devtools/go/go-target.inc
@@ -10,6 +10,7 @@ export GO386 = "${TARGET_GO386}"
export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
+export GOCACHE = "${B}/.cache"
GO_LDFLAGS = ""
GO_LDFLAGS_class-nativesdk = "-linkmode external"
export GO_LDFLAGS
diff --git a/poky/meta/recipes-devtools/go/go_1.11.bb b/poky/meta/recipes-devtools/go/go_1.11.bb
deleted file mode 100644
index 42cdb0430..000000000
--- a/poky/meta/recipes-devtools/go/go_1.11.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require go-${PV}.inc
-require go-target.inc
-
-export GOBUILDMODE=""
-
-# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips
-# doesn't support -buildmode=pie, so skip the QA checking for mips and its
-# variants.
-python() {
- if 'mips' in d.getVar('TARGET_ARCH'):
- d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
- else:
- d.setVar('GOBUILDMODE', 'pie')
-}
diff --git a/poky/meta/recipes-devtools/json-c/json-c/add-disable-werror-option-to-configure.patch b/poky/meta/recipes-devtools/json-c/json-c/add-disable-werror-option-to-configure.patch
new file mode 100644
index 000000000..0c20c8458
--- /dev/null
+++ b/poky/meta/recipes-devtools/json-c/json-c/add-disable-werror-option-to-configure.patch
@@ -0,0 +1,45 @@
+json-c: Backport --disable-werror patch to allow compilation under icecc
+
+icecc preprocesses source files locally before shipping them off to be compiled
+on remote hosts. This preprocessing removes comments, including /* fallthough */
+comments in switch statements that normally prevent an implicit-fallthrough
+warning, see https://github.com/icecc/icecream/issues/419
+
+Rather than turning off -Werror, the upstream project has implemented a
+configure option, --disable-werror, in response to Ross's
+https://github.com/json-c/json-c/issues/489
+
+This patch from
+https://github.com/json-c/json-c/commit/21c886534f8927fdc0fb5f8647394f3e0e0874b8
+
+Upstream-Status: Backport [Not yet released]
+Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
+
+From 21c886534f8927fdc0fb5f8647394f3e0e0874b8 Mon Sep 17 00:00:00 2001
+From: Pierce Lopez <pierce.lopez@gmail.com>
+Date: Sun, 9 Jun 2019 10:52:08 -0400
+Subject: [PATCH] build: add --disable-werror option to configure
+
+to omit -Werror compiler option
+---
+ configure.ac | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 272ea6af9c..798fd5b747 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -165,7 +165,12 @@ AS_IF([test "x$enable_Bsymbolic" = "xcheck"],
+ AS_IF([test "x$enable_Bsymbolic" = "xyes"], [JSON_BSYMBOLIC_LDFLAGS=-Wl[,]-Bsymbolic-functions])
+ AC_SUBST(JSON_BSYMBOLIC_LDFLAGS)
+
+-AX_APPEND_COMPILE_FLAGS([-Wall -Werror -Wcast-qual -Wno-error=deprecated-declarations])
++AC_ARG_ENABLE([werror],
++ AS_HELP_STRING([--disable-werror], [avoid treating compiler warnings as fatal errors]))
++
++AS_IF([test "x$enable_werror" != "xno"], [AX_APPEND_COMPILE_FLAGS([-Werror])])
++
++AX_APPEND_COMPILE_FLAGS([-Wall -Wcast-qual -Wno-error=deprecated-declarations])
+ AX_APPEND_COMPILE_FLAGS([-Wextra -Wwrite-string -Wno-unused-parameter])
+ AX_APPEND_COMPILE_FLAGS([-D_GNU_SOURCE])
+
diff --git a/poky/meta/recipes-devtools/json-c/json-c_0.13.1.bb b/poky/meta/recipes-devtools/json-c/json-c_0.13.1.bb
index 5b10e6829..9d8f2e787 100644
--- a/poky/meta/recipes-devtools/json-c/json-c_0.13.1.bb
+++ b/poky/meta/recipes-devtools/json-c/json-c_0.13.1.bb
@@ -4,7 +4,9 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz"
+SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+ file://add-disable-werror-option-to-configure.patch \
+ "
SRC_URI[md5sum] = "04969ad59cc37bddd83741a08b98f350"
SRC_URI[sha256sum] = "b87e608d4d3f7bfdd36ef78d56d53c74e66ab278d318b71e6002a369d36f4873"
@@ -20,7 +22,9 @@ RPROVIDES_${PN} = "libjson"
inherit autotools
-EXTRA_OECONF = "--enable-rdrand"
+EXTRA_OECONF = "--disable-werror \
+ --enable-rdrand \
+ "
do_configure_prepend() {
# Clean up autoconf cruft that should not be in the tarball
diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd/0001-v1-meson.build-explicitly-specify-the-v1-library-in-.patch b/poky/meta/recipes-devtools/libmodulemd/libmodulemd/0001-v1-meson.build-explicitly-specify-the-v1-library-in-.patch
new file mode 100644
index 000000000..1568d25f9
--- /dev/null
+++ b/poky/meta/recipes-devtools/libmodulemd/libmodulemd/0001-v1-meson.build-explicitly-specify-the-v1-library-in-.patch
@@ -0,0 +1,28 @@
+From b651551134cf170038b3e01812e3767969506491 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 21 May 2019 17:59:26 +0200
+Subject: [PATCH] v1/meson.build: explicitly specify the v1 library in
+ pkgconfig
+
+Otherwise there would be '-lmodulemd' which resolves
+to v2 version if both v2 and v1 are present in the sysroot.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ modulemd/v1/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modulemd/v1/meson.build b/modulemd/v1/meson.build
+index 4d54e69..9144ca2 100644
+--- a/modulemd/v1/meson.build
++++ b/modulemd/v1/meson.build
+@@ -325,7 +325,7 @@ configure_file(
+ )
+
+ pkg.generate(
+- libraries : modulemd_v1_lib,
++ libraries : '-l:libmodulemd.so.1',
+ subdirs : v1_header_path,
+ version : libmodulemd_v1_version,
+ name : 'modulemd',
diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb b/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
index 40715c06e..7e8aea7be 100644
--- a/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
+++ b/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
@@ -5,16 +5,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=25a3927bff3ee4f5b21bcb0ed3fcd6bb"
SRC_URI = "git://github.com/fedora-modularity/libmodulemd;protocol=https \
file://0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch \
file://0002-modulemd-v1-meson.build-do-not-generate-gir-or-gtkdo.patch \
+ file://0001-v1-meson.build-explicitly-specify-the-v1-library-in-.patch \
"
-PV = "2.2.3"
-SRCREV = "4c75c6f8b39ee57aebe8fd36ef84808e893048c0"
+PV = "2.5.0"
+SRCREV = "8d9a99ddf037df7c032119cdd3a87238a3cc9090"
S = "${WORKDIR}/git"
inherit meson gobject-introspection
-EXTRA_OEMESON = "-Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=false"
+EXTRA_OEMESON = "-Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=true"
DEPENDS += "glib-2.0 libyaml glib-2.0-native"
diff --git a/poky/meta/recipes-devtools/librepo/librepo_1.9.6.bb b/poky/meta/recipes-devtools/librepo/librepo_1.10.3.bb
index fecedc981..d7c83edce 100644
--- a/poky/meta/recipes-devtools/librepo/librepo_1.9.6.bb
+++ b/poky/meta/recipes-devtools/librepo/librepo_1.10.3.bb
@@ -7,7 +7,7 @@ SRC_URI = "git://github.com/rpm-software-management/librepo.git \
file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
"
-SRCREV = "7d8acd45eb09809a5ab729c312744da4b2fe92bb"
+SRCREV = "2eb0a27031956fd98340ca2707f03abb7b780372"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc b/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
index af0ff4586..a9b63c1bf 100644
--- a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
+++ b/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
@@ -8,7 +8,6 @@ inherit autotools texinfo ptest
SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
file://ac_config_links.patch \
- file://remove-gets.patch \
file://m4-1.4.18-glibc-change-work-around.patch \
"
SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
@@ -53,7 +52,7 @@ do_install_ptest() {
}
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make coreutils diffutils"
RDEPENDS_${PN}-ptest_append_libc-glibc = "\
locale-base-fr-fr.iso-8859-1 \
"
diff --git a/poky/meta/recipes-devtools/m4/m4/remove-gets.patch b/poky/meta/recipes-devtools/m4/m4/remove-gets.patch
deleted file mode 100644
index abe82f3b2..000000000
--- a/poky/meta/recipes-devtools/m4/m4/remove-gets.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-eglibc has remove gets starting 2.16
-therefore check for its being there before
-undefining it.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-diff --git a/lib/stdio.in.h b/lib/stdio.in.h
-index 5727452..f04a691 100644
---- a/lib/stdio.in.h
-+++ b/lib/stdio.in.h
-@@ -742,10 +742,12 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
- /* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning; besides, C11
- removed it. */
-+#if defined gets
- #undef gets
- #if HAVE_RAW_DECL_GETS && !defined __cplusplus
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
- #endif
-+#endif
-
- #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
- struct obstack;
diff --git a/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
index da477454c..2b22531dd 100644
--- a/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
@@ -51,7 +51,7 @@ index 6d3678f..90fdb80 100644
- cmd = self.pkgbin.get_command() + args
+ def _call_pkgbin_real(self, args, env, use_native=False):
+ if use_native:
-+ cmd = self.pkgbin.get_command() + "-native" + args
++ cmd = [self.pkgbin.get_command()[0] + "-native"] + args
+ else:
+ cmd = self.pkgbin.get_command() + args
p, out = Popen_safe(cmd, env=env)[0:2]
diff --git a/poky/meta/recipes-devtools/mtd/mtd-utils/0001-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch b/poky/meta/recipes-devtools/mtd/mtd-utils/0001-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch
deleted file mode 100644
index 4ece56b9c..000000000
--- a/poky/meta/recipes-devtools/mtd/mtd-utils/0001-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 0f833ac73ad631248826386e2918d8571ecf0347 Mon Sep 17 00:00:00 2001
-From: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-Date: Sat, 9 Jun 2018 16:45:22 +0200
-Subject: [PATCH] Revert "Return correct error number in ubi_get_vol_info1"
-
-This reverts commit dede98ffb706676309488d7cc660f569548d5930.
-
-The original commit tried to fix a descrepancy between the implementation
-and the documentation by making the implementation comply.
-
-When making the change, it was overlooked, that ubinfo and ubirename were
-written against the implementation instead of the behaviour specified by
-the documentation. So were further internal functions like
-ubi_get_vol_info1_nm which further breaks ubirmvol.
-
-A report with an outline of a resulting problem can be read on
-the mailing list:
-
-http://lists.infradead.org/pipermail/linux-mtd/2018-June/081562.html
-
-From the report:
-
-steps to reproduce: have mtd-utils 2.0.1 or 2.0.2
-
-0. make a bunch of ubi volumes in sequential order
-
-ubimkvol /dev/ubi0 -s 64KiB -N test1
-ubimkvol /dev/ubi0 -s 64KiB -N test2
-ubimkvol /dev/ubi0 -s 64KiB -N test3
-ubimkvol /dev/ubi0 -s 64KiB -N test4
-..
-
-1. delete the test1 volume, making a hole in the volume table
-
-ubirmvol /dev/ubi0 -N test1
-
-2. try an affected tool (i.e. "ubirmvol /dev/ubi0 -N test4" )
-
- |root at mr24:/# ubirmvol /dev/ubi0 -N test4
- |ubirmvol: error!: cannot find UBI volume "test4"
- | error 19 (No such device)
-
-or "ubinfo -a"
-
- | root at mr24:/# ubinfo -a
- | UBI version: 1
- | Count of UBI devices: 1
- | UBI control device major/minor: 10:59
- | Present UBI devices: ubi0
- |
- | ubi0
- | Volumes count: 11
- | Logical eraseblock size: 15872 bytes, 15.5 KiB
- | Total amount of logical eraseblocks: 1952 (30982144 bytes, 29.5 MiB)
- | Amount of available logical eraseblocks: 75 (1190400 bytes, 1.1 MiB)
- | Maximum count of volumes 92
- | Count of bad physical eraseblocks: 0
- | Count of reserved physical eraseblocks: 40
- | Current maximum erase counter value: 984
- | Minimum input/output unit size: 512 bytes
- | Character device major/minor: 251:0
- | ubinfo: error!: libubi failed to probe volume 5 on ubi0
- | error 19 (No such device)
- | Present volumes: 0, 1, 2, 3, 4root at mr24:/#
-
-Reported-by: Christian Lamparter <chunkeey@gmail.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-Upstream-Status: Accepted [http://git.infradead.org/mtd-utils.git/commit/0f833ac73ad631248826386e2918d8571ecf0347]
----
- lib/libubi.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/lib/libubi.c b/lib/libubi.c
-index b50e68a..978b433 100644
---- a/lib/libubi.c
-+++ b/lib/libubi.c
-@@ -1240,11 +1240,8 @@ int ubi_get_vol_info1(libubi_t desc, int dev_num, int vol_id,
- info->dev_num = dev_num;
- info->vol_id = vol_id;
-
-- if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor)) {
-- if (errno == ENOENT)
-- errno = ENODEV;
-+ if (vol_get_major(lib, dev_num, vol_id, &info->major, &info->minor))
- return -1;
-- }
-
- ret = vol_read_data(lib->vol_type, dev_num, vol_id, buf, 50);
- if (ret < 0)
---
-2.14.4
-
diff --git a/poky/meta/recipes-devtools/mtd/mtd-utils_git.bb b/poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 9ffac2ed3..49a650a9e 100644
--- a/poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -10,12 +10,11 @@ inherit autotools pkgconfig update-alternatives
DEPENDS = "zlib e2fsprogs util-linux"
RDEPENDS_mtd-utils-tests += "bash"
-PV = "2.0.2+${SRCPV}"
+PV = "2.1.0+${SRCPV}"
-SRCREV = "bc63d36e39f389c8c17f6a8e9db47f2acc884659"
+SRCREV = "b5027be5f470830ac9543db3c52e076b13abd313"
SRC_URI = "git://git.infradead.org/mtd-utils.git \
file://add-exclusion-to-mkfs-jffs2-git-2.patch \
- file://0001-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch \
"
S = "${WORKDIR}/git/"
@@ -25,9 +24,12 @@ EXTRA_OECONF += "--enable-install-tests"
# xattr support creates an additional compile-time dependency on acl because
# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
# regardless whether acl is enabled or disabled in the distro should be okay.
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo jffs ubifs"
PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl"
+PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl"
+PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs"
+PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs"
CPPFLAGS_append_riscv64 = " -pthread -D_REENTRANT"
@@ -59,7 +61,9 @@ do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
}
-PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc mtd-utils-tests"
+PACKAGES =+ "mtd-utils-misc mtd-utils-tests"
+PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "jffs", "mtd-utils-jffs2", "", d)}"
+PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}"
FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
diff --git a/poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch b/poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch
deleted file mode 100644
index 6c058c71d..000000000
--- a/poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 42afc1f652d28dce3c5b9915d0cd3087a144e445 Mon Sep 17 00:00:00 2001
-From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-Date: Mon, 18 Feb 2019 11:25:43 -0600
-Subject: [PATCH] opkg-build: do not set mtime on data.tar.X
-
-Opkg should make sure the binaries it creates are created in a
-repoducibe way, but it shouldn't modify the mtime of the binaries it
-consumes. Doing so has side effects, for exmaple, Python pyc files are
-invalidated.
-
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-
-Upstream-Status: Submitted
----
- opkg-build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/opkg-build b/opkg-build
-index 13782ee..363cd01 100755
---- a/opkg-build
-+++ b/opkg-build
-@@ -301,7 +301,7 @@ build_date="${SOURCE_DATE_EPOCH:-$(date +%s)}"
-
- ( cd $pkg_dir/$CONTROL && find . -type f > $tmp_dir/control_list )
- ( cd $pkg_dir && find . -path ./$CONTROL -prune -o -print > $tmp_dir/file_list )
--( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion --mtime=@$build_date -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
-+( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
- ( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --no-recursion --mtime=@$build_date -c $tarformat -T $tmp_dir/control_list | gzip $zipargs > $tmp_dir/control.tar.gz )
- rm $tmp_dir/file_list
- rm $tmp_dir/control_list
---
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.0.bb b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb
index 9a3e06b92..4be7b16d8 100644
--- a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.0.bb
+++ b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb
@@ -9,13 +9,12 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtu
SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
file://0001-Switch-all-scripts-to-use-Python-3.x.patch \
- file://0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch \
"
UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
-SRC_URI[md5sum] = "6e1c2eae96239520a8eb3d05372773ea"
-SRC_URI[sha256sum] = "8153f4e5dadde422d35feaf86bf595266af9d0037389bc418fa87feb0437efb3"
+SRC_URI[md5sum] = "8c140f835b694a0c27cfb23d2426a02b"
+SRC_URI[sha256sum] = "9ea9efdd9fe13661ad251e3a2860c1c93045adcfaa6659c3e86d9748ecda3b6e"
TARGET_CC_ARCH += "${LDFLAGS}"
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch b/poky/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch
index 7d5c079b2..7d5c079b2 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch
+++ b/poky/meta/recipes-devtools/perl/files/0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch b/poky/meta/recipes-devtools/perl/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch
index ed8ec1d41..ed8ec1d41 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch
+++ b/poky/meta/recipes-devtools/perl/files/0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch b/poky/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
index 3b0fc453e..3b0fc453e 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
+++ b/poky/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch b/poky/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
index 0aaeaa29e..0aaeaa29e 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
+++ b/poky/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
diff --git a/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch b/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch
new file mode 100644
index 000000000..07f153162
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch
@@ -0,0 +1,30 @@
+From 31a2c5555f9ef32f35d7d5ce1fd09a010ba5f5c6 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Mon, 17 Jun 2019 10:47:15 -0500
+Subject: [PATCH 1/2] enc2xs: Add environment variable to suppress comments
+
+Comment generation in enc2xs can now be suppressed by setting the
+ENC2XS_NO_COMMENTS environment variable. This allows enc2xs to produce
+reproducible output by omitting the name of the generating program.
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+Upstream-status: Accepted [https://github.com/dankogai/p5-encode/pull/145]
+---
+ cpan/Encode/bin/enc2xs | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs
+index 619b64b757..bfce9ee735 100644
+--- a/cpan/Encode/bin/enc2xs
++++ b/cpan/Encode/bin/enc2xs
+@@ -144,6 +144,7 @@ getopts('CM:SQqOo:f:n:v',\%opt);
+ $opt{M} and make_makefile_pl($opt{M}, @ARGV);
+ $opt{C} and make_configlocal_pm($opt{C}, @ARGV);
+ $opt{v} ||= $ENV{ENC2XS_VERBOSE};
++$opt{q} ||= $ENV{ENC2XS_NO_COMMENTS};
+
+ sub verbose {
+ print STDERR @_ if $opt{v};
+--
+2.21.0
+
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch b/poky/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
index e7985036a..e7985036a 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
+++ b/poky/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
diff --git a/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch b/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch
new file mode 100644
index 000000000..e70ff67f7
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch
@@ -0,0 +1,32 @@
+From 260ebd15e16cd86b9b58e5c5f3a496b3853ca46d Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Mon, 17 Jun 2019 10:47:23 -0500
+Subject: [PATCH 2/2] Constant: Fix up shebang
+
+The instructions indicate that the script should be explicitly passed to
+"perl -x", so automatically setting the #! to be ^X is unnecessary and
+makes the file non-reproducible when building because ^X could be the
+absolute path to miniperl.
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+Upstream-status: Submitted [https://rt.cpan.org/Public/Bug/Display.html?id=129866]
+---
+ cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
+index 14eb809714..d4d074e121 100644
+--- a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
++++ b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm
+@@ -219,7 +219,7 @@ sub dogfood {
+ Regenerate these constant functions by feeding this entire source file to
+ perl -x
+
+-#!$^X -w
++#!/usr/bin/env perl -x -w
+ use ExtUtils::Constant qw (constant_types C_constant XS_constant);
+
+ EOT
+--
+2.21.0
+
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/errno_ver.diff b/poky/meta/recipes-devtools/perl/files/errno_ver.diff
index a965fbeee..a965fbeee 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/errno_ver.diff
+++ b/poky/meta/recipes-devtools/perl/files/errno_ver.diff
diff --git a/poky/meta/recipes-devtools/perl/files/fix-setgroup.patch b/poky/meta/recipes-devtools/perl/files/fix-setgroup.patch
new file mode 100644
index 000000000..2b490e606
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/files/fix-setgroup.patch
@@ -0,0 +1,49 @@
+Test script to reproduce the problem:
+
+#!/usr/bin/env perl
+$) = "2 2";
+print $!;
+
+Result from perl 5.28 under strace:
+
+setgroups(1, [2]) = 0
+setresgid(-1, 2, -1) = 0
+
+Result from perl 5.30 under strace:
+
+setgroups(1, [-1]) = -1 EINVAL (Invalid argument)
+setresgid(-1, 2, -1) = 0
+
+Patch which broke this upstream:
+https://perl5.git.perl.org/perl.git/commitdiff/5d4a52b5c68a11bfc97c2e24806993b84a61eade
+
+Issue is that the new function changes the endptr to the end of the
+scanned number and needs to be reset to the end of the string for
+each iteration of the loop.
+
+[YOCTO #13391]
+
+RP
+2019/6/14
+Upstream-Status: Pending
+
+Index: perl-5.30.0/mg.c
+===================================================================
+--- perl-5.30.0.orig/mg.c
++++ perl-5.30.0/mg.c
+@@ -3179,6 +3256,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
+ const char *p = SvPV_const(sv, len);
+ Groups_t *gary = NULL;
+ const char* endptr = p + len;
++ const char* realend = p + len;
+ UV uv;
+ #ifdef _SC_NGROUPS_MAX
+ int maxgrp = sysconf(_SC_NGROUPS_MAX);
+@@ -3209,6 +3287,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
+ Newx(gary, i + 1, Groups_t);
+ else
+ Renew(gary, i + 1, Groups_t);
++ endptr = realend;
+ if (grok_atoUV(p, &uv, &endptr))
+ gary[i] = (Groups_t)uv;
+ else {
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/native-perlinc.patch b/poky/meta/recipes-devtools/perl/files/native-perlinc.patch
index a2e1aefd4..a2e1aefd4 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/native-perlinc.patch
+++ b/poky/meta/recipes-devtools/perl/files/native-perlinc.patch
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/perl-configpm-switch.patch b/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
index e6f23eed6..3c2cecb8c 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/perl-configpm-switch.patch
+++ b/poky/meta/recipes-devtools/perl/files/perl-configpm-switch.patch
@@ -1,3 +1,8 @@
+From 7f313cac31c55cbe62a4d0cdfa8321cc05a8eb3a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sun, 27 May 2007 21:04:11 +0000
+Subject: [PATCH] perl: 5.8.7 -> 5.8.8 (from OE)
+
This patch is used for perl-native only. It enables the switching of
configuration files between Config_heavy.pl and
Config_heavy-target.pl by setting the environment variables
@@ -10,11 +15,15 @@ values would be valid for the host only.
Upstream-Status: Inappropriate [native]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-Index: perl-5.14.2/configpm
-===================================================================
---- perl-5.14.2.orig/configpm
-+++ perl-5.14.2/configpm
-@@ -658,7 +658,7 @@ sub FETCH {
+---
+ configpm | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/configpm b/configpm
+index 09c4a3b..6a0a680 100755
+--- a/configpm
++++ b/configpm
+@@ -687,7 +687,7 @@ sub FETCH {
my($self, $key) = @_;
# check for cached value (which may be undef so we use exists not defined)
@@ -23,7 +32,7 @@ Index: perl-5.14.2/configpm
}
ENDOFEND
-@@ -816,7 +816,21 @@ $config_txt .= sprintf <<'ENDOFTIE', $fa
+@@ -845,7 +845,21 @@ $config_txt .= sprintf <<'ENDOFTIE', $fast_config;
sub DESTROY { }
sub AUTOLOAD {
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch b/poky/meta/recipes-devtools/perl/files/perl-dynloader.patch
index 6bb832a42..6bb832a42 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/perl-dynloader.patch
+++ b/poky/meta/recipes-devtools/perl/files/perl-dynloader.patch
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/perl-rdepends.txt b/poky/meta/recipes-devtools/perl/files/perl-rdepends.txt
index f93bbc764..331a44d30 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/perl-rdepends.txt
+++ b/poky/meta/recipes-devtools/perl/files/perl-rdepends.txt
@@ -153,6 +153,9 @@ RDEPENDS_perl-module-b-xref += "perl-module-b"
RDEPENDS_perl-module-b-xref += "perl-module-config"
RDEPENDS_perl-module-b-xref += "perl-module-strict"
RDEPENDS_perl-module-bytes += "perl-module-bytes-heavy"
+RDEPENDS_perl-module-carp += "perl-module-exporter"
+RDEPENDS_perl-module-carp += "perl-module-strict"
+RDEPENDS_perl-module-carp += "perl-module-warnings"
RDEPENDS_perl-module--charnames += "perl-module-bytes"
RDEPENDS_perl-module-charnames += "perl-module-bytes"
RDEPENDS_perl-module-charnames += "perl-module--charnames"
@@ -239,6 +242,7 @@ RDEPENDS_perl-module-cwd += "perl-module-errno"
RDEPENDS_perl-module-cwd += "perl-module-exporter"
RDEPENDS_perl-module-cwd += "perl-module-strict"
RDEPENDS_perl-module-cwd += "perl-module-xsloader"
+RDEPENDS_perl-module-data-dumper += "perl-module-bytes"
RDEPENDS_perl-module-data-dumper += "perl-module-config"
RDEPENDS_perl-module-data-dumper += "perl-module-constant"
RDEPENDS_perl-module-data-dumper += "perl-module-exporter"
@@ -447,6 +451,7 @@ RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-ipc-cmd"
RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-strict"
RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-text-parsewords"
RDEPENDS_perl-module-extutils-cbuilder-base += "perl-module-warnings"
+RDEPENDS_perl-module-extutils-cbuilder += "perl-module-extutils-cbuilder-base"
RDEPENDS_perl-module-extutils-cbuilder += "perl-module-file-basename"
RDEPENDS_perl-module-extutils-cbuilder += "perl-module-file-path"
RDEPENDS_perl-module-extutils-cbuilder += "perl-module-strict"
@@ -793,6 +798,10 @@ RDEPENDS_perl-module-file-path += "perl-module-exporter"
RDEPENDS_perl-module-file-path += "perl-module-file-basename"
RDEPENDS_perl-module-file-path += "perl-module-strict"
RDEPENDS_perl-module-file-path += "perl-module-vars"
+RDEPENDS_perl-module-file-spec += "perl-module-constant"
+RDEPENDS_perl-module-file-spec += "perl-module-cwd"
+RDEPENDS_perl-module-file-spec += "perl-module-strict"
+RDEPENDS_perl-module-file-spec += "perl-module-file-spec-unix"
RDEPENDS_perl-module-file-stat += "perl-module-class-struct"
RDEPENDS_perl-module-file-stat += "perl-module-constant"
RDEPENDS_perl-module-file-stat += "perl-module-exporter"
@@ -801,16 +810,19 @@ RDEPENDS_perl-module-file-stat += "perl-module-overload "
RDEPENDS_perl-module-file-stat += "perl-module-strict"
RDEPENDS_perl-module-file-stat += "perl-module-warnings"
RDEPENDS_perl-module-file-stat += "perl-module-warnings-register"
+RDEPENDS_perl-module-file-temp += "perl-module-carp"
RDEPENDS_perl-module-file-temp += "perl-module-constant"
RDEPENDS_perl-module-file-temp += "perl-module-cwd"
RDEPENDS_perl-module-file-temp += "perl-module-errno"
RDEPENDS_perl-module-file-temp += "perl-module-exporter"
RDEPENDS_perl-module-file-temp += "perl-module-fcntl"
RDEPENDS_perl-module-file-temp += "perl-module-file-path"
+RDEPENDS_perl-module-file-temp += "perl-module-file-spec"
RDEPENDS_perl-module-file-temp += "perl-module-io-seekable"
RDEPENDS_perl-module-file-temp += "perl-module-overload"
RDEPENDS_perl-module-file-temp += "perl-module-parent"
RDEPENDS_perl-module-file-temp += "perl-module-posix"
+RDEPENDS_perl-module-file-temp += "perl-module-scalar-util"
RDEPENDS_perl-module-file-temp += "perl-module-strict"
RDEPENDS_perl-module-file-temp += "perl-module-vars"
RDEPENDS_perl-module-filter-simple += "perl-module-filter-util-call"
@@ -954,11 +966,13 @@ RDEPENDS_perl-module-io-dir += "perl-module-file-stat"
RDEPENDS_perl-module-io-dir += "perl-module-io-file"
RDEPENDS_perl-module-io-dir += "perl-module-strict"
RDEPENDS_perl-module-io-dir += "perl-module-tie-hash"
+RDEPENDS_perl-module-io-file += "perl-module-carp"
RDEPENDS_perl-module-io-file += "perl-module-exporter"
RDEPENDS_perl-module-io-file += "perl-module-fcntl"
RDEPENDS_perl-module-io-file += "perl-module-io-seekable"
RDEPENDS_perl-module-io-file += "perl-module-selectsaver"
RDEPENDS_perl-module-io-file += "perl-module-strict"
+RDEPENDS_perl-module-io-file += "perl-module-symbol"
RDEPENDS_perl-module-io-handle += "perl-module-exporter"
RDEPENDS_perl-module-io-handle += "perl-module-io"
RDEPENDS_perl-module-io-handle += "perl-module-io-file"
@@ -1347,6 +1361,7 @@ RDEPENDS_perl-module-math-complex += "perl-module-warnings"
RDEPENDS_perl-module-math-trig += "perl-module-exporter"
RDEPENDS_perl-module-math-trig += "perl-module-math-complex"
RDEPENDS_perl-module-math-trig += "perl-module-strict"
+RDEPENDS_perl-module-metadata += "perl-module-version"
RDEPENDS_perl-module-memoize-anydbm-file += "perl-module-vars"
RDEPENDS_perl-module-memoize += "perl-module-config"
RDEPENDS_perl-module-memoize += "perl-module-exporter"
@@ -1482,6 +1497,7 @@ RDEPENDS_perl-module-overloading += "perl-module-overload-numbers"
RDEPENDS_perl-module-overloading += "perl-module-warnings"
RDEPENDS_perl-module-overload += "perl-module-mro"
RDEPENDS_perl-module-overload += "perl-module-warnings-register"
+RDEPENDS_perl-module-overload += "perl-module-overloading"
RDEPENDS_perl-module-params-check += "perl-module-exporter"
RDEPENDS_perl-module-params-check += "perl-module-locale-maketext-simple"
RDEPENDS_perl-module-params-check += "perl-module-strict"
@@ -1722,6 +1738,11 @@ RDEPENDS_perl-module-safe += "perl-module-b"
RDEPENDS_perl-module-safe += "perl-module-opcode"
RDEPENDS_perl-module-safe += "perl-module-strict"
RDEPENDS_perl-module-safe += "perl-module-utf8"
+RDEPENDS_perl-module-scalar-util += "perl-module-carp"
+RDEPENDS_perl-module-scalar-util += "perl-module-exporter"
+RDEPENDS_perl-module-scalar-util += "perl-module-list-util"
+RDEPENDS_perl-module-scalar-util += "perl-module-strict"
+RDEPENDS_perl-module-scalar-util += "perl-module-warnings"
RDEPENDS_perl-module-sdbm-file += "perl-module-exporter"
RDEPENDS_perl-module-sdbm-file += "perl-module-strict"
RDEPENDS_perl-module-sdbm-file += "perl-module-tie-hash"
@@ -1767,6 +1788,7 @@ RDEPENDS_perl-module-sys-syslog += "perl-module-xsloader"
RDEPENDS_perl-module-tap-base += "perl-module-base"
RDEPENDS_perl-module-tap-base += "perl-module-constant"
RDEPENDS_perl-module-tap-base += "perl-module-strict"
+RDEPENDS_perl-module-tap-base += "perl-module-tap-object"
RDEPENDS_perl-module-tap-base += "perl-module-warnings"
RDEPENDS_perl-module-tap-formatter-base += "perl-module-base"
RDEPENDS_perl-module-tap-formatter-base += "perl-module-posix"
@@ -1806,39 +1828,50 @@ RDEPENDS_perl-module-tap-harness-env += "perl-module-tap-object"
RDEPENDS_perl-module-tap-harness-env += "perl-module-text-parsewords"
RDEPENDS_perl-module-tap-harness-env += "perl-module-warnings"
RDEPENDS_perl-module-tap-harness += "perl-module-base"
+RDEPENDS_perl-module-tap-harness += "perl-module-carp"
RDEPENDS_perl-module-tap-harness += "perl-module-file-path"
+RDEPENDS_perl-module-tap-harness += "perl-module-file-spec"
RDEPENDS_perl-module-tap-harness += "perl-module-io-handle"
RDEPENDS_perl-module-tap-harness += "perl-module-strict"
+RDEPENDS_perl-module-tap-harness += "perl-module-tap-base"
RDEPENDS_perl-module-tap-harness += "perl-module-warnings"
RDEPENDS_perl-module-tap-object += "perl-module-strict"
RDEPENDS_perl-module-tap-object += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-base"
RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-benchmark"
RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-tap-object"
RDEPENDS_perl-module-tap-parser-aggregator += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-grammar += "perl-module-base"
RDEPENDS_perl-module-tap-parser-grammar += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-grammar += "perl-module-tap-object"
RDEPENDS_perl-module-tap-parser-grammar += "perl-module-tap-parser-resultfactory"
RDEPENDS_perl-module-tap-parser-grammar += "perl-module-tap-parser-yamlish-reader"
RDEPENDS_perl-module-tap-parser-grammar += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-base"
RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-tap-parser-iterator"
RDEPENDS_perl-module-tap-parser-iterator-array += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-base"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-carp"
RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-constant"
RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-file-basename"
RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-tap-object"
RDEPENDS_perl-module-tap-parser-iteratorfactory += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-iterator += "perl-module-base"
RDEPENDS_perl-module-tap-parser-iterator += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator += "perl-module-tap-object"
RDEPENDS_perl-module-tap-parser-iterator += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-base"
RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-config"
RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-io-handle"
RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-tap-parser-iterator"
RDEPENDS_perl-module-tap-parser-iterator-process += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-base"
RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-tap-parser-iterator"
RDEPENDS_perl-module-tap-parser-iterator-stream += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-base"
RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-constant"
@@ -1846,6 +1879,7 @@ RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-io-select"
RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-multiplexer += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser += "perl-module-base"
+RDEPENDS_perl-module-tap-parser += "perl-module-carp"
RDEPENDS_perl-module-tap-parser += "perl-module-strict"
RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-grammar"
RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-iterator"
@@ -1861,12 +1895,15 @@ RDEPENDS_perl-module-tap-parser += "perl-module-tap-parser-sourcehandler-rawtap"
RDEPENDS_perl-module-tap-parser += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-base"
RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-tap-parser-result"
RDEPENDS_perl-module-tap-parser-result-bailout += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-base"
RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-tap-parser-result"
RDEPENDS_perl-module-tap-parser-result-comment += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-base"
RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-object"
RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-bailout"
RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-comment"
RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-plan"
@@ -1878,31 +1915,41 @@ RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-tap-parser-result-
RDEPENDS_perl-module-tap-parser-resultfactory += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-result += "perl-module-base"
RDEPENDS_perl-module-tap-parser-result += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result += "perl-module-tap-object"
RDEPENDS_perl-module-tap-parser-result += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-base"
RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-tap-parser-result"
RDEPENDS_perl-module-tap-parser-result-plan += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-base"
RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-tap-parser-result"
RDEPENDS_perl-module-tap-parser-result-pragma += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-result-test += "perl-module-base"
RDEPENDS_perl-module-tap-parser-result-test += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-test += "perl-module-tap-parser-result"
RDEPENDS_perl-module-tap-parser-result-test += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-base"
RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-tap-parser-result"
RDEPENDS_perl-module-tap-parser-result-unknown += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-result-version += "perl-module-base"
RDEPENDS_perl-module-tap-parser-result-version += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-version += "perl-module-tap-parser-result"
RDEPENDS_perl-module-tap-parser-result-version += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-base"
RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-tap-parser-result"
RDEPENDS_perl-module-tap-parser-result-yaml += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-scheduler-job += "perl-module-carp"
RDEPENDS_perl-module-tap-parser-scheduler-job += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-scheduler-job += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-carp"
RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-tap-parser-scheduler-job"
RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-tap-parser-scheduler-spinner"
RDEPENDS_perl-module-tap-parser-scheduler += "perl-module-warnings"
+RDEPENDS_perl-module-tap-parser-scheduler-spinner += "perl-module-carp"
RDEPENDS_perl-module-tap-parser-scheduler-spinner += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-scheduler-spinner += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-base"
@@ -1910,18 +1957,21 @@ RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-constan
RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-tap-parser-iteratorfactory"
RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-tap-parser-iterator-process"
+RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-tap-parser-sourcehandler"
RDEPENDS_perl-module-tap-parser-sourcehandler-executable += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-base"
RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-constant"
RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-tap-parser-iteratorfactory"
RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-tap-parser-iterator-stream"
+RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-tap-parser-sourcehandler"
RDEPENDS_perl-module-tap-parser-sourcehandler-file += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-base"
RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-constant"
RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-tap-parser-iteratorfactory"
RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-tap-parser-iterator-stream"
+RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-tap-parser-sourcehandler"
RDEPENDS_perl-module-tap-parser-sourcehandler-handle += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-base"
RDEPENDS_perl-module-tap-parser-sourcehandler += "perl-module-strict"
@@ -1933,23 +1983,28 @@ RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-constant"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-iteratorfactory"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-iterator-process"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-sourcehandler-executable"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-text-parsewords"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-base"
RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-tap-parser-iterator-array"
RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-tap-parser-iteratorfactory"
+RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-tap-parser-sourcehandler"
RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-source += "perl-module-base"
RDEPENDS_perl-module-tap-parser-source += "perl-module-constant"
RDEPENDS_perl-module-tap-parser-source += "perl-module-file-basename"
RDEPENDS_perl-module-tap-parser-source += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-source += "perl-module-tap-object"
RDEPENDS_perl-module-tap-parser-source += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-base"
RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-tap-object"
RDEPENDS_perl-module-tap-parser-yamlish-reader += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-base"
RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-strict"
+RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-tap-object"
RDEPENDS_perl-module-tap-parser-yamlish-writer += "perl-module-warnings"
RDEPENDS_perl-module-term-ansicolor += "perl-module-exporter"
RDEPENDS_perl-module-term-ansicolor += "perl-module-strict"
@@ -1966,11 +2021,20 @@ RDEPENDS_perl-module-test-builder-module += "perl-module-exporter"
RDEPENDS_perl-module-test-builder-module += "perl-module-strict"
RDEPENDS_perl-module-test-builder-module += "perl-module-test-builder"
RDEPENDS_perl-module-test-builder += "perl-module-data-dumper"
+RDEPENDS_perl-module-test-builder += "perl-module-list-util"
RDEPENDS_perl-module-test-builder += "perl-module-overload"
RDEPENDS_perl-module-test-builder += "perl-module-strict"
+RDEPENDS_perl-module-test-builder += "perl-module-scalar-util"
RDEPENDS_perl-module-test-builder += "perl-module-test-builder-formatter"
RDEPENDS_perl-module-test-builder += "perl-module-test-builder-tododiag"
+RDEPENDS_perl-module-test-builder += "perl-module-test2-api"
+RDEPENDS_perl-module-test-builder += "perl-module-test2-util"
RDEPENDS_perl-module-test-builder += "perl-module-warnings"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-strict"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-test2-formatter"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-test2-formatter-tap"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test-builder-formatter += "perl-module-warnings"
RDEPENDS_perl-module-test-builder-tester-color += "perl-module-strict"
RDEPENDS_perl-module-test-builder-tester-color += "perl-module-test-builder-tester"
RDEPENDS_perl-module-test-builder-tester += "perl-module-exporter"
@@ -1988,6 +2052,7 @@ RDEPENDS_perl-module-test-harness += "perl-module-tap-parser-source"
RDEPENDS_perl-module-test-harness += "perl-module-tap-parser-sourcehandler-perl"
RDEPENDS_perl-module-test-harness += "perl-module-text-parsewords"
RDEPENDS_perl-module-test-harness += "perl-module-warnings"
+RDEPENDS_perl-module-test-more += "perl-module-file-temp"
RDEPENDS_perl-module-test-more += "perl-module-strict"
RDEPENDS_perl-module-test-more += "perl-module-test-builder-module"
RDEPENDS_perl-module-test-more += "perl-module-warnings"
@@ -2013,6 +2078,100 @@ RDEPENDS_perl-module-test-tester += "perl-module-test-builder"
RDEPENDS_perl-module-test-tester += "perl-module-test-tester-capturerunner"
RDEPENDS_perl-module-test-tester += "perl-module-test-tester-delegate"
RDEPENDS_perl-module-test-tester += "perl-module-vars"
+RDEPENDS_perl-module-test2-api += "perl-module-carp"
+RDEPENDS_perl-module-test2-api += "perl-module-exporter"
+RDEPENDS_perl-module-test2-api += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-api += "perl-module-strict"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-api-context"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-api-instance"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-api-stack"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-bail"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-diag"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-exception"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-fail"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-note"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-ok"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-plan"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-skip"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-subtest"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-event-waiting"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-eventfacet-trace"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-hub"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-hub-interceptor"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-hub-interceptor-terminator"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-hub-subtest"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-api += "perl-module-test2-util-trace"
+RDEPENDS_perl-module-test2-api += "perl-module-warnings"
+RDEPENDS_perl-module-test2-api-context += "perl-module-carp"
+RDEPENDS_perl-module-test2-api-context += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-api-context += "perl-module-strict"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-api"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-event-v2"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-eventfacet"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-eventfacet-trace"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-util-externalmeta"
+RDEPENDS_perl-module-test2-api-context += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-api-context += "perl-module-warnings"
+RDEPENDS_perl-module-test2-event += "perl-module-carp"
+RDEPENDS_perl-module-test2-event += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-event += "perl-module-strict"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-about"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-amnesty"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-assert"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-control"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-error"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-hub"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-info"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-meta"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-parent"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-plan"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-eventfacet-trace"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-util-externalmeta"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-event += "perl-module-test2-util-trace"
+RDEPENDS_perl-module-test2-event += "perl-module-warnings"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-carp"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-test2-util-facets2legacy"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-strict"
+RDEPENDS_perl-module-test2-event-v2 += "perl-module-warnings"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-carp"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-strict"
+RDEPENDS_perl-module-test2-eventfacet += "perl-module-warnings"
+RDEPENDS_perl-module-test2-hub += "perl-module-carp"
+RDEPENDS_perl-module-test2-hub += "perl-module-list-util"
+RDEPENDS_perl-module-test2-hub += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-hub += "perl-module-strict"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-event-ok"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-event-pass"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-event-plan"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-util"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-util-externalmeta"
+RDEPENDS_perl-module-test2-hub += "perl-module-test2-util-hashbase"
+RDEPENDS_perl-module-test2-hub += "perl-module-warnings"
+RDEPENDS_perl-module-test2-util += "perl-module-carp"
+RDEPENDS_perl-module-test2-util += "perl-module-config"
+RDEPENDS_perl-module-test2-util += "perl-module-posix"
+RDEPENDS_perl-module-test2-util += "perl-module-strict"
+RDEPENDS_perl-module-test2-util += "perl-module-warnings"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-base"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-carp"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-exporter"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-scalar-util"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-strict"
+RDEPENDS_perl-module-test2-util-facets2legacy += "perl-module-warnings"
+RDEPENDS_perl-module-test2-util-hashbase += "perl-module-carp"
+RDEPENDS_perl-module-test2-util-hashbase += "perl-module-mro"
+RDEPENDS_perl-module-test2-util-hashbase += "perl-module-strict"
+RDEPENDS_perl-module-test2-util-hashbase += "perl-module-warnings"
RDEPENDS_perl-module-text-abbrev += "perl-module-exporter"
RDEPENDS_perl-module-text-balanced += "perl-module-exporter"
RDEPENDS_perl-module-text-balanced += "perl-module-overload"
@@ -2370,9 +2529,11 @@ RDEPENDS_perl-module-cpan += "perl-module-file-copy"
RDEPENDS_perl-module-cpan += "perl-module-file-find"
RDEPENDS_perl-module-cpan += "perl-module-filehandle"
RDEPENDS_perl-module-cpan += "perl-module-file-path"
+RDEPENDS_perl-module-cpan += "perl-module-json-pp"
RDEPENDS_perl-module-cpan += "perl-module-lib"
RDEPENDS_perl-module-cpan += "perl-module-net-ping"
RDEPENDS_perl-module-cpan += "perl-module-overload"
+RDEPENDS_perl-module-cpan += "perl-module-parse-cpan-meta"
RDEPENDS_perl-module-cpan += "perl-module-posix"
RDEPENDS_perl-module-cpan += "perl-module-safe"
RDEPENDS_perl-module-cpan += "perl-module-strict"
@@ -2537,6 +2698,7 @@ RDEPENDS_perl-module-encode += "perl-module-constant"
RDEPENDS_perl-module-encode += "perl-module-encode-alias"
RDEPENDS_perl-module-encode += "perl-module-encode-config"
RDEPENDS_perl-module-encode += "perl-module-encode-configlocal-pm"
+RDEPENDS_perl-module-encode += "perl-module-encode-encoding"
RDEPENDS_perl-module-encode += "perl-module-encode-mime-name"
RDEPENDS_perl-module-encode += "perl-module-exporter"
RDEPENDS_perl-module-encode += "perl-module-parent"
@@ -2723,6 +2885,7 @@ RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-makemaker-confi
RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-makemaker-version"
RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-manifest"
RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-mm"
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-mm-unix"
RDEPENDS_perl-module-extutils-makemaker += "perl-module-extutils-my"
RDEPENDS_perl-module-extutils-makemaker += "perl-module-file-path"
RDEPENDS_perl-module-extutils-makemaker += "perl-module-strict"
@@ -2959,6 +3122,7 @@ RDEPENDS_perl-module-file-temp += "perl-module-io-seekable"
RDEPENDS_perl-module-file-temp += "perl-module-overload"
RDEPENDS_perl-module-file-temp += "perl-module-parent"
RDEPENDS_perl-module-file-temp += "perl-module-posix"
+RDEPENDS_perl-module-file-temp += "perl-module-file-spec"
RDEPENDS_perl-module-file-temp += "perl-module-strict"
RDEPENDS_perl-module-file-temp += "perl-module-vars"
RDEPENDS_perl-module-filter-simple += "perl-module-filter-util-call"
@@ -3822,6 +3986,8 @@ RDEPENDS_perl-module-pod-simple-tiedoutfh += "perl-module-vars"
RDEPENDS_perl-module-pod-simple-transcodedumb += "perl-module-strict"
RDEPENDS_perl-module-pod-simple-transcodedumb += "perl-module-vars"
RDEPENDS_perl-module-pod-simple-transcode += "perl-module-strict"
+RDEPENDS_perl-module-pod-simple-transcode += "perl-module-pod-simple-transcodedumb"
+RDEPENDS_perl-module-pod-simple-transcode += "perl-module-pod-simple-transcodesmart"
RDEPENDS_perl-module-pod-simple-transcode += "perl-module-vars"
RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-encode"
RDEPENDS_perl-module-pod-simple-transcodesmart += "perl-module-pod-simple"
@@ -3915,6 +4081,7 @@ RDEPENDS_perl-module-sys-syslog += "perl-module-xsloader"
RDEPENDS_perl-module-tap-base += "perl-module-base"
RDEPENDS_perl-module-tap-base += "perl-module-constant"
RDEPENDS_perl-module-tap-base += "perl-module-strict"
+RDEPENDS_perl-module-tap-base += "perl-module-tap-object"
RDEPENDS_perl-module-tap-base += "perl-module-warnings"
RDEPENDS_perl-module-tap-formatter-base += "perl-module-base"
RDEPENDS_perl-module-tap-formatter-base += "perl-module-posix"
@@ -3940,7 +4107,9 @@ RDEPENDS_perl-module-tap-formatter-console-session += "perl-module-warnings"
RDEPENDS_perl-module-tap-formatter-file += "perl-module-base"
RDEPENDS_perl-module-tap-formatter-file += "perl-module-posix"
RDEPENDS_perl-module-tap-formatter-file += "perl-module-strict"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-tap-formatter-base"
RDEPENDS_perl-module-tap-formatter-file += "perl-module-tap-formatter-file-session"
+RDEPENDS_perl-module-tap-formatter-file += "perl-module-tap-formatter-session"
RDEPENDS_perl-module-tap-formatter-file += "perl-module-warnings"
RDEPENDS_perl-module-tap-formatter-file-session += "perl-module-base"
RDEPENDS_perl-module-tap-formatter-file-session += "perl-module-strict"
@@ -3957,6 +4126,7 @@ RDEPENDS_perl-module-tap-harness += "perl-module-base"
RDEPENDS_perl-module-tap-harness += "perl-module-file-path"
RDEPENDS_perl-module-tap-harness += "perl-module-io-handle"
RDEPENDS_perl-module-tap-harness += "perl-module-strict"
+RDEPENDS_perl-module-tap-harness += "perl-module-tap-formatter-file"
RDEPENDS_perl-module-tap-harness += "perl-module-warnings"
RDEPENDS_perl-module-tap-object += "perl-module-strict"
RDEPENDS_perl-module-tap-object += "perl-module-warnings"
@@ -4081,6 +4251,7 @@ RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-constant"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-strict"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-iteratorfactory"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-iterator-process"
+RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-tap-parser-sourcehandler-executable"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-text-parsewords"
RDEPENDS_perl-module-tap-parser-sourcehandler-perl += "perl-module-warnings"
RDEPENDS_perl-module-tap-parser-sourcehandler-rawtap += "perl-module-base"
diff --git a/poky/meta/recipes-devtools/perl-sanity/files/run-ptest b/poky/meta/recipes-devtools/perl/files/run-ptest
index dad4d4291..dad4d4291 100644
--- a/poky/meta/recipes-devtools/perl-sanity/files/run-ptest
+++ b/poky/meta/recipes-devtools/perl/files/run-ptest
diff --git a/poky/meta/recipes-devtools/perl/libmodule-build-perl/run-ptest b/poky/meta/recipes-devtools/perl/libmodule-build-perl/run-ptest
new file mode 100644
index 000000000..0d63d1513
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/libmodule-build-perl/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+for case in `find t -type f -name '*.t'`; do
+ perl -I inc -I blib -Mblib $case >$case.output 2>&1
+ ret=$?
+ cat $case.output
+ if [ $ret -ne 0 ]; then
+ echo "FAIL: ${case%.t}"
+ elif grep -i 'SKIP' $case.output; then
+ echo "SKIP: ${case%.t}"
+ else
+ echo "PASS: ${case%.t}"
+ fi
+
+ rm -f $case.output
+done
diff --git a/poky/meta/recipes-devtools/perl/libmodule-build-perl_0.4229.bb b/poky/meta/recipes-devtools/perl/libmodule-build-perl_0.4229.bb
new file mode 100644
index 000000000..f759f862f
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/libmodule-build-perl_0.4229.bb
@@ -0,0 +1,103 @@
+SUMMARY = "Module::Build - Build and install Perl modules"
+DESCRIPTION = "Many Perl distributions use a Build.PL file instead of a \
+Makefile.PL file to drive distribution configuration, build, test and \
+installation. Traditionally, Build.PL uses Module::Build as the underlying \
+build system. This module provides a simple, lightweight, drop-in replacement. \
+Whereas Module::Build has over 6,700 lines of code; this module has less than \
+120, yet supports the features needed by most distributions."
+
+SECTION = "libs"
+
+HOMEPAGE = "https://metacpan.org/release/Module-Build"
+
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=949;endline=954;md5=624c06db56a2af4d70cf9edc29fcae1b"
+
+SRC_URI = "${CPAN_MIRROR}/authors/id/L/LE/LEONT/Module-Build-${PV}.tar.gz \
+ file://run-ptest \
+ "
+SRC_URI[md5sum] = "1447d9e02e63f7a1643986789a8f1ba9"
+SRC_URI[sha256sum] = "1fe491a6cda914b01bc8e592faa2b5404e9f35915ca15322f8f2a8d8f9008c18"
+
+S = "${WORKDIR}/Module-Build-${PV}"
+
+inherit cpan_build ptest-perl
+
+# From:
+# https://github.com/rehsack/meta-cpan/blob/master/recipes-devel/module-build-perl/module-build-perl_0.4216.bb
+#
+do_patch_module_build () {
+ cd ${S}
+ sed -i -e 's,my $interpreter = $self->{properties}{perl};,my $interpreter = "${bindir}/perl";,g' lib/Module/Build/Base.pm
+}
+
+do_patch[postfuncs] += "do_patch_module_build"
+
+do_install_ptest() {
+ cp -r ${B}/inc ${D}${PTEST_PATH}
+ cp -r ${B}/blib ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}
+}
+
+RDEPENDS_${PN} += " \
+ perl-module-carp \
+ perl-module-cpan \
+ perl-module-config \
+ perl-module-cwd \
+ perl-module-data-dumper \
+ perl-module-encode \
+ perl-module-extutils-cbuilder \
+ perl-module-extutils-command \
+ perl-module-extutils-install \
+ perl-module-extutils-installed \
+ perl-module-extutils-mkbootstrap \
+ perl-module-extutils-packlist \
+ perl-module-extutils-parsexs \
+ perl-module-file-basename \
+ perl-module-file-compare \
+ perl-module-file-copy \
+ perl-module-file-find \
+ perl-module-file-glob \
+ perl-module-file-path \
+ perl-module-file-spec \
+ perl-module-file-spec-functions \
+ perl-module-getopt-long \
+ perl-module-metadata \
+ perl-module-perl-ostype \
+ perl-module-pod-man \
+ perl-module-tap-harness \
+ perl-module-text-abbrev \
+ perl-module-text-parsewords \
+ perl-module-utf8 \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ gcc \
+ make \
+ perl-module-blib \
+ perl-module-file-temp \
+ perl-module-lib \
+ perl-module-perlio \
+ perl-module-perlio-encoding \
+ perl-module-pod-text \
+ perl-module-tap-harness-env \
+ perl-module-tap-parser \
+ perl-module-tap-parser-scheduler \
+ perl-module-test-harness \
+ perl-module-test-more \
+"
+
+RPROVIDES_${PN} += "\
+ libmodule-build-base-perl \
+ libmodule-build-compat-perl \
+ libmodule-build-config-perl \
+ libmodule-build-cookbook-perl \
+ libmodule-build-dumper-perl \
+ libmodule-build-notes-perl \
+ libmodule-build-ppmaker-perl \
+ libmodule-build-platform-default-perl \
+ libmodule-build-platform-unix-perl \
+ libmodule-build-podparser-perl \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb b/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb
index 3abb9aa8e..c44ee6340 100644
--- a/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb
+++ b/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb
@@ -24,6 +24,6 @@ S = "${WORKDIR}/${CPAN_NAME}-${PV}"
inherit cpan ptest-perl
-RDEPENDS_${PN}-ptest += "perl-module-test-more"
+RDEPENDS_${PN}-ptest += "perl-module-test-more perl-module-ipc-open3 perl-module-lib perl-module-version"
BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/perl/liburi-perl_1.74.bb b/poky/meta/recipes-devtools/perl/liburi-perl_1.74.bb
index a7cfa0fbe..c27765bcb 100644
--- a/poky/meta/recipes-devtools/perl/liburi-perl_1.74.bb
+++ b/poky/meta/recipes-devtools/perl/liburi-perl_1.74.bb
@@ -33,6 +33,18 @@ do_install_prepend() {
rm -rf ${B}/t/file.t
}
-RDEPENDS_${PN}-ptest += "libtest-needs-perl"
+RDEPENDS_${PN} += "perl-module-integer perl-module-mime-base64"
+RDEPENDS_${PN}-ptest += " \
+ libtest-needs-perl \
+ perl-module-test-more \
+ perl-module-test \
+ perl-module-utf8 \
+ perl-module-extutils-makemaker \
+ perl-module-net-domain \
+ perl-module-encode \
+ perl-module-extutils-mm-unix \
+ perl-module-file-spec-functions \
+ perl-module-perlio \
+"
BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb b/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index 95af4d1de..7c9b7696a 100644
--- a/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
+++ b/poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -50,4 +50,6 @@ do_install_ptest() {
chown -R root:root ${D}${PTEST_PATH}/samples
}
+RDEPENDS_${PN}-ptest += "perl-module-filehandle perl-module-if perl-module-test perl-module-test-more"
+
BBCLASSEXTEND="native nativesdk"
diff --git a/poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb b/poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
index 0f6099868..818ae3d57 100644
--- a/poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
+++ b/poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
@@ -26,3 +26,5 @@ do_compile() {
cpan_do_compile
}
+RDEPENDS_${PN} += "perl-module-carp perl-module-overload perl-module-universal perl-module-io-handle"
+RDEPENDS_${PN}-ptest += "libxml-parser-perl perl-module-file-glob"
diff --git a/poky/meta/recipes-devtools/perl-sanity/perl-ptest.inc b/poky/meta/recipes-devtools/perl/perl-ptest.inc
index 9dd9b7da5..715205776 100644
--- a/poky/meta/recipes-devtools/perl-sanity/perl-ptest.inc
+++ b/poky/meta/recipes-devtools/perl/perl-ptest.inc
@@ -2,6 +2,9 @@ inherit ptest
SRC_URI += "file://run-ptest \
"
+
+DEBUG_PREFIX_MAP_REGEX = "${@'\\|'.join(d.getVar('DEBUG_PREFIX_MAP').split())}"
+
do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/*
@@ -13,7 +16,7 @@ do_install_ptest () {
--exclude='win32/config.*' --exclude=plan9 --exclude=README.plan9 --exclude=perlplan9.pod --exclude=Configure \
--exclude=veryclean.sh --exclude=realclean.sh --exclude=getioctlsizes \
--exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' --exclude=makefile.old \
- --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x )
+ --exclude=miniperl --exclude=generate_uudmap --exclude=patches --exclude='config.log' * | ( cd ${D}${PTEST_PATH} && tar -x )
ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
@@ -21,12 +24,12 @@ do_install_ptest () {
find "${D}${PTEST_PATH}" \
\( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \
-o -name 'h2xs' -o -name 'h2ph' \
- -o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man' -o -name 'pod2text' \) \
+ -o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man' -o -name 'pod2text' -o -name 'Makefile.config' \) \
-type f -exec sed -i \
-e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
-e "s,-isystem${STAGING_INCDIR} ,,g" \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's^${DEBUG_PREFIX_MAP_REGEX}^^g' \
-e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_LIBDIR},${libdir},g" \
-e "s,${STAGING_BINDIR},${bindir},g" \
diff --git a/poky/meta/recipes-devtools/perl-sanity/perl_5.28.2.bb b/poky/meta/recipes-devtools/perl/perl_5.30.0.bb
index 12b220a4d..e3664290e 100644
--- a/poky/meta/recipes-devtools/perl-sanity/perl_5.28.2.bb
+++ b/poky/meta/recipes-devtools/perl/perl_5.30.0.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
- https://github.com/arsv/perl-cross/releases/download/1.2.3/perl-cross-1.2.3.tar.gz;name=perl-cross \
+ https://github.com/arsv/perl-cross/releases/download/1.3/perl-cross-1.3.tar.gz;name=perl-cross \
file://perl-rdepends.txt \
file://0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch \
file://0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch \
@@ -18,17 +18,18 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \
file://perl-dynloader.patch \
file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
+ file://fix-setgroup.patch \
+ file://0001-enc2xs-Add-environment-variable-to-suppress-comments.patch \
+ file://0002-Constant-Fix-up-shebang.patch \
"
SRC_URI_append_class-native = " \
file://perl-configpm-switch.patch \
"
-SRC_URI[perl.md5sum] = "1323e7581fbedf3791d2843f4ccaec4b"
-SRC_URI[perl.sha256sum] = "aa95456dddb3eb1cc5475fed4e08f91876bea71fb636fba6399054dfbabed6c7"
-SRC_URI[perl-cross.md5sum] = "03d9eafd71161eb5d1f80434e8b49dbc"
-SRC_URI[perl-cross.sha256sum] = "84583a1bb5f3a2c64d13d031386c114382e5c62955c6f84a27cec8318536627c"
-
-PR = "r1"
+SRC_URI[perl.md5sum] = "9770584cdf9b5631c38097645ce33549"
+SRC_URI[perl.sha256sum] = "851213c754d98ccff042caa40ba7a796b2cee88c5325f121be5cbb61bbf975f2"
+SRC_URI[perl-cross.md5sum] = "4dda3daf9c4fe42b3d6a5dd052852a48"
+SRC_URI[perl-cross.sha256sum] = "49edea1ea2cd6c5c47386ca71beda8d150c748835781354dbe7f75b1df27e703"
S = "${WORKDIR}/perl-${PV}"
@@ -38,12 +39,15 @@ DEPENDS += "db gdbm zlib virtual/crypt"
PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
+# Don't generate comments in enc2xs output files. They are not reproducible
+export ENC2XS_NO_COMMENTS = "1"
+
do_unpack_append() {
bb.build.exec_func('do_copy_perlcross', d)
}
do_copy_perlcross() {
- cp -rf ${WORKDIR}/perl-cross*/* ${S}
+ cp -rfp ${WORKDIR}/perl-cross*/* ${S}
}
do_configure_class-target() {
@@ -90,6 +94,16 @@ do_configure_class-native() {
-Ui_xlocale
}
+do_configure_append() {
+ if [ -n "$SOURCE_DATE_EPOCH" ]; then
+ PERL_BUILD_DATE="$(${PYTHON} -c "\
+from datetime import datetime, timezone; \
+print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b %d %H:%M:%S %Y')) \
+ ")"
+ echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h
+ fi
+}
+
do_compile() {
oe_runmake
}
@@ -165,6 +179,7 @@ perl_package_preprocess () {
${PKGD}${libdir}/perl5/${PV}/Config.pm \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \
+ ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \
${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \
${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \
${PKGD}${libdir}/perl5/${PV}/FileCache.pm \
@@ -177,6 +192,7 @@ require perl-ptest.inc
FILES_${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
${libdir}/perl5/site_perl \
${libdir}/perl5/${PV}/Config.pm \
+ ${libdir}/perl5/${PV}/*/Config_git.pl \
${libdir}/perl5/${PV}/*/Config_heavy-target.pl \
${libdir}/perl5/config.sh \
${libdir}/perl5/${PV}/strict.pm \
diff --git a/poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.0.bb b/poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.1.bb
index 1452875f5..c60ef7422 100644
--- a/poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.0.bb
+++ b/poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.1.bb
@@ -21,8 +21,8 @@ SRC_URI = "\
file://pkg-config-native.in \
file://pkg-config-esdk.in \
"
-SRC_URI[md5sum] = "0c93492d7f001e5175b0347b5472e86d"
-SRC_URI[sha256sum] = "6135a3abb576672ba54a899860442ba185063f0f90dae5892f64f7bae8e1ece5"
+SRC_URI[md5sum] = "556bae2b9e0cc7b46e7c00083cb6d95d"
+SRC_URI[sha256sum] = "22b9ee38438901f9d60f180e5182821180854fa738fd071f593ea26a81da208c"
inherit autotools
diff --git a/poky/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb b/poky/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb
index 50137895c..a1133dad4 100644
--- a/poky/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb
+++ b/poky/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb
@@ -4,3 +4,7 @@ require python-numpy.inc
RDEPENDS_${PN}_class-target_append = " \
${PYTHON_PN}-subprocess \
"
+
+do_install_append(){
+ rm ${D}/${bindir}/f2py
+}
diff --git a/poky/meta/recipes-devtools/python/python-mako.inc b/poky/meta/recipes-devtools/python/python-mako.inc
index 97c624bbc..20808fe5a 100644
--- a/poky/meta/recipes-devtools/python/python-mako.inc
+++ b/poky/meta/recipes-devtools/python/python-mako.inc
@@ -8,8 +8,8 @@ PYPI_PACKAGE = "Mako"
inherit pypi
-SRC_URI[md5sum] = "d739720f3f0d6a1cb6a96ea7a4760c3e"
-SRC_URI[sha256sum] = "0728c404877cd4ca72c409c0ea372dc5f3b53fa1ad2bb434e1d216c0444ff1fd"
+SRC_URI[md5sum] = "a94d376078dda65f834ea5049a81ebb5"
+SRC_URI[sha256sum] = "7165919e78e1feb68b4dbe829871ea9941398178fa58e6beedb9ba14acf63965"
RDEPENDS_${PN} = "${PYTHON_PN}-html \
${PYTHON_PN}-netclient \
diff --git a/poky/meta/recipes-devtools/python/python-nose_1.3.7.bb b/poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
index 6d69d2d62..fab609df9 100644
--- a/poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
+++ b/poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
@@ -1,2 +1,6 @@
inherit setuptools
require python-nose.inc
+
+do_install_append() {
+ rm ${D}${bindir}/nosetests
+}
diff --git a/poky/meta/recipes-devtools/python/python-setuptools.inc b/poky/meta/recipes-devtools/python/python-setuptools.inc
index 357aa0708..f49e07869 100644
--- a/poky/meta/recipes-devtools/python/python-setuptools.inc
+++ b/poky/meta/recipes-devtools/python/python-setuptools.inc
@@ -37,3 +37,14 @@ do_install_prepend() {
}
BBCLASSEXTEND = "native nativesdk"
+
+# The pkg-resources module can be used by itself, without the package downloader
+# and easy_install. Ship it in a separate package so that it can be used by
+# minimal distributions.
+PACKAGES =+ "${PYTHON_PN}-pkg-resources "
+FILES_${PYTHON_PN}-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*"
+# Due to the way OE-Core implemented native recipes, the native class cannot
+# have a dependency on something that is not a recipe name. Work around that by
+# manually setting RPROVIDES.
+RDEPENDS_${PN}_append = " ${PYTHON_PN}-pkg-resources"
+RPROVIDES_append_class-native = " ${PYTHON_PN}-pkg-resources-native"
diff --git a/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948-fix.patch b/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948-fix.patch
new file mode 100644
index 000000000..b26723701
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948-fix.patch
@@ -0,0 +1,55 @@
+From 179a5f75f1121dab271fe8f90eb35145f9dcbbda Mon Sep 17 00:00:00 2001
+From: Sihoon Lee <push0ebp@gmail.com>
+Date: Fri, 17 May 2019 02:41:06 +0900
+Subject: [PATCH] Update test_urllib.py and urllib.py\nchange assertEqual into
+ assertRasies in DummyURLopener test, and simplify mitigation
+
+Upstream-Status: Submitted https://github.com/python/cpython/pull/11842
+
+CVE: CVE-2019-9948
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ Lib/test/test_urllib.py | 11 +++--------
+ Lib/urllib.py | 4 ++--
+ 2 files changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index e5f210e62a18..1e23dfb0bb16 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -1027,14 +1027,9 @@ def test_local_file_open(self):
+ class DummyURLopener(urllib.URLopener):
+ def open_local_file(self, url):
+ return url
+- self.assertEqual(DummyURLopener().open(
+- 'local-file://example'), '//example')
+- self.assertEqual(DummyURLopener().open(
+- 'local_file://example'), '//example')
+- self.assertRaises(IOError, urllib.urlopen,
+- 'local-file://example')
+- self.assertRaises(IOError, urllib.urlopen,
+- 'local_file://example')
++ for url in ('local_file://example', 'local-file://example'):
++ self.assertRaises(IOError, DummyURLopener().open, url)
++ self.assertRaises(IOError, urllib.urlopen, url)
+
+ # Just commented them out.
+ # Can't really tell why keep failing in windows and sparc.
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index a24e9a5c68fb..39b834054e9e 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -203,10 +203,10 @@ def open(self, fullurl, data=None):
+ name = 'open_' + urltype
+ self.type = urltype
+ name = name.replace('-', '_')
+-
++
+ # bpo-35907: # disallow the file reading with the type not allowed
+ if not hasattr(self, name) or \
+- (self == _urlopener and name == 'open_local_file'):
++ getattr(self, name) == self.open_local_file:
+ if proxy:
+ return self.open_unknown_proxy(proxy, fullurl, data)
+ else:
diff --git a/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948.patch b/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948.patch
new file mode 100644
index 000000000..f4c225d2f
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948.patch
@@ -0,0 +1,55 @@
+From 8f99cc799e4393bf1112b9395b2342f81b3f45ef Mon Sep 17 00:00:00 2001
+From: push0ebp <push0ebp@shl-MacBook-Pro.local>
+Date: Thu, 14 Feb 2019 02:05:46 +0900
+Subject: [PATCH] bpo-35907: Avoid file reading as disallowing the unnecessary
+ URL scheme in urllib
+
+Upstream-Status: Submitted https://github.com/python/cpython/pull/11842
+
+CVE: CVE-2019-9948
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ Lib/test/test_urllib.py | 12 ++++++++++++
+ Lib/urllib.py | 5 ++++-
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index 1ce9201c0693..e5f210e62a18 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -1023,6 +1023,18 @@ def open_spam(self, url):
+ "spam://c:|windows%/:=&?~#+!$,;'@()*[]|/path/"),
+ "//c:|windows%/:=&?~#+!$,;'@()*[]|/path/")
+
++ def test_local_file_open(self):
++ class DummyURLopener(urllib.URLopener):
++ def open_local_file(self, url):
++ return url
++ self.assertEqual(DummyURLopener().open(
++ 'local-file://example'), '//example')
++ self.assertEqual(DummyURLopener().open(
++ 'local_file://example'), '//example')
++ self.assertRaises(IOError, urllib.urlopen,
++ 'local-file://example')
++ self.assertRaises(IOError, urllib.urlopen,
++ 'local_file://example')
+
+ # Just commented them out.
+ # Can't really tell why keep failing in windows and sparc.
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index d85504a5cb7e..a24e9a5c68fb 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -203,7 +203,10 @@ def open(self, fullurl, data=None):
+ name = 'open_' + urltype
+ self.type = urltype
+ name = name.replace('-', '_')
+- if not hasattr(self, name):
++
++ # bpo-35907: # disallow the file reading with the type not allowed
++ if not hasattr(self, name) or \
++ (self == _urlopener and name == 'open_local_file'):
+ if proxy:
+ return self.open_unknown_proxy(proxy, fullurl, data)
+ else:
diff --git a/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636-fix.patch b/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636-fix.patch
new file mode 100644
index 000000000..2ce4d2cde
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636-fix.patch
@@ -0,0 +1,28 @@
+From 06b5ee585d6e76bdbb4002f642d864d860cbbd2b Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Tue, 12 Mar 2019 08:23:33 -0700
+Subject: [PATCH] bpo-36216: Only print test messages when verbose
+
+CVE: CVE-2019-9636
+
+Upstream-Status: Backport https://github.com/python/cpython/pull/12291/commits/06b5ee585d6e76bdbb4002f642d864d860cbbd2b
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ Lib/test/test_urlparse.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index 73b0228ea8e3..1830d0b28688 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -644,7 +644,8 @@ def test_urlsplit_normalization(self):
+ for scheme in [u"http", u"https", u"ftp"]:
+ for c in denorm_chars:
+ url = u"{}://netloc{}false.netloc/path".format(scheme, c)
+- print "Checking %r" % url
++ if test_support.verbose:
++ print "Checking %r" % url
+ with self.assertRaises(ValueError):
+ urlparse.urlsplit(url)
+
diff --git a/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636.patch b/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636.patch
new file mode 100644
index 000000000..352b13ba9
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636.patch
@@ -0,0 +1,111 @@
+From 3e3669c9c41a27e1466e2c28b3906e3dd0ce3e7e Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Thu, 7 Mar 2019 08:25:22 -0800
+Subject: [PATCH] bpo-36216: Add check for characters in netloc that normalize
+ to separators (GH-12201)
+
+CVE: CVE-2019-9636
+
+Upstream-Status: Backport https://github.com/python/cpython/pull/12216/commits/3e3669c9c41a27e1466e2c28b3906e3dd0ce3e7e
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ Doc/library/urlparse.rst | 20 ++++++++++++++++
+ Lib/test/test_urlparse.py | 24 +++++++++++++++++++
+ Lib/urlparse.py | 17 +++++++++++++
+ .../2019-03-06-09-38-40.bpo-36216.6q1m4a.rst | 3 +++
+ 4 files changed, 64 insertions(+)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index 4e1ded73c266..73b0228ea8e3 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -1,4 +1,6 @@
+ from test import test_support
++import sys
++import unicodedata
+ import unittest
+ import urlparse
+
+@@ -624,6 +626,28 @@ def test_portseparator(self):
+ self.assertEqual(urlparse.urlparse("http://www.python.org:80"),
+ ('http','www.python.org:80','','','',''))
+
++ def test_urlsplit_normalization(self):
++ # Certain characters should never occur in the netloc,
++ # including under normalization.
++ # Ensure that ALL of them are detected and cause an error
++ illegal_chars = u'/:#?@'
++ hex_chars = {'{:04X}'.format(ord(c)) for c in illegal_chars}
++ denorm_chars = [
++ c for c in map(unichr, range(128, sys.maxunicode))
++ if (hex_chars & set(unicodedata.decomposition(c).split()))
++ and c not in illegal_chars
++ ]
++ # Sanity check that we found at least one such character
++ self.assertIn(u'\u2100', denorm_chars)
++ self.assertIn(u'\uFF03', denorm_chars)
++
++ for scheme in [u"http", u"https", u"ftp"]:
++ for c in denorm_chars:
++ url = u"{}://netloc{}false.netloc/path".format(scheme, c)
++ print "Checking %r" % url
++ with self.assertRaises(ValueError):
++ urlparse.urlsplit(url)
++
+ def test_main():
+ test_support.run_unittest(UrlParseTestCase)
+
+diff --git a/Lib/urlparse.py b/Lib/urlparse.py
+index f7c2b032b097..54eda08651ab 100644
+--- a/Lib/urlparse.py
++++ b/Lib/urlparse.py
+@@ -165,6 +165,21 @@ def _splitnetloc(url, start=0):
+ delim = min(delim, wdelim) # use earliest delim position
+ return url[start:delim], url[delim:] # return (domain, rest)
+
++def _checknetloc(netloc):
++ if not netloc or not isinstance(netloc, unicode):
++ return
++ # looking for characters like \u2100 that expand to 'a/c'
++ # IDNA uses NFKC equivalence, so normalize for this check
++ import unicodedata
++ netloc2 = unicodedata.normalize('NFKC', netloc)
++ if netloc == netloc2:
++ return
++ _, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay
++ for c in '/?#@:':
++ if c in netloc2:
++ raise ValueError("netloc '" + netloc2 + "' contains invalid " +
++ "characters under NFKC normalization")
++
+ def urlsplit(url, scheme='', allow_fragments=True):
+ """Parse a URL into 5 components:
+ <scheme>://<netloc>/<path>?<query>#<fragment>
+@@ -193,6 +208,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+ url, fragment = url.split('#', 1)
+ if '?' in url:
+ url, query = url.split('?', 1)
++ _checknetloc(netloc)
+ v = SplitResult(scheme, netloc, url, query, fragment)
+ _parse_cache[key] = v
+ return v
+@@ -216,6 +232,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+ url, fragment = url.split('#', 1)
+ if '?' in url:
+ url, query = url.split('?', 1)
++ _checknetloc(netloc)
+ v = SplitResult(scheme, netloc, url, query, fragment)
+ _parse_cache[key] = v
+ return v
+diff --git a/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+new file mode 100644
+index 000000000000..1e1ad92c6feb
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+@@ -0,0 +1,3 @@
++Changes urlsplit() to raise ValueError when the URL contains characters that
++decompose under IDNA encoding (NFKC-normalization) into characters that
++affect how the URL is parsed.
+\ No newline at end of file
diff --git a/poky/meta/recipes-devtools/python/python3-mako_1.0.9.bb b/poky/meta/recipes-devtools/python/python3-mako_1.0.10.bb
index 17803f1b0..17803f1b0 100644
--- a/poky/meta/recipes-devtools/python/python3-mako_1.0.9.bb
+++ b/poky/meta/recipes-devtools/python/python3-mako_1.0.10.bb
diff --git a/poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb b/poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
index 8bc1f4983..13dbf9617 100644
--- a/poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
+++ b/poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
@@ -1,6 +1,2 @@
inherit setuptools3
require python-nose.inc
-
-do_install_append() {
- mv ${D}${bindir}/nosetests ${D}${bindir}/nosetests3
-}
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.1.3.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.1.3.bb
deleted file mode 100644
index d9b6ce74a..000000000
--- a/poky/meta/recipes-devtools/python/python3-pbr_5.1.3.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-inherit setuptools3
-require python-pbr.inc
-SRC_URI[md5sum] = "08972dca5fd2a959f27842090973edd6"
-SRC_URI[sha256sum] = "8c361cc353d988e4f5b998555c88098b9d5964c2e11acf7b0d21925a66bb5824"
-
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.2.0.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.2.0.bb
new file mode 100644
index 000000000..ed6832e4a
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pbr_5.2.0.bb
@@ -0,0 +1,5 @@
+inherit setuptools3
+require python-pbr.inc
+SRC_URI[md5sum] = "2bca008fd08d035a2f78c606d876a6db"
+SRC_URI[sha256sum] = "d950c64aeea5456bbd147468382a5bb77fe692c13c9f00f0219814ce5b642755"
+
diff --git a/poky/meta/recipes-devtools/python/python3-pip_19.0.3.bb b/poky/meta/recipes-devtools/python/python3-pip_19.1.1.bb
index 4fdc7ee24..baf32f472 100644
--- a/poky/meta/recipes-devtools/python/python3-pip_19.0.3.bb
+++ b/poky/meta/recipes-devtools/python/python3-pip_19.1.1.bb
@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8ba06d529c955048e5ddd7c45459eb2e"
DEPENDS += "python3 python3-setuptools-native"
-SRC_URI[md5sum] = "1c5edb0924a0d7d79f3a2e3df05009b4"
-SRC_URI[sha256sum] = "6e6f197a1abfb45118dbb878b5c859a0edbdd33fd250100bc015b67fded4b9f2"
+SRC_URI[md5sum] = "4fb98a060f21c731d6743b90a714fc73"
+SRC_URI[sha256sum] = "44d3d7d3d30a1eb65c7e5ff1173cdf8f7467850605ac7cc3707b6064bddd0958"
inherit pypi distutils3
diff --git a/poky/meta/recipes-devtools/python/python3-pygments_2.4.2.bb b/poky/meta/recipes-devtools/python/python3-pygments_2.4.2.bb
new file mode 100644
index 000000000..35c0ac6a5
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pygments_2.4.2.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Pygments is a syntax highlighting package written in Python."
+DESCRIPTION = "Pygments is a syntax highlighting package written in Python."
+HOMEPAGE = "http://pygments.org/"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1d7b7bffbfeaa14083fd2bd3236aea8"
+
+inherit setuptools3
+SRC_URI[md5sum] = "5ecc3fbb2a783e917b369271fc0e6cd1"
+SRC_URI[sha256sum] = "881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297"
+
+DEPENDS += "\
+ ${PYTHON_PN} \
+ "
+
+PYPI_PACKAGE = "Pygments"
+
+inherit pypi
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/poky/meta/recipes-devtools/python/python3-scons-native_3.0.5.bb b/poky/meta/recipes-devtools/python/python3-scons-native_3.0.5.bb
new file mode 100644
index 000000000..5cd595662
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-scons-native_3.0.5.bb
@@ -0,0 +1,8 @@
+require python3-scons_${PV}.bb
+inherit native python3native
+DEPENDS = "python3-native"
+RDEPENDS_${PN} = ""
+
+do_install_append() {
+ create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' PYTHONNOUSERSITE='1'
+}
diff --git a/poky/meta/recipes-devtools/python/python3-scons_3.0.5.bb b/poky/meta/recipes-devtools/python/python3-scons_3.0.5.bb
new file mode 100644
index 000000000..7fb75a627
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-scons_3.0.5.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=37bb53a08e6beaea0c90e7821d731284"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
+SRC_URI[md5sum] = "9f9c163e8bd48cf8cd92f03e85ca6395"
+SRC_URI[sha256sum] = "df676f23dc6d4bfa384fc389d95dcd21ab907e6349d4c848958ba4befb73c73e"
+
+S = "${WORKDIR}/scons-${PV}"
+
+UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit setuptools3
+
+do_install_prepend() {
+ sed -i -e "1s,#!.*python.*,#!${USRBINPATH}/env python3," ${S}/script/*
+}
+
+RDEPENDS_${PN} = "\
+ python3-core \
+ python3-fcntl \
+ python3-io \
+ python3-json \
+ python3-shell \
+ python3-pickle \
+ python3-pprint \
+ "
diff --git a/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch b/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
new file mode 100644
index 000000000..e7af88654
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
@@ -0,0 +1,201 @@
+From 7535c39951b9d15dd64c4669092a8582ba555466 Mon Sep 17 00:00:00 2001
+From: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
+Date: Fri, 31 May 2019 15:34:34 +0200
+Subject: [PATCH] bpo-36852: proper detection of mips architecture for soft
+ float
+
+When (cross) compiling for softfloat mips, __mips_hard_float will not be
+defined and detection of OS triplet in configure.ac / configure will fail.
+
+This also has to do with the custom detection of the build triplet. Trying
+to do this in a more autoconf/autotools manner.
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/13196]
+Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
+---
+ configure.ac | 169 ++++++---------------------------------------------
+ 1 file changed, 17 insertions(+), 152 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a7de901e08..a73e2de51b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -727,158 +727,23 @@ fi
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+ AC_SUBST(MULTIARCH)
+
+-AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
+-cat >> conftest.c <<EOF
+-#undef bfin
+-#undef cris
+-#undef fr30
+-#undef linux
+-#undef hppa
+-#undef hpux
+-#undef i386
+-#undef mips
+-#undef powerpc
+-#undef sparc
+-#undef unix
+-#if defined(__ANDROID__)
+- # Android is not a multiarch system.
+-#elif defined(__linux__)
+-# if defined(__x86_64__) && defined(__LP64__)
+- x86_64-linux-gnu
+-# elif defined(__x86_64__) && defined(__ILP32__)
+- x86_64-linux-gnux32
+-# elif defined(__i386__)
+- i386-linux-gnu
+-# elif defined(__aarch64__) && defined(__AARCH64EL__)
+-# if defined(__ILP32__)
+- aarch64_ilp32-linux-gnu
+-# else
+- aarch64-linux-gnu
+-# endif
+-# elif defined(__aarch64__) && defined(__AARCH64EB__)
+-# if defined(__ILP32__)
+- aarch64_be_ilp32-linux-gnu
+-# else
+- aarch64_be-linux-gnu
+-# endif
+-# elif defined(__alpha__)
+- alpha-linux-gnu
+-# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
+-# if defined(__ARMEL__)
+- arm-linux-gnueabihf
+-# else
+- armeb-linux-gnueabihf
+-# endif
+-# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
+-# if defined(__ARMEL__)
+- arm-linux-gnueabi
+-# else
+- armeb-linux-gnueabi
+-# endif
+-# elif defined(__hppa__)
+- hppa-linux-gnu
+-# elif defined(__ia64__)
+- ia64-linux-gnu
+-# elif defined(__m68k__) && !defined(__mcoldfire__)
+- m68k-linux-gnu
+-# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
+-# if _MIPS_SIM == _ABIO32
+- mipsisa32r6el-linux-gnu
+-# elif _MIPS_SIM == _ABIN32
+- mipsisa64r6el-linux-gnuabin32
+-# elif _MIPS_SIM == _ABI64
+- mipsisa64r6el-linux-gnuabi64
+-# else
+-# error unknown platform triplet
+-# endif
+-# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
+-# if _MIPS_SIM == _ABIO32
+- mipsisa32r6-linux-gnu
+-# elif _MIPS_SIM == _ABIN32
+- mipsisa64r6-linux-gnuabin32
+-# elif _MIPS_SIM == _ABI64
+- mipsisa64r6-linux-gnuabi64
+-# else
+-# error unknown platform triplet
+-# endif
+-# elif defined(__mips_hard_float) && defined(_MIPSEL)
+-# if _MIPS_SIM == _ABIO32
+- mipsel-linux-gnu
+-# elif _MIPS_SIM == _ABIN32
+- mips64el-linux-gnuabin32
+-# elif _MIPS_SIM == _ABI64
+- mips64el-linux-gnuabi64
+-# else
+-# error unknown platform triplet
+-# endif
+-# elif defined(__mips_hard_float)
+-# if _MIPS_SIM == _ABIO32
+- mips-linux-gnu
+-# elif _MIPS_SIM == _ABIN32
+- mips64-linux-gnuabin32
+-# elif _MIPS_SIM == _ABI64
+- mips64-linux-gnuabi64
+-# else
+-# error unknown platform triplet
+-# endif
+-# elif defined(__or1k__)
+- or1k-linux-gnu
+-# elif defined(__powerpc__) && defined(__SPE__)
+- powerpc-linux-gnuspe
+-# elif defined(__powerpc64__)
+-# if defined(__LITTLE_ENDIAN__)
+- powerpc64le-linux-gnu
+-# else
+- powerpc64-linux-gnu
+-# endif
+-# elif defined(__powerpc__)
+- powerpc-linux-gnu
+-# elif defined(__s390x__)
+- s390x-linux-gnu
+-# elif defined(__s390__)
+- s390-linux-gnu
+-# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
+- sh4-linux-gnu
+-# elif defined(__sparc__) && defined(__arch64__)
+- sparc64-linux-gnu
+-# elif defined(__sparc__)
+- sparc-linux-gnu
+-# elif defined(__riscv)
+-# if __riscv_xlen == 32
+- riscv32-linux-gnu
+-# elif __riscv_xlen == 64
+- riscv64-linux-gnu
+-# else
+-# error unknown platform triplet
+-# endif
+-# else
+-# error unknown platform triplet
+-# endif
+-#elif defined(__FreeBSD_kernel__)
+-# if defined(__LP64__)
+- x86_64-kfreebsd-gnu
+-# elif defined(__i386__)
+- i386-kfreebsd-gnu
+-# else
+-# error unknown platform triplet
+-# endif
+-#elif defined(__gnu_hurd__)
+- i386-gnu
+-#elif defined(__APPLE__)
+- darwin
+-#else
+-# error unknown platform triplet
+-#endif
+-
+-EOF
+-
+-if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
+- PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
+- AC_MSG_RESULT([$PLATFORM_TRIPLET])
+-else
+- AC_MSG_RESULT([none])
+-fi
+-rm -f conftest.c conftest.out
++AC_CANONICAL_TARGET
++## Not using $target to filter out vendor
++## Need to handle macos, vxworks and hurd special (?) :-/
++case ${target_os} in
++ darwin*)
++ PLATFORM_TRIPLET=darwin
++ ;;
++ hurd*)
++ PLATFORM_TRIPLET=i386-gnu
++ ;;
++ vxworks*)
++ PLATFORM_TRIPLET=vxworks
++ ;;
++ *)
++ PLATFORM_TRIPLET=${target_cpu}-${target_os}
++ ;;
++esac
+
+ if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
+ if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
+--
+2.21.0
+
diff --git a/poky/meta/recipes-devtools/python/python3/crosspythonpath.patch b/poky/meta/recipes-devtools/python/python3/crosspythonpath.patch
new file mode 100644
index 000000000..d789ab57d
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/crosspythonpath.patch
@@ -0,0 +1,25 @@
+configure.ac: add CROSSPYTHONPATH into PYTHONPATH for PYTHON_FOR_BUILD
+
+When building x86->x86 the system will try to execute .so and related items
+from the default PYTHONPATH. This will fail if the target CPU contains
+instructions that the host CPU does not have, add CROSSPYTHONPATH
+into PYTHONPATH so we can prepend the list to find correct libs.
+
+Upstream-Status: Inappropriate [OE-Core integration specific]
+
+Credits-to: Mark Hatle <mark.hatle@windriver.com>
+Credits-to: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
+diff --git a/configure.ac b/configure.ac
+index 4ab19a6..7036a53 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -76,7 +76,7 @@ if test "$cross_compiling" = yes; then
+ AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
+ fi
+ AC_MSG_RESULT($interp)
+- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
+ fi
+ elif test "$cross_compiling" = maybe; then
+ AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
diff --git a/poky/meta/recipes-devtools/python/python3/reformat_sysconfig.py b/poky/meta/recipes-devtools/python/python3/reformat_sysconfig.py
new file mode 100644
index 000000000..c4164313e
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/reformat_sysconfig.py
@@ -0,0 +1,21 @@
+#! /usr/bin/env python3
+#
+# SPDX-License-Identifier: MIT
+#
+# Copyright 2019 by Garmin Ltd. or its subsidiaries
+#
+# A script to reformat python sysconfig
+
+import sys
+import pprint
+l = {}
+g = {}
+with open(sys.argv[1], 'r') as f:
+ exec(f.read(), g, l)
+
+with open(sys.argv[1], 'w') as f:
+ for k in sorted(l.keys()):
+ f.write('%s = ' % k)
+ pprint.pprint(l[k], stream=f, width=sys.maxsize)
+ f.write('\n')
+
diff --git a/poky/meta/recipes-devtools/python/python3_3.7.3.bb b/poky/meta/recipes-devtools/python/python3_3.7.3.bb
index 413d35ae1..3409d94ba 100644
--- a/poky/meta/recipes-devtools/python/python3_3.7.3.bb
+++ b/poky/meta/recipes-devtools/python/python3_3.7.3.bb
@@ -23,6 +23,9 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \
file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \
+ file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \
+ file://crosspythonpath.patch \
+ file://reformat_sysconfig.py \
"
SRC_URI_append_class-native = " \
@@ -64,6 +67,7 @@ DEPENDS_append_class-nativesdk = " python3-native"
EXTRA_OECONF = " --without-ensurepip --enable-shared"
EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}"
+export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
EXTRANATIVEPATH += "python3-native"
@@ -72,8 +76,16 @@ CACHED_CONFIGUREVARS = " \
ac_cv_file__dev_ptc=no \
ac_cv_working_tzset=yes \
"
+python() {
+ # PGO currently causes builds to not be reproducible, so disable it for
+ # now. See YOCTO #13407
+ if bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', True, False, d) and d.getVar('BUILD_REPRODUCIBLE_BINARIES') != '1':
+ d.setVar('PACKAGECONFIG_PGO', 'pgo')
+ else:
+ d.setVar('PACKAGECONFIG_PGO', '')
+}
-PACKAGECONFIG_class-target ??= "readline ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'pgo', '', d)}"
+PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO}"
PACKAGECONFIG_class-native ??= "readline"
PACKAGECONFIG_class-nativesdk ??= "readline"
PACKAGECONFIG[readline] = ",,readline"
@@ -154,6 +166,12 @@ py_package_preprocess () {
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py \
${PKGD}/${bindir}/python${PYTHON_BINABI}-config
+ # Reformat _sysconfigdata after modifying it so that it remains
+ # reproducible
+ for c in ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py; do
+ python3 ${WORKDIR}/reformat_sysconfig.py $c
+ done
+
# Recompile _sysconfigdata after modifying it
cd ${PKGD}
sysconfigfile=`find . -name _sysconfigdata_*.py`
diff --git a/poky/meta/recipes-devtools/python/python_2.7.16.bb b/poky/meta/recipes-devtools/python/python_2.7.16.bb
index 0e7dd2b3f..5f387b8af 100644
--- a/poky/meta/recipes-devtools/python/python_2.7.16.bb
+++ b/poky/meta/recipes-devtools/python/python_2.7.16.bb
@@ -30,7 +30,11 @@ SRC_URI += " \
file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
file://float-endian.patch \
file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \
- "
+ file://bpo-35907-cve-2019-9948.patch \
+ file://bpo-35907-cve-2019-9948-fix.patch \
+ file://bpo-36216-cve-2019-9636.patch \
+ file://bpo-36216-cve-2019-9636-fix.patch \
+"
S = "${WORKDIR}/Python-${PV}"
@@ -158,7 +162,7 @@ py_package_preprocess () {
PACKAGES_remove = "${PN}"
# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
+RPROVIDES_${PN}-modules = "${PN}"
RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
RRECOMMENDS_${PN}-crypt = "openssl"
diff --git a/poky/meta/recipes-devtools/qemu/qemu-system-native_4.0.0.bb b/poky/meta/recipes-devtools/qemu/qemu-system-native_4.0.0.bb
index 820883df6..964dcee52 100644
--- a/poky/meta/recipes-devtools/qemu/qemu-system-native_4.0.0.bb
+++ b/poky/meta/recipes-devtools/qemu/qemu-system-native_4.0.0.bb
@@ -5,7 +5,7 @@ require qemu-native.inc
# As some of the files installed by qemu-native and qemu-system-native
# are the same, we depend on qemu-native to get the full installation set
# and avoid file clashes
-DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native"
+DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native"
EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc
index f7b41412a..ac475a8e2 100644
--- a/poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu.inc
@@ -4,6 +4,9 @@ LICENSE = "GPLv2 & LGPLv2.1"
RDEPENDS_${PN}-ptest = "bash make"
+require qemu-targets.inc
+inherit pkgconfig bluetooth ptest
+
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
@@ -20,7 +23,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://0008-apic-fixup-fallthrough-to-PIC.patch \
file://0009-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
file://0010-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \
- file://0013-Revert-target-arm-Use-vector-operations-for-saturati.patch \
+ file://0013-target-arm-Fix-vector-operation-segfault.patch \
"
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
@@ -49,10 +52,6 @@ do_install_ptest() {
-e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include
}
-
-require qemu-targets.inc
-inherit pkgconfig bluetooth ptest
-
# QEMU_TARGETS is overridable variable
QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc riscv32 riscv64 sh4 x86_64"
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0013-Revert-target-arm-Use-vector-operations-for-saturati.patch b/poky/meta/recipes-devtools/qemu/qemu/0013-Revert-target-arm-Use-vector-operations-for-saturati.patch
deleted file mode 100644
index 3d018a74d..000000000
--- a/poky/meta/recipes-devtools/qemu/qemu/0013-Revert-target-arm-Use-vector-operations-for-saturati.patch
+++ /dev/null
@@ -1,493 +0,0 @@
-From b46cdcdeb762c1f0eef68dc4a7d90f8176152e07 Mon Sep 17 00:00:00 2001
-From: Alistair Francis <alistair.francis@wdc.com>
-Date: Wed, 1 May 2019 19:51:27 -0700
-Subject: [PATCH] Revert "target/arm: Use vector operations for saturation"
-
-This reverts commit 89e68b575e138d0af1435f11a8ffcd8779c237bd.
-
-This fixes QEMU aborts when running the qemuarm machine.
-
-Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
-Upstream-Status: Pending
----
- target/arm/helper.h | 33 -------
- target/arm/translate-a64.c | 36 ++++----
- target/arm/translate.c | 172 ++++++-------------------------------
- target/arm/translate.h | 4 -
- target/arm/vec_helper.c | 130 ----------------------------
- 5 files changed, 44 insertions(+), 331 deletions(-)
-
-diff --git a/target/arm/helper.h b/target/arm/helper.h
-index 50cb036378..b2669f140f 100644
---- a/target/arm/helper.h
-+++ b/target/arm/helper.h
-@@ -646,39 +646,6 @@ DEF_HELPER_FLAGS_6(gvec_fmla_idx_s, TCG_CALL_NO_RWG,
- DEF_HELPER_FLAGS_6(gvec_fmla_idx_d, TCG_CALL_NO_RWG,
- void, ptr, ptr, ptr, ptr, ptr, i32)
-
--DEF_HELPER_FLAGS_5(gvec_uqadd_b, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_uqadd_h, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_uqadd_s, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_uqadd_d, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_sqadd_b, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_sqadd_h, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_sqadd_s, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_sqadd_d, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_uqsub_b, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_uqsub_h, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_uqsub_s, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_uqsub_d, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_sqsub_b, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_sqsub_h, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_sqsub_s, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--DEF_HELPER_FLAGS_5(gvec_sqsub_d, TCG_CALL_NO_RWG,
-- void, ptr, ptr, ptr, ptr, i32)
--
- DEF_HELPER_FLAGS_5(gvec_fmlal_a32, TCG_CALL_NO_RWG,
- void, ptr, ptr, ptr, ptr, i32)
- DEF_HELPER_FLAGS_5(gvec_fmlal_a64, TCG_CALL_NO_RWG,
-diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
-index 9dcc5ff3a3..428211f92f 100644
---- a/target/arm/translate-a64.c
-+++ b/target/arm/translate-a64.c
-@@ -11230,22 +11230,6 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn)
- }
-
- switch (opcode) {
-- case 0x01: /* SQADD, UQADD */
-- tcg_gen_gvec_4(vec_full_reg_offset(s, rd),
-- offsetof(CPUARMState, vfp.qc),
-- vec_full_reg_offset(s, rn),
-- vec_full_reg_offset(s, rm),
-- is_q ? 16 : 8, vec_full_reg_size(s),
-- (u ? uqadd_op : sqadd_op) + size);
-- return;
-- case 0x05: /* SQSUB, UQSUB */
-- tcg_gen_gvec_4(vec_full_reg_offset(s, rd),
-- offsetof(CPUARMState, vfp.qc),
-- vec_full_reg_offset(s, rn),
-- vec_full_reg_offset(s, rm),
-- is_q ? 16 : 8, vec_full_reg_size(s),
-- (u ? uqsub_op : sqsub_op) + size);
-- return;
- case 0x0c: /* SMAX, UMAX */
- if (u) {
- gen_gvec_fn3(s, is_q, rd, rn, rm, tcg_gen_gvec_umax, size);
-@@ -11341,6 +11325,16 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn)
- genfn = fns[size][u];
- break;
- }
-+ case 0x1: /* SQADD, UQADD */
-+ {
-+ static NeonGenTwoOpEnvFn * const fns[3][2] = {
-+ { gen_helper_neon_qadd_s8, gen_helper_neon_qadd_u8 },
-+ { gen_helper_neon_qadd_s16, gen_helper_neon_qadd_u16 },
-+ { gen_helper_neon_qadd_s32, gen_helper_neon_qadd_u32 },
-+ };
-+ genenvfn = fns[size][u];
-+ break;
-+ }
- case 0x2: /* SRHADD, URHADD */
- {
- static NeonGenTwoOpFn * const fns[3][2] = {
-@@ -11361,6 +11355,16 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn)
- genfn = fns[size][u];
- break;
- }
-+ case 0x5: /* SQSUB, UQSUB */
-+ {
-+ static NeonGenTwoOpEnvFn * const fns[3][2] = {
-+ { gen_helper_neon_qsub_s8, gen_helper_neon_qsub_u8 },
-+ { gen_helper_neon_qsub_s16, gen_helper_neon_qsub_u16 },
-+ { gen_helper_neon_qsub_s32, gen_helper_neon_qsub_u32 },
-+ };
-+ genenvfn = fns[size][u];
-+ break;
-+ }
- case 0x8: /* SSHL, USHL */
- {
- static NeonGenTwoOpFn * const fns[3][2] = {
-diff --git a/target/arm/translate.c b/target/arm/translate.c
-index 10bc53f91c..cf675cef3f 100644
---- a/target/arm/translate.c
-+++ b/target/arm/translate.c
-@@ -6242,142 +6242,6 @@ const GVecGen3 cmtst_op[4] = {
- .vece = MO_64 },
- };
-
--static void gen_uqadd_vec(unsigned vece, TCGv_vec t, TCGv_vec sat,
-- TCGv_vec a, TCGv_vec b)
--{
-- TCGv_vec x = tcg_temp_new_vec_matching(t);
-- tcg_gen_add_vec(vece, x, a, b);
-- tcg_gen_usadd_vec(vece, t, a, b);
-- tcg_gen_cmp_vec(TCG_COND_NE, vece, x, x, t);
-- tcg_gen_or_vec(vece, sat, sat, x);
-- tcg_temp_free_vec(x);
--}
--
--const GVecGen4 uqadd_op[4] = {
-- { .fniv = gen_uqadd_vec,
-- .fno = gen_helper_gvec_uqadd_b,
-- .opc = INDEX_op_usadd_vec,
-- .write_aofs = true,
-- .vece = MO_8 },
-- { .fniv = gen_uqadd_vec,
-- .fno = gen_helper_gvec_uqadd_h,
-- .opc = INDEX_op_usadd_vec,
-- .write_aofs = true,
-- .vece = MO_16 },
-- { .fniv = gen_uqadd_vec,
-- .fno = gen_helper_gvec_uqadd_s,
-- .opc = INDEX_op_usadd_vec,
-- .write_aofs = true,
-- .vece = MO_32 },
-- { .fniv = gen_uqadd_vec,
-- .fno = gen_helper_gvec_uqadd_d,
-- .opc = INDEX_op_usadd_vec,
-- .write_aofs = true,
-- .vece = MO_64 },
--};
--
--static void gen_sqadd_vec(unsigned vece, TCGv_vec t, TCGv_vec sat,
-- TCGv_vec a, TCGv_vec b)
--{
-- TCGv_vec x = tcg_temp_new_vec_matching(t);
-- tcg_gen_add_vec(vece, x, a, b);
-- tcg_gen_ssadd_vec(vece, t, a, b);
-- tcg_gen_cmp_vec(TCG_COND_NE, vece, x, x, t);
-- tcg_gen_or_vec(vece, sat, sat, x);
-- tcg_temp_free_vec(x);
--}
--
--const GVecGen4 sqadd_op[4] = {
-- { .fniv = gen_sqadd_vec,
-- .fno = gen_helper_gvec_sqadd_b,
-- .opc = INDEX_op_ssadd_vec,
-- .write_aofs = true,
-- .vece = MO_8 },
-- { .fniv = gen_sqadd_vec,
-- .fno = gen_helper_gvec_sqadd_h,
-- .opc = INDEX_op_ssadd_vec,
-- .write_aofs = true,
-- .vece = MO_16 },
-- { .fniv = gen_sqadd_vec,
-- .fno = gen_helper_gvec_sqadd_s,
-- .opc = INDEX_op_ssadd_vec,
-- .write_aofs = true,
-- .vece = MO_32 },
-- { .fniv = gen_sqadd_vec,
-- .fno = gen_helper_gvec_sqadd_d,
-- .opc = INDEX_op_ssadd_vec,
-- .write_aofs = true,
-- .vece = MO_64 },
--};
--
--static void gen_uqsub_vec(unsigned vece, TCGv_vec t, TCGv_vec sat,
-- TCGv_vec a, TCGv_vec b)
--{
-- TCGv_vec x = tcg_temp_new_vec_matching(t);
-- tcg_gen_sub_vec(vece, x, a, b);
-- tcg_gen_ussub_vec(vece, t, a, b);
-- tcg_gen_cmp_vec(TCG_COND_NE, vece, x, x, t);
-- tcg_gen_or_vec(vece, sat, sat, x);
-- tcg_temp_free_vec(x);
--}
--
--const GVecGen4 uqsub_op[4] = {
-- { .fniv = gen_uqsub_vec,
-- .fno = gen_helper_gvec_uqsub_b,
-- .opc = INDEX_op_ussub_vec,
-- .write_aofs = true,
-- .vece = MO_8 },
-- { .fniv = gen_uqsub_vec,
-- .fno = gen_helper_gvec_uqsub_h,
-- .opc = INDEX_op_ussub_vec,
-- .write_aofs = true,
-- .vece = MO_16 },
-- { .fniv = gen_uqsub_vec,
-- .fno = gen_helper_gvec_uqsub_s,
-- .opc = INDEX_op_ussub_vec,
-- .write_aofs = true,
-- .vece = MO_32 },
-- { .fniv = gen_uqsub_vec,
-- .fno = gen_helper_gvec_uqsub_d,
-- .opc = INDEX_op_ussub_vec,
-- .write_aofs = true,
-- .vece = MO_64 },
--};
--
--static void gen_sqsub_vec(unsigned vece, TCGv_vec t, TCGv_vec sat,
-- TCGv_vec a, TCGv_vec b)
--{
-- TCGv_vec x = tcg_temp_new_vec_matching(t);
-- tcg_gen_sub_vec(vece, x, a, b);
-- tcg_gen_sssub_vec(vece, t, a, b);
-- tcg_gen_cmp_vec(TCG_COND_NE, vece, x, x, t);
-- tcg_gen_or_vec(vece, sat, sat, x);
-- tcg_temp_free_vec(x);
--}
--
--const GVecGen4 sqsub_op[4] = {
-- { .fniv = gen_sqsub_vec,
-- .fno = gen_helper_gvec_sqsub_b,
-- .opc = INDEX_op_sssub_vec,
-- .write_aofs = true,
-- .vece = MO_8 },
-- { .fniv = gen_sqsub_vec,
-- .fno = gen_helper_gvec_sqsub_h,
-- .opc = INDEX_op_sssub_vec,
-- .write_aofs = true,
-- .vece = MO_16 },
-- { .fniv = gen_sqsub_vec,
-- .fno = gen_helper_gvec_sqsub_s,
-- .opc = INDEX_op_sssub_vec,
-- .write_aofs = true,
-- .vece = MO_32 },
-- { .fniv = gen_sqsub_vec,
-- .fno = gen_helper_gvec_sqsub_d,
-- .opc = INDEX_op_sssub_vec,
-- .write_aofs = true,
-- .vece = MO_64 },
--};
--
- /* Translate a NEON data processing instruction. Return nonzero if the
- instruction is invalid.
- We process data in a mixture of 32-bit and 64-bit chunks.
-@@ -6561,18 +6425,6 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
- }
- return 0;
-
-- case NEON_3R_VQADD:
-- tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc),
-- rn_ofs, rm_ofs, vec_size, vec_size,
-- (u ? uqadd_op : sqadd_op) + size);
-- break;
--
-- case NEON_3R_VQSUB:
-- tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc),
-- rn_ofs, rm_ofs, vec_size, vec_size,
-- (u ? uqsub_op : sqsub_op) + size);
-- break;
--
- case NEON_3R_VMUL: /* VMUL */
- if (u) {
- /* Polynomial case allows only P8 and is handled below. */
-@@ -6637,6 +6489,24 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
- neon_load_reg64(cpu_V0, rn + pass);
- neon_load_reg64(cpu_V1, rm + pass);
- switch (op) {
-+ case NEON_3R_VQADD:
-+ if (u) {
-+ gen_helper_neon_qadd_u64(cpu_V0, cpu_env,
-+ cpu_V0, cpu_V1);
-+ } else {
-+ gen_helper_neon_qadd_s64(cpu_V0, cpu_env,
-+ cpu_V0, cpu_V1);
-+ }
-+ break;
-+ case NEON_3R_VQSUB:
-+ if (u) {
-+ gen_helper_neon_qsub_u64(cpu_V0, cpu_env,
-+ cpu_V0, cpu_V1);
-+ } else {
-+ gen_helper_neon_qsub_s64(cpu_V0, cpu_env,
-+ cpu_V0, cpu_V1);
-+ }
-+ break;
- case NEON_3R_VSHL:
- if (u) {
- gen_helper_neon_shl_u64(cpu_V0, cpu_V1, cpu_V0);
-@@ -6752,12 +6622,18 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
- case NEON_3R_VHADD:
- GEN_NEON_INTEGER_OP(hadd);
- break;
-+ case NEON_3R_VQADD:
-+ GEN_NEON_INTEGER_OP_ENV(qadd);
-+ break;
- case NEON_3R_VRHADD:
- GEN_NEON_INTEGER_OP(rhadd);
- break;
- case NEON_3R_VHSUB:
- GEN_NEON_INTEGER_OP(hsub);
- break;
-+ case NEON_3R_VQSUB:
-+ GEN_NEON_INTEGER_OP_ENV(qsub);
-+ break;
- case NEON_3R_VSHL:
- GEN_NEON_INTEGER_OP(shl);
- break;
-diff --git a/target/arm/translate.h b/target/arm/translate.h
-index c2348def0d..07055c9449 100644
---- a/target/arm/translate.h
-+++ b/target/arm/translate.h
-@@ -248,10 +248,6 @@ extern const GVecGen2i ssra_op[4];
- extern const GVecGen2i usra_op[4];
- extern const GVecGen2i sri_op[4];
- extern const GVecGen2i sli_op[4];
--extern const GVecGen4 uqadd_op[4];
--extern const GVecGen4 sqadd_op[4];
--extern const GVecGen4 uqsub_op[4];
--extern const GVecGen4 sqsub_op[4];
- void gen_cmtst_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b);
-
- /*
-diff --git a/target/arm/vec_helper.c b/target/arm/vec_helper.c
-index dedef62403..be3271659f 100644
---- a/target/arm/vec_helper.c
-+++ b/target/arm/vec_helper.c
-@@ -769,136 +769,6 @@ DO_FMLA_IDX(gvec_fmla_idx_d, float64, )
-
- #undef DO_FMLA_IDX
-
--#define DO_SAT(NAME, WTYPE, TYPEN, TYPEM, OP, MIN, MAX) \
--void HELPER(NAME)(void *vd, void *vq, void *vn, void *vm, uint32_t desc) \
--{ \
-- intptr_t i, oprsz = simd_oprsz(desc); \
-- TYPEN *d = vd, *n = vn; TYPEM *m = vm; \
-- bool q = false; \
-- for (i = 0; i < oprsz / sizeof(TYPEN); i++) { \
-- WTYPE dd = (WTYPE)n[i] OP m[i]; \
-- if (dd < MIN) { \
-- dd = MIN; \
-- q = true; \
-- } else if (dd > MAX) { \
-- dd = MAX; \
-- q = true; \
-- } \
-- d[i] = dd; \
-- } \
-- if (q) { \
-- uint32_t *qc = vq; \
-- qc[0] = 1; \
-- } \
-- clear_tail(d, oprsz, simd_maxsz(desc)); \
--}
--
--DO_SAT(gvec_uqadd_b, int, uint8_t, uint8_t, +, 0, UINT8_MAX)
--DO_SAT(gvec_uqadd_h, int, uint16_t, uint16_t, +, 0, UINT16_MAX)
--DO_SAT(gvec_uqadd_s, int64_t, uint32_t, uint32_t, +, 0, UINT32_MAX)
--
--DO_SAT(gvec_sqadd_b, int, int8_t, int8_t, +, INT8_MIN, INT8_MAX)
--DO_SAT(gvec_sqadd_h, int, int16_t, int16_t, +, INT16_MIN, INT16_MAX)
--DO_SAT(gvec_sqadd_s, int64_t, int32_t, int32_t, +, INT32_MIN, INT32_MAX)
--
--DO_SAT(gvec_uqsub_b, int, uint8_t, uint8_t, -, 0, UINT8_MAX)
--DO_SAT(gvec_uqsub_h, int, uint16_t, uint16_t, -, 0, UINT16_MAX)
--DO_SAT(gvec_uqsub_s, int64_t, uint32_t, uint32_t, -, 0, UINT32_MAX)
--
--DO_SAT(gvec_sqsub_b, int, int8_t, int8_t, -, INT8_MIN, INT8_MAX)
--DO_SAT(gvec_sqsub_h, int, int16_t, int16_t, -, INT16_MIN, INT16_MAX)
--DO_SAT(gvec_sqsub_s, int64_t, int32_t, int32_t, -, INT32_MIN, INT32_MAX)
--
--#undef DO_SAT
--
--void HELPER(gvec_uqadd_d)(void *vd, void *vq, void *vn,
-- void *vm, uint32_t desc)
--{
-- intptr_t i, oprsz = simd_oprsz(desc);
-- uint64_t *d = vd, *n = vn, *m = vm;
-- bool q = false;
--
-- for (i = 0; i < oprsz / 8; i++) {
-- uint64_t nn = n[i], mm = m[i], dd = nn + mm;
-- if (dd < nn) {
-- dd = UINT64_MAX;
-- q = true;
-- }
-- d[i] = dd;
-- }
-- if (q) {
-- uint32_t *qc = vq;
-- qc[0] = 1;
-- }
-- clear_tail(d, oprsz, simd_maxsz(desc));
--}
--
--void HELPER(gvec_uqsub_d)(void *vd, void *vq, void *vn,
-- void *vm, uint32_t desc)
--{
-- intptr_t i, oprsz = simd_oprsz(desc);
-- uint64_t *d = vd, *n = vn, *m = vm;
-- bool q = false;
--
-- for (i = 0; i < oprsz / 8; i++) {
-- uint64_t nn = n[i], mm = m[i], dd = nn - mm;
-- if (nn < mm) {
-- dd = 0;
-- q = true;
-- }
-- d[i] = dd;
-- }
-- if (q) {
-- uint32_t *qc = vq;
-- qc[0] = 1;
-- }
-- clear_tail(d, oprsz, simd_maxsz(desc));
--}
--
--void HELPER(gvec_sqadd_d)(void *vd, void *vq, void *vn,
-- void *vm, uint32_t desc)
--{
-- intptr_t i, oprsz = simd_oprsz(desc);
-- int64_t *d = vd, *n = vn, *m = vm;
-- bool q = false;
--
-- for (i = 0; i < oprsz / 8; i++) {
-- int64_t nn = n[i], mm = m[i], dd = nn + mm;
-- if (((dd ^ nn) & ~(nn ^ mm)) & INT64_MIN) {
-- dd = (nn >> 63) ^ ~INT64_MIN;
-- q = true;
-- }
-- d[i] = dd;
-- }
-- if (q) {
-- uint32_t *qc = vq;
-- qc[0] = 1;
-- }
-- clear_tail(d, oprsz, simd_maxsz(desc));
--}
--
--void HELPER(gvec_sqsub_d)(void *vd, void *vq, void *vn,
-- void *vm, uint32_t desc)
--{
-- intptr_t i, oprsz = simd_oprsz(desc);
-- int64_t *d = vd, *n = vn, *m = vm;
-- bool q = false;
--
-- for (i = 0; i < oprsz / 8; i++) {
-- int64_t nn = n[i], mm = m[i], dd = nn - mm;
-- if (((dd ^ nn) & (nn ^ mm)) & INT64_MIN) {
-- dd = (nn >> 63) ^ ~INT64_MIN;
-- q = true;
-- }
-- d[i] = dd;
-- }
-- if (q) {
-- uint32_t *qc = vq;
-- qc[0] = 1;
-- }
-- clear_tail(d, oprsz, simd_maxsz(desc));
--}
--
- /*
- * Convert float16 to float32, raising no exceptions and
- * preserving exceptional values, including SNaN.
---
-2.21.0
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0013-target-arm-Fix-vector-operation-segfault.patch b/poky/meta/recipes-devtools/qemu/qemu/0013-target-arm-Fix-vector-operation-segfault.patch
new file mode 100644
index 000000000..c1dd957dc
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0013-target-arm-Fix-vector-operation-segfault.patch
@@ -0,0 +1,66 @@
+From 2f143d3ad1c05e91cf2cdf5de06d59a80a95e6c8 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Thu, 23 May 2019 14:47:43 +0100
+Subject: [PATCH] target/arm: Fix vector operation segfault
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit 89e68b575 "target/arm: Use vector operations for saturation"
+causes this abort() when booting QEMU ARM with a Cortex-A15:
+
+0 0x00007ffff4c2382f in raise () at /usr/lib/libc.so.6
+1 0x00007ffff4c0e672 in abort () at /usr/lib/libc.so.6
+2 0x00005555559c1839 in disas_neon_data_insn (insn=<optimized out>, s=<optimized out>) at ./target/arm/translate.c:6673
+3 0x00005555559c1839 in disas_neon_data_insn (s=<optimized out>, insn=<optimized out>) at ./target/arm/translate.c:6386
+4 0x00005555559cd8a4 in disas_arm_insn (insn=4081107068, s=0x7fffe59a9510) at ./target/arm/translate.c:9289
+5 0x00005555559cd8a4 in arm_tr_translate_insn (dcbase=0x7fffe59a9510, cpu=<optimized out>) at ./target/arm/translate.c:13612
+6 0x00005555558d1d39 in translator_loop (ops=0x5555561cc580 <arm_translator_ops>, db=0x7fffe59a9510, cpu=0x55555686a2f0, tb=<optimized out>, max_insns=<optimized out>) at ./accel/tcg/translator.c:96
+7 0x00005555559d10d4 in gen_intermediate_code (cpu=cpu@entry=0x55555686a2f0, tb=tb@entry=0x7fffd7840080 <code_gen_buffer+126091347>, max_insns=max_insns@entry=512) at ./target/arm/translate.c:13901
+8 0x00005555558d06b9 in tb_gen_code (cpu=cpu@entry=0x55555686a2f0, pc=3067096216, cs_base=0, flags=192, cflags=-16252928, cflags@entry=524288) at ./accel/tcg/translate-all.c:1736
+9 0x00005555558ce467 in tb_find (cf_mask=524288, tb_exit=1, last_tb=0x7fffd783e640 <code_gen_buffer+126084627>, cpu=0x1) at ./accel/tcg/cpu-exec.c:407
+10 0x00005555558ce467 in cpu_exec (cpu=cpu@entry=0x55555686a2f0) at ./accel/tcg/cpu-exec.c:728
+11 0x000055555588b0cf in tcg_cpu_exec (cpu=0x55555686a2f0) at ./cpus.c:1431
+12 0x000055555588d223 in qemu_tcg_cpu_thread_fn (arg=0x55555686a2f0) at ./cpus.c:1735
+13 0x000055555588d223 in qemu_tcg_cpu_thread_fn (arg=arg@entry=0x55555686a2f0) at ./cpus.c:1709
+14 0x0000555555d2629a in qemu_thread_start (args=<optimized out>) at ./util/qemu-thread-posix.c:502
+15 0x00007ffff4db8a92 in start_thread () at /usr/lib/libpthread.
+
+This patch ensures that we don't hit the abort() in the second switch
+case in disas_neon_data_insn() as we will return from the first case.
+
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
+Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
+Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
+Tested-by: Alex Bennée <alex.bennee@linaro.org>
+Message-id: ad91b397f360b2fc7f4087e476f7df5b04d42ddb.1558021877.git.alistair.francis@wdc.com
+Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
+Upstream-Status: Backport [4.1.0]
+---
+ target/arm/translate.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/target/arm/translate.c b/target/arm/translate.c
+index dd053c80d6..298c262825 100644
+--- a/target/arm/translate.c
++++ b/target/arm/translate.c
+@@ -6598,13 +6598,13 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
+ tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc),
+ rn_ofs, rm_ofs, vec_size, vec_size,
+ (u ? uqadd_op : sqadd_op) + size);
+- break;
++ return 0;
+
+ case NEON_3R_VQSUB:
+ tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc),
+ rn_ofs, rm_ofs, vec_size, vec_size,
+ (u ? uqsub_op : sqsub_op) + size);
+- break;
++ return 0;
+
+ case NEON_3R_VMUL: /* VMUL */
+ if (u) {
+--
+2.21.0
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu_4.0.0.bb b/poky/meta/recipes-devtools/qemu/qemu_4.0.0.bb
index 247e0311e..76776098d 100644
--- a/poky/meta/recipes-devtools/qemu/qemu_4.0.0.bb
+++ b/poky/meta/recipes-devtools/qemu/qemu_4.0.0.bb
@@ -2,11 +2,12 @@ BBCLASSEXTEND = "nativesdk"
require qemu.inc
-DEPENDS = "glib-2.0 zlib pixman"
+DEPENDS = "glib-2.0 zlib pixman bison-native"
RDEPENDS_${PN}_class-target += "bash"
EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}"
+EXTRA_OECONF_append_class-target_mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
EXTRA_OECONF_append_class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
do_install_append_class-nativesdk() {
diff --git a/poky/meta/recipes-devtools/quilt/quilt.inc b/poky/meta/recipes-devtools/quilt/quilt.inc
index 150df3d57..dbf722be2 100644
--- a/poky/meta/recipes-devtools/quilt/quilt.inc
+++ b/poky/meta/recipes-devtools/quilt/quilt.inc
@@ -85,5 +85,5 @@ RDEPENDS_${PN}-ptest = "make file sed gawk diffutils findutils ed perl \
perl-module-filehandle perl-module-getopt-std \
perl-module-posix perl-module-file-temp \
perl-module-text-parsewords perl-module-overloading \
- bash util-linux-getopt \
+ bash util-linux-getopt patch \
"
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
index 0ce7b4e8c..87c1e8cac 100644
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
@@ -1,39 +1,8 @@
-Define FNM_EXTMATCH if not defined its glibc specific define
include missing sys/stat.h for stat* function declarations
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: squashfs-tools/action.c
-===================================================================
---- squashfs-tools.orig/action.c
-+++ squashfs-tools/action.c
-@@ -44,6 +44,10 @@
- #include "action.h"
- #include "error.h"
-
-+#if !defined(FNM_EXTMATCH)
-+#define FNM_EXTMATCH 0
-+#endif
-+
- /*
- * code to parse actions
- */
-Index: squashfs-tools/mksquashfs.c
-===================================================================
---- squashfs-tools.orig/mksquashfs.c
-+++ squashfs-tools/mksquashfs.c
-@@ -1261,6 +1261,10 @@ void write_dir(squashfs_inode *inode, st
- dir_size + 3, directory_block, directory_offset, NULL, NULL,
- dir, 0);
-
-+#if !defined(FNM_EXTMATCH)
-+#define FNM_EXTMATCH 0
-+#endif
-+
- #ifdef SQUASHFS_TRACE
- {
- unsigned char *dirp;
Index: squashfs-tools/pseudo.c
===================================================================
--- squashfs-tools.orig/pseudo.c
@@ -46,18 +15,3 @@ Index: squashfs-tools/pseudo.c
#include <ctype.h>
#include "pseudo.h"
-Index: squashfs-tools/unsquashfs.c
-===================================================================
---- squashfs-tools.orig/unsquashfs.c
-+++ squashfs-tools/unsquashfs.c
-@@ -42,6 +42,10 @@
- #include <sys/sysmacros.h>
- #endif
-
-+#ifndef FNM_EXTMATCH
-+#define FNM_EXTMATCH 0
-+#endif
-+
- struct cache *fragment_cache, *data_cache;
- struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
- pthread_t *thread, *inflator_thread;
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index 5a8b5f77b..dc1568a77 100644
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -19,6 +19,9 @@ SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e
S = "${WORKDIR}/git/squashfs-tools"
+# needs FNM_EXTMATCH
+COMPATIBLE_HOST_libc-musl = 'null'
+
EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS}"
PACKAGECONFIG ??= "gzip xz lzo lz4 lzma xattr"
diff --git a/poky/meta/recipes-devtools/strace/strace/ptest-spacesave.patch b/poky/meta/recipes-devtools/strace/strace/ptest-spacesave.patch
new file mode 100644
index 000000000..3e32cc388
--- /dev/null
+++ b/poky/meta/recipes-devtools/strace/strace/ptest-spacesave.patch
@@ -0,0 +1,19 @@
+If the test is successful, remove the log and exp files. This stops strace
+using around 600MB of disk space and running our ptest images out of space.
+
+RP 2019/5/29
+
+Upstream-Status: Inappropriate [specific to OE image space issues]
+
+Index: strace-4.26/tests/gen_tests.sh
+===================================================================
+--- strace-4.26.orig/tests/gen_tests.sh
++++ strace-4.26/tests/gen_tests.sh
+@@ -62,6 +62,7 @@ while read -r name arg0 args; do {
+ $hdr
+ . "\${srcdir=.}/init.sh"
+ run_strace_match_diff $arg0 $args
++ rm -rf log exp
+ EOF
+ ;;
+
diff --git a/poky/meta/recipes-devtools/strace/strace_4.26.bb b/poky/meta/recipes-devtools/strace/strace_4.26.bb
index 24f92c99e..3b61fc3ee 100644
--- a/poky/meta/recipes-devtools/strace/strace_4.26.bb
+++ b/poky/meta/recipes-devtools/strace/strace_4.26.bb
@@ -15,6 +15,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
file://0001-mips-o32-fix-build.patch \
+ file://ptest-spacesave.patch \
"
SRC_URI[md5sum] = "daa51acc0c7c696221ec03cf0b30a7af"
SRC_URI[sha256sum] = "7c4d2ffeef4f7d1cdc71062ca78d1130eb52f947c2fca82f59f6a1183bfa1e1c"
diff --git a/poky/meta/recipes-devtools/vala/vala_0.44.3.bb b/poky/meta/recipes-devtools/vala/vala_0.44.5.bb
index fe6a5fcdc..518c9ebda 100644
--- a/poky/meta/recipes-devtools/vala/vala_0.44.3.bb
+++ b/poky/meta/recipes-devtools/vala/vala_0.44.5.bb
@@ -4,5 +4,5 @@ SRC_URI += "file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.pat
file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
"
-SRC_URI[md5sum] = "25f97c1b46ae0b60b5cc49cbc044eca2"
-SRC_URI[sha256sum] = "8553b422484af88be1685d8b47f7b0df36ae4477c3e77e89ab22276ffed1eae9"
+SRC_URI[md5sum] = "1e8b8595168446c529b11236cf75e328"
+SRC_URI[sha256sum] = "bb8f8185b805411511786733c4b769c3ee6af8bc879609bffb6c46b8999bc27f"
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
index ae3498f55..85f0ff756 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
+++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
@@ -110,7 +110,7 @@ RDEPENDS_${PN} += "perl"
# redirect functions like strlen.
RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob ${PN}-dbg"
+RDEPENDS_${PN}-ptest += " file perl perl-module-file-glob sed ${PN}-dbg"
RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
# One of the tests contains a bogus interpreter path on purpose.
@@ -168,6 +168,7 @@ do_install_ptest() {
-o -name "*.h" \) \
-exec rm {} \;
mv ${D}${PTEST_PATH}/cachegrind/tests/a_c ${D}${PTEST_PATH}/cachegrind/tests/a.c
+ touch ${D}${PTEST_PATH}/cachegrind/tests/a.c -r ${D}${PTEST_PATH}/cachegrind/tests/cgout-test
# find *_annotate in ${bindir} for yocto build
sed -i s:\.\./\.\./cachegrind/cg_annotate:${bindir}/cg_annotate: ${D}${PTEST_PATH}/cachegrind/tests/ann1.vgtest