Yocto 2.5
Move OpenBMC to Yocto 2.5(sumo)
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I5c5ad6904a16e14c1c397f0baf10c9d465594a78
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
index 68f1b3c..ef232c1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
@@ -67,4 +67,10 @@
install -d ${D}${localstatedir}/cache/apt/archives/partial
install -d ${D}${localstatedir}/log/apt/
+
+ install -d ${D}${includedir}/apt-pkg
+ for h in `find ${S}/apt-pkg ${S}/apt-inst -name '*.h'`
+ do
+ install -m 0644 $h ${D}${includedir}/apt-pkg
+ done
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
index 0532671..d16b5c7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
@@ -17,10 +17,10 @@
configure.ac | 7 -------
2 files changed, 3 insertions(+), 13 deletions(-)
-diff --git a/Makefile b/Makefile
-index 7680f08..69527a5 100644
---- a/Makefile
-+++ b/Makefile
+Index: apt-1.2.24/Makefile
+===================================================================
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
@@ -9,8 +9,8 @@ endif
.PHONY: default
default: startup all
@@ -32,9 +32,9 @@
$(MAKE) -C vendor $@
$(MAKE) -C apt-pkg $@
$(MAKE) -C apt-inst $@
-@@ -21,8 +21,6 @@ all headers library clean veryclean binary program doc manpages docbook test upd
+@@ -21,8 +21,6 @@ all headers library clean veryclean bina
$(MAKE) -C dselect $@
- $(MAKE) -C doc $@
+ # $(MAKE) -C doc $@
$(MAKE) -C po $@
- # FIXME: -C test has issue swith parallel builds, investigate!
- -$(MAKE) -C test $@
@@ -52,10 +52,10 @@
dirs: startup
-diff --git a/configure.ac b/configure.ac
-index 1f05da5..e47f459 100644
---- a/configure.ac
-+++ b/configure.ac
+Index: apt-1.2.24/configure.ac
+===================================================================
+--- apt-1.2.24.orig/configure.ac
++++ apt-1.2.24/configure.ac
@@ -90,13 +90,6 @@ AC_CHECK_LIB(curl, curl_easy_init,
AC_MSG_ERROR([failed: I need CURL due https support]),
)
@@ -70,6 +70,3 @@
AC_SUBST(BDBLIB)
HAVE_ZLIB=no
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
index 801ae6d..899c6ef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
@@ -1,12 +1,14 @@
Upstream-Status: Pending
---- a/apt-pkg/contrib/weakptr.h
-+++ b/apt-pkg/contrib/weakptr.h
+Index: apt-1.2.24/apt-pkg/contrib/weakptr.h
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/contrib/weakptr.h
++++ apt-1.2.24/apt-pkg/contrib/weakptr.h
@@ -21,6 +21,7 @@
#ifndef WEAK_POINTER_H
#define WEAK_POINTER_H
+#include <cstdlib>
#include <set>
- /**
- * Class for objects providing support for weak pointers.
+ #include <stddef.h>
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch
index 46e3161..0c686d6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/makerace.patch
@@ -8,16 +8,16 @@
Upstream-Status: Pending
-Index: apt-0.9.9.4/buildlib/library.mak
+Index: apt-1.2.24/buildlib/library.mak
===================================================================
---- apt-0.9.9.4.orig/buildlib/library.mak 2013-07-31 15:45:07.320440575 +0300
-+++ apt-0.9.9.4/buildlib/library.mak 2013-07-31 15:46:49.440440561 +0300
-@@ -61,7 +61,7 @@
+--- apt-1.2.24.orig/buildlib/library.mak
++++ apt-1.2.24/buildlib/library.mak
+@@ -65,7 +65,7 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR
# Compilation rules
vpath %.cc $(SUBDIRS)
-$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS)
+$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS) $($(LOCAL)-HEADERS)
echo Compiling $< to $@
- $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -o $@ $<
+ $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXSTD) $(CXXFLAGS) $(PICFLAGS) -o $@ '$(abspath $<)'
$(DoDep)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
index a0996d4..98b6c96 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
@@ -1,8 +1,10 @@
Upstream-Status: Pending
---- a/apt-pkg/deb/dpkgpm.cc
-+++ b/apt-pkg/deb/dpkgpm.cc
-@@ -42,6 +42,12 @@
+Index: apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/deb/dpkgpm.cc
++++ apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+@@ -54,6 +54,12 @@
#include <apti18n.h>
/*}}}*/
@@ -14,8 +16,8 @@
+
using namespace std;
- namespace
-@@ -1279,7 +1285,7 @@ void pkgDPkgPM::WriteApportReport(const
+ APT_PURE static string
+@@ -1703,7 +1709,7 @@ void pkgDPkgPM::WriteApportReport(const
}
// check if its not a follow up error
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch
index 449e42d..78cf538 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/nodoc.patch
@@ -3,16 +3,16 @@
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: apt-0.9.7.7/Makefile
+Index: apt-1.2.24/Makefile
===================================================================
---- apt-0.9.7.7.orig/Makefile
-+++ apt-0.9.7.7/Makefile
-@@ -17,7 +17,7 @@ all headers library clean veryclean bina
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
+@@ -19,7 +19,7 @@ all headers library clean veryclean bina
$(MAKE) -C cmdline $@
$(MAKE) -C ftparchive $@
$(MAKE) -C dselect $@
- $(MAKE) -C doc $@
+# $(MAKE) -C doc $@
$(MAKE) -C po $@
- $(MAKE) -C test $@
-
+ # FIXME: -C test has issue swith parallel builds, investigate!
+ -$(MAKE) -C test $@
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb b/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
index 104dc38..89d57ac 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
@@ -9,6 +9,10 @@
SRC_URI[md5sum] = "bf19d4cddce260b3c3e1d51d42509071"
SRC_URI[sha256sum] = "e8f2efd235f842bad2f6938bf4a72240a5e5fcd248e8444335e63beb60fabd82"
-inherit autotools
+inherit autotools allarch
+
+PACKAGES = "${PN} ${PN}-doc"
+
+FILES_${PN} += "${datadir}/aclocal"
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
index ea62df8..df81bc6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
@@ -41,6 +41,10 @@
CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'"
do_configure() {
+ # manually install a newer config.guess/.sub
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/build-aux
+ install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/build-aux
+
oe_runconf
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
index 64eb253..96b5a3d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch
@@ -22,10 +22,10 @@
t/wrap/automake.in | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
-diff --git a/bin/aclocal.in b/bin/aclocal.in
-index 349f24a..50cb8d3 100644
---- a/bin/aclocal.in
-+++ b/bin/aclocal.in
+Index: automake-1.15.1/bin/aclocal.in
+===================================================================
+--- automake-1.15.1.orig/bin/aclocal.in
++++ automake-1.15.1/bin/aclocal.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
@@ -40,17 +40,17 @@
use Automake::Config;
use Automake::General;
-diff --git a/bin/automake.in b/bin/automake.in
-index eedc8bc..e0a01cf 100644
---- a/bin/automake.in
-+++ b/bin/automake.in
+Index: automake-1.15.1/bin/automake.in
+===================================================================
+--- automake-1.15.1.orig/bin/automake.in
++++ automake-1.15.1/bin/automake.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
# -*- perl -*-
# @configure_input@
-@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+@@ -28,6 +28,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
package Automake;
use strict;
@@ -58,16 +58,16 @@
BEGIN
{
-diff --git a/t/wrap/aclocal.in b/t/wrap/aclocal.in
-index e64b546..9996899 100644
---- a/t/wrap/aclocal.in
-+++ b/t/wrap/aclocal.in
+Index: automake-1.15.1/t/wrap/aclocal.in
+===================================================================
+--- automake-1.15.1.orig/t/wrap/aclocal.in
++++ automake-1.15.1/t/wrap/aclocal.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
# @configure_input@
- # Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ # Copyright (C) 2012-2017 Free Software Foundation, Inc.
@@ -19,6 +19,7 @@
BEGIN
{
@@ -76,16 +76,16 @@
@Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib');
unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib'
if '@srcdir@' ne '.';
-diff --git a/t/wrap/automake.in b/t/wrap/automake.in
-index 8b943b1..be61226 100644
---- a/t/wrap/automake.in
-+++ b/t/wrap/automake.in
+Index: automake-1.15.1/t/wrap/automake.in
+===================================================================
+--- automake-1.15.1.orig/t/wrap/automake.in
++++ automake-1.15.1/t/wrap/automake.in
@@ -1,4 +1,4 @@
-#!@PERL@ -w
+#!@PERL@
# @configure_input@
- # Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ # Copyright (C) 2012-2017 Free Software Foundation, Inc.
@@ -19,6 +19,7 @@
BEGIN
{
@@ -94,6 +94,3 @@
@Automake::perl_libdirs = ('@abs_top_srcdir@/lib');
unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib'
if '@srcdir@' ne '.';
---
-2.3.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch
index 1dd5337..c32cd1f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/buildtest.patch
@@ -4,21 +4,23 @@
Signed-off-by: Björn Stenberg <bjst@enea.com>
Upstream-Status: Pending
---- a/lib/am/check.am 2012-11-14 13:46:16.335475995 +0100
-+++ b/lib/am/check.am 2012-08-13 18:40:12.000000000 +0200
-@@ -44,7 +44,7 @@
- am__tty_colors = $(am__tty_colors_dummy)
- endif !%?COLOR%
-
+Index: automake-1.15.1/lib/am/check.am
+===================================================================
+--- automake-1.15.1.orig/lib/am/check.am
++++ automake-1.15.1/lib/am/check.am
+@@ -41,7 +41,7 @@ am__tty_colors = { \
+ fi; \
+ }
+
-.PHONY: check-TESTS
+.PHONY: check-TESTS buildtest-TESTS runtest-TESTS
-
- if %?PARALLEL_TESTS%
-
-@@ -465,7 +465,14 @@
-
- else !%?PARALLEL_TESTS%
-
+
+ if !%?SERIAL_TESTS%
+
+@@ -466,7 +466,14 @@ else %?SERIAL_TESTS%
+
+ ## Obsolescent serial testsuite driver.
+
-check-TESTS: $(TESTS)
+AM_RECURSIVE_TARGETS += buildtest runtest
+
@@ -28,6 +30,6 @@
+ $(MAKE) $(AM_MAKEFLAGS) runtest-TESTS
+
+runtest-TESTS:
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
## Make sure Solaris VPATH-expands all members of this list, even
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.30.inc
similarity index 96%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.30.inc
index 07a72e2..9c883ac 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.30.inc
@@ -18,7 +18,7 @@
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
-SRCREV ?= "90276f15379d380761fc499da2ba24cfb3c12a94"
+SRCREV ?= "caa839fba66600a6c36d3639906ed9110b79c307"
BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git"
SRC_URI = "\
${BINUTILS_GIT_URI} \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
index 0b515d8..2df8360 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
@@ -1,4 +1,4 @@
-From 58ac9f95a3d83c29efaf7a8906fb6aefea8c8e79 Mon Sep 17 00:00:00 2001
+From 2e1b5e24a6759de7f73aa6060a574848d9131b5a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:58:54 +0000
Subject: [PATCH 01/15] binutils-crosssdk: Generate relocatable SDKs
@@ -18,7 +18,7 @@
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index b6940d376d..a42c4d7a4b 100755
+index 8732422b3a..1f257e99ca 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -37,16 +37,16 @@
( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
. ${CUSTOMIZER_SCRIPT}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
+unset PARTIAL_LINKING
- LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
+ RELOCATING=" "
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index d9138bc059..e48faeca43 100644
+index 9787ab5dac..0c8a93c2c8 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
-@@ -138,8 +138,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
+@@ -139,8 +139,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
fi
fi
@@ -58,5 +58,5 @@
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
index 370333d..bac7fb2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
@@ -1,4 +1,4 @@
-From 8f929c616208351d0971d7dfd7574d48d3144603 Mon Sep 17 00:00:00 2001
+From 58ddf38fa53abb48b69dd76e398c73451ad1a5eb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 6 Mar 2017 23:37:05 -0800
Subject: [PATCH 02/15] binutils-cross: Do not generate linker script
@@ -23,7 +23,7 @@
1 file changed, 23 deletions(-)
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index a42c4d7a4b..d727b4d07e 100755
+index 1f257e99ca..1583b73a2b 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -189,29 +189,6 @@ append_to_lib_path()
@@ -57,5 +57,5 @@
libs=${NATIVE_LIB_DIRS}
if [ "x${NATIVE}" = "xyes" ] ; then
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
index b6c09cc..306afe7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
@@ -1,4 +1,4 @@
-From e5a806aae02a10290c71deb72f6294c98068368d Mon Sep 17 00:00:00 2001
+From 5089be88f670bcadf7db0e778894f900b2c05d7b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:07:33 +0000
Subject: [PATCH 03/15] configure: widen the regexp for SH architectures
@@ -14,12 +14,12 @@
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
-index be9dd89d9b..d8af155ab5 100755
+index 2d615a9996..c4ad45c06c 100755
--- a/configure
+++ b/configure
-@@ -3844,7 +3844,7 @@ case "${target}" in
- or1k*-*-*)
- noconfigdirs="$noconfigdirs gdb"
+@@ -3835,7 +3835,7 @@ case "${target}" in
+ nvptx*-*-*)
+ noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
;;
- sh-*-*)
+ sh*-*-* | sh64-*-*)
@@ -27,7 +27,7 @@
sh*-*-elf)
;;
diff --git a/gprof/configure b/gprof/configure
-index e71fe8b9e4..679e0dce77 100755
+index 1e25102976..6b43bf2b18 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -5874,6 +5874,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -43,5 +43,5 @@
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
index 38eee30..3e29c58 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
@@ -1,4 +1,4 @@
-From 3634ec3547bc0f8a5d1b8ad15365e2f836cda642 Mon Sep 17 00:00:00 2001
+From a0e893ea094c48fa803046ffa89e31907aee0597 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:09:58 +0000
Subject: [PATCH 04/15] Point scripts location to libdir
@@ -12,7 +12,7 @@
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 625347ff62..d5334d2681 100644
+index 6243c12528..3c5d6c8202 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -57,7 +57,7 @@ endif
@@ -25,7 +25,7 @@
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/ld/Makefile.in b/ld/Makefile.in
-index ba251777b0..a2cf2282b5 100644
+index 760c037f9d..6dea692869 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -446,7 +446,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
@@ -38,5 +38,5 @@
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
index 59150a2..2f49969 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
@@ -1,4 +1,4 @@
-From 9d37c8f68c07da63186cb993f1221f6c11eca422 Mon Sep 17 00:00:00 2001
+From 518abb195d0eb47d8eef581d7fd0a5fd9fa73f7d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:27:17 +0000
Subject: [PATCH 05/15] Only generate an RPATH entry if LD_RUN_PATH is not
@@ -15,10 +15,10 @@
1 file changed, 4 insertions(+)
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 9ac1840316..9dc4c149bc 100644
+index c0925fc9b9..7d7670a89f 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1463,6 +1463,8 @@ fragment <<EOF
+@@ -1470,6 +1470,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
path = (const char *) getenv ("LD_RUN_PATH");
@@ -27,7 +27,7 @@
if (path
&& gld${EMULATION_NAME}_search_needed (path, &n, force))
break;
-@@ -1740,6 +1742,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1750,6 +1752,8 @@ gld${EMULATION_NAME}_before_allocation (void)
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
@@ -37,5 +37,5 @@
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
index e87efe6..333e2ee 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
@@ -1,4 +1,4 @@
-From 71c734bb3754319029dcfc898cedbade42274dcb Mon Sep 17 00:00:00 2001
+From fad053cc59baa6277182b0fc90415a214060ba99 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 14 Feb 2016 17:04:07 +0000
Subject: [PATCH 06/15] Use libtool 2.4
@@ -12,7 +12,6 @@
bfd/configure | 1318 +++++++++++++++++------
bfd/configure.ac | 2 +-
binutils/configure | 1316 +++++++++++++++++------
- configure | 2 +-
gas/configure | 1314 +++++++++++++++++------
gprof/configure | 1321 +++++++++++++++++------
ld/configure | 1691 +++++++++++++++++++++--------
@@ -24,10 +23,10 @@
opcodes/configure | 1318 +++++++++++++++++------
opcodes/configure.ac | 2 +-
zlib/configure | 1316 +++++++++++++++++------
- 15 files changed, 9927 insertions(+), 3694 deletions(-)
+ 14 files changed, 9926 insertions(+), 3693 deletions(-)
diff --git a/bfd/configure b/bfd/configure
-index 48276594ed..3ece8943f3 100755
+index 6c2b24ebe3..5fdd723b7f 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -672,6 +672,9 @@ OTOOL
@@ -1931,7 +1930,7 @@
chmod +x "$ofile"
diff --git a/bfd/configure.ac b/bfd/configure.ac
-index 8fd03a7ea8..8816c3286c 100644
+index 2342f3faea..a6451fccda 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -254,7 +254,7 @@ changequote(,)dnl
@@ -1944,7 +1943,7 @@
# More hacks to build DLLs on Windows.
diff --git a/binutils/configure b/binutils/configure
-index 22e1b1736e..321b63535b 100755
+index 5d9c9105a7..a65b2b4518 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -659,8 +659,11 @@ OTOOL
@@ -3841,21 +3840,8 @@
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-diff --git a/configure b/configure
-index d8af155ab5..005ed827ab 100755
---- a/configure
-+++ b/configure
-@@ -3844,7 +3844,7 @@ case "${target}" in
- or1k*-*-*)
- noconfigdirs="$noconfigdirs gdb"
- ;;
-- sh*-*-* | sh64-*-*)
-+ sh-*-* | sh64-*-*)
- case "${target}" in
- sh*-*-elf)
- ;;
diff --git a/gas/configure b/gas/configure
-index 93afb20c8f..81dd4cbd97 100755
+index fbac8f44d5..a40ac2144f 100755
--- a/gas/configure
+++ b/gas/configure
@@ -650,8 +650,11 @@ OTOOL
@@ -5156,7 +5142,7 @@
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15436,13 +16089,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15437,13 +16090,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -5177,7 +5163,7 @@
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15457,14 +16117,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15458,14 +16118,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -5196,7 +5182,7 @@
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15497,12 +16160,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15498,12 +16161,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -5210,7 +5196,7 @@
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -15557,8 +16220,13 @@ reload_flag \
+@@ -15558,8 +16221,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -5224,7 +5210,7 @@
STRIP \
RANLIB \
CC \
-@@ -15568,12 +16236,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -15569,12 +16237,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -5240,7 +5226,7 @@
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -15589,7 +16259,6 @@ no_undefined_flag \
+@@ -15590,7 +16260,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -5248,7 +5234,7 @@
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -15625,6 +16294,7 @@ module_cmds \
+@@ -15626,6 +16295,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -5256,7 +5242,7 @@
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -16389,7 +17059,8 @@ $as_echo X"$file" |
+@@ -16390,7 +17060,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -5266,7 +5252,7 @@
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -16492,19 +17163,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16493,19 +17164,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -5310,7 +5296,7 @@
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -16534,6 +17228,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -16535,6 +17229,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -5323,7 +5309,7 @@
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -16543,6 +17243,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -16544,6 +17244,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -5333,7 +5319,7 @@
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -16657,12 +17360,12 @@ with_gcc=$GCC
+@@ -16658,12 +17361,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -5349,7 +5335,7 @@
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -16749,9 +17452,6 @@ inherit_rpath=$inherit_rpath
+@@ -16750,9 +17453,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -5359,7 +5345,7 @@
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -16767,6 +17467,9 @@ include_expsyms=$lt_include_expsyms
+@@ -16768,6 +17468,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -5369,7 +5355,7 @@
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -16799,210 +17502,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -16800,210 +17503,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -5744,7 +5730,7 @@
chmod +x "$ofile"
diff --git a/gprof/configure b/gprof/configure
-index 679e0dce77..ac4c016a63 100755
+index 6b43bf2b18..245ee48bc3 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -631,8 +631,11 @@ OTOOL
@@ -7654,7 +7640,7 @@
chmod +x "$ofile"
diff --git a/ld/configure b/ld/configure
-index d7f66f8cdc..4e71511bd1 100755
+index 0cc6e8a50f..db8b998722 100755
--- a/ld/configure
+++ b/ld/configure
@@ -655,8 +655,11 @@ OTOOL
@@ -17336,7 +17322,7 @@
# These exist entirely to fool aclocal when bootstrapping libtool.
#
diff --git a/opcodes/configure b/opcodes/configure
-index 17530f54b9..79b39611c2 100755
+index 4f29887098..2127d39288 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -650,6 +650,9 @@ OTOOL
@@ -19240,7 +19226,7 @@
chmod +x "$ofile"
diff --git a/opcodes/configure.ac b/opcodes/configure.ac
-index a9fbfd61f1..c43780f64d 100644
+index b07f3f3629..5a32d9b1fc 100644
--- a/opcodes/configure.ac
+++ b/opcodes/configure.ac
@@ -167,7 +167,7 @@ changequote(,)dnl
@@ -21153,5 +21139,5 @@
chmod +x "$ofile"
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
index 8801960..4a51273 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
@@ -1,4 +1,4 @@
-From 2b87aad1741bc481dd0982f100ad5ea7f937bb61 Mon Sep 17 00:00:00 2001
+From 697903256e09533778baa8af66402c44d70219d9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:37:10 +0000
Subject: [PATCH 07/15] Add the armv5e architecture to binutils
@@ -19,10 +19,10 @@
1 file changed, 1 insertion(+)
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
-index a885efe4fc..735eaa7447 100644
+index ec50420518..a25d1721af 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
-@@ -25990,6 +25990,7 @@ static const struct arm_arch_option_table arm_archs[] =
+@@ -26195,6 +26195,7 @@ static const struct arm_arch_option_table arm_archs[] =
ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
@@ -31,5 +31,5 @@
ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
index 30a22b5..939be67 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
@@ -1,4 +1,4 @@
-From 331443a87a31ec504e5652fc099d9129a9a4deb8 Mon Sep 17 00:00:00 2001
+From 622d66634eb2e509d4126f5bdcab26de367241a1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:39:01 +0000
Subject: [PATCH 08/15] don't let the distro compiler point to the wrong
@@ -17,7 +17,7 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index 25cfa29ad5..ce67a710e3 100644
+index ed1b334c36..d4ffd8b57b 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -364,7 +364,8 @@ install-strip: install
@@ -31,5 +31,5 @@
if test -n "${target_header_dir}"; then \
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
index e0e2578..e751047 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -1,4 +1,4 @@
-From 0a4afdcf0700efd45963568e2d0049127cdf4434 Mon Sep 17 00:00:00 2001
+From 27e38ee92c24fca86b1c3f6ef156a1892dd06bfd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 15 Jan 2016 06:31:09 +0000
Subject: [PATCH 09/15] warn for uses of system directories when cross linking
@@ -77,7 +77,7 @@
#undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure
-index 4e71511bd1..71c6ad1fd1 100755
+index db8b998722..489ead5c13 100755
--- a/ld/configure
+++ b/ld/configure
@@ -789,6 +789,7 @@ with_lib_path
@@ -118,7 +118,7 @@
if test "${enable_gold+set}" = set; then :
enableval=$enable_gold; case "${enableval}" in
diff --git a/ld/configure.ac b/ld/configure.ac
-index 00080f85fd..3aa98e37fb 100644
+index bada1b50b0..d074a3820b 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
@@ -139,10 +139,10 @@
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
diff --git a/ld/ld.h b/ld/ld.h
-index c6fa1247f0..01c373498f 100644
+index ba914b921e..9df17dab6c 100644
--- a/ld/ld.h
+++ b/ld/ld.h
-@@ -174,6 +174,14 @@ typedef struct
+@@ -180,6 +180,14 @@ typedef struct
in the linker script. */
bfd_boolean force_group_allocation;
@@ -158,10 +158,10 @@
enum endian_enum endian;
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index ebe7e7b7bd..33aa2c62fa 100644
+index c89915f1aa..df430837e2 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
-@@ -2480,6 +2480,18 @@ string identifying the original linked file does not change.
+@@ -2498,6 +2498,18 @@ string identifying the original linked file does not change.
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -181,7 +181,7 @@
@c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 3b37a0a3e2..5c85b01849 100644
+index 6532a57d96..f943f0b2e5 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -116,6 +116,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
@@ -209,7 +209,7 @@
/* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 5aa7f6bc3e..cb655e0399 100644
+index 140ed1d9da..9965cbc04f 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -147,6 +147,8 @@ enum option_values
@@ -222,7 +222,7 @@
/* The initial parser states. */
diff --git a/ld/ldmain.c b/ld/ldmain.c
-index 2b09f20413..89e2a3a805 100644
+index c473ed24c3..adae0b4610 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -261,6 +261,8 @@ main (int argc, char **argv)
@@ -235,7 +235,7 @@
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
diff --git a/ld/lexsup.c b/ld/lexsup.c
-index effa277b16..e4929607e9 100644
+index f2191602d4..bccb3bdeef 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -538,6 +538,14 @@ static const struct ld_option ld_options[] =
@@ -269,5 +269,5 @@
}
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
index 496242e..33dfff9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
@@ -1,4 +1,4 @@
-From 88fac08f1c472c612f381cbb9408756f2f58b4ff Mon Sep 17 00:00:00 2001
+From e205ae05c41a8cc8d47708f0a3b6f740e2bf2526 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:42:38 +0000
Subject: [PATCH 10/15] Fix rpath in libtool when sysroot is enabled
@@ -48,5 +48,5 @@
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
index ac87a2d..80fcbc1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
@@ -1,4 +1,4 @@
-From 497660bdbeb6788786553a5d733105f7f898dc62 Mon Sep 17 00:00:00 2001
+From 7978c1299021033c35c29c94e0997235f7ede248 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:44:14 +0000
Subject: [PATCH 11/15] Change default emulation for mips64*-*-linux
@@ -14,10 +14,10 @@
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/bfd/config.bfd b/bfd/config.bfd
-index dc24aabad5..4511024f22 100644
+index f04a993f06..8777f96bd2 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
-@@ -1186,12 +1186,12 @@ case "${targ}" in
+@@ -1189,12 +1189,12 @@ case "${targ}" in
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
;;
mips64*el-*-linux*)
@@ -35,12 +35,12 @@
mips*el-*-linux*)
targ_defvec=mips_elf32_trad_le_vec
diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 47c719cd05..fe7b9238b2 100644
+index 6183a85b3d..1d78465590 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
-@@ -530,11 +530,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
+@@ -535,11 +535,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
- targ_extra_emuls="elf32elmipvxworks" ;;
+ targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
@@ -55,5 +55,5 @@
mips*el-*-linux-*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
index dc5e580..1fefb68 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
@@ -1,4 +1,4 @@
-From 8c60a55d3678589d93739bd27fec216911d80968 Mon Sep 17 00:00:00 2001
+From 3b40bf584615f794b85fd50d4d0a5c0a1d2ee7bf Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 14 Feb 2016 17:06:19 +0000
Subject: [PATCH 12/15] Add support for Netlogic XLP
@@ -34,7 +34,7 @@
14 files changed, 61 insertions(+), 21 deletions(-)
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
-index 3d38fda14b..0aec49bbb3 100644
+index eec9c4ad2a..3bf0a71e63 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -814,6 +814,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
@@ -46,34 +46,34 @@
arch_flags = M_MIPS2;
break;
diff --git a/bfd/archures.c b/bfd/archures.c
-index 433b95fa08..063b7943a1 100644
+index e83c57a2f3..3016ea1bae 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -201,6 +201,7 @@ DESCRIPTION
- .#define bfd_mach_mips_octeon3 6503
- .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *}
- .#define bfd_mach_mips_interaptiv_mr2 736550 {* decimal 'IA2' *}
-+.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP' *}
- .#define bfd_mach_mipsisa32 32
- .#define bfd_mach_mipsisa32r2 33
- .#define bfd_mach_mipsisa32r3 34
+ .#define bfd_mach_mips_octeon3 6503
+ .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR'. *}
+ .#define bfd_mach_mips_interaptiv_mr2 736550 {* decimal 'IA2'. *}
++.#define bfd_mach_mips_xlp 887680 {* decimal 'XLP'. *}
+ .#define bfd_mach_mipsisa32 32
+ .#define bfd_mach_mipsisa32r2 33
+ .#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index d126aed086..2b753b3a93 100644
+index 42991e7848..27abc5d5a8 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
-@@ -2060,6 +2060,7 @@ enum bfd_architecture
+@@ -2062,6 +2062,7 @@ enum bfd_architecture
#define bfd_mach_mips_octeon3 6503
- #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
- #define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2' */
-+#define bfd_mach_mips_xlp 887680 /* decimal 'XLP' */
+ #define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
+ #define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
++#define bfd_mach_mips_xlp 887680 /* decimal 'XLP'. */
#define bfd_mach_mipsisa32 32
#define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 4511024f22..f0f9072f10 100644
+index 8777f96bd2..7b80bda8c9 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
-@@ -1169,6 +1169,11 @@ case "${targ}" in
+@@ -1172,6 +1172,11 @@ case "${targ}" in
targ_defvec=mips_elf32_le_vec
targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
;;
@@ -86,7 +86,7 @@
targ_defvec=mips_elf32_be_vec
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
-index 2493094bef..8375d1ae96 100644
+index cb50c64371..2b9d1d6ecf 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -105,7 +105,8 @@ enum
@@ -100,7 +100,7 @@
#define NN(index) (&arch_info_struct[(index) + 1])
@@ -158,7 +159,8 @@ static const bfd_arch_info_type arch_info_struct[] =
- N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
+ N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", FALSE,
NN(I_interaptiv_mr2)),
- N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
@@ -110,10 +110,10 @@
/* The default architecture is mips:3000, but with a machine number of
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
-index fddf68c816..354c85d00b 100644
+index 285401367d..14ebb5f175 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
-@@ -6796,6 +6796,9 @@ _bfd_elf_mips_mach (flagword flags)
+@@ -6806,6 +6806,9 @@ _bfd_elf_mips_mach (flagword flags)
case E_MIPS_MACH_IAMR2:
return bfd_mach_mips_interaptiv_mr2;
@@ -123,7 +123,7 @@
default:
switch (flags & EF_MIPS_ARCH)
{
-@@ -11956,6 +11959,10 @@ mips_set_isa_flags (bfd *abfd)
+@@ -11963,6 +11966,10 @@ mips_set_isa_flags (bfd *abfd)
val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
break;
@@ -134,7 +134,7 @@
case bfd_mach_mipsisa32:
val = E_MIPS_ARCH_32;
break;
-@@ -13989,6 +13996,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
+@@ -13936,6 +13943,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
{ bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
{ bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
{ bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
@@ -143,10 +143,10 @@
/* MIPS64 extensions. */
{ bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 2b15f0f2cb..092744708e 100644
+index ae1cda9a7b..fed0387a94 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
-@@ -3335,6 +3335,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
+@@ -3370,6 +3370,7 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
case E_MIPS_MACH_IAMR2: strcat (buf, ", interaptiv-mr2"); break;
@@ -155,7 +155,7 @@
/* We simply ignore the field in this case to avoid confusion:
MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
-index 3804df2958..9576c986db 100644
+index c135131b59..d8fbda8e31 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -552,6 +552,7 @@ static int mips_32bitmode = 0;
@@ -174,7 +174,7 @@
)
/* Whether the processor uses hardware interlocks to protect reads
-@@ -19738,7 +19740,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
+@@ -19737,7 +19739,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
/* Broadcom XLP.
XLP is mostly like XLR, with the prominent exception that it is
MIPS64R2 rather than MIPS64. */
@@ -184,7 +184,7 @@
/* MIPS 64 Release 6 */
{ "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
diff --git a/gas/configure b/gas/configure
-index 81dd4cbd97..95bdf3b19b 100755
+index a40ac2144f..65a6995243 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12989,6 +12989,9 @@ _ACEOF
@@ -198,7 +198,7 @@
mips_cpu=r3900
;;
diff --git a/include/elf/mips.h b/include/elf/mips.h
-index a4bea43ff8..73d904e25f 100644
+index 9de0b4e175..74fc4f7e55 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
@@ -210,7 +210,7 @@
#define E_MIPS_MACH_OCTEON3 0x008e0000
#define E_MIPS_MACH_5400 0x00910000
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
-index ceae9ec50a..276ee3c6c1 100644
+index 5eea72f139..90f6d57e15 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -1259,6 +1259,8 @@ static const unsigned int mips_isa_table[] = {
@@ -241,10 +241,10 @@
return FALSE;
}
diff --git a/ld/configure.tgt b/ld/configure.tgt
-index fe7b9238b2..2adf108b17 100644
+index 1d78465590..307e787b64 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
-@@ -516,6 +516,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
+@@ -521,6 +521,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
@@ -254,7 +254,7 @@
targ_extra_emuls="elf32lr5900"
targ_extra_libpath=$targ_extra_emuls ;;
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
-index 45195007c1..4a80a05d19 100644
+index 984fcbb802..95b107d216 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -655,13 +655,11 @@ const struct mips_arch_choice mips_arch_choices[] =
@@ -277,7 +277,7 @@
/* This entry, mips16, is here only for ISA/processor selection; do
not print its name. */
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
-index 19fca408c9..d02069c528 100644
+index 180d613c93..65b7b8cc23 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -328,6 +328,7 @@ decode_mips_operand (const char *p)
@@ -389,5 +389,5 @@
{"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
{"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 },
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
index 247376b..c3e1b13 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
@@ -1,4 +1,4 @@
-From e46202becab625c6c08caf91e08ccbbc1bf799c4 Mon Sep 17 00:00:00 2001
+From 27ec22ca3cd56cfdf060d2e1f414bedce269b322 Mon Sep 17 00:00:00 2001
From: Zhenhua Luo <zhenhua.luo@nxp.com>
Date: Sat, 11 Jun 2016 22:08:29 -0500
Subject: [PATCH 13/15] fix the incorrect assembling for ppc wait mnemonic
@@ -11,10 +11,10 @@
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
-index 426261ab21..0d35916cdd 100644
+index bb17f26c2e..dbdd762b4e 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
-@@ -4881,7 +4881,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -5338,7 +5338,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"ldepx", X(31,29), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
{"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}},
@@ -22,7 +22,7 @@
{"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
-@@ -4935,7 +4934,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -5392,7 +5391,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
{"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
@@ -32,5 +32,5 @@
{"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}},
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
index 42b1065..cf3690f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
@@ -1,4 +1,4 @@
-From bf20d5823662d1f2eb47de2cdfd173627a205b17 Mon Sep 17 00:00:00 2001
+From 7dfbd6889d868a09d695dd2736104848c1a9c9c3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 31 Mar 2017 11:42:03 -0700
Subject: [PATCH 14/15] Detect 64-bit MIPS targets
@@ -14,7 +14,7 @@
1 file changed, 14 insertions(+)
diff --git a/gold/configure.tgt b/gold/configure.tgt
-index 3d63027297..c1f92a1360 100644
+index 8aef22a318..7030026ffa 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -153,6 +153,13 @@ aarch64*-*)
@@ -46,5 +46,5 @@
targ_obj=mips
targ_machine=EM_MIPS
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
index 2c8900c..8c9fd23 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch
@@ -1,4 +1,4 @@
-From 9b456a0e4f284fd41ac36595144ed44dc82410ee Mon Sep 17 00:00:00 2001
+From 298804f430939d6cc94b09732ee93e64c5e6be18 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Mon, 6 Mar 2017 23:33:27 -0800
Subject: [PATCH 15/15] sync with OE libtool changes
@@ -85,5 +85,5 @@
elif test -n "$runpath_var"; then
case "$finalize_perm_rpath " in
--
-2.14.0
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.30.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.30.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/m4.patch b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/m4.patch
deleted file mode 100644
index d139da5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/m4.patch
+++ /dev/null
@@ -1,414 +0,0 @@
-Upstream-Status: Pending
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
-Index: bison-2.4.2/m4/lcmessage.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/lcmessage.m4
-@@ -0,0 +1,32 @@
-+# lcmessage.m4 serial 3 (gettext-0.11.3)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+dnl
-+dnl This file can can be used in projects which are not available under
-+dnl the GNU General Public License or the GNU Library General Public
-+dnl License but which still want to provide support for the GNU gettext
-+dnl functionality.
-+dnl Please note that the actual code of the GNU gettext library is covered
-+dnl by the GNU Library General Public License, and the rest of the GNU
-+dnl gettext package package is covered by the GNU General Public License.
-+dnl They are *not* in the public domain.
-+
-+dnl Authors:
-+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
-+
-+# Check whether LC_MESSAGES is available in <locale.h>.
-+
-+AC_DEFUN([AM_LC_MESSAGES],
-+[
-+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-+ if test $am_cv_val_LC_MESSAGES = yes; then
-+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
-+ [Define if your <locale.h> file defines LC_MESSAGES.])
-+ fi
-+])
-Index: bison-2.4.2/m4/uintmax_t.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/uintmax_t.m4
-@@ -0,0 +1,29 @@
-+# uintmax_t.m4 serial 6 (gettext-0.11)
-+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_PREREQ(2.13)
-+
-+# Define uintmax_t to `unsigned long' or `unsigned long long'
-+# if <inttypes.h> does not exist.
-+
-+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
-+[
-+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
-+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
-+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
-+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
-+ test $ac_cv_type_unsigned_long_long = yes \
-+ && ac_type='unsigned long long' \
-+ || ac_type='unsigned long'
-+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
-+ [Define to unsigned long or unsigned long long
-+ if <inttypes.h> and <stdint.h> don't define.])
-+ fi
-+])
-Index: bison-2.4.2/m4/ulonglong.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/ulonglong.m4
-@@ -0,0 +1,23 @@
-+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
-+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Paul Eggert.
-+
-+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
-+[
-+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
-+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
-+ [unsigned long long ullmax = (unsigned long long) -1;
-+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
-+ ac_cv_type_unsigned_long_long=yes,
-+ ac_cv_type_unsigned_long_long=no)])
-+ if test $ac_cv_type_unsigned_long_long = yes; then
-+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
-+ [Define if you have the unsigned long long type.])
-+ fi
-+])
-Index: bison-2.4.2/m4/intdiv0.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/intdiv0.m4
-@@ -0,0 +1,72 @@
-+# intdiv0.m4 serial 1 (gettext-0.11.3)
-+dnl Copyright (C) 2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+dnl From Bruno Haible.
-+
-+AC_DEFUN([gt_INTDIV0],
-+[
-+ AC_REQUIRE([AC_PROG_CC])dnl
-+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
-+
-+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
-+ gt_cv_int_divbyzero_sigfpe,
-+ [
-+ AC_TRY_RUN([
-+#include <stdlib.h>
-+#include <signal.h>
-+
-+static void
-+#ifdef __cplusplus
-+sigfpe_handler (int sig)
-+#else
-+sigfpe_handler (sig) int sig;
-+#endif
-+{
-+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
-+ exit (sig != SIGFPE);
-+}
-+
-+int x = 1;
-+int y = 0;
-+int z;
-+int nan;
-+
-+int main ()
-+{
-+ signal (SIGFPE, sigfpe_handler);
-+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
-+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
-+ signal (SIGTRAP, sigfpe_handler);
-+#endif
-+/* Linux/SPARC yields signal SIGILL. */
-+#if defined (__sparc__) && defined (__linux__)
-+ signal (SIGILL, sigfpe_handler);
-+#endif
-+
-+ z = x / y;
-+ nan = y / y;
-+ exit (1);
-+}
-+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
-+ [
-+ # Guess based on the CPU.
-+ case "$host_cpu" in
-+ alpha* | i[34567]86 | m68k | s390*)
-+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
-+ *)
-+ gt_cv_int_divbyzero_sigfpe="guessing no";;
-+ esac
-+ ])
-+ ])
-+ case "$gt_cv_int_divbyzero_sigfpe" in
-+ *yes) value=1;;
-+ *) value=0;;
-+ esac
-+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
-+ [Define if integer division by zero raises signal SIGFPE.])
-+])
-Index: bison-2.4.2/m4/glib.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/glib.m4
-@@ -0,0 +1,196 @@
-+# Configure paths for GLIB
-+# Owen Taylor 97-11-3
-+
-+dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
-+dnl gthread is specified in MODULES, pass to glib-config
-+dnl
-+AC_DEFUN(AM_PATH_GLIB,
-+[dnl
-+dnl Get the cflags and libraries from the glib-config script
-+dnl
-+AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
-+ glib_config_prefix="$withval", glib_config_prefix="")
-+AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
-+ glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
-+AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
-+ , enable_glibtest=yes)
-+
-+ if test x$glib_config_exec_prefix != x ; then
-+ glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
-+ if test x${GLIB_CONFIG+set} != xset ; then
-+ GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
-+ fi
-+ fi
-+ if test x$glib_config_prefix != x ; then
-+ glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
-+ if test x${GLIB_CONFIG+set} != xset ; then
-+ GLIB_CONFIG=$glib_config_prefix/bin/glib-config
-+ fi
-+ fi
-+
-+ for module in . $4
-+ do
-+ case "$module" in
-+ gmodule)
-+ glib_config_args="$glib_config_args gmodule"
-+ ;;
-+ gthread)
-+ glib_config_args="$glib_config_args gthread"
-+ ;;
-+ esac
-+ done
-+
-+ AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
-+ min_glib_version=ifelse([$1], ,0.99.7,$1)
-+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
-+ no_glib=""
-+ if test "$GLIB_CONFIG" = "no" ; then
-+ no_glib=yes
-+ else
-+ GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
-+ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
-+ glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-+ glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-+ glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
-+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-+ if test "x$enable_glibtest" = "xyes" ; then
-+ ac_save_CFLAGS="$CFLAGS"
-+ ac_save_LIBS="$LIBS"
-+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+ LIBS="$GLIB_LIBS $LIBS"
-+dnl
-+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
-+dnl checks the results of glib-config to some extent
-+dnl
-+ rm -f conf.glibtest
-+ AC_TRY_RUN([
-+#include <glib.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+
-+int
-+main ()
-+{
-+ int major, minor, micro;
-+ char *tmp_version;
-+
-+ system ("touch conf.glibtest");
-+
-+ /* HP/UX 9 (%@#!) writes to sscanf strings */
-+ tmp_version = g_strdup("$min_glib_version");
-+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
-+ printf("%s, bad version string\n", "$min_glib_version");
-+ exit(1);
-+ }
-+
-+ if ((glib_major_version != $glib_config_major_version) ||
-+ (glib_minor_version != $glib_config_minor_version) ||
-+ (glib_micro_version != $glib_config_micro_version))
-+ {
-+ printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
-+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ printf ("*** was found! If glib-config was correct, then it is best\n");
-+ printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
-+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-+ printf("*** required on your system.\n");
-+ printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
-+ printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
-+ printf("*** before re-running configure\n");
-+ }
-+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
-+ (glib_minor_version != GLIB_MINOR_VERSION) ||
-+ (glib_micro_version != GLIB_MICRO_VERSION))
-+ {
-+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
-+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
-+ printf("*** library (version %d.%d.%d)\n",
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ }
-+ else
-+ {
-+ if ((glib_major_version > major) ||
-+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
-+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
-+ {
-+ return 0;
-+ }
-+ else
-+ {
-+ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
-+ glib_major_version, glib_minor_version, glib_micro_version);
-+ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
-+ major, minor, micro);
-+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
-+ printf("***\n");
-+ printf("*** If you have already installed a sufficiently new version, this error\n");
-+ printf("*** probably means that the wrong copy of the glib-config shell script is\n");
-+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
-+ printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
-+ printf("*** correct copy of glib-config. (In this case, you will have to\n");
-+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-+ printf("*** so that the correct libraries are found at run-time))\n");
-+ }
-+ }
-+ return 1;
-+}
-+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-+ CFLAGS="$ac_save_CFLAGS"
-+ LIBS="$ac_save_LIBS"
-+ fi
-+ fi
-+ if test "x$no_glib" = x ; then
-+ AC_MSG_RESULT(yes)
-+ ifelse([$2], , :, [$2])
-+ else
-+ AC_MSG_RESULT(no)
-+ if test "$GLIB_CONFIG" = "no" ; then
-+ echo "*** The glib-config script installed by GLIB could not be found"
-+ echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
-+ echo "*** your path, or set the GLIB_CONFIG environment variable to the"
-+ echo "*** full path to glib-config."
-+ else
-+ if test -f conf.glibtest ; then
-+ :
-+ else
-+ echo "*** Could not run GLIB test program, checking why..."
-+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
-+ LIBS="$LIBS $GLIB_LIBS"
-+ AC_TRY_LINK([
-+#include <glib.h>
-+#include <stdio.h>
-+], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
-+ [ echo "*** The test program compiled, but did not run. This usually means"
-+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
-+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
-+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
-+ echo "*** is required on your system"
-+ echo "***"
-+ echo "*** If you have an old version installed, it is best to remove it, although"
-+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
-+ echo "***"
-+ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
-+ echo "*** came with the system with the command"
-+ echo "***"
-+ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
-+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
-+ echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
-+ echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
-+ echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
-+ CFLAGS="$ac_save_CFLAGS"
-+ LIBS="$ac_save_LIBS"
-+ fi
-+ fi
-+ GLIB_CFLAGS=""
-+ GLIB_LIBS=""
-+ ifelse([$3], , :, [$3])
-+ fi
-+ AC_SUBST(GLIB_CFLAGS)
-+ AC_SUBST(GLIB_LIBS)
-+ rm -f conf.glibtest
-+])
-Index: bison-2.4.2/m4/isc-posix.m4
-===================================================================
---- /dev/null
-+++ bison-2.4.2/m4/isc-posix.m4
-@@ -0,0 +1,26 @@
-+# isc-posix.m4 serial 2 (gettext-0.11.2)
-+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-+dnl This file is free software, distributed under the terms of the GNU
-+dnl General Public License. As a special exception to the GNU General
-+dnl Public License, this file may be distributed as part of a program
-+dnl that contains a configuration script generated by Autoconf, under
-+dnl the same distribution terms as the rest of that program.
-+
-+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
-+
-+# This test replaces the one in autoconf.
-+# Currently this macro should have the same name as the autoconf macro
-+# because gettext's gettext.m4 (distributed in the automake package)
-+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-+# give these diagnostics:
-+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-+
-+undefine([AC_ISC_POSIX])
-+
-+AC_DEFUN([AC_ISC_POSIX],
-+ [
-+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
-+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
-+ ]
-+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
index 7d066be..58728f5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
@@ -10,7 +10,6 @@
DEPENDS = "bison-native flex-native"
SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
- file://m4.patch \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://dont-depend-on-help2man.patch.patch \
file://0001-src-local.mk-fix-parallel-issue.patch \
@@ -23,9 +22,9 @@
SRC_URI[md5sum] = "c342201de104cc9ce0a21e0ad10d4021"
SRC_URI[sha256sum] = "a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1"
-DEPENDS_class-native = "gettext-minimal-native"
-
inherit autotools gettext texinfo
+
+# The automatic m4 path detection gets confused, so force the right value
acpaths = "-I ${S}/m4"
do_compile_prepend() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
index a310135..b3c889b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
@@ -90,7 +90,7 @@
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-SRC_URI = "git://github.com/mmeeks/bootchart.git \
+SRC_URI = "git://github.com/xrmx/bootchart.git \
file://bootchartd_stop.sh \
file://0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch \
file://0001-collector-Allocate-space-on-heap-for-chunks.patch \
@@ -139,7 +139,7 @@
PACKAGES =+ "pybootchartgui"
FILES_pybootchartgui += "${PYTHON_SITEPACKAGES_DIR}/pybootchartgui ${bindir}/pybootchartgui"
-RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs"
+RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-shell python3-compression python3-codecs"
RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
RDEPENDS_${PN}_class-target += "lsb"
DEPENDS_append_class-native = " python3-pycairo-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch
new file mode 100644
index 0000000..790676b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch
@@ -0,0 +1,26 @@
+From bc35c4caebb57cc8b96c30c25432b12ca8dc18d5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 6 Oct 2017 15:03:49 +0300
+Subject: [PATCH] Fix build with musl (missing header include for dev_t).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ convert/source-fs.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/convert/source-fs.h b/convert/source-fs.h
+index 23f3356..6fd770f 100644
+--- a/convert/source-fs.h
++++ b/convert/source-fs.h
+@@ -20,6 +20,7 @@
+ #include "kerncompat.h"
+ #include <linux/kdev_t.h>
+ #include <pthread.h>
++#include <sys/types.h>
+
+ #define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID
+
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
index a81900e..467de32 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
@@ -12,19 +12,16 @@
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Makefile b/Makefile
-index b3e2b63..347aaf1 100644
---- a/Makefile
-+++ b/Makefile
-@@ -323,7 +323,7 @@ version.h: version.sh version.h.in configure.ac
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -343,7 +343,7 @@ version.h: version.sh version.h.in confi
mktables: kernel-lib/mktables.c
@echo " [CC] $@"
- $(Q)$(CC) $(CFLAGS) $< -o $@
+ $(Q)$(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
- kernel-lib/tables.c: mktables
- @echo " [TABLE] $@"
---
-2.13.2
-
+ # the target can be regenerated manually using mktables, but a local copy is
+ # kept so the build process is simpler
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb
similarity index 82%
rename from import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb
index c3cc89c..bc157e2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb
@@ -14,13 +14,17 @@
DEPENDS_append_class-target = " udev"
RDEPENDS_${PN} = "libgcc"
-SRCREV = "0607132c3200bcead1426e6dc685432008de95de"
+SRCREV = "a7a1ea0f4f2a1d6eeeb3d106e062c7f1034f16d4"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
file://0001-Makefile-build-mktables-using-native-gcc.patch \
+ file://0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch \
"
+RECIPE_NO_UPDATE_REASON = "Waiting for resolution of https://github.com/kdave/btrfs-progs/issues/109"
inherit autotools-brokensep pkgconfig manpages
+CLEANBROKEN = "1"
+
PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
index 84d04cf..efcf6b6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
@@ -22,7 +22,7 @@
SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
PE = "1"
PV = "2015.02.10+git${SRCPV}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.4.bb
deleted file mode 100644
index 1e535b1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.4.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ccache.inc
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7fe21f9470f2305e95e7d8a632255079"
-
-SRC_URI[md5sum] = "95ab3c56284129cc2a32460c23069516"
-SRC_URI[sha256sum] = "24f15bf389e38c41548c9c259532187774ec0cb9686c3497bbb75504c8dc404f"
-
-SRC_URI += " \
- file://0002-dev.mk.in-fix-file-name-too-long.patch \
- file://Revert-Create-man-page-in-the-make-install-from-git-.patch \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.5.bb
new file mode 100644
index 0000000..929f0f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.3.5.bb
@@ -0,0 +1,12 @@
+require ccache.inc
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=dae379a85bb6e9d594773e0aa64876f6"
+
+SRC_URI[md5sum] = "eee58db7cce892febddb989308dc568f"
+SRC_URI[sha256sum] = "190576a6e938760ec8113523e6fd380141117303e90766cc4802e770422b30c6"
+
+SRC_URI += " \
+ file://0002-dev.mk.in-fix-file-name-too-long.patch \
+ file://Revert-Create-man-page-in-the-make-install-from-git-.patch \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch b/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
index 837cfad..3f01c69 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/0002-dev.mk.in-fix-file-name-too-long.patch
@@ -14,10 +14,10 @@
dev.mk.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/dev.mk.in b/dev.mk.in
-index 1261ad3..ec55ac4 100644
---- a/dev.mk.in
-+++ b/dev.mk.in
+Index: ccache-3.3.4/dev.mk.in
+===================================================================
+--- ccache-3.3.4.orig/dev.mk.in
++++ ccache-3.3.4/dev.mk.in
@@ -1,7 +1,7 @@
# GNU make syntax reigns in this file.
@@ -26,7 +26,4 @@
+all_cppflags += -MD -MP -MF .deps/$(subst .._,,$(subst /,_,$(subst $(srcdir)/,,$<))).d
ASCIIDOC = asciidoc
- GPERF = gperf
---
-1.7.9.5
-
+ CPPCHECK = cppcheck
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb b/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
index 0e0be62..78e1565 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
@@ -8,6 +8,7 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2"
+UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b"
SRC_URI[sha256sum] = "ed282eb6276c4154ce6a0b5dee0bdb81940d0cbbfc7d03f769c4735ef5f5860f"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.10.3.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.10.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
index 6aeb25f..394c9eb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
@@ -6,41 +6,23 @@
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
SECTION = "console/utils"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=8d8c7bc32f8797d23f5cf605d9339d2d \
- file://Source/cmake.h;beginline=1;endline=3;md5=4494dee184212fc89c469c3acd555a14"
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=79b5b78197c74d5c5f9c7ccadeee4e8c \
+ file://Source/cmake.h;md5=4494dee184212fc89c469c3acd555a14;beginline=1;endline=3 \
+ "
CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
file://support-oe-qt4-tools-names.patch \
file://qt4-fail-silent.patch \
- file://0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch \
+ file://cmake-Prevent-the-detection-of-Qt5.patch \
+ file://0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch \
+ file://0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch \
+ file://0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch \
+ file://0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch \
"
-SRC_URI[md5sum] = "b5dff61f6a7f1305271ab3f6ae261419"
-SRC_URI[sha256sum] = "da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d"
+SRC_URI[md5sum] = "1c38c67295ca696aeafd8c059d748b38"
+SRC_URI[sha256sum] = "0c3a1dcf0be03e40cf4f341dda79c96ffb6c35ae35f2f911845b72dab3559cf8"
UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
-
-# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
-# and possibly missing qmake binary (qtbase-native can be removed from sysroot
-# e.g. in order to upgrade it, even when there is target qtbase)
-
-# Fixes errors like this in cmake(-native).do_configure:
-#| -- Performing Test run_pic_test - Success
-#| CMake Error at tmp-eglibc/sysroots/qemuarm/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
-#| The imported target "Qt5::Core" references the file
-#|
-#| "/qmake"
-#|
-#| but this file does not exist. Possible reasons include:
-
-do_configure_prepend() {
- sed -i 's/^find_package(Qt5Core QUIET)$/#find_package(Qt5Core QUIET)/g' ${S}/Tests/RunCMake/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets QUIET NO_MODULE)/# find_package(Qt5Widgets QUIET NO_MODULE)/g' ${S}/Tests/CMakeLists.txt
- sed -i 's/^find_package(Qt5Widgets QUIET)/#find_package(Qt5Widgets QUIET)/g' ${S}/Source/QtDialog/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutoUicInterface/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch
new file mode 100644
index 0000000..fda60e3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Boost-1.66.0-dependency-and-release-update.patch
@@ -0,0 +1,52 @@
+From 433a2d495a2481c63b82c11a30f7c642d6abe63f Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 19:55:49 +1100
+Subject: [PATCH] FindBoost: Boost 1.66.0 dependency and release update
+
+Release notes: http://www.boost.org/users/history/version_1_66_0.html
+
+* All new libraries are header-only.
+* _Boost_COMPONENT_DEPENDENCIES is unchanged from 1.65.1
+* _Boost_FIBER_COMPILER_FEATURES is unchanged from 1.64.0
+
+Upstream-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -797,7 +797,7 @@ function(_Boost_COMPONENT_DEPENDENCIES c
+ set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ endif()
+- if(NOT Boost_VERSION VERSION_LESS 106600)
++ if(NOT Boost_VERSION VERSION_LESS 106700)
+ message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
+ set(_Boost_IMPORTED_TARGETS FALSE)
+ endif()
+@@ -931,8 +931,8 @@ endfunction()
+ # `${Boost_ROOT}/libs/fiber/build/Jamfile.v2`.
+ #
+ function(_Boost_COMPILER_FEATURES component _ret)
+- # Boost >= 1.62 and < 1.65
+- if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106500)
++ # Boost >= 1.62 and < 1.67
++ if(NOT Boost_VERSION VERSION_LESS 106200 AND Boost_VERSION VERSION_LESS 106700)
+ set(_Boost_FIBER_COMPILER_FEATURES
+ cxx_alias_templates
+ cxx_auto_type
+@@ -1038,7 +1038,7 @@ else()
+ # _Boost_COMPONENT_HEADERS. See the instructions at the top of
+ # _Boost_COMPONENT_DEPENDENCIES.
+ set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
+- "1.65.1" "1.65.0" "1.65"
++ "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
+ "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
+ "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
+ "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch
new file mode 100644
index 0000000..a45eda5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindBoost-Fix-incorrect-alphabetisation-of-headers-l.patch
@@ -0,0 +1,29 @@
+From b1e9f67137733bc109d355450fcd06edda4784c5 Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 20:07:31 +1100
+Subject: [PATCH 1/6] FindBoost: Fix incorrect alphabetisation of headers list
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -831,8 +831,8 @@ function(_Boost_COMPONENT_HEADERS compon
+ set(_Boost_CONTAINER_HEADERS "boost/container/container_fwd.hpp")
+ set(_Boost_CONTEXT_HEADERS "boost/context/all.hpp")
+ set(_Boost_COROUTINE_HEADERS "boost/coroutine/all.hpp")
+- set(_Boost_EXCEPTION_HEADERS "boost/exception/exception.hpp")
+ set(_Boost_DATE_TIME_HEADERS "boost/date_time/date.hpp")
++ set(_Boost_EXCEPTION_HEADERS "boost/exception/exception.hpp")
+ set(_Boost_FIBER_HEADERS "boost/fiber/all.hpp")
+ set(_Boost_FILESYSTEM_HEADERS "boost/filesystem/path.hpp")
+ set(_Boost_GRAPH_HEADERS "boost/graph/adjacency_list.hpp")
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
deleted file mode 100644
index 9b820db..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 46d25e782ebd9b6c50771b6f30433c58fae03a51 Mon Sep 17 00:00:00 2001
-From: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
-Date: Mon, 26 Jun 2017 11:30:07 -0400
-Subject: [PATCH] cmake: Use find_program if find_host_program is not
- available
-
-CMake does not define the `find_host_program` command we've been using
-in the cross-compiling code path. It was provided by a widely used
-Android toolchain file. For compatibility, continue to use
-`find_host_program` if available, but otherwise use just `find_program`.
-
-Upstream-Status: Accepted
-[https://gitlab.kitware.com/cmake/cmake/merge_requests/1009]
- - Will be in 3.10
-
-Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
----
- Modules/FindCUDA.cmake | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
-index a4dca54..77ca351 100644
---- a/Modules/FindCUDA.cmake
-+++ b/Modules/FindCUDA.cmake
-@@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING)
- # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers
- set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}")
- macro( cuda_find_host_program )
-- find_host_program( ${ARGN} )
-+ if (COMMAND find_host_program)
-+ find_host_program( ${ARGN} )
-+ else()
-+ find_program( ${ARGN} )
-+ endif()
- endmacro()
- else()
- # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch
new file mode 100644
index 0000000..88301c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0002-FindBoost-Implement-Architecture-and-Address-Model-t.patch
@@ -0,0 +1,132 @@
+From b044f69a413123f15a05034c00a8e3763764a1e5 Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 21:50:54 +1100
+Subject: [PATCH 2/6] FindBoost: Implement "Architecture and Address Model" tag
+
+This tag is new in Boost 1.66.0, and is present in the 'versioned'
+library file name layout.
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 52 +++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 42 insertions(+), 10 deletions(-)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -1385,8 +1385,11 @@ if(Boost_DEBUG)
+ endif()
+
+ #======================
+-# Systematically build up the Boost ABI tag
+-# http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming
++# Systematically build up the Boost ABI tag for the 'tagged' and 'versioned' layouts
++# http://boost.org/doc/libs/1_66_0/more/getting_started/windows.html#library-naming
++# http://boost.org/doc/libs/1_66_0/boost/config/auto_link.hpp
++# http://boost.org/doc/libs/1_66_0/tools/build/src/tools/common.jam
++# http://boost.org/doc/libs/1_66_0/boostcpp.jam
+ set( _boost_RELEASE_ABI_TAG "-")
+ set( _boost_DEBUG_ABI_TAG "-")
+ # Key Use this library when:
+@@ -1418,11 +1421,40 @@ if(Boost_USE_STLPORT)
+ string(APPEND _boost_DEBUG_ABI_TAG "p")
+ endif()
+ # n using the STLport deprecated "native iostreams" feature
++# removed from the documentation in 1.43.0 but still present in
++# boost/config/auto_link.hpp
+ if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
+ string(APPEND _boost_RELEASE_ABI_TAG "n")
+ string(APPEND _boost_DEBUG_ABI_TAG "n")
+ endif()
+
++# -x86 Architecture and address model tag
++# First character is the architecture, then word-size, either 32 or 64
++# Only used in 'versioned' layout, added in Boost 1.66.0
++set(_boost_ARCHITECTURE_TAG "")
++# {CMAKE_CXX_COMPILER_ARCHITECTURE_ID} is not currently set for all compilers
++if(NOT "x${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "x" AND NOT Boost_VERSION VERSION_LESS 106600)
++ string(APPEND _boost_ARCHITECTURE_TAG "-")
++ # This needs to be kept in-sync with the section of CMakePlatformId.h.in
++ # inside 'defined(_WIN32) && defined(_MSC_VER)'
++ if(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "IA64")
++ string(APPEND _boost_ARCHITECTURE_TAG "i")
++ elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "X86"
++ OR ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "x64")
++ string(APPEND _boost_ARCHITECTURE_TAG "x")
++ elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} MATCHES "^ARM")
++ string(APPEND _boost_ARCHITECTURE_TAG "a")
++ elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "MIPS")
++ string(APPEND _boost_ARCHITECTURE_TAG "m")
++ endif()
++
++ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
++ string(APPEND _boost_ARCHITECTURE_TAG "64")
++ else()
++ string(APPEND _boost_ARCHITECTURE_TAG "32")
++ endif()
++endif()
++
+ if(Boost_DEBUG)
+ message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
+@@ -1616,22 +1648,22 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+ unset(_boost_RELEASE_NAMES)
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_RELEASE_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_RELEASE_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
+ if(_boost_STATIC_RUNTIME_WORKAROUND)
+ set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_RELEASE_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_RELEASE_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
+@@ -1666,11 +1698,11 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+ unset(_boost_DEBUG_NAMES)
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_DEBUG_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_DEBUG_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
+@@ -1678,11 +1710,11 @@ foreach(COMPONENT ${Boost_FIND_COMPONENT
+ set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
+ foreach(compiler IN LISTS _boost_COMPILER)
+ list(APPEND _boost_DEBUG_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endforeach()
+ list(APPEND _boost_DEBUG_NAMES
+- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
++ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endif()
+ if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch
new file mode 100644
index 0000000..5178f5c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0003-FindBoost-Search-for-upstream-packaged-libs-next-to-.patch
@@ -0,0 +1,31 @@
+From d56deff7d127b030739bd0034609d0046121d8cd Mon Sep 17 00:00:00 2001
+From: "Paul \"TBBle\" Hampson" <Paul.Hampson@Pobox.com>
+Date: Fri, 29 Dec 2017 22:38:36 +1100
+Subject: [PATCH 3/6] FindBoost: Search for upstream-packaged libs next to
+ includes
+
+Upstream packages Boost binaries for Windows with the 'boost' directory
+(the INCLUDE_DIR) next to the lib-... directory (the LIBRARY_DIR).
+
+Affects cmake < 3.11.0
+
+Upsteam-Status: Backport
+[Yocto 12762]
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+---
+ Modules/FindBoost.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: cmake-3.10.3/Modules/FindBoost.cmake
+===================================================================
+--- cmake-3.10.3.orig/Modules/FindBoost.cmake
++++ cmake-3.10.3/Modules/FindBoost.cmake
+@@ -1502,6 +1502,7 @@ foreach(c DEBUG RELEASE)
+ ${Boost_INCLUDE_DIR}/stage/lib
+ )
+ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}/..")
++ _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}")
+ if( Boost_NO_SYSTEM_PATHS )
+ list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+ else()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch
new file mode 100644
index 0000000..88b7e94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/cmake-Prevent-the-detection-of-Qt5.patch
@@ -0,0 +1,215 @@
+From 875c11dbf87d1258ad7d3697a40d605d503e5673 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Wed, 17 Jan 2018 10:02:14 -0200
+Subject: [PATCH] cmake: Prevent the detection of Qt5
+Organization: O.S. Systems Software LTDA.
+
+CMake doesn't have dependency on qt4/qt5, so these tests usually fail
+but still can cause undeterministic results or build failures (when
+OE_QMAKE_PATH_EXTERNAL_HOST_BINS is undefined or native qmake removed
+while running the test in cmake)
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Source/QtDialog/CMakeLists.txt | 2 +-
+ Tests/CMakeLists.txt | 2 +-
+ Tests/Qt4And5Automoc/CMakeLists.txt | 4 ++--
+ Tests/QtAutoUicInterface/CMakeLists.txt | 2 +-
+ Tests/QtAutogen/CMakeLists.txt | 2 +-
+ Tests/QtAutogen/macosFW/CMakeLists.txt | 2 +-
+ Tests/QtAutogen/mocDepends/CMakeLists.txt | 2 +-
+ Tests/QtAutogenRerun/CMakeLists.txt | 4 ++--
+ Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt | 2 +-
+ Tests/QtAutogenRerun/mocRerun/CMakeLists.txt | 2 +-
+ Tests/QtAutogenRerun/rccDepends/CMakeLists.txt | 2 +-
+ Tests/RunCMake/CMakeLists.txt | 2 +-
+ Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake | 2 +-
+ 13 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
+index b38797bca..b5fbfc5fa 100644
+--- a/Source/QtDialog/CMakeLists.txt
++++ b/Source/QtDialog/CMakeLists.txt
+@@ -6,7 +6,7 @@ if(POLICY CMP0020)
+ cmake_policy(SET CMP0020 NEW) # Drop when CMake >= 2.8.11 required
+ endif()
+ CMake_OPTIONAL_COMPONENT(cmake-gui)
+-find_package(Qt5Widgets QUIET)
++#find_package(Qt5Widgets QUIET)
+ if (Qt5Widgets_FOUND)
+ include_directories(${Qt5Widgets_INCLUDE_DIRS})
+ add_definitions(${Qt5Widgets_DEFINITONS})
+diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
+index 533788a44..32ef03c55 100644
+--- a/Tests/CMakeLists.txt
++++ b/Tests/CMakeLists.txt
+@@ -1260,7 +1260,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
+ set(CMake_TEST_Qt5 1)
+ endif()
+ if(CMake_TEST_Qt5)
+- find_package(Qt5Widgets QUIET NO_MODULE)
++ #find_package(Qt5Widgets QUIET NO_MODULE)
+ endif()
+ if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND)
+ add_test(NAME Qt5Autogen COMMAND ${CMAKE_CTEST_COMMAND}
+diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt
+index ad74961d9..a9dd74b15 100644
+--- a/Tests/Qt4And5Automoc/CMakeLists.txt
++++ b/Tests/Qt4And5Automoc/CMakeLists.txt
+@@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 2.8.12)
+ project(Qt4And5Automoc)
+
+ if (QT_REVERSE_FIND_ORDER)
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ find_package(Qt4 REQUIRED)
+ else()
+ find_package(Qt4 REQUIRED)
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ endif()
+
+ set(CMAKE_AUTOMOC ON)
+diff --git a/Tests/QtAutoUicInterface/CMakeLists.txt b/Tests/QtAutoUicInterface/CMakeLists.txt
+index a5c2d99b2..2d640e4a3 100644
+--- a/Tests/QtAutoUicInterface/CMakeLists.txt
++++ b/Tests/QtAutoUicInterface/CMakeLists.txt
+@@ -14,7 +14,7 @@ else()
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+- find_package(Qt5Widgets REQUIRED)
++ #find_package(Qt5Widgets REQUIRED)
+
+ set(QT_CORE_TARGET Qt5::Core)
+ set(QT_GUI_TARGET Qt5::Widgets)
+diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
+index dff9d0c66..c6e8fc3f5 100644
+--- a/Tests/QtAutogen/CMakeLists.txt
++++ b/Tests/QtAutogen/CMakeLists.txt
+@@ -23,7 +23,7 @@ else()
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+- find_package(Qt5Widgets REQUIRED)
++ #find_package(Qt5Widgets REQUIRED)
+
+ set(QT_QTCORE_TARGET Qt5::Core)
+
+diff --git a/Tests/QtAutogen/macosFW/CMakeLists.txt b/Tests/QtAutogen/macosFW/CMakeLists.txt
+index 114d9bac0..157fe0aaa 100644
+--- a/Tests/QtAutogen/macosFW/CMakeLists.txt
++++ b/Tests/QtAutogen/macosFW/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 3.8)
+ project(macos-fw-test)
+
+-find_package(Qt5Test REQUIRED)
++#find_package(Qt5Test REQUIRED)
+
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/bin)
+diff --git a/Tests/QtAutogen/mocDepends/CMakeLists.txt b/Tests/QtAutogen/mocDepends/CMakeLists.txt
+index 8217b8dbf..86bb7bc7f 100644
+--- a/Tests/QtAutogen/mocDepends/CMakeLists.txt
++++ b/Tests/QtAutogen/mocDepends/CMakeLists.txt
+@@ -10,7 +10,7 @@ else()
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ set(QT_CORE_TARGET Qt5::Core)
+ endif()
+
+diff --git a/Tests/QtAutogenRerun/CMakeLists.txt b/Tests/QtAutogenRerun/CMakeLists.txt
+index e72c1912e..d7e6884ce 100644
+--- a/Tests/QtAutogenRerun/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/CMakeLists.txt
+@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.9)
+ cmake_policy(SET CMP0071 NEW)
+ project(QtAutogenRerun)
+
+-# Tell find_package(Qt5) where to find Qt.
++# Tell #find_package(Qt5) where to find Qt.
+ if(QT_QMAKE_EXECUTABLE)
+ get_filename_component(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH)
+ get_filename_component(Qt_PREFIX_DIR "${Qt_BIN_DIR}" PATH)
+@@ -23,7 +23,7 @@ else()
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+- find_package(Qt5Widgets REQUIRED)
++ #find_package(Qt5Widgets REQUIRED)
+
+ set(QT_QTCORE_TARGET Qt5::Core)
+
+diff --git a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt b/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt
+index b7cc5e9ff..e1d109953 100644
+--- a/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/mocPlugin/CMakeLists.txt
+@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC_DEPEND_FILTERS
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+-find_package(Qt5Widgets REQUIRED)
++#find_package(Qt5Widgets REQUIRED)
+
+ if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC)
+ add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC})
+diff --git a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt b/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
+index bafd9cf48..43ec933d2 100644
+--- a/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/mocRerun/CMakeLists.txt
+@@ -10,7 +10,7 @@ else()
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ set(QT_CORE_TARGET Qt5::Core)
+ endif()
+
+diff --git a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt b/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
+index 291592e7d..40cd52868 100644
+--- a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
++++ b/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
+@@ -9,7 +9,7 @@ else()
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+
+- find_package(Qt5Core REQUIRED)
++ #find_package(Qt5Core REQUIRED)
+ set(QT_CORE_TARGET Qt5::Core)
+ endif()
+
+diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
+index 29325ff0a..d30d01e78 100644
+--- a/Tests/RunCMake/CMakeLists.txt
++++ b/Tests/RunCMake/CMakeLists.txt
+@@ -274,7 +274,7 @@ add_RunCMake_test(configure_file)
+ add_RunCMake_test(CTestTimeoutAfterMatch)
+
+ find_package(Qt4 QUIET)
+-find_package(Qt5Core QUIET)
++#find_package(Qt5Core QUIET)
+ if (QT4_FOUND AND Qt5Core_FOUND AND NOT Qt5Core_VERSION VERSION_LESS 5.1.0)
+ add_RunCMake_test(IncompatibleQt)
+ endif()
+diff --git a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
+index 4fccdc418..b76e1e531 100644
+--- a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
++++ b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
+@@ -1,6 +1,6 @@
+
+ find_package(Qt4 REQUIRED)
+-find_package(Qt5Core REQUIRED)
++#find_package(Qt5Core REQUIRED)
+
+ add_executable(mainexe main.cpp)
+ target_link_libraries(mainexe Qt4::QtCore Qt5::Core)
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
index 15cbca8..6841554 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
@@ -1,4 +1,7 @@
-cmake: support OpenEmbedded Qt4 tool binary names
+From 10b8b523869124d2fc8cd98d9e028c0bcffd61b1 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Thu, 12 May 2011 15:36:03 +0000
+Subject: [PATCH 1/2] cmake: support OpenEmbedded Qt4 tool binary names
The FindQt4 module looks for Qt4 binaries to be able to gather the
paths used for compilation and also to be using during other processes
@@ -15,15 +18,16 @@
Instead of find_program, _find_qt4_program is now used.
Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
+
---
Modules/FindQt4.cmake | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
-index 11091b5..6704769 100644
+index c67d0be..0cf169b 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
-@@ -522,7 +522,7 @@ endfunction()
+@@ -516,7 +516,7 @@ endfunction()
set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
@@ -32,7 +36,7 @@
_qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
if (QT_QMAKE_EXECUTABLE AND
-@@ -1148,12 +1148,12 @@ if (QT_QMAKE_EXECUTABLE AND
+@@ -1142,12 +1142,12 @@ if (QT_QMAKE_EXECUTABLE AND
_find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc4 moc)
_find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic4 uic)
_find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3)
@@ -50,5 +54,5 @@
_find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist)
--
-1.9.1
+2.7.4
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.10.3.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.10.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
index 7b70daa..1c84fb1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
@@ -41,6 +41,7 @@
[ -z "${cve_dir}" ] && cve_dir="${DL_DIR}/CVE_CHECK"
[ -z "${cve_file}" ] && cve_file="${TMPDIR}/cve_check"
+ unused="${@bb.utils.export_proxies(d)}"
bbdebug 2 "Updating cve-check-tool database located in $cve_dir"
# --cacert works around curl-native not finding the CA bundle
if cve-check-update --cacert ${sysconfdir}/ssl/certs/ca-certificates.crt -d "$cve_dir" ; then
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
index e6f159c..6604648 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
@@ -23,7 +23,6 @@
file://distcc.service"
SRCREV = "d8b18df3e9dcbe4f092bed565835d3975e99432c"
S = "${WORKDIR}/git"
-UPSTREAM_VERSION_UNKNOWN = "1"
inherit autotools pkgconfig update-rc.d useradd systemd
@@ -41,7 +40,9 @@
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "distcc.service"
-do_install_append() {
+do_install() {
+ # Improve reproducibility: compress w/o timestamps
+ oe_runmake 'DESTDIR=${D}' "GZIP_BIN=gzip -n" install
install -d ${D}${sysconfdir}/init.d/
install -d ${D}${sysconfdir}/default
install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch
deleted file mode 100644
index 05f3141..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 166833a88a928a574bf9143b9b65f544be482c77 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 18 Aug 2017 15:55:15 +0300
-Subject: [PATCH] Check conf.releasever instead of releasever
-
-The substitutions may actually set the conf.releasever correctly,
-and so the check should use that instead of the passed-in function
-parameter.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/901]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- dnf/cli/cli.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
-index 2d63420c..167943b8 100644
---- a/dnf/cli/cli.py
-+++ b/dnf/cli/cli.py
-@@ -914,7 +914,7 @@ class Cli(object):
- conf.releasever = releasever
- subst = conf.substitutions
- subst.update_from_etc(conf.installroot)
-- if releasever is None:
-+ if conf.releasever is None:
- logger.warning(_("Unable to detect release version (use '--releasever' to specify "
- "release version)"))
-
---
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
index c9df458..6692b41 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
@@ -1,10 +1,11 @@
-From 8ce181714640315d2dd37ee794acbb22063cd669 Mon Sep 17 00:00:00 2001
+From 05e059cd4e9910c00b32d377f4f98e3c8dde6bc6 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 26 Jan 2017 16:36:20 +0200
-Subject: [PATCH] Corretly install tmpfiles.d configuration
+Subject: [PATCH 4/5] Corretly install tmpfiles.d configuration
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
etc/tmpfiles.d/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -17,5 +18,5 @@
-INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/)
+INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/)
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
index 0f261e5..15a7bfc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
@@ -1,16 +1,17 @@
-From 4313ced1320594013795f11f6db00381e3f4cc45 Mon Sep 17 00:00:00 2001
+From a8ef81c115a45f05dad145c98e10f3c4940e4e29 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 26 Jan 2017 16:25:47 +0200
-Subject: [PATCH] Do not hardcode /etc and systemd unit directories
+Subject: [PATCH 3/5] Do not hardcode /etc and systemd unit directories
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6a319935..db20ccd4 100644
+index 650b624a..10199618 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,8 +7,8 @@ if (NOT PYTHON_DESIRED)
@@ -25,5 +26,5 @@
if (${PYTHON_DESIRED} STREQUAL "2")
FIND_PACKAGE (PythonInterp REQUIRED)
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch
similarity index 67%
rename from import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
rename to import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch
index a90e77c..aa20009 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch
@@ -1,7 +1,7 @@
-From 31653d324cf8c7b1f2f9e49d22676bd2ac546331 Mon Sep 17 00:00:00 2001
+From 6365389074a1b86962f3d8b22a2ead2202026a98 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 11 Jan 2017 15:10:13 +0200
-Subject: [PATCH] Do not prepend installroot to logdir.
+Subject: [PATCH 5/5] Do not prepend installroot to logdir.
This would otherwise write the logs into rootfs/var/log
(whereas we want them in $T),
@@ -14,12 +14,12 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
-index b764801a..893f4bda 100644
+index d2d9c082..82270ecf 100644
--- a/dnf/cli/cli.py
+++ b/dnf/cli/cli.py
-@@ -881,7 +881,7 @@ class Cli(object):
- subst = conf.substitutions
- subst.update_from_etc(conf.installroot)
+@@ -920,7 +920,7 @@ class Cli(object):
+ logger.warning(_("Unable to detect release version (use '--releasever' to specify "
+ "release version)"))
- for opt in ('cachedir', 'logdir', 'persistdir'):
+ for opt in ('cachedir', 'persistdir'):
@@ -27,5 +27,5 @@
self.base._logging._setup_from_dnf_conf(conf)
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
index 8c59f9f..6e01191 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -1,16 +1,17 @@
-From 3ddaa930cda57a62a2174faebcc87aebc59591d1 Mon Sep 17 00:00:00 2001
+From 7205033e44d8fba1d3b18b490e7eaab82da1ffa3 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:29:07 +0200
-Subject: [PATCH 29/30] Do not set PYTHON_INSTALL_DIR by running python
+Subject: [PATCH 1/5] Do not set PYTHON_INSTALL_DIR by running python
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6a319935..466ca1e6 100644
+index 23e5f889..650b624a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ else()
@@ -23,5 +24,5 @@
MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
index 1abd880..eedbb57 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
@@ -1,19 +1,20 @@
-From 9c8d545152b35d8943be72b9503414a53e1ebf7c Mon Sep 17 00:00:00 2001
+From 8d97b72a1d77149e2f9048d1ca6cef66da1a8aa5 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:29:37 +0200
-Subject: [PATCH 30/30] Run python scripts using env
+Subject: [PATCH 2/5] Run python scripts using env
Otherwise the build tools hardcode the python path into them.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
bin/dnf-automatic.in | 2 +-
bin/dnf.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in
-index 5b06aa26..9f6f703e 100755
+index 5b06aa26..891b4c24 100755
--- a/bin/dnf-automatic.in
+++ b/bin/dnf-automatic.in
@@ -1,4 +1,4 @@
@@ -23,7 +24,7 @@
#
# Copyright (C) 2014-2016 Red Hat, Inc.
diff --git a/bin/dnf.in b/bin/dnf.in
-index 645d0f06..ab141abd 100755
+index 645d0f06..bdf7b3c4 100755
--- a/bin/dnf.in
+++ b/bin/dnf.in
@@ -1,4 +1,4 @@
@@ -33,5 +34,5 @@
#
# Copyright (C) 2012-2016 Red Hat, Inc.
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb
similarity index 76%
rename from import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb
index 3ed6a74..b88ddb4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb
@@ -5,15 +5,14 @@
"
SRC_URI = "git://github.com/rpm-software-management/dnf.git \
+ file://0001-Corretly-install-tmpfiles.d-configuration.patch \
+ file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
+ file://0005-Do-not-prepend-installroot-to-logdir.patch \
file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
file://0030-Run-python-scripts-using-env.patch \
- file://0001-Do-not-prepend-installroot-to-logdir.patch \
- file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
- file://0001-Corretly-install-tmpfiles.d-configuration.patch \
- file://0001-Check-conf.releasever-instead-of-releasever.patch \
"
-SRCREV = "be2585183ec4485ee4d5e121f242d8669296f065"
+SRCREV = "564c44667c7014843fa6f1732621093114ec59b2"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
@@ -26,8 +25,30 @@
EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
BBCLASSEXTEND = "native nativesdk"
-RDEPENDS_${PN}_class-target += "python3-core python3-codecs python3-netclient python3-email python3-threading python3-distutils librepo python3-shell python3-subprocess libcomps libdnf python3-sqlite3 python3-compression python3-rpm python3-iniparse python3-json python3-importlib python3-curses python3-argparse python3-misc python3-gpg"
-# Recommend gnupg so that GPG signature check on repository metadata is possible
+
+RDEPENDS_${PN}_class-target += " \
+ python3-core \
+ python3-codecs \
+ python3-netclient \
+ python3-email \
+ python3-threading \
+ python3-distutils \
+ python3-logging \
+ python3-fcntl \
+ librepo \
+ python3-shell \
+ libcomps \
+ libdnf \
+ python3-sqlite3 \
+ python3-compression \
+ python3-rpm \
+ python3-iniparse \
+ python3-json \
+ python3-curses \
+ python3-misc \
+ python3-gpg \
+ "
+
RRECOMMENDS_${PN}_class-target += "gnupg"
# Create a symlink called 'dnf' as 'make install' does not do it, but
@@ -46,6 +67,7 @@
}
SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
+ dnf-automatic.service dnf-automatic.timer \
dnf-automatic-download.service dnf-automatic-download.timer \
dnf-automatic-install.service dnf-automatic-install.timer \
dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch
new file mode 100644
index 0000000..45c606e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch
@@ -0,0 +1,54 @@
+From 319f32d743f5b5e725012654d124e49226d5de91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Mar 2018 20:28:24 -0700
+Subject: [PATCH] arch: Add support for riscv64 CPU
+
+ * Architecture support:
+ - Add support for riscv64 CPU. Closes: #822914
+ Thanks to Manuel A. Fernandez Montecelo <mafm@debian.org>
+
+Upstream-Status: Backport [https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=dpkg%2Fdpkg.git;a=commitdiff_plain;h=ee0855cc66076691de4796be48f8a0d889fde001;hp=2f5816d8be40b449d2473b22f9e0c33b32f3bd78]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ data/cputable | 1 +
+ scripts/t/Dpkg_Arch.t | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/data/cputable b/data/cputable
+index a2bd7d6..9f2a8e0 100644
+--- a/data/cputable
++++ b/data/cputable
+@@ -41,6 +41,7 @@ powerpc powerpc (powerpc|ppc) 32 big
+ powerpcel powerpcle powerpcle 32 little
+ ppc64 powerpc64 (powerpc|ppc)64 64 big
+ ppc64el powerpc64le powerpc64le 64 little
++riscv64 riscv64 riscv64 64 little
+ s390 s390 s390 32 big
+ s390x s390x s390x 64 big
+ sh3 sh3 sh3 32 little
+diff --git a/scripts/t/Dpkg_Arch.t b/scripts/t/Dpkg_Arch.t
+index d478b49..ecd5d66 100644
+--- a/scripts/t/Dpkg_Arch.t
++++ b/scripts/t/Dpkg_Arch.t
+@@ -16,7 +16,7 @@
+ use strict;
+ use warnings;
+
+-use Test::More tests => 16367;
++use Test::More tests => 16832;
+
+ use_ok('Dpkg::Arch', qw(debarch_to_debtuple debarch_to_multiarch
+ debarch_eq debarch_is debarch_is_wildcard
+@@ -162,7 +162,7 @@ is(gnutriplet_to_debarch(undef), undef, 'undef gnutriplet');
+ is(gnutriplet_to_debarch('unknown-unknown-unknown'), undef, 'unknown gnutriplet');
+ is(gnutriplet_to_debarch('x86_64-linux-gnu'), 'amd64', 'known gnutriplet');
+
+-is(scalar get_valid_arches(), 524, 'expected amount of known architectures');
++is(scalar get_valid_arches(), 539, 'expected amount of known architectures');
+
+ {
+ local $ENV{CC} = 'false';
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
index d929466..8797ea5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
@@ -5,6 +5,7 @@
helps compiling dpkg for musl/arm-softfloat
+Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
index d56b8a6..d483866 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
@@ -1,12 +1,17 @@
+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
+ Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface
- Status: CLOSED CANTFIX
+ Status: CLOSED CANTFIX
Last Closed: 2009-11-22 22:19:55
Kirby Zhou 2009-08-20 23:37:55 EDT
@@ -60,13 +65,16 @@
Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
Signed-off-by: Lei Liu <lei.liu2@windriver.com>
+
---
- src/archives.c | 4 ++--
+ src/archives.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
+diff --git a/src/archives.c b/src/archives.c
+index 4b2fc92..a92b795 100644
--- a/src/archives.c
+++ b/src/archives.c
-@@ -75,7 +75,7 @@
+@@ -69,7 +69,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. */
@@ -75,7 +83,7 @@
sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
#elif defined(HAVE_POSIX_FADVISE)
posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
-@@ -1179,7 +1179,7 @@
+@@ -1078,7 +1078,7 @@ tarobject(void *ctx, struct tar_entry *ti)
return 0;
}
@@ -84,3 +92,6 @@
static void
tar_writeback_barrier(struct fileinlist *files, struct pkginfo *pkg)
{
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
index c0c59f1..6d8ec34 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
@@ -14,6 +14,7 @@
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://0001-arch-Add-support-for-riscv64-CPU.patch \
"
SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
new file mode 100644
index 0000000..c59a006
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb
@@ -0,0 +1,22 @@
+SUMMARY = "A small utility for printing debig source file locations embedded in binaries"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://../dwarfsrcfiles.c;md5=31483894e453a77acbb67847565f1b5c;beginline=1;endline=8"
+
+SRC_URI = "file://dwarfsrcfiles.c"
+BBCLASSEXTEND = "native"
+DEPENDS = "elfutils"
+DEPENDS_append_libc-musl = " argp-standalone"
+
+do_compile () {
+ ${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw
+}
+
+do_compile_libc-musl () {
+ ${CC} ${CFLAGS} ${LDFLAGS} -o dwarfsrcfiles ../dwarfsrcfiles.c -lelf -ldw -largp
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -t ${D}${bindir} dwarfsrcfiles
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
new file mode 100644
index 0000000..af7af52
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dwarfsrcfiles/files/dwarfsrcfiles.c
@@ -0,0 +1,111 @@
+// dwarfsrcfiles.c - Get source files associated with the dwarf in a elf file.
+// gcc -Wall -g -O2 -lelf -ldw -o dwarfsrcfiles dwarfsrcfiles.c
+//
+// Copyright (C) 2011, Mark Wielaard <mjw@redhat.com>
+//
+// This file is free software. You can redistribute it and/or modify
+// it under the terms of the GNU General Public License (GPL); either
+// version 2, or (at your option) any later version.
+
+#include <argp.h>
+#include <stdio.h>
+
+#include <dwarf.h>
+#include <elfutils/libdw.h>
+#include <elfutils/libdwfl.h>
+
+static int
+process_cu (Dwarf_Die *cu_die)
+{
+ Dwarf_Attribute attr;
+ const char *name;
+ const char *dir = NULL;
+
+ Dwarf_Files *files;
+ size_t n;
+ int i;
+
+ if (dwarf_tag (cu_die) != DW_TAG_compile_unit)
+ {
+ fprintf (stderr, "DIE isn't a compile unit");
+ return -1;
+ }
+
+ if (dwarf_attr (cu_die, DW_AT_name, &attr) == NULL)
+ {
+ fprintf(stderr, "CU doesn't have a DW_AT_name");
+ return -1;
+ }
+
+ name = dwarf_formstring (&attr);
+ if (name == NULL)
+ {
+ fprintf(stderr, "Couldn't get DW_AT_name as string, %s",
+ dwarf_errmsg (-1));
+ return -1;
+ }
+
+ if (dwarf_attr (cu_die, DW_AT_comp_dir, &attr) != NULL)
+ {
+ dir = dwarf_formstring (&attr);
+ if (dir == NULL)
+ {
+ fprintf(stderr, "Couldn't get DW_AT_comp_die as string, %s",
+ dwarf_errmsg (-1));
+ return -1;
+ }
+ }
+
+ if (dir == NULL)
+ printf ("%s\n", name);
+ else
+ printf ("%s/%s\n", dir, name);
+
+ if (dwarf_getsrcfiles (cu_die, &files, &n) != 0)
+ {
+ fprintf(stderr, "Couldn't get CU file table, %s",
+ dwarf_errmsg (-1));
+ return -1;
+ }
+
+ for (i = 1; i < n; i++)
+ {
+ const char *file = dwarf_filesrc (files, i, NULL, NULL);
+ if (dir != NULL && file[0] != '/')
+ printf ("\t%s/%s\n", dir, file);
+ else
+ printf ("\t%s\n", file);
+ }
+
+ return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+ char* args[3];
+ int res = 0;
+ Dwfl *dwfl;
+ Dwarf_Addr bias;
+
+ if (argc != 2)
+ fprintf(stderr, "Usage %s <file>", argv[0]);
+
+ // Pretend "dwarfsrcfiles -e <file>" was given, so we can use standard
+ // dwfl argp parser to open the file for us and get our Dwfl. Useful
+ // in case argument is an ET_REL file (like kernel modules). libdwfl
+ // will fix up relocations for us.
+ args[0] = argv[0];
+ args[1] = "-e";
+ args[2] = argv[1];
+
+ argp_parse (dwfl_standard_argp (), 3, args, 0, NULL, &dwfl);
+
+ Dwarf_Die *cu = NULL;
+ while ((cu = dwfl_nextcu (dwfl, cu, &bias)) != NULL)
+ res |= process_cu (cu);
+
+ dwfl_end (dwfl);
+
+ return res;
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch
new file mode 100644
index 0000000..ff1284e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch
@@ -0,0 +1,40 @@
+From ae6603206176b771c9ed1f82569f68fc1257f014 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Wed, 3 Jan 2018 01:32:02 -0500
+Subject: [PATCH] libext2fs: fix build failure in swapfs.c on big-endian
+ systems
+
+Addresses-Debian-Bug: #886119
+
+Reported-by: James Clarke <jrtc27@debian.org>
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+---
+Upstream-Status: Backport
+
+ lib/ext2fs/swapfs.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
+index 6e5cff97..b13dc422 100644
+--- a/lib/ext2fs/swapfs.c
++++ b/lib/ext2fs/swapfs.c
+@@ -19,6 +19,7 @@
+
+ #include "ext2_fs.h"
+ #include "ext2fs.h"
++#include "ext2fsP.h"
+ #include <ext2fs/ext2_ext_attr.h>
+
+ #ifdef WORDS_BIGENDIAN
+@@ -358,7 +359,7 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
+ if (inode_includes(inode_size, i_projid))
+ t->i_projid = ext2fs_swab16(f->i_projid);
+ /* catch new static fields added after i_projid */
+- EXT2FS_BUILD_BUG_ON(sizeof(ext2_inode_large) != 160);
++ EXT2FS_BUILD_BUG_ON(sizeof(struct ext2_inode_large) != 160);
+
+ i = sizeof(struct ext2_inode) + extra_isize + sizeof(__u32);
+ if (bufsize < (int) i)
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch
deleted file mode 100644
index 308fe0e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-rename-copy_file_range-to-copy_file_chunk.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 647353f7c3fd29e1ffd468d7ff56d9643047ab35 Mon Sep 17 00:00:00 2001
-From: Palmer Dabbelt <palmer@dabbelt.com>
-Date: Fri, 29 Dec 2017 10:19:51 -0800
-Subject: [PATCH] misc: rename copy_file_range to copy_file_chunk
-
-As of 2.27, glibc will have a copy_file_range library call to wrap the
-new copy_file_range system call. This conflicts with the function in
-misc/create_inode.c, which this patch renames _copy_file_range.
-
-Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-
-Upstream-Status: Backport
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- misc/create_inode.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index 8ce3fafa..cd89146f 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -396,7 +396,7 @@ static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
- }
- #endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */
-
--static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
-+static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file,
- off_t start, off_t end, char *buf,
- char *zerobuf)
- {
-@@ -470,7 +470,7 @@ static errcode_t try_lseek_copy(ext2_filsys fs, int fd, struct stat *statbuf,
-
- data_blk = data & ~(fs->blocksize - 1);
- hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1);
-- err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf,
-+ err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf,
- zerobuf);
- if (err)
- return err;
-@@ -521,7 +521,7 @@ static errcode_t try_fiemap_copy(ext2_filsys fs, int fd, ext2_file_t e2_file,
- goto out;
- for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents;
- i++, ext++) {
-- err = copy_file_range(fs, fd, e2_file, ext->fe_logical,
-+ err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical,
- ext->fe_logical + ext->fe_length,
- buf, zerobuf);
- if (err)
-@@ -574,7 +574,7 @@ static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf,
- goto out;
- #endif
-
-- err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf,
-+ err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf,
- zerobuf);
- out:
- ext2fs_free_mem(&zerobuf);
---
-2.16.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
index 38fb07e..38e1bdb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
@@ -19,10 +19,10 @@
misc/mke2fs.conf.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
-index 812f7c7..0280398 100644
---- a/misc/mke2fs.conf.in
-+++ b/misc/mke2fs.conf.in
+Index: git/misc/mke2fs.conf.in
+===================================================================
+--- git.orig/misc/mke2fs.conf.in
++++ git/misc/mke2fs.conf.in
@@ -11,8 +11,9 @@
features = has_journal
}
@@ -32,5 +32,5 @@
inode_size = 256
+ auto_64-bit_support = 1
}
- ext4dev = {
- features = has_journal,extent,huge_file,flex_bg,uninit_bg,inline_data,64bit,dir_nlink,extra_isize
+ small = {
+ blocksize = 1024
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4 b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
deleted file mode 100644
index c0bd7db..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/acinclude.m4
+++ /dev/null
@@ -1,135 +0,0 @@
-# Extracted from the package's shipped aclocal.m4. Custom macros should be in
-# acinclude.m4 so running aclocal doesn't blow them away.
-#
-# Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-# from http://autoconf-archive.cryp.to/ax_tls.html
-#
-# This was licensed under the GPL with the following exception:
-#
-# As a special exception, the respective Autoconf Macro's copyright
-# owner gives unlimited permission to copy, distribute and modify the
-# configure scripts that are the output of Autoconf when processing
-# the Macro. You need not follow the terms of the GNU General Public
-# License when using or distributing such scripts, even though
-# portions of the text of the Macro appear in them. The GNU General
-# Public License (GPL) does govern all other use of the material that
-# constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the
-# Autoconf Macro released by the Autoconf Macro Archive. When you make
-# and distribute a modified version of the Autoconf Macro, you may
-# extend this special exception to the GPL to apply to your modified
-# version as well.
-#
-AC_DEFUN([AX_TLS], [
- AC_MSG_CHECKING(for thread local storage (TLS) class)
- AC_CACHE_VAL(ac_cv_tls, [
- ax_tls_keywords="__thread __declspec(thread) none"
- for ax_tls_keyword in $ax_tls_keywords; do
- case $ax_tls_keyword in
- none) ac_cv_tls=none ; break ;;
- *)
- AC_TRY_COMPILE(
- [#include <stdlib.h>
- static void
- foo(void) {
- static ] $ax_tls_keyword [ int bar;
- exit(1);
- }],
- [],
- [ac_cv_tls=$ax_tls_keyword ; break],
- ac_cv_tls=none
- )
- esac
- done
-])
-
- if test "$ac_cv_tls" != "none"; then
- dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
- AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
- fi
- AC_MSG_RESULT($ac_cv_tls)
-])
-
-# ===========================================================================
-# http://www.nongnu.org/autoconf-archive/check_gnu_make.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# CHECK_GNU_MAKE()
-#
-# DESCRIPTION
-#
-# This macro searches for a GNU version of make. If a match is found, the
-# makefile variable `ifGNUmake' is set to the empty string, otherwise it
-# is set to "#". This is useful for including a special features in a
-# Makefile, which cannot be handled by other versions of make. The
-# variable _cv_gnu_make_command is set to the command to invoke GNU make
-# if it exists, the empty string otherwise.
-#
-# Here is an example of its use:
-#
-# Makefile.in might contain:
-#
-# # A failsafe way of putting a dependency rule into a makefile
-# $(DEPEND):
-# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
-#
-# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
-# @ifGNUmake@ include $(DEPEND)
-# @ifGNUmake@ endif
-#
-# Then configure.in would normally contain:
-#
-# CHECK_GNU_MAKE()
-# AC_OUTPUT(Makefile)
-#
-# Then perhaps to cause gnu make to override any other make, we could do
-# something like this (note that GNU make always looks for GNUmakefile
-# first):
-#
-# if ! test x$_cv_gnu_make_command = x ; then
-# mv Makefile GNUmakefile
-# echo .DEFAULT: > Makefile ;
-# echo \ $_cv_gnu_make_command \$@ >> Makefile;
-# fi
-#
-# Then, if any (well almost any) other make is called, and GNU make also
-# exists, then the other make wraps the GNU make.
-#
-# LICENSE
-#
-# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-#
-# Note: Modified by Ted Ts'o to add @ifNotGNUMake@
-
-AC_DEFUN(
- [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
- _cv_gnu_make_command='' ;
-dnl Search all the common names for GNU make
- for a in "$MAKE" make gmake gnumake ; do
- if test -z "$a" ; then continue ; fi ;
- if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
- _cv_gnu_make_command=$a ;
- break;
- fi
- done ;
- ) ;
-dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
- if test "x$_cv_gnu_make_command" != "x" ; then
- ifGNUmake='' ;
- ifNotGNUmake='#' ;
- else
- ifGNUmake='#' ;
- ifNotGNUmake='' ;
- AC_MSG_RESULT("Not found");
- fi
- AC_SUBST(ifGNUmake)
- AC_SUBST(ifNotGNUmake)
-] )
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
index 33054c6..69c09bc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
@@ -1,3 +1,6 @@
+From c7914309aeee6209ddb6995c084805a911d9cc82 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 10 Aug 2016 11:19:44 +0800
Subject: [PATCH] Fix missing check for permission denied.
If the path to "ROOT_SYSCONFDIR/mke2fs.conf" has a permission denied problem,
@@ -10,15 +13,16 @@
Written-by: Henrik Wallin <henrik.b.wallin@ericsson.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
---
lib/support/profile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/support/profile.c b/lib/support/profile.c
-index 51a3314..1c1039f 100644
+index 9e96673b..32d83002 100644
--- a/lib/support/profile.c
+++ b/lib/support/profile.c
-@@ -335,7 +335,7 @@ profile_init(const char **files, profile_t *ret_profile)
+@@ -335,7 +335,7 @@ profile_init(const char * const *files, profile_t *ret_profile)
*last = new_file;
last = &new_file->next;
}
@@ -28,5 +32,5 @@
goto errout;
--
-2.7.4
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
deleted file mode 100644
index 2a3aeff..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Mei Lei <lei.mei@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index c1fe224..f5ac628 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1374,7 +1374,8 @@ if test -n "$WITH_DIET_LIBC" ; then
- INCLUDES="$INCLUDES -D_REENTRANT"
- fi
- AC_SUBST(INCLUDES)
--AM_MKINSTALLDIRS
-+MKINSTALLDIRS="mkdir -p"
-+AC_SUBST(MKINSTALLDIRS)
- dnl
- dnl Build CFLAGS
- dnl
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
index 7df0967..7c4bb39 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
@@ -1,10 +1,10 @@
Upstream-Status: Inappropriate
-diff --git a/tests/Makefile.in b/tests/Makefile.in
-index c130f4a..d2ade03 100644
---- a/tests/Makefile.in
-+++ b/tests/Makefile.in
-@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
+Index: git/tests/Makefile.in
+===================================================================
+--- git.orig/tests/Makefile.in
++++ git/tests/Makefile.in
+@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile
@echo "#!/bin/sh" > test_one
@echo "HTREE=y" >> test_one
@echo "QUOTA=y" >> test_one
@@ -12,8 +12,8 @@
+ @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
@echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
@echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one
- @cat $(srcdir)/test_one.in >> test_one
-@@ -27,7 +27,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
+ @echo "DD=@DD@" >>test_one
+@@ -28,7 +28,7 @@ test_one: $(srcdir)/test_one.in Makefile
test_script: test_one test_script.in Makefile mke2fs.conf
@echo "Creating test_script..."
@echo "#!/bin/sh" > test_script
@@ -22,10 +22,10 @@
@cat $(srcdir)/test_script.in >> test_script
@chmod +x test_script
-diff --git a/tests/test_config b/tests/test_config
-index 547ef4c..e11e6f4 100644
---- a/tests/test_config
-+++ b/tests/test_config
+Index: git/tests/test_config
+===================================================================
+--- git.orig/tests/test_config
++++ git/tests/test_config
@@ -3,24 +3,24 @@
#
@@ -67,10 +67,10 @@
CLEAN_OUTPUT="sed -f $cmd_dir/filter.sed"
LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${LD_LIBRARY_PATH}
DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${DYLD_LIBRARY_PATH}
-diff --git a/tests/test_script.in b/tests/test_script.in
-index 9959e30..442999d 100644
---- a/tests/test_script.in
-+++ b/tests/test_script.in
+Index: git/tests/test_script.in
+===================================================================
+--- git.orig/tests/test_script.in
++++ git/tests/test_script.in
@@ -39,7 +39,7 @@ for i; do
done
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch
deleted file mode 100644
index 8e5d1d3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Suppport for binary reproducibility.
-When compressing, do not save the original file name and time stamp.
-
-Upstream-Status: Submitted [Theodore Ts'o tytso@mit.edu (maintainer)]
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-diff --git a/doc/Makefile.in b/doc/Makefile.in
-index 9cb584c..0bee4e4 100644
---- a/doc/Makefile.in
-+++ b/doc/Makefile.in
-@@ -28,7 +28,7 @@ install-doc-libs: libext2fs.info libext2fs.dvi
- $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i ; \
- done
- $(E) " GZIP $(infodir)/libext2fs.info*"
-- -$(Q) gzip -9 $(DESTDIR)$(infodir)/libext2fs.info*
-+ -$(Q) gzip -9 -n $(DESTDIR)$(infodir)/libext2fs.info*
-
- uninstall-doc-libs:
- $(RM) -rf $(DESTDIR)$(infodir)/libext2fs.info*
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
similarity index 84%
rename from import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
index f1d7c08..56abb3b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
@@ -1,21 +1,19 @@
require e2fsprogs.inc
-SRC_URI += "file://acinclude.m4 \
- file://remove.ldconfig.call.patch \
- file://quiet-debugfs.patch \
+SRC_URI += "file://remove.ldconfig.call.patch \
file://run-ptest \
file://ptest.patch \
- file://mkdir.patch \
file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
file://mkdir_p.patch \
- file://reproducible-doc.patch \
file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \
- file://0001-misc-rename-copy_file_range-to-copy_file_chunk.patch \
+ file://0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch \
+ "
+
+SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
+ file://quiet-debugfs.patch \
"
-SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch"
-
-SRCREV = "2a13c84b513aa094d1cda727e92d35a89dd777da"
+SRCREV = "af2eac481cf426c05ae12b946396980e16c8ab19"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
@@ -27,8 +25,10 @@
PACKAGECONFIG ??= ""
PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
-do_configure_prepend () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
+# make locale rules sometimes fire, sometimes don't as git doesn't preserve
+# file mktime. Touch the files introducing non-determinism to the build
+do_compile_prepend (){
+ find ${S}/po -type f -name "*.po" -exec touch {} +
}
do_install () {
@@ -109,7 +109,9 @@
do_install_ptest() {
cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test
cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test
- sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
+ sed -e 's!../e2fsck/e2fsck!e2fsck!g' \
+ -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect*
+ sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script
# Remove various files
find "${D}${PTEST_PATH}" -type f \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
index 3b81e28..14ac22e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
@@ -5,40 +5,31 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "libtool bzip2 zlib virtual/libintl"
DEPENDS_append_libc-musl = " argp-standalone fts "
-SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2"
+# The Debian patches below are from:
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz
+SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
+ file://0001-dso-link-change.patch \
+ file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
+ file://0003-fixheadercheck.patch \
+ file://0004-Disable-the-test-to-convert-euc-jp.patch \
+ file://0005-fix-a-stack-usage-warning.patch \
+ file://0006-Fix-build-on-aarch64-musl.patch \
+ file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
+ file://0001-libasm-may-link-with-libbz2-if-found.patch \
+ file://debian/hppa_backend.diff \
+ file://debian/arm_backend.diff \
+ file://debian/mips_backend.patch \
+ file://debian/mips_readelf_w.patch \
+ file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \
+ file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
+ file://debian/0003-Add-mips-n64-relocation-format-hack.patch \
+ file://0001-Use-fallthrough-attribute.patch \
+ file://0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch \
+ "
+SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch"
SRC_URI[md5sum] = "03599aee98c9b726c7a732a2dd0245d5"
SRC_URI[sha256sum] = "1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066"
-SRC_URI += "\
- file://0001-dso-link-change.patch \
- file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
- file://0003-fixheadercheck.patch \
- file://0004-Disable-the-test-to-convert-euc-jp.patch \
- file://0005-fix-a-stack-usage-warning.patch \
- file://0006-Fix-build-on-aarch64-musl.patch \
- file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
- file://0001-libasm-may-link-with-libbz2-if-found.patch \
-"
-SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch"
-
-# Pick patches from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz
-SRC_URI += "\
- file://debian/hppa_backend.diff \
- file://debian/arm_backend.diff \
- file://debian/mips_backend.patch \
- file://debian/mips_readelf_w.patch \
- file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \
- file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
- file://debian/0003-Add-mips-n64-relocation-format-hack.patch \
-"
-# Fix the patches from Debian with GCC7
-SRC_URI += "file://debian/fallthrough.patch"
-
-# The buildsystem wants to generate 2 .h files from source using a binary it just built,
-# which can not pass the cross compiling, so let's work around it by adding 2 .h files
-# along with the do_configure_prepend()
-
inherit autotools gettext
EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
new file mode 100644
index 0000000..cf4d1df
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch
@@ -0,0 +1,34 @@
+From 732913a8c35c7b25c0cbf6903cab1ad6b602b525 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 22 Mar 2018 22:44:03 -0700
+Subject: [PATCH] Ensure that packed structs follow the gcc memory layout
+
+Partial backport of
+https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d
+
+Helps fixing alignment errors e.g.
+linux-core-note.c:116:1: error: alignment 2 of 'struct m68k_prstatus
+' is less than 4 [-Werror=packed-not-aligned]
+ ;
+ ^
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ backends/linux-core-note.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
+index 5f06c896..9faae4c3 100644
+--- a/backends/linux-core-note.c
++++ b/backends/linux-core-note.c
+@@ -111,7 +111,7 @@ struct EBLHOOK(prstatus)
+ FIELD (INT, pr_fpvalid);
+ }
+ #ifdef ALIGN_PRSTATUS
+- __attribute__ ((packed, aligned (ALIGN_PRSTATUS)))
++ attribute_packed __attribute__ ((aligned (ALIGN_PRSTATUS)))
+ #endif
+ ;
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch
new file mode 100644
index 0000000..5e2155b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-Use-fallthrough-attribute.patch
@@ -0,0 +1,791 @@
+From 5cb883f67d00a63531ef195c242763d36b1905ca Mon Sep 17 00:00:00 2001
+From: Joshua Watt <Joshua.Watt@garmin.com>
+Date: Fri, 9 Feb 2018 12:46:38 -0600
+Subject: [PATCH] Use fallthrough attribute
+
+Use __attribute__ ((fallthrough)) to indicate switch case fall through
+instead of a comment. This ensure that the fallthrough warning is not
+triggered even if the file is pre-processed (hence stripping the
+comments) before it is compiled.
+
+The actual fallback implementation is hidden behind a FALLBACK macro in
+case the compiler doesn't support it.
+
+Finally, the -Wimplict-fallthrough warning was upgraded to only allow
+the attribute to satisfy it; a comment alone is no longer sufficient.
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+
+Upstream-Status: Submitted [1]
+
+[1] https://sourceware.org/ml/elfutils-devel/2018-q1/msg00027.html
+---
+ backends/aarch64_retval.c | 2 +-
+ backends/alpha_retval.c | 4 ++--
+ backends/arm_regs.c | 2 +-
+ backends/arm_retval.c | 2 +-
+ backends/i386_regs.c | 2 +-
+ backends/i386_retval.c | 4 ++--
+ backends/ia64_retval.c | 2 +-
+ backends/linux-core-note.c | 2 +-
+ backends/m68k_retval.c | 4 ++--
+ backends/mips_retval.c | 4 ++--
+ backends/parisc_retval.c | 5 +++--
+ backends/ppc64_retval.c | 6 +++---
+ backends/ppc_regs.c | 2 +-
+ backends/ppc_retval.c | 4 ++--
+ backends/s390_retval.c | 4 ++--
+ backends/sh_retval.c | 2 +-
+ backends/sparc_retval.c | 2 +-
+ backends/tilegx_retval.c | 4 ++--
+ backends/x86_64_regs.c | 2 +-
+ backends/x86_64_retval.c | 2 +-
+ config/eu.am | 4 +++-
+ configure.ac | 6 ++++++
+ lib/eu-config.h | 7 +++++++
+ libcpu/i386_disasm.c | 2 +-
+ libcpu/i386_parse.c | 4 ++--
+ libdw/cfi.c | 4 ++--
+ libdw/dwarf_frame_register.c | 2 +-
+ libdwfl/dwfl_report_elf.c | 2 +-
+ libdwfl/frame_unwind.c | 2 +-
+ libebl/eblobjnote.c | 2 +-
+ libelf/elf32_updatenull.c | 2 +-
+ libelf/elf_begin.c | 4 ++--
+ libelf/elf_cntl.c | 2 +-
+ src/addr2line.c | 2 +-
+ src/elfcompress.c | 2 +-
+ src/elflint.c | 8 ++++----
+ src/objdump.c | 2 +-
+ src/readelf.c | 8 ++++----
+ src/strings.c | 2 +-
+ tests/backtrace.c | 2 +-
+ tests/elfstrmerge.c | 3 ++-
+ 41 files changed, 75 insertions(+), 58 deletions(-)
+
+diff --git a/backends/aarch64_retval.c b/backends/aarch64_retval.c
+index 68de307..1308340 100644
+--- a/backends/aarch64_retval.c
++++ b/backends/aarch64_retval.c
+@@ -292,7 +292,7 @@ aarch64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ assert (count > 0);
+ if (count <= 4)
+ return pass_hfa (locp, base_size, count);
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case 1:
+ /* Not a HFA. */
+diff --git a/backends/alpha_retval.c b/backends/alpha_retval.c
+index 53dbfa4..d9bae3b 100644
+--- a/backends/alpha_retval.c
++++ b/backends/alpha_retval.c
+@@ -85,7 +85,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -131,7 +131,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ }
+ }
+
+- /* Else fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+diff --git a/backends/arm_regs.c b/backends/arm_regs.c
+index 4ee1039..418c931 100644
+--- a/backends/arm_regs.c
++++ b/backends/arm_regs.c
+@@ -81,7 +81,7 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
+ * but gcc maps FPA registers here
+ */
+ regno += 96 - 16;
+- /* Fall through. */
++ FALLTHROUGH;
+ case 96 + 0 ... 96 + 7:
+ *setname = "FPA";
+ *type = DW_ATE_float;
+diff --git a/backends/arm_retval.c b/backends/arm_retval.c
+index 8687eab..313e4eb 100644
+--- a/backends/arm_retval.c
++++ b/backends/arm_retval.c
+@@ -90,7 +90,7 @@ arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/backends/i386_regs.c b/backends/i386_regs.c
+index fd963a6..7ec93bb 100644
+--- a/backends/i386_regs.c
++++ b/backends/i386_regs.c
+@@ -92,7 +92,7 @@ i386_register_info (Ebl *ebl __attribute__ ((unused)),
+ case 5:
+ case 8:
+ *type = DW_ATE_address;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case 0 ... 3:
+ case 6 ... 7:
+ name[0] = 'e';
+diff --git a/backends/i386_retval.c b/backends/i386_retval.c
+index 4aa646f..32fec72 100644
+--- a/backends/i386_retval.c
++++ b/backends/i386_retval.c
+@@ -85,7 +85,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -123,7 +123,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ if (size <= 8)
+ return nloc_intregpair;
+ }
+- /* Fallthrough */
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+diff --git a/backends/ia64_retval.c b/backends/ia64_retval.c
+index dcd5f28..03ea4d8 100644
+--- a/backends/ia64_retval.c
++++ b/backends/ia64_retval.c
+@@ -260,7 +260,7 @@ ia64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
+index 67638d7..5f06c89 100644
+--- a/backends/linux-core-note.c
++++ b/backends/linux-core-note.c
+@@ -226,7 +226,7 @@ EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name,
+ if (memcmp (name, "CORE", nhdr->n_namesz) == 0)
+ break;
+ /* Buggy old Linux kernels didn't terminate "LINUX". */
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case sizeof "LINUX":
+ if (memcmp (name, "LINUX", nhdr->n_namesz) == 0)
+diff --git a/backends/m68k_retval.c b/backends/m68k_retval.c
+index c68ed02..a653ba3 100644
+--- a/backends/m68k_retval.c
++++ b/backends/m68k_retval.c
+@@ -92,7 +92,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -135,7 +135,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ if (size <= 8)
+ return nloc_intregpair;
+ }
+- /* Fallthrough */
++ FALLTHROUGH;
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+ case DW_TAG_union_type:
+diff --git a/backends/mips_retval.c b/backends/mips_retval.c
+index 57487bb..c6e1ffe 100644
+--- a/backends/mips_retval.c
++++ b/backends/mips_retval.c
+@@ -306,7 +306,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = dwarf_tag (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -389,7 +389,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ }
+ }
+
+- /* Fallthrough to handle large types */
++ FALLTHROUGH; /* Fallthrough to handle large types */
+
+ case DW_TAG_array_type:
+ large:
+diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c
+index df7ec3a..1f1e91a 100644
+--- a/backends/parisc_retval.c
++++ b/backends/parisc_retval.c
+@@ -116,7 +116,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = dwarf_tag (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -167,6 +167,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+
+ /* Else fall through. */
+ }
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+@@ -189,7 +190,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in
+ *locp = loc_aggregate;
+ return nloc_aggregate;
+ #endif
+- /* fall through. */
++ FALLTHROUGH;
+ }
+ }
+
+diff --git a/backends/ppc64_retval.c b/backends/ppc64_retval.c
+index a251983..eb1c11e 100644
+--- a/backends/ppc64_retval.c
++++ b/backends/ppc64_retval.c
+@@ -96,7 +96,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -141,7 +141,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return nloc_intreg;
+ }
+
+- /* Else fall through. */
++ FALLTHROUGH;
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+ case DW_TAG_union_type:
+@@ -161,7 +161,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return nloc_vmxreg;
+ }
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_string_type:
+ if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 8)
+diff --git a/backends/ppc_regs.c b/backends/ppc_regs.c
+index c2d5011..43d2534 100644
+--- a/backends/ppc_regs.c
++++ b/backends/ppc_regs.c
+@@ -140,7 +140,7 @@ ppc_register_info (Ebl *ebl __attribute__ ((unused)),
+ case 100:
+ if (*bits == 32)
+ return stpcpy (name, "mq") + 1 - name;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case 102 ... 107:
+ name[0] = 's';
+ name[1] = 'p';
+diff --git a/backends/ppc_retval.c b/backends/ppc_retval.c
+index b14a99f..39b42da 100644
+--- a/backends/ppc_retval.c
++++ b/backends/ppc_retval.c
+@@ -108,7 +108,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -172,7 +172,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return nloc_intregquad;
+ }
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+diff --git a/backends/s390_retval.c b/backends/s390_retval.c
+index a927d46..2043f98 100644
+--- a/backends/s390_retval.c
++++ b/backends/s390_retval.c
+@@ -87,7 +87,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -127,7 +127,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return size <= asize ? nloc_intreg : nloc_intregpair;
+ }
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+diff --git a/backends/sh_retval.c b/backends/sh_retval.c
+index d44f260..33d7d96 100644
+--- a/backends/sh_retval.c
++++ b/backends/sh_retval.c
+@@ -84,7 +84,7 @@ sh_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/backends/sparc_retval.c b/backends/sparc_retval.c
+index e1b1775..fb81cdc 100644
+--- a/backends/sparc_retval.c
++++ b/backends/sparc_retval.c
+@@ -91,7 +91,7 @@ sparc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/backends/tilegx_retval.c b/backends/tilegx_retval.c
+index db81a20..7f7d24b 100644
+--- a/backends/tilegx_retval.c
++++ b/backends/tilegx_retval.c
+@@ -79,7 +79,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+@@ -113,7 +113,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ return nloc_intreg;
+ }
+
+- /* Else fall through. */
++ FALLTHROUGH;
+ case DW_TAG_structure_type:
+ case DW_TAG_class_type:
+ case DW_TAG_union_type:
+diff --git a/backends/x86_64_regs.c b/backends/x86_64_regs.c
+index 8430440..ef987da 100644
+--- a/backends/x86_64_regs.c
++++ b/backends/x86_64_regs.c
+@@ -87,7 +87,7 @@ x86_64_register_info (Ebl *ebl __attribute__ ((unused)),
+
+ case 6 ... 7:
+ *type = DW_ATE_address;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case 0 ... 5:
+ name[0] = 'r';
+ name[1] = baseregs[regno][0];
+diff --git a/backends/x86_64_retval.c b/backends/x86_64_retval.c
+index b3799ae..f9114cb 100644
+--- a/backends/x86_64_retval.c
++++ b/backends/x86_64_retval.c
+@@ -100,7 +100,7 @@ x86_64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ typedie = dwarf_formref_die (attr, &die_mem);
+ tag = DWARF_TAG_OR_RETURN (typedie);
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_TAG_base_type:
+ case DW_TAG_enumeration_type:
+diff --git a/config/eu.am b/config/eu.am
+index 8fe1e25..b6ec581 100644
+--- a/config/eu.am
++++ b/config/eu.am
+@@ -62,7 +62,9 @@ NULL_DEREFERENCE_WARNING=
+ endif
+
+ if HAVE_IMPLICIT_FALLTHROUGH_WARNING
+-IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough
++# Use strict fallthrough. Only __attribute__((fallthrough)) will prevent the
++# warning
++IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough=5
+ else
+ IMPLICIT_FALLTHROUGH_WARNING=
+ endif
+diff --git a/configure.ac b/configure.ac
+index 1f1856d..698efbb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -360,6 +360,12 @@ CFLAGS="$old_CFLAGS"])
+ AM_CONDITIONAL(HAVE_IMPLICIT_FALLTHROUGH_WARNING,
+ [test "x$ac_cv_implicit_fallthrough" != "xno"])
+
++# Assume the fallthrough attribute is supported if -Wimplict-fallthrough is supported
++if test "$ac_cv_implicit_fallthrough" = "yes"; then
++ AC_DEFINE([HAVE_FALLTHROUGH], [1],
++ [Defined if __attribute__((fallthrough)) is supported])
++fi
++
+ dnl Check if we have argp available from our libc
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+diff --git a/lib/eu-config.h b/lib/eu-config.h
+index 400cdc6..e8d4ec2 100644
+--- a/lib/eu-config.h
++++ b/lib/eu-config.h
+@@ -186,5 +186,12 @@ asm (".section predict_data, \"aw\"; .previous\n"
+ # define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING"
+ #endif
+
++#ifndef FALLTHROUGH
++# ifdef HAVE_FALLTHROUGH
++# define FALLTHROUGH __attribute__ ((fallthrough))
++# else
++# define FALLTHROUGH ((void) 0)
++# endif
++#endif
+
+ #endif /* eu-config.h */
+diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
+index 60fd6d4..837a3a8 100644
+--- a/libcpu/i386_disasm.c
++++ b/libcpu/i386_disasm.c
+@@ -819,7 +819,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
+ ++param_start;
+ break;
+ }
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ str = "";
+ assert (! "INVALID not handled");
+diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
+index ef1ac35..6fa7ce3 100644
+--- a/libcpu/i386_parse.c
++++ b/libcpu/i386_parse.c
+@@ -1047,7 +1047,7 @@ yytnamerr (char *yyres, const char *yystr)
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+- /* Fall through. */
++ FALLTHROUGH;
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+@@ -2042,7 +2042,7 @@ yyabortlab:
+ yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+- /* Fall through. */
++ FALLTHROUGH;
+ #endif
+
+ yyreturn:
+diff --git a/libdw/cfi.c b/libdw/cfi.c
+index daa845f..341e055 100644
+--- a/libdw/cfi.c
++++ b/libdw/cfi.c
+@@ -138,7 +138,7 @@ execute_cfi (Dwarf_CFI *cache,
+
+ case DW_CFA_advance_loc1:
+ operand = *program++;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case DW_CFA_advance_loc + 0 ... DW_CFA_advance_loc + CFI_PRIMARY_MAX:
+ advance_loc:
+ loc += operand * cie->code_alignment_factor;
+@@ -301,7 +301,7 @@ execute_cfi (Dwarf_CFI *cache,
+
+ case DW_CFA_restore_extended:
+ get_uleb128 (operand, program, end);
+- /* Fallthrough */
++ FALLTHROUGH;
+ case DW_CFA_restore + 0 ... DW_CFA_restore + CFI_PRIMARY_MAX:
+
+ if (unlikely (abi_cfi) && likely (opcode == DW_CFA_restore))
+diff --git a/libdw/dwarf_frame_register.c b/libdw/dwarf_frame_register.c
+index 37e8e91..d0159fb 100644
+--- a/libdw/dwarf_frame_register.c
++++ b/libdw/dwarf_frame_register.c
+@@ -62,7 +62,7 @@ dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem,
+ /* Use the default rule for registers not yet mentioned in CFI. */
+ if (fs->cache->default_same_value)
+ goto same_value;
+- /*FALLTHROUGH*/
++ FALLTHROUGH;
+ case reg_undefined:
+ /* The value is known to be unavailable. */
+ break;
+diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c
+index 6950a37..3fc9384 100644
+--- a/libdwfl/dwfl_report_elf.c
++++ b/libdwfl/dwfl_report_elf.c
+@@ -174,7 +174,7 @@ __libdwfl_elf_address_range (Elf *elf, GElf_Addr base, bool add_p_vaddr,
+ /* An assigned base address is meaningless for these. */
+ base = 0;
+ add_p_vaddr = true;
+- /* Fallthrough. */
++ FALLTHROUGH;
+ case ET_DYN:
+ default:;
+ size_t phnum;
+diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c
+index 4dc9c43..eaea495 100644
+--- a/libdwfl/frame_unwind.c
++++ b/libdwfl/frame_unwind.c
+@@ -442,7 +442,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops,
+ }
+ if (val1 == 0)
+ break;
+- /* FALLTHRU */
++ FALLTHROUGH;
+ case DW_OP_skip:;
+ Dwarf_Word offset = op->offset + 1 + 2 + (int16_t) op->number;
+ const Dwarf_Op *found = bsearch ((void *) (uintptr_t) offset, ops, nops,
+diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c
+index f80a1a5..ca4f155 100644
+--- a/libebl/eblobjnote.c
++++ b/libebl/eblobjnote.c
+@@ -223,7 +223,7 @@ ebl_object_note (Ebl *ebl, const char *name, uint32_t type,
+ free (buf);
+ break;
+ }
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ default:
+ /* Unknown type. */
+diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
+index a51bf70..5351518 100644
+--- a/libelf/elf32_updatenull.c
++++ b/libelf/elf32_updatenull.c
+@@ -232,7 +232,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum)
+ __libelf_seterrno (ELF_E_GROUP_NOT_REL);
+ return -1;
+ }
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+ case SHT_SYMTAB_SHNDX:
+ sh_entsize = elf_typesize (32, ELF_T_WORD, 1);
+ break;
+diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
+index 6f85038..6de206a 100644
+--- a/libelf/elf_begin.c
++++ b/libelf/elf_begin.c
+@@ -582,7 +582,7 @@ read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd,
+ ? sizeof (Elf32_Ehdr) : sizeof (Elf64_Ehdr)))
+ return file_read_elf (fildes, NULL, mem.header, offset, maxsize, cmd,
+ parent);
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ default:
+ break;
+@@ -1097,7 +1097,7 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *ref)
+ retval = NULL;
+ break;
+ }
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ case ELF_C_READ:
+ case ELF_C_READ_MMAP:
+diff --git a/libelf/elf_cntl.c b/libelf/elf_cntl.c
+index ab13ffb..fd68178 100644
+--- a/libelf/elf_cntl.c
++++ b/libelf/elf_cntl.c
+@@ -62,7 +62,7 @@ elf_cntl (Elf *elf, Elf_Cmd cmd)
+ result = -1;
+ break;
+ }
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ case ELF_C_FDDONE:
+ /* Mark the file descriptor as not usable. */
+diff --git a/src/addr2line.c b/src/addr2line.c
+index ba414a7..444ee52 100644
+--- a/src/addr2line.c
++++ b/src/addr2line.c
+@@ -618,7 +618,7 @@ handle_address (const char *string, Dwfl *dwfl)
+ case 1:
+ addr = 0;
+ j = i;
+- /* Fallthrough */
++ FALLTHROUGH;
+ case 2:
+ if (string[j] != '\0')
+ break;
+diff --git a/src/elfcompress.c b/src/elfcompress.c
+index 8e0d5c5..25378a4 100644
+--- a/src/elfcompress.c
++++ b/src/elfcompress.c
+@@ -149,7 +149,7 @@ parse_opt (int key, char *arg __attribute__ ((unused)),
+ N_("Only one input file allowed together with '-o'"));
+ /* We only use this for checking the number of arguments, we don't
+ actually want to consume them. */
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ return ARGP_ERR_UNKNOWN;
+ }
+diff --git a/src/elflint.c b/src/elflint.c
+index 51e53c2..df1b3a0 100644
+--- a/src/elflint.c
++++ b/src/elflint.c
+@@ -1764,7 +1764,7 @@ section [%2d] '%s': entry %zu: pointer does not match address of section [%2d] '
+ if (dyn->d_tag < DT_ADDRRNGLO || dyn->d_tag > DT_ADDRRNGHI)
+ /* Value is no pointer. */
+ break;
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ case DT_AUXILIARY:
+ case DT_FILTER:
+@@ -3993,7 +3993,7 @@ section [%2zu] '%s': merge flag set but entry size is zero\n"),
+ case SHT_NOBITS:
+ if (is_debuginfo)
+ break;
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ ERROR (gettext ("\
+ section [%2zu] '%s' has unexpected type %d for an executable section\n"),
+@@ -4137,7 +4137,7 @@ section [%2zu] '%s': ELF header says this is the section header string table but
+ ERROR (gettext ("\
+ section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"),
+ cnt, section_name (ebl, cnt));
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+ case SHT_SYMTAB:
+ check_symtab (ebl, ehdr, shdr, cnt);
+ break;
+@@ -4336,7 +4336,7 @@ section [%2d] '%s': unknown core file note type %" PRIu32
+ if (nhdr.n_namesz == sizeof "Linux"
+ && !memcmp (data->d_buf + name_offset, "Linux", sizeof "Linux"))
+ break;
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ if (shndx == 0)
+ ERROR (gettext ("\
+diff --git a/src/objdump.c b/src/objdump.c
+index 860cfac..0dd9a6a 100644
+--- a/src/objdump.c
++++ b/src/objdump.c
+@@ -223,7 +223,7 @@ parse_opt (int key, char *arg,
+ }
+ /* We only use this for checking the number of arguments, we don't
+ actually want to consume them. */
+- /* Fallthrough */
++ FALLTHROUGH;
+ default:
+ return ARGP_ERR_UNKNOWN;
+ }
+diff --git a/src/readelf.c b/src/readelf.c
+index 346eccd..6a27e7e 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -465,7 +465,7 @@ parse_opt (int key, char *arg,
+ print_string_sections = true;
+ break;
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+ case 'x':
+ add_dump_section (arg, false);
+ any_control_option = true;
+@@ -6029,7 +6029,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
+ dwarf_form_name (form), (uintmax_t) num);
+ return DWARF_CB_OK;
+ }
+- /* else fallthrough */
++ FALLTHROUGH;
+
+ /* These cases always take a loclistptr and no constant. */
+ case DW_AT_location:
+@@ -6195,7 +6195,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
+ print_block (block.length, block.data);
+ break;
+ }
+- /* Fall through. */
++ FALLTHROUGH;
+
+ case DW_AT_location:
+ case DW_AT_data_location:
+@@ -9227,7 +9227,7 @@ handle_auxv_note (Ebl *ebl, Elf *core, GElf_Word descsz, GElf_Off desc_pos)
+ printf (" %s\n", name);
+ break;
+ }
+- /* Fall through */
++ FALLTHROUGH;
+ case 'x': /* hex */
+ case 'p': /* address */
+ case 's': /* address of string */
+diff --git a/src/strings.c b/src/strings.c
+index d214356..03d0f13 100644
+--- a/src/strings.c
++++ b/src/strings.c
+@@ -246,7 +246,7 @@ parse_opt (int key, char *arg,
+ case 'b':
+ case 'B':
+ big_endian = true;
+- /* FALLTHROUGH */
++ FALLTHROUGH;
+
+ case 'l':
+ case 'L':
+diff --git a/tests/backtrace.c b/tests/backtrace.c
+index 21abe8a..f5dd761 100644
+--- a/tests/backtrace.c
++++ b/tests/backtrace.c
+@@ -127,7 +127,7 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
+ assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
+ break;
+ }
+- /* FALLTHRU */
++ FALLTHROUGH;
+ case 4:
+ /* Some simple frame unwinders get this wrong and think sigusr2
+ is calling itself again. Allow it and just pretend there is
+diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
+index 8d5b53c..62c549d 100644
+--- a/tests/elfstrmerge.c
++++ b/tests/elfstrmerge.c
+@@ -578,7 +578,8 @@ main (int argc, char **argv)
+ break;
+
+ case SHT_DYNAMIC:
+- /* Fallthrough. There are string indexes in here, but
++ FALLTHROUGH;
++ /* There are string indexes in here, but
+ they (should) point to a allocated string table,
+ which we don't alter. */
+ default:
+--
+2.14.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
index 8864d44..a42ce7b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
@@ -1,4 +1,4 @@
-From 010b0c57e748440eb1ceb3d977875f2488d2b4ce Mon Sep 17 00:00:00 2001
+From ef0981744669149a00dd0439a54dac30de7b56a7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 16 Aug 2017 10:06:26 +0800
Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
@@ -10,6 +10,7 @@
Rebase to 0.170
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
---
Makefile.am | 2 +-
lib/color.c | 3 ++-
@@ -83,7 +84,7 @@
69 files changed, 95 insertions(+), 64 deletions(-)
diff --git a/Makefile.am b/Makefile.am
-index 2ff444e..41f77df 100644
+index 2ff444e7..41f77df8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h
@@ -96,7 +97,7 @@
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/lib/color.c b/lib/color.c
-index f62389d..a2a84b4 100644
+index f62389d5..a2a84b46 100644
--- a/lib/color.c
+++ b/lib/color.c
@@ -32,13 +32,14 @@
@@ -116,7 +117,7 @@
/* Prototype for option handler. */
static error_t parse_opt (int key, char *arg, struct argp_state *state);
diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
-index dac2a5f..43016fc 100644
+index dac2a5f5..43016fc3 100644
--- a/lib/fixedsizehash.h
+++ b/lib/fixedsizehash.h
@@ -30,7 +30,6 @@
@@ -128,7 +129,7 @@
#include <system.h>
diff --git a/lib/system.h b/lib/system.h
-index 9203335..1a60131 100644
+index 92033355..1a601319 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -50,6 +50,16 @@
@@ -149,7 +150,7 @@
#ifndef MAX
#define MAX(m, n) ((m) < (n) ? (n) : (m))
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
-index 0cde384..217b054 100644
+index 0cde384f..217b0541 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -30,7 +30,7 @@
@@ -162,7 +163,7 @@
#include <stddef.h>
#include <stdlib.h>
diff --git a/libasm/asm_end.c b/libasm/asm_end.c
-index ced24f5..4ad918c 100644
+index ced24f50..4ad918c4 100644
--- a/libasm/asm_end.c
+++ b/libasm/asm_end.c
@@ -32,7 +32,7 @@
@@ -175,7 +176,7 @@
#include <stdio.h>
#include <stdlib.h>
diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c
-index ddbb25d..74a598d 100644
+index ddbb25df..74a598d9 100644
--- a/libasm/asm_newscn.c
+++ b/libasm/asm_newscn.c
@@ -32,7 +32,7 @@
@@ -188,7 +189,7 @@
#include <stdlib.h>
#include <string.h>
diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c
-index aae5eae..6d76016 100644
+index aae5eae6..6d760165 100644
--- a/libcpu/i386_gendis.c
+++ b/libcpu/i386_gendis.c
@@ -31,7 +31,7 @@
@@ -201,7 +202,7 @@
#include <stdio.h>
#include <stdlib.h>
diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c
-index ba5f4aa..b1e4191 100644
+index ba5f4aa5..b1e41916 100644
--- a/libcpu/i386_lex.c
+++ b/libcpu/i386_lex.c
@@ -577,7 +577,7 @@ char *i386_text;
@@ -214,7 +215,7 @@
#include <libeu.h>
diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
-index ef1ac35..48f2e64 100644
+index 6fa7ce3d..bb270061 100644
--- a/libcpu/i386_parse.c
+++ b/libcpu/i386_parse.c
@@ -107,7 +107,7 @@
@@ -227,7 +228,7 @@
#include <libintl.h>
#include <math.h>
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
-index ff8c291..89e792a 100644
+index ff8c291e..89e792aa 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
@@ -105,7 +105,8 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
@@ -241,7 +242,7 @@
libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
# The rpath is necessary for libebl because its $ORIGIN use will
diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c
-index 28a8cf6..29aeb3f 100644
+index 28a8cf6e..29aeb3f7 100644
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
@@ -31,7 +31,7 @@
@@ -254,7 +255,7 @@
#include <stdlib.h>
#include "libdwP.h"
diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c
-index ee0c164..b06ab59 100644
+index ee0c1646..b06ab596 100644
--- a/libdwfl/dwfl_build_id_find_elf.c
+++ b/libdwfl/dwfl_build_id_find_elf.c
@@ -31,6 +31,7 @@
@@ -275,7 +276,7 @@
{
*file_name = name;
diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
-index 7bcf61c..c345797 100644
+index 7bcf61cc..c345797a 100644
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
@@ -297,7 +298,7 @@
return elf_errmsg (error & 0xffff);
case OTHER_ERROR (LIBDW):
diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
-index 9775ace..511c4a6 100644
+index 9775aced..511c4a6a 100644
--- a/libdwfl/dwfl_module_getdwarf.c
+++ b/libdwfl/dwfl_module_getdwarf.c
@@ -35,6 +35,7 @@
@@ -309,7 +310,7 @@
#include "../libelf/libelfP.h"
#include "system.h"
diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
-index 6d5a42a..9267788 100644
+index 6d5a42a6..9267788d 100644
--- a/libdwfl/find-debuginfo.c
+++ b/libdwfl/find-debuginfo.c
@@ -389,7 +389,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
@@ -322,7 +323,7 @@
fd = find_debuginfo_in_path (mod, canon,
debuglink_file, debuglink_crc,
diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c
-index f849128..6f0aca1 100644
+index f849128d..6f0aca1b 100644
--- a/libdwfl/libdwfl_crc32_file.c
+++ b/libdwfl/libdwfl_crc32_file.c
@@ -29,6 +29,15 @@
@@ -342,7 +343,7 @@
#define crc32 __libdwfl_crc32
#include <libdwflP.h>
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
-index 9d0fef2..9fc09b8 100644
+index 9d0fef2c..9fc09b88 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -40,6 +40,7 @@
@@ -354,7 +355,7 @@
#include <errno.h>
#include <stdio.h>
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
-index 5371396..2e66dfd 100644
+index 53713963..2e66dfdd 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -32,7 +32,7 @@
@@ -367,7 +368,7 @@
#include <dwarf.h>
#include <stdlib.h>
diff --git a/libelf/elf.h b/libelf/elf.h
-index 5cf2b93..990b3af 100644
+index 5cf2b934..990b3afb 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -21,7 +21,9 @@
@@ -392,7 +393,7 @@
#endif /* elf.h */
diff --git a/libelf/libelf.h b/libelf/libelf.h
-index 547c0f5..dd78799 100644
+index 547c0f50..dd78799e 100644
--- a/libelf/libelf.h
+++ b/libelf/libelf.h
@@ -29,6 +29,7 @@
@@ -404,7 +405,7 @@
#include <sys/types.h>
diff --git a/libelf/libelfP.h b/libelf/libelfP.h
-index 7ee6625..5840899 100644
+index 7ee6625a..58408997 100644
--- a/libelf/libelfP.h
+++ b/libelf/libelfP.h
@@ -32,6 +32,7 @@
@@ -416,7 +417,7 @@
#include <errno.h>
#include <stdbool.h>
diff --git a/src/addr2line.c b/src/addr2line.c
-index ba414a7..04b7116 100644
+index 444ee52c..9596fa67 100644
--- a/src/addr2line.c
+++ b/src/addr2line.c
@@ -23,7 +23,7 @@
@@ -429,7 +430,7 @@
#include <inttypes.h>
#include <libdwfl.h>
diff --git a/src/ar.c b/src/ar.c
-index ec32cee..4efd729 100644
+index ec32cee5..4efd729c 100644
--- a/src/ar.c
+++ b/src/ar.c
@@ -22,7 +22,7 @@
@@ -442,7 +443,7 @@
#include <gelf.h>
#include <libintl.h>
diff --git a/src/arlib.c b/src/arlib.c
-index e0839aa..1143658 100644
+index e0839aab..1143658f 100644
--- a/src/arlib.c
+++ b/src/arlib.c
@@ -21,7 +21,7 @@
@@ -455,7 +456,7 @@
#include <inttypes.h>
#include <libintl.h>
diff --git a/src/arlib2.c b/src/arlib2.c
-index 553fc57..46443d0 100644
+index 553fc57b..46443d0e 100644
--- a/src/arlib2.c
+++ b/src/arlib2.c
@@ -20,7 +20,7 @@
@@ -468,7 +469,7 @@
#include <limits.h>
#include <string.h>
diff --git a/src/elfcmp.c b/src/elfcmp.c
-index 5046420..cff183f 100644
+index 50464207..cff183fa 100644
--- a/src/elfcmp.c
+++ b/src/elfcmp.c
@@ -23,7 +23,7 @@
@@ -481,7 +482,7 @@
#include <locale.h>
#include <libintl.h>
diff --git a/src/elflint.c b/src/elflint.c
-index 51e53c2..da0b0dc 100644
+index df1b3a03..67d8d134 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -24,7 +24,7 @@
@@ -494,7 +495,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/findtextrel.c b/src/findtextrel.c
-index 8f1e239..71463af 100644
+index 8f1e239a..71463af3 100644
--- a/src/findtextrel.c
+++ b/src/findtextrel.c
@@ -23,7 +23,7 @@
@@ -507,7 +508,7 @@
#include <gelf.h>
#include <libdw.h>
diff --git a/src/nm.c b/src/nm.c
-index 969c6d3..3113c04 100644
+index 969c6d35..3113c04c 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -26,7 +26,7 @@
@@ -520,7 +521,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/objdump.c b/src/objdump.c
-index 860cfac..61e67bf 100644
+index 0dd9a6aa..9c8bf149 100644
--- a/src/objdump.c
+++ b/src/objdump.c
@@ -21,7 +21,7 @@
@@ -533,7 +534,7 @@
#include <inttypes.h>
#include <libintl.h>
diff --git a/src/ranlib.c b/src/ranlib.c
-index cc0ee23..ae851e4 100644
+index cc0ee233..ae851e40 100644
--- a/src/ranlib.c
+++ b/src/ranlib.c
@@ -24,7 +24,7 @@
@@ -546,7 +547,7 @@
#include <gelf.h>
#include <libintl.h>
diff --git a/src/readelf.c b/src/readelf.c
-index 346eccd..c831aa8 100644
+index 6a27e7e0..4759a965 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -25,7 +25,7 @@
@@ -559,7 +560,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/size.c b/src/size.c
-index ad8dbcb..fd83be0 100644
+index ad8dbcbb..fd83be06 100644
--- a/src/size.c
+++ b/src/size.c
@@ -21,7 +21,7 @@
@@ -572,7 +573,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/stack.c b/src/stack.c
-index 6f2ff69..6da0243 100644
+index 6f2ff69f..6da0243d 100644
--- a/src/stack.c
+++ b/src/stack.c
@@ -18,7 +18,7 @@
@@ -585,7 +586,7 @@
#include <inttypes.h>
#include <stdio.h>
diff --git a/src/strings.c b/src/strings.c
-index d214356..76cb26b 100644
+index 03d0f133..5c311cbd 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -25,7 +25,7 @@
@@ -598,7 +599,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/strip.c b/src/strip.c
-index c7830ec..0d7f148 100644
+index c7830ec6..0d7f148d 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -24,7 +24,7 @@
@@ -611,7 +612,7 @@
#include <fnmatch.h>
#include <gelf.h>
diff --git a/src/unstrip.c b/src/unstrip.c
-index 5074909..3d4f952 100644
+index 50749093..3d4f9525 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -31,7 +31,7 @@
@@ -624,7 +625,7 @@
#include <fnmatch.h>
#include <libintl.h>
diff --git a/tests/addrscopes.c b/tests/addrscopes.c
-index 791569f..54f4311 100644
+index 791569f5..54f4311b 100644
--- a/tests/addrscopes.c
+++ b/tests/addrscopes.c
@@ -25,7 +25,7 @@
@@ -637,7 +638,7 @@
diff --git a/tests/allregs.c b/tests/allregs.c
-index 286f7e3..c9de089 100644
+index 286f7e3c..c9de0897 100644
--- a/tests/allregs.c
+++ b/tests/allregs.c
@@ -21,7 +21,7 @@
@@ -650,7 +651,7 @@
#include <argp.h>
#include <assert.h>
diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c
-index a387d8f..955c27d 100644
+index a387d8ff..955c27d1 100644
--- a/tests/backtrace-data.c
+++ b/tests/backtrace-data.c
@@ -27,7 +27,7 @@
@@ -663,7 +664,7 @@
#include <dwarf.h>
#if defined(__x86_64__) && defined(__linux__)
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
-index 2dc8a9a..24ca7fb 100644
+index 2dc8a9a2..24ca7fb0 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -22,7 +22,7 @@
@@ -676,7 +677,7 @@
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/tests/backtrace.c b/tests/backtrace.c
-index 21abe8a..d733248 100644
+index f5dd761f..a93a8f03 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -24,7 +24,7 @@
@@ -689,7 +690,7 @@
#include <dwarf.h>
#ifdef __linux__
diff --git a/tests/buildid.c b/tests/buildid.c
-index 87c1877..2953e6b 100644
+index 87c18773..2953e6bb 100644
--- a/tests/buildid.c
+++ b/tests/buildid.c
@@ -23,7 +23,7 @@
@@ -702,7 +703,7 @@
#include <stdlib.h>
#include <sys/types.h>
diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c
-index 6d97d50..ee7e559 100644
+index 6d97d500..ee7e559e 100644
--- a/tests/debugaltlink.c
+++ b/tests/debugaltlink.c
@@ -23,7 +23,7 @@
@@ -715,7 +716,7 @@
#include <stdlib.h>
#include <sys/types.h>
diff --git a/tests/debuglink.c b/tests/debuglink.c
-index 935d102..741cb81 100644
+index 935d1029..741cb814 100644
--- a/tests/debuglink.c
+++ b/tests/debuglink.c
@@ -21,7 +21,7 @@
@@ -728,7 +729,7 @@
#include <stdlib.h>
#include <sys/types.h>
diff --git a/tests/deleted.c b/tests/deleted.c
-index 6be35bc..0190711 100644
+index 6be35bc2..01907113 100644
--- a/tests/deleted.c
+++ b/tests/deleted.c
@@ -21,7 +21,7 @@
@@ -741,7 +742,7 @@
#ifdef __linux__
#include <sys/prctl.h>
diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c
-index 21e470a..1ea1e3b 100644
+index 21e470a3..1ea1e3b2 100644
--- a/tests/dwfl-addr-sect.c
+++ b/tests/dwfl-addr-sect.c
@@ -23,7 +23,7 @@
@@ -754,7 +755,7 @@
#include <argp.h>
#include ELFUTILS_HEADER(dwfl)
diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c
-index aa8030e..02c8bef 100644
+index aa8030e1..02c8bef9 100644
--- a/tests/dwfl-bug-addr-overflow.c
+++ b/tests/dwfl-bug-addr-overflow.c
@@ -20,7 +20,7 @@
@@ -767,7 +768,7 @@
#include ELFUTILS_HEADER(dwfl)
diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c
-index 689cdd7..5973da3 100644
+index 689cdd79..5973da39 100644
--- a/tests/dwfl-bug-fd-leak.c
+++ b/tests/dwfl-bug-fd-leak.c
@@ -24,7 +24,7 @@
@@ -780,7 +781,7 @@
#include <dwarf.h>
diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c
-index 1ee989f..fd62e65 100644
+index 1ee989f8..fd62e653 100644
--- a/tests/dwfl-bug-getmodules.c
+++ b/tests/dwfl-bug-getmodules.c
@@ -18,7 +18,7 @@
@@ -793,7 +794,7 @@
static const Dwfl_Callbacks callbacks =
{
diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c
-index a4e97d3..f471587 100644
+index a4e97d3c..f471587c 100644
--- a/tests/dwfl-report-elf-align.c
+++ b/tests/dwfl-report-elf-align.c
@@ -20,7 +20,7 @@
@@ -806,7 +807,7 @@
#include <string.h>
#include <stdlib.h>
diff --git a/tests/dwfllines.c b/tests/dwfllines.c
-index 90379dd..cbdf6c4 100644
+index 90379dd2..cbdf6c4c 100644
--- a/tests/dwfllines.c
+++ b/tests/dwfllines.c
@@ -27,7 +27,7 @@
@@ -819,7 +820,7 @@
int
main (int argc, char *argv[])
diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c
-index 0027f96..e68d3bc 100644
+index 0027f96b..e68d3bca 100644
--- a/tests/dwflmodtest.c
+++ b/tests/dwflmodtest.c
@@ -23,7 +23,7 @@
@@ -832,7 +833,7 @@
#include <argp.h>
#include ELFUTILS_HEADER(dwfl)
diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c
-index 49ac334..cf07830 100644
+index 49ac3346..cf078301 100644
--- a/tests/dwflsyms.c
+++ b/tests/dwflsyms.c
@@ -25,7 +25,7 @@
@@ -845,7 +846,7 @@
static const char *
diff --git a/tests/early-offscn.c b/tests/early-offscn.c
-index 924cb9e..6f60d5a 100644
+index 924cb9ef..6f60d5a3 100644
--- a/tests/early-offscn.c
+++ b/tests/early-offscn.c
@@ -19,7 +19,7 @@
@@ -858,7 +859,7 @@
#include <gelf.h>
#include <stdio.h>
diff --git a/tests/ecp.c b/tests/ecp.c
-index 38a6859..743cea5 100644
+index 38a6859e..743cea5d 100644
--- a/tests/ecp.c
+++ b/tests/ecp.c
@@ -20,7 +20,7 @@
@@ -871,7 +872,7 @@
#include <gelf.h>
#include <stdlib.h>
diff --git a/tests/find-prologues.c b/tests/find-prologues.c
-index ba8ae37..76f5f04 100644
+index ba8ae371..76f5f047 100644
--- a/tests/find-prologues.c
+++ b/tests/find-prologues.c
@@ -25,7 +25,7 @@
@@ -884,7 +885,7 @@
#include <fnmatch.h>
diff --git a/tests/funcretval.c b/tests/funcretval.c
-index 8d19d11..c8aaa93 100644
+index 8d19d117..c8aaa93d 100644
--- a/tests/funcretval.c
+++ b/tests/funcretval.c
@@ -25,7 +25,7 @@
@@ -897,7 +898,7 @@
#include <fnmatch.h>
diff --git a/tests/funcscopes.c b/tests/funcscopes.c
-index 9c90185..dbccb89 100644
+index 9c901858..dbccb89e 100644
--- a/tests/funcscopes.c
+++ b/tests/funcscopes.c
@@ -25,7 +25,7 @@
@@ -910,7 +911,7 @@
#include <fnmatch.h>
diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c
-index 055aede..9c394dd 100644
+index 055aede0..9c394dd0 100644
--- a/tests/getsrc_die.c
+++ b/tests/getsrc_die.c
@@ -19,7 +19,7 @@
@@ -923,7 +924,7 @@
#include <inttypes.h>
#include <libelf.h>
diff --git a/tests/line2addr.c b/tests/line2addr.c
-index e0d65d3..9bf0023 100644
+index e0d65d3d..9bf0023b 100644
--- a/tests/line2addr.c
+++ b/tests/line2addr.c
@@ -26,7 +26,7 @@
@@ -936,7 +937,7 @@
static void
diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c
-index d0f4302..8da4fbd 100644
+index d0f43023..8da4fbdf 100644
--- a/tests/low_high_pc.c
+++ b/tests/low_high_pc.c
@@ -25,7 +25,7 @@
@@ -949,7 +950,7 @@
#include <fnmatch.h>
diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c
-index d50355e..3c41f40 100644
+index d50355e9..3c41f40b 100644
--- a/tests/md5-sha1-test.c
+++ b/tests/md5-sha1-test.c
@@ -19,7 +19,7 @@
@@ -962,7 +963,7 @@
#include "md5.h"
#include "sha1.h"
diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c
-index 6f027df..1ce5e6e 100644
+index 6f027dfe..1ce5e6ed 100644
--- a/tests/rdwrmmap.c
+++ b/tests/rdwrmmap.c
@@ -19,7 +19,7 @@
@@ -975,7 +976,7 @@
#include <fcntl.h>
#include <unistd.h>
diff --git a/tests/saridx.c b/tests/saridx.c
-index 8a450d8..b387801 100644
+index 8a450d82..b3878013 100644
--- a/tests/saridx.c
+++ b/tests/saridx.c
@@ -17,7 +17,7 @@
@@ -988,7 +989,7 @@
#include <gelf.h>
#include <stdio.h>
diff --git a/tests/sectiondump.c b/tests/sectiondump.c
-index 3033fed..8e888db 100644
+index 3033fedc..8e888db3 100644
--- a/tests/sectiondump.c
+++ b/tests/sectiondump.c
@@ -18,7 +18,7 @@
@@ -1001,7 +1002,7 @@
#include <gelf.h>
#include <inttypes.h>
diff --git a/tests/varlocs.c b/tests/varlocs.c
-index c3fba89..e043ea2 100644
+index c3fba89e..e043ea2c 100644
--- a/tests/varlocs.c
+++ b/tests/varlocs.c
@@ -25,7 +25,7 @@
@@ -1014,7 +1015,7 @@
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c
-index b876c10..afb2823 100644
+index b876c10b..afb28232 100644
--- a/tests/vdsosyms.c
+++ b/tests/vdsosyms.c
@@ -18,7 +18,7 @@
@@ -1026,6 +1027,3 @@
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch
deleted file mode 100644
index b2623f9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-GCC7 adds -Wimplicit-fallthrough to warn when a switch case falls through,
-however this causes warnings (which are promoted to errors) with the elfutils
-patches from Debian for mips and parisc, which use fallthrough's by design.
-
-Explicitly mark the intentional fallthrough switch cases with a comment to
-disable the warnings where the fallthrough behaviour is desired.
-
-Upstream-Status: Pending [debian]
-Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-
-Index: elfutils-0.168/backends/parisc_retval.c
-===================================================================
---- elfutils-0.168.orig/backends/parisc_retval.c
-+++ elfutils-0.168/backends/parisc_retval.c
-@@ -166,7 +166,7 @@ parisc_return_value_location_ (Dwarf_Die
- return nloc_intregpair;
-
- /* Else fall through. */
-- }
-+ } // fallthrough
-
- case DW_TAG_structure_type:
- case DW_TAG_class_type:
-Index: elfutils-0.168/backends/mips_retval.c
-===================================================================
---- elfutils-0.168.orig/backends/mips_retval.c
-+++ elfutils-0.168/backends/mips_retval.c
-@@ -387,7 +387,7 @@ mips_return_value_location (Dwarf_Die *f
- else
- return nloc_intregpair;
- }
-- }
-+ } // fallthrough
-
- /* Fallthrough to handle large types */
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
index 44fda7f..56f852a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
@@ -1,10 +1,10 @@
Upstream-Status: Backport [from debian]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Index: b/backends/parisc_init.c
+Index: elfutils-0.170/backends/parisc_init.c
===================================================================
--- /dev/null
-+++ b/backends/parisc_init.c
++++ elfutils-0.170/backends/parisc_init.c
@@ -0,0 +1,73 @@
+/* Initialization of PA-RISC specific backend library.
+ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
@@ -79,10 +79,10 @@
+
+ return MODVERSION;
+}
-Index: b/backends/parisc_regs.c
+Index: elfutils-0.170/backends/parisc_regs.c
===================================================================
--- /dev/null
-+++ b/backends/parisc_regs.c
++++ elfutils-0.170/backends/parisc_regs.c
@@ -0,0 +1,159 @@
+/* Register names and numbers for PA-RISC DWARF.
+ Copyright (C) 2005, 2006 Red Hat, Inc.
@@ -243,10 +243,10 @@
+ name[namelen++] = '\0';
+ return namelen;
+}
-Index: b/backends/parisc_reloc.def
+Index: elfutils-0.170/backends/parisc_reloc.def
===================================================================
--- /dev/null
-+++ b/backends/parisc_reloc.def
++++ elfutils-0.170/backends/parisc_reloc.def
@@ -0,0 +1,128 @@
+/* List the relocation types for PA-RISC. -*- C -*-
+ Copyright (C) 2005 Red Hat, Inc.
@@ -376,10 +376,10 @@
+RELOC_TYPE (TLS_DTPMOD64, DYN)
+
+#define NO_RELATIVE_RELOC 1
-Index: b/backends/parisc_retval.c
+Index: elfutils-0.170/backends/parisc_retval.c
===================================================================
--- /dev/null
-+++ b/backends/parisc_retval.c
++++ elfutils-0.170/backends/parisc_retval.c
@@ -0,0 +1,213 @@
+/* Function return value location for Linux/PA-RISC ABI.
+ Copyright (C) 2005 Red Hat, Inc.
@@ -594,10 +594,10 @@
+ return parisc_return_value_location_ (functypedie, locp, 1);
+}
+
-Index: b/backends/parisc_symbol.c
+Index: elfutils-0.170/backends/parisc_symbol.c
===================================================================
--- /dev/null
-+++ b/backends/parisc_symbol.c
++++ elfutils-0.170/backends/parisc_symbol.c
@@ -0,0 +1,112 @@
+/* PA-RISC specific symbolic name handling.
+ Copyright (C) 2002, 2005 Red Hat, Inc.
@@ -711,10 +711,10 @@
+ return ELF_T_NUM;
+ }
+}
-Index: b/backends/libebl_parisc.h
+Index: elfutils-0.170/backends/libebl_parisc.h
===================================================================
--- /dev/null
-+++ b/backends/libebl_parisc.h
++++ elfutils-0.170/backends/libebl_parisc.h
@@ -0,0 +1,9 @@
+#ifndef _LIBEBL_HPPA_H
+#define _LIBEBL_HPPA_H 1
@@ -725,10 +725,10 @@
+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
+
+#endif
-Index: b/backends/Makefile.am
+Index: elfutils-0.170/backends/Makefile.am
===================================================================
---- a/backends/Makefile.am
-+++ b/backends/Makefile.am
+--- elfutils-0.170.orig/backends/Makefile.am
++++ elfutils-0.170/backends/Makefile.am
@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
@@ -744,7 +744,7 @@
noinst_LIBRARIES = $(libebl_pic)
noinst_DATA = $(libebl_pic:_pic.a=.so)
-@@ -128,6 +128,9 @@ endif
+@@ -124,6 +124,9 @@ cpu_bpf = ../libcpu/libcpu_bpf.a
libebl_bpf_pic_a_SOURCES = $(bpf_SRCS)
am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os)
@@ -752,13 +752,13 @@
+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
@rm -f $(@:.so=.map)
-Index: b/libelf/elf.h
+Index: elfutils-0.170/libelf/elf.h
===================================================================
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -2055,16 +2055,24 @@ enum
+--- elfutils-0.170.orig/libelf/elf.h
++++ elfutils-0.170/libelf/elf.h
+@@ -2056,16 +2056,24 @@ enum
#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
#define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
@@ -783,7 +783,7 @@
#define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
#define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
#define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
-@@ -2073,6 +2081,7 @@ enum
+@@ -2074,6 +2082,7 @@ enum
#define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
#define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
#define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
@@ -791,7 +791,7 @@
#define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
#define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
#define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
-@@ -2098,6 +2107,8 @@ enum
+@@ -2099,6 +2108,8 @@ enum
#define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
#define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
#define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch
new file mode 100644
index 0000000..b1d322d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect/0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch
@@ -0,0 +1,91 @@
+From f0049b4b2ea55b3b3c53bf6f0275654801c755d2 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 28 Sep 2017 15:54:55 +0800
+Subject: [PATCH] expect: Fix segfaults if Tcl is built with stubs and Expect
+ is used directly from C program
+
+Description: This dirty hack fixes segfaults if Tcl is built with stubs
+ and Expect is used directly from C program.
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588817
+Example:
+ #include <stdio.h>
+ #include <tcl8.5/expect.h>
+ int main()
+ {
+ FILE *pipe;
+ char *some_command = "uname";
+ char datum;
+ pipe = exp_popen(some_command);
+ if (pipe == NULL) return 1;
+ while ((datum = getc (pipe)) != EOF)
+ printf("%c",datum);
+ }
+Example:
+ #include <stdio.h>
+ #include "expect.h"
+ main()
+ {
+ int fd = 0;
+ fd = exp_spawnl("echo", "echo", "Hello User: Whats up?", (char*) 0);
+ switch (exp_expectl(fd, exp_regexp, "ser:", 1, exp_end)) {
+ case 1: {
+ printf("GOT ser:\n");
+ break;
+ }
+ default: {
+ printf("DEFAULT\n");
+ return 1;
+ }
+ }
+ printf("Normal Exit\n");
+ return 0;
+ }
+Author: Sergei Golovan <sgolovan@debian.org>
+
+Upstream-Status: Pending
+This patch is backported from fedora changes for expect:
+http://pkgs.fedoraproject.org/cgit/rpms/expect.git/commit/
+?h=master&id=b6737eed550be93182f2ed194e836a6cbbcf4fa3
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ exp_clib.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/exp_clib.c b/exp_clib.c
+index 172c05e..19341d5 100644
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -114,7 +114,11 @@ extern unsigned long strtoul _ANSI_ARGS_((CONST char *string,
+ #include <stdlib.h> /* for malloc */
+ #endif
+
+-#include <tcl.h>
++#define ckalloc(x) Tcl_Alloc(x)
++#define ckfree(x) Tcl_Free(x)
++extern char *Tcl_ErrnoMsg(int err);
++extern char *Tcl_Alloc(unsigned int size);
++extern void Tcl_Free(char *ptr);
+ #include "expect.h"
+ #define TclRegError exp_TclRegError
+
+@@ -389,7 +393,7 @@ char *exp;
+ FAIL("regexp too big");
+
+ /* Allocate space. */
+- r = (regexp *)ckalloc(sizeof(regexp) + (unsigned)rcstate->regsize);
++ r = (regexp *)malloc(sizeof(regexp) + (unsigned)rcstate->regsize);
+ if (r == NULL)
+ FAIL("out of space");
+
+@@ -399,7 +403,7 @@ char *exp;
+ rcstate->regcode = r->program;
+ regc(MAGIC, rcstate);
+ if (reg(0, &flags, rcstate) == NULL) {
+- ckfree ((char*) r);
++ free((char*) r);
+ return(NULL);
+ }
+
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.4.bb
similarity index 92%
rename from import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.4.bb
index e2d24e8..96eacd9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -18,17 +18,16 @@
inherit autotools update-alternatives
-PR = "r1"
-
SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
file://0001-configure.in.patch \
file://0002-tcl.m4.patch \
file://01-example-shebang.patch \
file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \
file://0001-Resolve-string-formatting-issues.patch \
+ file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \
"
-SRC_URI[md5sum] = "44e1a4f4c877e9ddc5a542dfa7ecc92b"
-SRC_URI[sha256sum] = "b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040"
+SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
+SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch b/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch
index d31ac59..319f9db 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch
@@ -14,17 +14,14 @@
1 file changed, 1 insertion(+)
diff --git a/magic/Magdir/commands b/magic/Magdir/commands
-index 1a46efd..255c04b 100644
+index f6ad1c8..f79e7dd 100644
--- a/magic/Magdir/commands
+++ b/magic/Magdir/commands
@@ -57,6 +57,7 @@
0 string/wt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk
- 0 regex/4096 =^[A-Za-z0-9_]{0,100}BEGIN[A-Za-z0-9_]{0,100}[{] awk or perl script text
+ 0 regex/4096 =^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{] awk or perl script text
+!:strength - 12
# AT&T Bell Labs' Plan 9 shell
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.32.bb
similarity index 96%
rename from import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/file/file_5.32.bb
index 1b1f502..5e15925 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.32.bb
@@ -19,7 +19,7 @@
file://0001-Add-P-prompt-into-Usage-info.patch \
"
-SRCREV = "70c5f15060c7ad81150177de83a3e64500a54c9f"
+SRCREV = "d474e35513940dbca039b510b4de705b44f5bd9c"
S = "${WORKDIR}/git"
inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
index 032833a..29792ef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
@@ -2,11 +2,11 @@
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Index: flex-2.5.37/doc/Makefile.am
+Index: flex-2.6.0/doc/Makefile.am
===================================================================
---- flex-2.5.37.orig/doc/Makefile.am 2012-07-21 04:18:27.000000000 +0300
-+++ flex-2.5.37/doc/Makefile.am 2013-07-30 17:57:09.834834531 +0300
-@@ -2,7 +2,7 @@
+--- flex-2.6.0.orig/doc/Makefile.am
++++ flex-2.6.0/doc/Makefile.am
+@@ -2,7 +2,7 @@ help2man = @HELP2MAN@
info_TEXINFOS = flex.texi
dist_man_MANS = flex.1
@@ -14,4 +14,4 @@
+EXTRA_DIST= flex.pdf
CLEANFILES = \
- flex.hks \
+ flex.aux \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
index a906fe8..b89b751 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
@@ -43,6 +43,10 @@
create_wrapper ${D}/${bindir}/flex M4=${M4}
}
+PACKAGES =+ "${PN}-libfl"
+
+FILES_${PN}-libfl = "${libdir}/libfl.so.* ${libdir}/libfl_pic.so.*"
+
RDEPENDS_${PN} += "m4"
RDEPENDS_${PN}-ptest += "bash gawk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4.inc
deleted file mode 100644
index 42eabef..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4.inc
+++ /dev/null
@@ -1,145 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "6.4.0"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "6.4.0"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-6.4:${FILE_DIRNAME}/gcc-6.4/backport:"
-
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
-
-LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
-"
-
-
-BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz"
-#SRCREV = "bd9a826d5448db11d29d2ec5884e7e679066f140"
-#BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git"
-#BASEURI ?= "ftp://sourceware.org/pub/gcc/snapshots/6.2.0-RC-20160815/gcc-6.2.0-RC-20160815.tar.bz2"
-
-SRC_URI = "\
- ${BASEURI} \
- file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
- file://0008-missing-execinfo_h.patch \
- file://0009-c99-snprintf.patch \
- file://0010-gcc-poison-system-directories.patch \
- file://0011-gcc-poison-dir-extend.patch \
- file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0013-64-bit-multilib-hack.patch \
- file://0014-optional-libstdc.patch \
- file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0016-COLLECT_GCC_OPTIONS.patch \
- file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0018-fortran-cross-compile-hack.patch \
- file://0019-cpp-honor-sysroot.patch \
- file://0020-MIPS64-Default-to-N64-ABI.patch \
- file://0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0022-gcc-Fix-argument-list-too-long-error.patch \
- file://0023-Disable-sdt.patch \
- file://0024-libtool.patch \
- file://0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
- file://0028-export-CPP.patch \
- file://0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
- file://0031-Ensure-target-gcc-headers-can-be-included.patch \
- file://0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
- file://0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
- file://0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
- file://0035-aarch64-Add-support-for-musl-ldso.patch \
- file://0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
- file://0037-handle-sysroot-support-for-nativesdk-gcc.patch \
- file://0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
- file://0039-Fix-various-_FOR_BUILD-and-related-variables.patch \
- file://0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
- file://0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
- file://0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch \
- file://0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
- file://0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \
- file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
- file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
- file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
- file://0048-sync-gcc-stddef.h-with-musl.patch \
- file://0054_all_nopie-all-flags.patch \
- file://0055-unwind_h-glibc26.patch \
- ${BACKPORTS} \
-"
-BACKPORTS = "\
- file://CVE-2016-6131.patch \
- file://0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch \
- file://0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch \
- file://0001-i386-Move-struct-ix86_frame-to-machine_function.patch \
- file://0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch \
- file://0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch \
- file://0004-x86-Add-mindirect-branch.patch \
- file://0005-x86-Add-mfunction-return.patch \
- file://0006-x86-Add-mindirect-branch-register.patch \
- file://0007-x86-Add-V-register-operand-modifier.patch \
- file://0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch \
- file://0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch \
- file://0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch \
- file://0011-i386-Update-mfunction-return-for-return-with-pop.patch \
- file://0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch \
- file://0013-gcc-sanitizers.patch \
-"
-
-SRC_URI[md5sum] = "11ba51a0cfb8471927f387c8895fe232"
-SRC_URI[sha256sum] = "850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4"
-
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git"
-B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-
-# Language Overrides
-FORTRAN = ""
-JAVA = ""
-
-LTO = "--enable-lto"
-
-EXTRA_OECONF_BASE = "\
- ${LTO} \
- --enable-libssp \
- --enable-libitm \
- --disable-bootstrap \
- --disable-libmudflap \
- --with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
- --enable-linker-build-id \
- --with-ppl=no \
- --with-cloog=no \
- --enable-checking=release \
- --enable-cheaders=c_global \
- --without-isl \
-"
-
-EXTRA_OECONF_INITIAL = "\
- --disable-libmudflap \
- --disable-libgomp \
- --disable-libitm \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no \
- --without-isl \
- gcc_cv_libc_provides_ssp=yes \
-"
-
-EXTRA_OECONF_PATHS = "\
- --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
- --with-sysroot=/not/exist \
- --with-build-sysroot=${STAGING_DIR_TARGET} \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 415f091..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 92ed30da16b7487b334f739be177eb39885ab772 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:37:11 +0400
-Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- configure | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 35f231e..bfadc33 100755
---- a/configure
-+++ b/configure
-@@ -7550,7 +7550,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
-diff --git a/configure.ac b/configure.ac
-index 74bf58a..197d61b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3149,7 +3149,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch
deleted file mode 100644
index 01e7c95..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6dde3da24ef4b9b357bca670d8551cab3fdda843 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:48:10 +0400
-Subject: [PATCH 08/46] missing-execinfo_h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- boehm-gc/include/gc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
-index 6b38f2d..fca98ff 100644
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch
deleted file mode 100644
index d62341a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b794f1f1c1c7c06f3f0d78cf76c4fb90c2ab8dfb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:03 +0400
-Subject: [PATCH 09/46] c99-snprintf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/c_std/cstdio | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
-index a4119ba..8396f43 100644
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -144,7 +144,7 @@ namespace std
- using ::vsprintf;
- } // namespace std
-
--#if _GLIBCXX_USE_C99_STDIO
-+#if _GLIBCXX_USE_C99_STDIO || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system-directories.patch
deleted file mode 100644
index ac4cf44..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-From d76250323dad69212c958e4857a98d99ab51a39e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 10/46] gcc: poison-system-directories
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
----
- gcc/common.opt | 4 ++++
- gcc/config.in | 6 ++++++
- gcc/configure | 16 ++++++++++++++++
- gcc/configure.ac | 10 ++++++++++
- gcc/doc/invoke.texi | 9 +++++++++
- gcc/gcc.c | 2 ++
- gcc/incpath.c | 19 +++++++++++++++++++
- 7 files changed, 66 insertions(+)
-
-diff --git a/gcc/common.opt b/gcc/common.opt
-index 67048db..733185c 100644
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -659,6 +659,10 @@ Wreturn-local-addr
- Common Var(warn_return_local_addr) Init(1) Warning
- Warn about returning a pointer/reference to a local or temporary variable.
-
-+Wpoison-system-directories
-+Common Var(flag_poison_system_directories) Init(1) Warning
-+Warn for -I and -L options using system directories if cross compiling
-+
- Wshadow
- Common Var(warn_shadow) Warning
- Warn when one local variable shadows another.
-diff --git a/gcc/config.in b/gcc/config.in
-index 115cb61..105b30f 100644
---- a/gcc/config.in
-+++ b/gcc/config.in
-@@ -187,6 +187,12 @@
- #endif
-
-
-+/* Define to warn for use of native system header directories */
-+#ifndef USED_FOR_TARGET
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+#endif
-+
-+
- /* Define if you want all operations on RTL (the basic data structure of the
- optimizer and back end) to be checked for dynamic type safety at runtime.
- This is quite expensive. */
-diff --git a/gcc/configure b/gcc/configure
-index 1c6e340..8f83152 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -942,6 +942,7 @@ with_system_zlib
- enable_maintainer_mode
- enable_link_mutex
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_host_shared
- enable_libquadmath_support
-@@ -1681,6 +1682,8 @@ Optional Features:
- --enable-version-specific-runtime-libs
- specify that runtime libraries should be installed
- in a compiler-specific directory
-+ --enable-poison-system-directories
-+ warn for use of native system header directories
- --enable-plugin enable plugin support
- --enable-host-shared build host code as shared libraries
- --disable-libquadmath-support
-@@ -28908,6 +28911,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
- fi
-
-
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+ enableval=$enable_poison_system_directories;
-+else
-+ enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-+
- # Substitute configuration variables
-
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 6c1dcd9..0fccaef 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5861,6 +5861,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
- [specify that runtime libraries should be
- installed in a compiler-specific directory])])
-
-+AC_ARG_ENABLE([poison-system-directories],
-+ AS_HELP_STRING([--enable-poison-system-directories],
-+ [warn for use of native system header directories]),,
-+ [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+ [1],
-+ [Define to warn for use of native system header directories])
-+fi
-+
- # Substitute configuration variables
- AC_SUBST(subdirs)
- AC_SUBST(srcdir)
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 821f8fd..8bb49e7 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -284,6 +284,7 @@ Objective-C and Objective-C++ Dialects}.
- -Wparentheses -Wno-pedantic-ms-format @gol
- -Wplacement-new -Wplacement-new=@var{n} @gol
- -Wpointer-arith -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wno-pragmas -Wredundant-decls -Wno-return-local-addr @gol
- -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol
- -Wshift-overflow -Wshift-overflow=@var{n} @gol
-@@ -4723,6 +4724,14 @@ made up of data only and thus requires no special treatment. But, for
- most targets, it is made up of code and thus requires the stack to be
- made executable in order for the program to work properly.
-
-+@item -Wno-poison-system-directories
-+@opindex Wno-poison-system-directories
-+Do not warn for @option{-I} or @option{-L} options using system
-+directories such as @file{/usr/include} when cross compiling. This
-+option is intended for use in chroot environments when such
-+directories contain the correct headers and libraries for the target
-+system rather than the host.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 1af5920..4cfef7f 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1017,6 +1017,8 @@ proper position among the other output files. */
- "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
- "%X %{o*} %{e*} %{N} %{n} %{r}\
- %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
-+ %{Wno-poison-system-directories:--no-poison-system-directories} \
-+ %{Werror=poison-system-directories:--error-poison-system-directories} \
- %{static:} %{L*} %(mfwrap) %(link_libgcc) " \
- VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
- %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index ea40f4a..856da41 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -26,6 +26,7 @@
- #include "intl.h"
- #include "incpath.h"
- #include "cppdefault.h"
-+#include "diagnostic-core.h"
-
- /* Microsoft Windows does not natively support inodes.
- VMS has non-numeric inodes. */
-@@ -381,6 +382,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- }
- fprintf (stderr, _("End of search list.\n"));
- }
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+ if (flag_poison_system_directories)
-+ {
-+ struct cpp_dir *p;
-+
-+ for (p = heads[QUOTE]; p; p = p->next)
-+ {
-+ if ((!strncmp (p->name, "/usr/include", 12))
-+ || (!strncmp (p->name, "/usr/local/include", 18))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ warning (OPT_Wpoison_system_directories,
-+ "include location \"%s\" is unsafe for "
-+ "cross-compilation",
-+ p->name);
-+ }
-+ }
-+#endif
- }
-
- /* Use given -I paths for #include "..." but not #include <...>, and
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch
deleted file mode 100644
index a1736ae..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a1c24b59def393e43cd50b6768604a212c788ed3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:00:34 +0400
-Subject: [PATCH 11/46] gcc-poison-dir-extend
-
-Add /sw/include and /opt/include based on the original
-zecke-no-host-includes.patch patch. The original patch checked for
-/usr/include, /sw/include and /opt/include and then triggered a failure and
-aborted.
-
-Instead, we add the two missing items to the current scan. If the user
-wants this to be a failure, they can add "-Werror=poison-system-directories".
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/incpath.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index 856da41..d2fc82c 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -392,7 +392,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- {
- if ((!strncmp (p->name, "/usr/include", 12))
- || (!strncmp (p->name, "/usr/local/include", 18))
-- || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
-+ || (!strncmp (p->name, "/sw/include", 11))
-+ || (!strncmp (p->name, "/opt/include", 12)))
- warning (OPT_Wpoison_system_directories,
- "include location \"%s\" is unsafe for "
- "cross-compilation",
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
deleted file mode 100644
index 939b070..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 00ef5f0f2a8d3b33aeb1e55c0d23439f4dd495af Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:08:31 +0400
-Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
-
-Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
-
-This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
-
-Other changes I had to do include:
-
-- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
-
-- passing the right CFLAGS to configure scripts as exported environment variables
-
-I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
-
-Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
-
-Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- configure | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/configure b/configure
-index bfadc33..755d382 100755
---- a/configure
-+++ b/configure
-@@ -6819,6 +6819,38 @@ fi
-
-
-
-+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
-+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
-+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
-+# We want to ensure that TARGET libraries (which we know are built with
-+# gcc) are built with "-O2 -g", so include those options when setting
-+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
-+if test "x$CFLAGS_FOR_TARGET" = x; then
-+ CFLAGS_FOR_TARGET=$CFLAGS
-+ case " $CFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
-+ esac
-+ case " $CFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
-+ esac
-+fi
-+
-+
-+if test "x$CXXFLAGS_FOR_TARGET" = x; then
-+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
-+ case " $CXXFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
-+ esac
-+ case " $CXXFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
-+ esac
-+fi
-+
-+
- # Handle --with-headers=XXX. If the value is not "yes", the contents of
- # the named directory are copied to $(tooldir)/sys-include.
- if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch
deleted file mode 100644
index e31cde4..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 7fc7a070ac53a55950a1eac76f02877d4106b4b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:10:06 +0400
-Subject: [PATCH 13/46] 64-bit multilib hack.
-
-GCC has internal multilib handling code but it assumes a very specific rigid directory
-layout. The build system implementation of multilib layout is very generic and allows
-complete customisation of the library directories.
-
-This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
-directory, "."). We need to do this for each multilib that is configured as we don't
-know which compiler options may be being passed into the compiler. Since we have a compiler
-per mulitlib at this point that isn't an issue.
-
-The one problem is the target compiler is only going to work for the default multlilib at
-this point. Ideally we'd figure out which multilibs were being enabled with which paths
-and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
-and override these platform defaults in its build config.
-
-RP 15/8/11
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/i386/t-linux64 | 6 ++----
- gcc/config/mips/t-linux64 | 10 +++-------
- gcc/config/rs6000/t-linux64 | 5 ++---
- 3 files changed, 7 insertions(+), 14 deletions(-)
-
-diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index c0cc8a3..365a5d6 100644
---- a/gcc/config/i386/t-linux64
-+++ b/gcc/config/i386/t-linux64
-@@ -32,7 +32,5 @@
- #
- comma=,
- MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
--MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
--MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
-+MULTILIB_DIRNAMES = . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
-index 16c8adf..b932ace 100644
---- a/gcc/config/mips/t-linux64
-+++ b/gcc/config/mips/t-linux64
-@@ -17,10 +17,6 @@
- # <http://www.gnu.org/licenses/>.
-
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
--MULTILIB_DIRNAMES = n32 32 64
--MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
--MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
--MULTILIB_OSDIRNAMES = \
-- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
-- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
-- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+MULTILIB_DIRNAMES = . . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-+
-diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
-index fa7550b..9b5d9ef 100644
---- a/gcc/config/rs6000/t-linux64
-+++ b/gcc/config/rs6000/t-linux64
-@@ -26,10 +26,9 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
-
- MULTILIB_OPTIONS := m64/m32
--MULTILIB_DIRNAMES := 64 32
-+MULTILIB_DIRNAMES := . .
- MULTILIB_EXTRA_OPTS :=
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- $(COMPILE) $<
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch
deleted file mode 100644
index 44b0cc7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 36275f7981bdaf919bbc9b51a7c7fae1e192adb3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:12:56 +0400
-Subject: [PATCH 14/46] optional libstdc
-
-gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
-will not run correctly since by default the linker will try to link against libstdc++
-which shouldn't exist yet. We need an option to disable -lstdc++
-option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
-driver. This patch adds such an option which only disables the -lstdc++.
-
-A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
-do this officially, the likely answer is don't build libstdc++ separately.
-
-RP 29/6/10
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- gcc/c-family/c.opt | 4 ++++
- gcc/cp/g++spec.c | 1 +
- gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++-
- gcc/gcc.c | 1 +
- 4 files changed, 37 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 4f86876..660da6c 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1647,6 +1647,10 @@ nostdinc++
- C++ ObjC++
- Do not search standard system include directories for C++.
-
-+nostdlib++
-+Driver
-+Do not link standard C++ runtime library
-+
- o
- C ObjC C++ ObjC++ Joined Separate
- ; Documented in common.opt
-diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
-index 03cbde0..3642540 100644
---- a/gcc/cp/g++spec.c
-+++ b/gcc/cp/g++spec.c
-@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
- switch (decoded_options[i].opt_index)
- {
- case OPT_nostdlib:
-+ case OPT_nostdlib__:
- case OPT_nodefaultlibs:
- library = -1;
- break;
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 8bb49e7..84d68aa 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -207,6 +207,9 @@ in the following sections.
- -fno-weak -nostdinc++ @gol
- -fvisibility-inlines-hidden @gol
- -fvisibility-ms-compat @gol
-+-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
-+-fvtv-counts -fvtv-debug @gol
-+-nostdlib++ @gol
- -fext-numeric-literals @gol
- -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol
- -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol
-@@ -470,7 +473,7 @@ Objective-C and Objective-C++ Dialects}.
- -s -static -static-libgcc -static-libstdc++ @gol
- -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
- -static-libmpx -static-libmpxwrappers @gol
---shared -shared-libgcc -symbolic @gol
-+-shared -shared-libgcc -symbolic -nostdlib++ @gol
- -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
- -u @var{symbol} -z @var{keyword}}
-
-@@ -10601,6 +10604,33 @@ library subroutines.
- constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
- GNU Compiler Collection (GCC) Internals}.)
-
-+@item -nostdlib++
-+@opindex nostdlib++
-+Do not use the standard system C++ runtime libraries when linking.
-+Only the libraries you specify will be passed to the linker.
-+
-+@cindex @option{-lgcc}, use with @option{-nostdlib}
-+@cindex @option{-nostdlib} and unresolved references
-+@cindex unresolved references and @option{-nostdlib}
-+@cindex @option{-lgcc}, use with @option{-nodefaultlibs}
-+@cindex @option{-nodefaultlibs} and unresolved references
-+@cindex unresolved references and @option{-nodefaultlibs}
-+One of the standard libraries bypassed by @option{-nostdlib} and
-+@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
-+which GCC uses to overcome shortcomings of particular machines, or special
-+needs for some languages.
-+(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
-+Collection (GCC) Internals},
-+for more discussion of @file{libgcc.a}.)
-+In most cases, you need @file{libgcc.a} even when you want to avoid
-+other standard libraries. In other words, when you specify @option{-nostdlib}
-+or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
-+This ensures that you have no unresolved references to internal GCC
-+library subroutines.
-+(An example of such an internal subroutine is @code{__main}, used to ensure C++
-+constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
-+GNU Compiler Collection (GCC) Internals}.)
-+
- @item -pie
- @opindex pie
- Produce a position independent executable on targets that support it.
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 4cfef7f..da0b482 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1028,6 +1028,7 @@ proper position among the other output files. */
- %(mflib) " STACK_SPLIT_SPEC "\
- %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
-+ %{!nostdlib++:}\
- %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}"
- #endif
-
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index 6fc7346..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 9346f6042d8f7f85a75ca2af15f3b8d234985165 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 15/46] 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 8f83152..5e72f17 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27018,13 +27018,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 0fccaef..dd8f6fa 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4522,13 +4522,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.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index c154864..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1033bc2d4efc5c301bb822b607a673f5b10cc69f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:16:28 +0400
-Subject: [PATCH 16/46] COLLECT_GCC_OPTIONS
-
-This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
-invoke collect2.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/gcc.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index da0b482..7ca129f 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -4591,6 +4591,15 @@ set_collect_gcc_options (void)
- sizeof ("COLLECT_GCC_OPTIONS=") - 1);
-
- first_time = TRUE;
-+#ifdef HAVE_LD_SYSROOT
-+ if (target_system_root_changed && target_system_root)
-+ {
-+ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
-+ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
-+ obstack_grow (&collect_obstack, "'", 1);
-+ first_time = FALSE;
-+ }
-+#endif
- for (i = 0; (int) i < n_switches; i++)
- {
- const char *const *args;
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
deleted file mode 100644
index 0dbabd9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 67123a306880af997a99ae514677c2da4973bd1a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:17:25 +0400
-Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in
- ${B}
-
-Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
-the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-While compiling gcc-crosssdk-initial-x86_64 on some host, there is
-occasionally failure that test the existance of default.h doesn't
-work, the reason is tm_include_list='** defaults.h' rather than
-tm_include_list='** ./defaults.h'
-
-So we add the test condition for this situation.
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/Makefile.in | 2 +-
- gcc/configure | 4 ++--
- gcc/configure.ac | 4 ++--
- gcc/mkconfig.sh | 4 ++--
- 4 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 6c5adc0..9a1d466 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -517,7 +517,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
- TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
-
- xmake_file=@xmake_file@
--tmake_file=@tmake_file@
-+tmake_file=@tmake_file@ ./t-oe
- TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
- TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
- TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
-diff --git a/gcc/configure b/gcc/configure
-index 5e72f17..389b6d5 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -12130,8 +12130,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index dd8f6fa..91ac800 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1883,8 +1883,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index 67dfac6..b73e08d 100644
---- a/gcc/mkconfig.sh
-+++ b/gcc/mkconfig.sh
-@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
- if [ $# -ge 1 ]; then
- echo '#ifdef IN_GCC' >> ${output}T
- for file in "$@"; do
-- if test x"$file" = x"defaults.h"; then
-+ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
- postpone_defaults_h="yes"
- else
- echo "# include \"$file\"" >> ${output}T
-@@ -109,7 +109,7 @@ esac
-
- # If we postponed including defaults.h, add the #include now.
- if test x"$postpone_defaults_h" = x"yes"; then
-- echo "# include \"defaults.h\"" >> ${output}T
-+ echo "# include \"./defaults.h\"" >> ${output}T
- fi
-
- # Add multiple inclusion protection guard, part two.
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch
deleted file mode 100644
index b43d89e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e360dc3e0f1e0b9b001ef722fcf66f8120a03dbc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:01 +0400
-Subject: [PATCH 18/46] fortran cross-compile hack.
-
-* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
-used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
-directory.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libgfortran/configure | 2 +-
- libgfortran/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/configure b/libgfortran/configure
-index f746f6f..b4f3278 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -12734,7 +12734,7 @@ esac
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- ac_ext=${ac_fc_srcext-f}
- ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
-index 8f377bb..67710b5 100644
---- a/libgfortran/configure.ac
-+++ b/libgfortran/configure.ac
-@@ -240,7 +240,7 @@ AC_SUBST(enable_static)
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- AC_PROG_FC(gfortran)
-
- # extra LD Flags which are required for targets
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch
deleted file mode 100644
index 417a5ed..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 98d9c0c1b5552294b2130f7304bfb522da323442 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:22:00 +0400
-Subject: [PATCH 19/46] cpp: honor sysroot.
-
-Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
-preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
-rather than the --sysroot option specified on the commandline. If access to that directory is
-permission denied (unreadable), gcc will error.
-
-This happens when ccache is in use due to the fact it uses preprocessed source files.
-
-The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
--isystem, -isysroot happen and the correct sysroot is used.
-
-[YOCTO #2074]
-
-RP 2012/04/13
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/cp/lang-specs.h | 2 +-
- gcc/gcc.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index 9707fac..fe487a2 100644
---- a/gcc/cp/lang-specs.h
-+++ b/gcc/cp/lang-specs.h
-@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3. If not see
- {".ii", "@c++-cpp-output", 0, 0, 0},
- {"@c++-cpp-output",
- "%{!M:%{!MM:%{!E:\
-- cc1plus -fpreprocessed %i %(cc1_options) %2\
-+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
- %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 7ca129f..04fa81d 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1329,7 +1329,7 @@ static const struct compiler default_compilers[] =
- %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
- {".i", "@cpp-output", 0, 0, 0},
- {"@cpp-output",
-- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
- {".s", "@assembler", 0, 0, 0},
- {"@assembler",
- "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch
deleted file mode 100644
index ba612f5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 1f15447fbcf65142627af8a9694761534da8d0d1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:23:08 +0400
-Subject: [PATCH 20/46] MIPS64: Default to N64 ABI
-
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE config specific]
----
- gcc/config.gcc | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index f66e48c..9c6d156 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2065,29 +2065,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
- default_mips_arch=mips32
- ;;
- mips64el-st-linux-gnu)
-- default_mips_abi=n32
-+ default_mips_abi=64
- tm_file="${tm_file} mips/st.h"
- tmake_file="${tmake_file} mips/t-st"
- enable_mips_multilibs="yes"
- ;;
- mips64octeon*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
- target_cpu_default=MASK_SOFT_FLOAT_ABI
- enable_mips_multilibs="yes"
- ;;
- mipsisa64r6*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- default_mips_arch=mips64r6
- enable_mips_multilibs="yes"
- ;;
- mipsisa64r2*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- default_mips_arch=mips64r2
- enable_mips_multilibs="yes"
- ;;
- mips64*-*-linux* | mipsisa64*-*-linux*)
-- default_mips_abi=n32
-+ default_mips_abi=64
- enable_mips_multilibs="yes"
- ;;
- esac
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
deleted file mode 100644
index 6675ce3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From 9f73c8918b63e6a1c9b79384fac411d1056eec1c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:24:50 +0400
-Subject: [PATCH 21/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
- relative to SYSTEMLIBS_DIR
-
-This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
-relative to SYSTEMLIBS_DIR which can be set in generated headers
-This breaks the assumption of hardcoded multilib in gcc
-Change is only for the supported architectures in OE including
-SH, sparc, alpha for possible future support (if any)
-
-Removes the do_headerfix task in metadata
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE configuration]
----
- gcc/config/alpha/linux-elf.h | 4 ++--
- gcc/config/arm/linux-eabi.h | 4 ++--
- gcc/config/arm/linux-elf.h | 2 +-
- gcc/config/i386/linux.h | 2 +-
- gcc/config/i386/linux64.h | 6 +++---
- gcc/config/linux.h | 8 ++++----
- gcc/config/mips/linux.h | 12 ++++++------
- gcc/config/rs6000/linux64.h | 16 ++++++----------
- gcc/config/sh/linux.h | 2 +-
- gcc/config/sparc/linux.h | 2 +-
- gcc/config/sparc/linux64.h | 4 ++--
- 11 files changed, 29 insertions(+), 33 deletions(-)
-
-diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index a0764d3..02f7a7c 100644
---- a/gcc/config/alpha/linux-elf.h
-+++ b/gcc/config/alpha/linux-elf.h
-@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
- #define EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index ace8481..4010435 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -68,8 +68,8 @@
- GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
-
- #undef GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
--#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
-+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
- #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
-
- #define GLIBC_DYNAMIC_LINKER \
-diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index a94bd2d..0220628 100644
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -62,7 +62,7 @@
-
- #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #define LINUX_TARGET_LINK_SPEC "%{h*} \
- %{static:-Bstatic} \
-diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index d37a875..edde586 100644
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index 73d22e3..f4b5615 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
- #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
--#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-
- #undef MUSL_DYNAMIC_LINKER32
- #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 9aeeb94..b055652 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
- GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
- supporting both 32-bit and 64-bit compilation. */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index fa253b6..da02c8d 100644
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
-
- #define GLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
-
- #undef UCLIBC_DYNAMIC_LINKER32
- #define UCLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
- #undef UCLIBC_DYNAMIC_LINKER64
- #define UCLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
- #define UCLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
-
- #undef MUSL_DYNAMIC_LINKER32
- #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index fefa0c4..7173938 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -412,16 +412,11 @@ extern int dot_symbols;
- #undef LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
-
--#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
--
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
- #ifdef LINUX64_DEFAULT_ABI_ELFv2
--#define GLIBC_DYNAMIC_LINKER64 \
--"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
--":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
- #else
--#define GLIBC_DYNAMIC_LINKER64 \
--"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
--":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
- #endif
-
- #define MUSL_DYNAMIC_LINKER32 \
-@@ -429,8 +424,9 @@ extern int dot_symbols;
- #define MUSL_DYNAMIC_LINKER64 \
- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
-
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
- "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index 2a036ac..50fb735 100644
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see
- "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
- "%{mfdpic:-fdpic}.so.1"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
-diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 9b32577..7bd66de 100644
---- a/gcc/config/sparc/linux.h
-+++ b/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
-diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index a1ef325..3bae3d5 100644
---- a/gcc/config/sparc/linux64.h
-+++ b/gcc/config/sparc/linux64.h
-@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #ifdef SPARC_BI_ARCH
-
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument-list-too-long-error.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument-list-too-long-error.patch
deleted file mode 100644
index fab6e4a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument-list-too-long-error.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From acce5157f6b3a1dc9a3676b7118ac887dc5693be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:26:37 +0400
-Subject: [PATCH 22/46] gcc: Fix argument list too long error.
-
-There would be an "Argument list too long" error when the
-build directory is longer than 200, this is caused by:
-
-headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
-
-The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
-it, use the $(sort list) of GNU make which can handle the too long list
-would fix the problem, the header would be short enough after sorted.
-The "tr ' ' '\012'" was used for translating the space to "\n", the
-$(sort list) doesn't need this.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 9a1d466..450cb79 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -3349,7 +3349,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
- # We keep the directory structure for files in config or c-family and .def
- # files. All other files are flattened to a single directory.
- $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
-- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
-+ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
- for file in $$headers; do \
- if [ -f $$file ] ; then \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch
deleted file mode 100644
index 0efd890..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 6573aec00ada35c48c1838c8491ce8f7798ae993 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:28:10 +0400
-Subject: [PATCH 23/46] Disable sdt.
-
-We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
-It may or may not exist from preivous builds though. To be determinstic, disable
-sdt.h usage always. This avoids build failures if the header is removed after configure
-but before libgcc is compiled for example.
-
-RP 2012/8/7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Disable sdt for libstdc++-v3.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [hack]
----
- gcc/configure | 12 ++++++------
- gcc/configure.ac | 18 +++++++++---------
- libstdc++-v3/configure | 6 +++---
- libstdc++-v3/configure.ac | 2 +-
- 4 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 389b6d5..73c264d 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -28528,12 +28528,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
- $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
- have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
--
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
--
--fi
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+#
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#
-+#fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
- $as_echo "$have_sys_sdt_h" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 91ac800..cecf121 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5514,15 +5514,15 @@ fi
- AC_SUBST([enable_default_ssp])
-
- # Test for <sys/sdt.h> on the target.
--GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
--AC_MSG_CHECKING(sys/sdt.h in the target C library)
--have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
-- AC_DEFINE(HAVE_SYS_SDT_H, 1,
-- [Define if your target C library provides sys/sdt.h])
--fi
--AC_MSG_RESULT($have_sys_sdt_h)
-+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
-+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
-+#have_sys_sdt_h=no
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+# AC_DEFINE(HAVE_SYS_SDT_H, 1,
-+# [Define if your target C library provides sys/sdt.h])
-+#fi
-+#AC_MSG_RESULT($have_sys_sdt_h)
-
- # Check if TFmode long double should be used by default or not.
- # Some glibc targets used DFmode long double, but with glibc 2.4
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 8a5481c..6a40e92 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -21735,11 +21735,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-- if test $glibcxx_cv_sys_sdt_h = yes; then
-+# if test $glibcxx_cv_sys_sdt_h = yes; then
-
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-
-- fi
-+# fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
- $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
-
-diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 9e19e99..0077ffd 100644
---- a/libstdc++-v3/configure.ac
-+++ b/libstdc++-v3/configure.ac
-@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
- GLIBCXX_CHECK_SC_NPROC_ONLN
- GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
- GLIBCXX_CHECK_SYSCTL_HW_NCPU
--GLIBCXX_CHECK_SDT_H
-+#GLIBCXX_CHECK_SDT_H
-
- # Check for available headers.
- AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch
deleted file mode 100644
index 1f73b5d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6c0aa5c2538829248547197718037ff0b9788676 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:29:11 +0400
-Subject: [PATCH 24/46] libtool
-
-libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
-when running on am x86_64 build host.
-
-This patch stops this speading to libdir in the libstdc++.la file within libtool.
-Arguably, it shouldn't be passing this into libtool in the first place but
-for now this resolves the nastiest problems this causes.
-
-func_normal_abspath would resolve an empty path to `pwd` so we need
-to filter the zero case.
-
-RP 2012/8/24
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- ltmain.sh | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 9503ec8..0121fba 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6359,6 +6359,10 @@ func_mode_link ()
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-+ if test -n "$install_libdir"; then
-+ func_normal_abspath "$install_libdir"
-+ install_libdir=$func_normal_abspath_result
-+ fi
-
- oldlibs=
- if test -z "$rpath"; then
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
deleted file mode 100644
index 3b7ee49..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From b1263a48553ce75f8c3bed4fe12122af57845567 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:30:32 +0400
-Subject: [PATCH 25/46] gcc: armv4: pass fix-v4bx to linker to support EABI.
-
-The LINK_SPEC for linux gets overwritten by linux-eabi.h which
-means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
-the option is not passed to linker when chosing march=armv4
-This patch redefines this in linux-eabi.h and reinserts it
-for eabi defaulting toolchains.
-
-We might want to send it upstream.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-eabi.h | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 4010435..aaea1c9 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -94,10 +94,14 @@
- #define MUSL_DYNAMIC_LINKER \
- "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-
-+/* For armv4 we pass --fix-v4bx to linker to support EABI */
-+#undef TARGET_FIX_V4BX_SPEC
-+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
--#define LINK_SPEC EABI_LINK_SPEC \
-+#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \
- LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
- LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
-
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
deleted file mode 100644
index be25be6..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From b5c305fc251299f2e328410b18cfb55c75b5f038 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:33:04 +0400
-Subject: [PATCH 26/46] Use the multilib config files from ${B} instead of
- using the ones from ${S}
-
-Use the multilib config files from ${B} instead of using the ones from ${S}
-so that the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 22 ++++++++++++++++++----
- gcc/configure.ac | 22 ++++++++++++++++++----
- 2 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 73c264d..377253e 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -12110,10 +12110,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -12124,6 +12134,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index cecf121..54e7619 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1863,10 +1863,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -1877,6 +1887,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
deleted file mode 100644
index d1bbebc..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From eb6178b7fb466ae429c56380c6dbc564a16d900a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:39:38 +0000
-Subject: [PATCH 27/46] Avoid using libdir from .la which usually points to a
- host path
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 0121fba..52bdbdb 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -5628,6 +5628,9 @@ func_mode_link ()
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
-+ # Instead of using libdir from .la which usually points to a host path,
-+ # use the path the .la is contained in.
-+ libdir="$abs_ladir"
- dir="$libdir"
- absdir="$libdir"
- fi
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch
deleted file mode 100644
index c212539..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 617184f35e97934d9e6268e71378574e2b776c2b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:40:59 +0000
-Subject: [PATCH 28/46] export CPP
-
-The OE environment sets and exports CPP as being the target gcc. When
-building gcc-cross-canadian for a mingw targetted sdk, the following can be found
-in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
-
-configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
-configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5
-configure:3666: $? = 0
-configure:3698: result: no
-configure:3786: checking how to run the C preprocessor
-configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
-configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
-configure:3876: $? = 0
-
-Note this is a *build* target (in build-x86_64-linux) so it should be
-using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
-headers are very different, using the wrong cpp is a real problem. It is leaking
-into configure through the CPP variable. Ultimately this leads to build
-failures related to not being able to include a process.h file for pem-unix.c.
-
-The fix is to ensure we export a sane CPP value into the build
-environment when using build targets. We could define a CPP_FOR_BUILD value which may be
-the version which needs to be upstreamed but for now, this fix is good enough to
-avoid the problem.
-
-RP 22/08/2013
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 1522e39..beb9b9a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
- AR="$(AR_FOR_BUILD)"; export AR; \
- AS="$(AS_FOR_BUILD)"; export AS; \
- CC="$(CC_FOR_BUILD)"; export CC; \
-+ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
deleted file mode 100644
index 47b9c0d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From e140700976e3b7eb4250b1ffde9bc16494456903 Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
-Date: Wed, 5 Feb 2014 16:52:31 +0200
-Subject: [PATCH 29/46] Enable SPE & AltiVec generation on powepc*linux target
-
-When is configured with --target=powerpc-linux, the resulting GCC will
-not be able to generate code for SPE targets (e500v1/v2).
-GCC configured with --target=powerpc-linuxspe will not be able to
-generate AltiVec instructions (for e6500).
-This patch modifies the configured file such that SPE or AltiVec code
-can be generated when gcc is configured with --target=powerpc-linux.
-The ABI and speciffic instructions can be selected through the
-"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
----
- gcc/config.gcc | 9 ++++++++-
- gcc/config/rs6000/linuxspe.h | 3 ---
- 2 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 9c6d156..18cff5a 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2392,7 +2392,14 @@ powerpc-*-rtems*)
- tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
- ;;
- powerpc*-*-linux*)
-- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+ case ${target} in
-+ powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+ ;;
-+ *)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h"
-+ ;;
-+ esac
- extra_options="${extra_options} rs6000/sysv4.opt"
- tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
- extra_objs="$extra_objs rs6000-linux.o"
-diff --git a/gcc/config/rs6000/linuxspe.h b/gcc/config/rs6000/linuxspe.h
-index 35623cd..f74e00d 100644
---- a/gcc/config/rs6000/linuxspe.h
-+++ b/gcc/config/rs6000/linuxspe.h
-@@ -27,6 +27,3 @@
- #undef TARGET_DEFAULT
- #define TARGET_DEFAULT MASK_STRICT_ALIGN
- #endif
--
--#undef ASM_DEFAULT_SPEC
--#define ASM_DEFAULT_SPEC "-mppc -mspe -me500"
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
deleted file mode 100644
index c09d019..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 0ddcb95a86830766fd02122f19384fc929b377c5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:21:55 +0000
-Subject: [PATCH 30/46] Disable the MULTILIB_OSDIRNAMES and other multilib
- options.
-
-Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
-systems where the libdir is NOT set to /lib64. This is allowed by the
-ABI, as
-long as the dynamic loader is present in /lib.
-
-We simply want to use the default rules in gcc to find and configure the
-normal libdir.
-
-Upstream-Status: Inappropriate[OE-Specific]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/t-aarch64-linux | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
-index 1cfe9f3..d688ac9 100644
---- a/gcc/config/aarch64/t-aarch64-linux
-+++ b/gcc/config/aarch64/t-aarch64-linux
-@@ -21,8 +21,8 @@
- LIB1ASMSRC = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
-
--AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
--MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-+#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
-+#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-
--MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
-+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patch
deleted file mode 100644
index fb1cd0f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From fc6621435a64a9d69aa251b70361da94cf2db6be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:25:11 +0000
-Subject: [PATCH 31/46] Ensure target gcc headers can be included
-
-There are a few headers installed as part of the OpenEmbedded
-gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
-built for the target architecture, these are within the target
-sysroot and not cross/nativesdk; thus they weren't able to be
-found by gcc with the existing search paths. Add support for
-picking up these headers under the sysroot supplied on the gcc
-command line in order to resolve this.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/Makefile.in | 2 ++
- gcc/cppdefault.c | 4 ++++
- gcc/defaults.h | 9 +++++++++
- gcc/gcc.c | 7 -------
- 4 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 450cb79..cc75536 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -593,6 +593,7 @@ libexecdir = @libexecdir@
-
- # Directory in which the compiler finds libraries etc.
- libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
-+libsubdir_target = gcc/$(target_noncanonical)/$(version)
- # Directory in which the compiler finds executables
- libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
- # Directory in which all plugin resources are installed
-@@ -2688,6 +2689,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
-
- PREPROCESSOR_DEFINES = \
- -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-+ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
- -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
- -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 54aaf06..7b4dd51 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
- /* This is the dir for gcc's private headers. */
- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
- #endif
-+#ifdef GCC_INCLUDE_SUBDIR_TARGET
-+ /* This is the dir for gcc's private headers under the specified sysroot. */
-+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+#endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-diff --git a/gcc/defaults.h b/gcc/defaults.h
-index 3e18338..0f317f2 100644
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -1492,4 +1492,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
- #endif
-
-+/* Default prefixes to attach to command names. */
-+
-+#ifndef STANDARD_STARTFILE_PREFIX_1
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#endif
-+#ifndef STANDARD_STARTFILE_PREFIX_2
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#endif
-+
- #endif /* ! GCC_DEFAULTS_H */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 04fa81d..9750cc2 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1450,13 +1450,6 @@ static const char *gcc_libexec_prefix;
-
- /* Default prefixes to attach to command names. */
-
--#ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
--#endif
--#ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
--#endif
--
- #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
- #undef MD_EXEC_PREFIX
- #undef MD_STARTFILE_PREFIX
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
deleted file mode 100644
index c0b001d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From ff939c5063d8f8d444bdb25651a0a48e608efaa4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 11:17:19 +0000
-Subject: [PATCH 32/46] gcc 4.8+ won't build with --disable-dependency-tracking
-
-since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
-
-This patch ensures we only use those compiler options when its enabled.
-
-Upstream-Status: Submitted
-
-(Problem was already reported upstream, attached this patch there
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
-
-RP
-2012/09/22
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libatomic/Makefile.am | 3 ++-
- libatomic/Makefile.in | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index b351244..399ce18 100644
---- a/libatomic/Makefile.am
-+++ b/libatomic/Makefile.am
-@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
-
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
-diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index a083d87..a92cfce 100644
---- a/libatomic/Makefile.in
-+++ b/libatomic/Makefile.in
-@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
- PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
deleted file mode 100644
index e425d71..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5092f5389d02e78cd59690cf3fca24b56a97aff2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 3 Mar 2015 08:21:19 +0000
-Subject: [PATCH 33/46] Don't search host directory during "relink" if
- $inst_prefix is provided
-
-http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
-
-Upstream-Status: Submitted
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 52bdbdb..82bcec3 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6004,12 +6004,13 @@ func_mode_link ()
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
-+ # Default if $libdir is not relative to the prefix:
- add_dir="-L$libdir"
-- # Try looking first in the location we're being installed to.
-+
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
-- add_dir="$add_dir -L$inst_prefix_dir$libdir"
-+ add_dir="-L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
deleted file mode 100644
index 922a855..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1faa6f69f93bb95af2b2b2bd24e181b50fb5b37c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:15:27 -0700
-Subject: [PATCH 34/46] Use SYSTEMLIBS_DIR replacement instead of hardcoding
- base_libdir
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE Configuration]
-
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 5fcaa59..8588ac0 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,7 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support-for-musl-ldso.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support-for-musl-ldso.patch
deleted file mode 100644
index 9dfc472..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support-for-musl-ldso.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3768468c1a6cc170fff88c03b808c975ac653811 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:18:39 -0700
-Subject: [PATCH 35/46] aarch64: Add support for musl ldso
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE Configuration]
-
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 8588ac0..946b3ca 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -24,7 +24,7 @@
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef MUSL_DYNAMIC_LINKER
--#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
- #undef ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
deleted file mode 100644
index f89a886..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From f4d3c8e970d42a43cd3d2f751e13324efa936ff8 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 5 Jul 2015 20:25:18 -0700
-Subject: [PATCH 36/46] libcc1: fix libcc1's install path and rpath
-
-* Install libcc1.so and libcc1plugin.so into
- $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
- had done to lto-plugin.
-* Fix bad RPATH iussue:
- gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
- /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
- [rpaths]
-
-Upstream-Status: Inappropriate [OE configuration]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- libcc1/Makefile.am | 4 ++--
- libcc1/Makefile.in | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
-index b40820b..32930c5 100644
---- a/libcc1/Makefile.am
-+++ b/libcc1/Makefile.am
-@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- $(Wc)$(libiberty_normal)))
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
-
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
-
- if ENABLE_PLUGIN
- plugin_LTLIBRARIES = libcc1plugin.la
-diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
-index 79d39d3..227ec22 100644
---- a/libcc1/Makefile.in
-+++ b/libcc1/Makefile.in
-@@ -291,8 +291,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- $(Wc)$(libiberty_normal)))
-
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
- @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
- @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
- BUILT_SOURCES = compiler-name.h
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patch
deleted file mode 100644
index 15efcb1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From 1475b941d7a9c9874b0fb0558d01805945467331 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:39:54 +0000
-Subject: [PATCH 37/46] handle sysroot support for nativesdk-gcc
-
-Being able to build a nativesdk gcc is useful, particularly in cases
-where the host compiler may be of an incompatible version (or a 32
-bit compiler is needed).
-
-Sadly, building nativesdk-gcc is not straight forward. We install
-nativesdk-gcc into a relocatable location and this means that its
-library locations can change. "Normal" sysroot support doesn't help
-in this case since the values of paths like "libdir" change, not just
-base root directory of the system.
-
-In order to handle this we do two things:
-
-a) Add %r into spec file markup which can be used for injected paths
- such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
-b) Add other paths which need relocation into a .gccrelocprefix section
- which the relocation code will notice and adjust automatically.
-
-Upstream-Status: Inappropriate
-RP 2015/7/28
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++++-------------
- gcc/cppdefault.h | 3 ++-
- gcc/gcc.c | 20 ++++++++++++++------
- 3 files changed, 53 insertions(+), 20 deletions(-)
-
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 7b4dd51..9d1166c 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -35,6 +35,30 @@
- # undef CROSS_INCLUDE_DIR
- #endif
-
-+static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
-+static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
-+static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
-+static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
-+static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
-+#ifdef LOCAL_INCLUDE_DIR
-+static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
-+#endif
-+#ifdef PREFIX_INCLUDE_DIR
-+static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
-+#endif
-+#ifdef FIXED_INCLUDE_DIR
-+static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
-+#endif
-+#ifdef CROSS_INCLUDE_DIR
-+static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
-+#endif
-+#ifdef TOOL_INCLUDE_DIR
-+static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
-+#endif
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
-+#endif
-+
- const struct default_include cpp_include_defaults[]
- #ifdef INCLUDE_DEFAULTS
- = INCLUDE_DEFAULTS;
-@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
- = {
- #ifdef GPLUSPLUS_INCLUDE_DIR
- /* Pick up GNU C++ generic include files. */
-- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
- /* Pick up GNU C++ target-dependent include files. */
-- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
- #endif
- #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
- /* Pick up GNU C++ backward and deprecated include files. */
-- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GCC_INCLUDE_DIR
- /* This is the dir for gcc's private headers. */
-- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef GCC_INCLUDE_SUBDIR_TARGET
- /* This is the dir for gcc's private headers under the specified sysroot. */
-- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
- #endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
- #endif
- #ifdef PREFIX_INCLUDE_DIR
-- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
-+ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
- #endif
- #ifdef FIXED_INCLUDE_DIR
- /* This is the dir for fixincludes. */
-- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
-+ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
- /* A multilib suffix needs adding if different multilibs use
- different headers. */
- #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
-@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
- #endif
- #ifdef CROSS_INCLUDE_DIR
- /* One place the target system's headers might be. */
-- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef TOOL_INCLUDE_DIR
- /* Another place the target system's headers might be. */
-- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
-+ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
- #endif
- #ifdef NATIVE_SYSTEM_HEADER_DIR
- /* /usr/include comes dead last. */
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
- #endif
- { 0, 0, 0, 0, 0, 0 }
- };
-diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
-index 8a81b45..9759efd 100644
---- a/gcc/cppdefault.h
-+++ b/gcc/cppdefault.h
-@@ -33,7 +33,8 @@
-
- struct default_include
- {
-- const char *const fname; /* The name of the directory. */
-+ const char *fname; /* The name of the directory. */
-+
- const char *const component; /* The component containing the directory
- (see update_path in prefix.c) */
- const char cplusplus; /* Only look here if we're compiling C++. */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 9750cc2..94c240e 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -247,6 +247,8 @@ FILE *report_times_to_file = NULL;
- #endif
- static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT;
-
-+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
-+
- /* Nonzero means pass the updated target_system_root to the compiler. */
-
- static int target_system_root_changed;
-@@ -517,6 +519,7 @@ or with constant text in a single argument.
- %G process LIBGCC_SPEC as a spec.
- %R Output the concatenation of target_system_root and
- target_sysroot_suffix.
-+ %r Output the base path target_relocatable_prefix
- %S process STARTFILE_SPEC as a spec. A capital S is actually used here.
- %E process ENDFILE_SPEC as a spec. A capital E is actually used here.
- %C process CPP_SPEC as a spec.
-@@ -1473,10 +1476,10 @@ static const char *gcc_libexec_prefix;
- gcc_exec_prefix is set because, in that case, we know where the
- compiler has been installed, and use paths relative to that
- location instead. */
--static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
--static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
--static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
--static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-+static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
-+static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
-+static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
-+static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-
- /* For native compilers, these are well-known paths containing
- components that may be provided by the system. For cross
-@@ -1484,9 +1487,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- static const char *md_exec_prefix = MD_EXEC_PREFIX;
- static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
- static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_1
-+static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_2
-+static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_2;
-
- /* A relative path to be used in finding the location of tools
-@@ -5762,6 +5765,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
- }
- break;
-
-+ case 'r':
-+ obstack_grow (&obstack, target_relocatable_prefix,
-+ strlen (target_relocatable_prefix));
-+ break;
-+
- case 'S':
- value = do_spec_1 (startfile_spec, 0, NULL);
- if (value != 0)
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
deleted file mode 100644
index 89ee79d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 42e4cdcaad590536246866b0846ec279e124fa16 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:41:45 +0000
-Subject: [PATCH 38/46] Search target sysroot gcc version specific dirs with
- multilib.
-
-We install the gcc libraries (such as crtbegin.p) into
-<sysroot><libdir>/<target-sys>/5.2.0/
-which is a default search path for GCC (aka multi_suffix in the
-code below). <target-sys> is 'machine' in gcc's terminology. We use
-these directories so that multiple gcc versions could in theory
-co-exist on target.
-
-We only want to build one gcc-cross-canadian per arch and have this work
-for all multilibs. <target-sys> can be handled by mapping the multilib
-<target-sys> to the one used by gcc-cross-canadian, e.g.
-mips64-polkmllib32-linux
-is symlinked to by mips64-poky-linux.
-
-The default gcc search path in the target sysroot for a "lib64" mutlilib
-is:
-
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-which means that the lib32 crtbegin.o will be found and the lib64 ones
-will not which leads to compiler failures.
-
-This patch injects a multilib version of that path first so the lib64
-binaries can be found first. With this change the search path becomes:
-
-<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-Upstream-Status: Pending
-RP 2015/7/31
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/gcc.c | 29 ++++++++++++++++++++++++++++-
- 1 file changed, 28 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 94c240e..2812819 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -2507,7 +2507,7 @@ for_each_path (const struct path_prefix *paths,
- if (path == NULL)
- {
- len = paths->max_len + extra_space + 1;
-- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
-+ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
- path = XNEWVEC (char, len);
- }
-
-@@ -2519,6 +2519,33 @@ for_each_path (const struct path_prefix *paths,
- /* Look first in MACHINE/VERSION subdirectory. */
- if (!skip_multi_dir)
- {
-+ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
-+ {
-+ const char *this_multi;
-+ size_t this_multi_len;
-+
-+ if (pl->os_multilib)
-+ {
-+ this_multi = multi_os_dir;
-+ this_multi_len = multi_os_dir_len;
-+ }
-+ else
-+ {
-+ this_multi = multi_dir;
-+ this_multi_len = multi_dir_len;
-+ }
-+
-+ /* Look in multilib MACHINE/VERSION subdirectory first */
-+ if (this_multi_len)
-+ {
-+ memcpy (path + len, this_multi, this_multi_len + 1);
-+ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
-+ ret = callback (path, callback_info);
-+ if (ret)
-+ break;
-+ }
-+ }
-+
- memcpy (path + len, multi_suffix, suffix_len + 1);
- ret = callback (path, callback_info);
- if (ret)
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
deleted file mode 100644
index 0ce7aec..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 9ced49e459ccf1887feb58adf1e8836dcb4b1bdf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Dec 2015 23:42:45 +0000
-Subject: [PATCH 39/46] Fix various _FOR_BUILD and related variables
-
-When doing a FOR_BUILD thing, you have to override CFLAGS with
-CFLAGS_FOR_BUILD. And if you use C++, you also have to override
-CXXFLAGS with CXXFLAGS_FOR_BUILD.
-Without this, when building for mingw, you end up trying to use
-the mingw headers for a host build.
-
-The same goes for other variables as well, such as CPPFLAGS,
-CPP, and GMPINC.
-
-Upstream-Status: Pending
-
-Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 6 ++++++
- Makefile.tpl | 5 +++++
- gcc/Makefile.in | 2 +-
- gcc/configure | 2 +-
- gcc/configure.ac | 2 +-
- 5 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index beb9b9a..3e1c6bc 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
- CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -170,6 +171,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-@@ -713,6 +718,7 @@ BASE_FLAGS_TO_PASS = \
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
-+ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
- "EXPECT=$(EXPECT)" \
- "FLEX=$(FLEX)" \
- "INSTALL=$(INSTALL)" \
-diff --git a/Makefile.tpl b/Makefile.tpl
-index 6b2eb6a..114e462 100644
---- a/Makefile.tpl
-+++ b/Makefile.tpl
-@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
- CC="$(CC_FOR_BUILD)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -172,6 +173,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index cc75536..0ad2dc8 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -780,7 +780,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@
- BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@
- BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG)
- BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
-+ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
-
- # Actual name to use when installing a native compiler.
- GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
-diff --git a/gcc/configure b/gcc/configure
-index 377253e..78fc64a 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11799,7 +11799,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 54e7619..a94666e 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1682,7 +1682,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
deleted file mode 100644
index c9a6fd0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b0412c01c275aaeb6b458461cd2425120c8bcec8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2016 10:26:10 -0800
-Subject: [PATCH 40/46] nios2: Define MUSL_DYNAMIC_LINKER
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gcc/config/nios2/linux.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
-index 4ef55b5..62bc1e7 100644
---- a/gcc/config/nios2/linux.h
-+++ b/gcc/config/nios2/linux.h
-@@ -30,6 +30,7 @@
- #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1"
-
- #undef LINK_SPEC
- #define LINK_SPEC LINK_SPEC_ENDIAN \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
deleted file mode 100644
index 29b7ce7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 210f6b3b82084cc756e02b8bc12f909a43b14ee8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 27 Jun 2017 18:10:54 -0700
-Subject: [PATCH 40/49] Add ssp_nonshared to link commandline for musl targets
-
-when -fstack-protector options are enabled we need to
-link with ssp_shared on musl since it does not provide
-the __stack_chk_fail_local() so essentially it provides
-libssp but not libssp_nonshared something like
-TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED
- where-as for glibc the needed symbols
-are already present in libc_nonshared library therefore
-we do not need any library helper on glibc based systems
-but musl needs the libssp_noshared from gcc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/linux.h | 7 +++++++
- gcc/config/rs6000/linux.h | 10 ++++++++++
- gcc/config/rs6000/linux64.h | 10 ++++++++++
- 3 files changed, 27 insertions(+)
-
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 2e683d0c430..1b4df798671 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -182,6 +182,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
- { 0, 0, 0, 0, 0, 0 } \
- }
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+#undef LINK_SSP_SPEC
-+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-+ "|fstack-protector-strong|fstack-protector-explicit" \
-+ ":-lssp_nonshared}"
-+#endif
-+
- #endif
-
- #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
-diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
-index 684afd6c190..22cfa391b89 100644
---- a/gcc/config/rs6000/linux.h
-+++ b/gcc/config/rs6000/linux.h
-@@ -91,6 +91,16 @@
- " -m elf32ppclinux")
- #endif
-
-+/* link libssp_nonshared.a with musl */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+#undef LINK_SSP_SPEC
-+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-+ "|fstack-protector-strong|fstack-protector-explicit" \
-+ ":-lssp_nonshared}"
-+#endif
-+#endif
-+
- #undef LINK_OS_LINUX_SPEC
- #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 3b00ec0fcf0..8371f8d7b6b 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -465,6 +465,16 @@ extern int dot_symbols;
- " -m elf64ppc")
- #endif
-
-+/* link libssp_nonshared.a with musl */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#ifdef TARGET_LIBC_PROVIDES_SSP
-+#undef LINK_SSP_SPEC
-+#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-+ "|fstack-protector-strong|fstack-protector-explicit" \
-+ ":-lssp_nonshared}"
-+#endif
-+#endif
-+
- #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
- -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
deleted file mode 100644
index 861f0fd..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-From ba738cc411c9a54e389e336bcaa0a2428dd4a9d2 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 02:27:43 -0400
-Subject: [PATCH 42/46] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
-
-Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one
-directory name (old) to another (new) in __FILE__, __BASE_FILE__ and
-__builtin_FILE ().
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
-
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/c-family/c-opts.c | 13 +++++++
- gcc/c-family/c.opt | 4 +++
- gcc/dwarf2out.c | 1 +
- gcc/gimplify.c | 3 ++
- libcpp/Makefile.in | 10 +++---
- libcpp/file-map.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++
- libcpp/include/file-map.h | 30 ++++++++++++++++
- libcpp/macro.c | 2 ++
- 8 files changed, 150 insertions(+), 5 deletions(-)
- create mode 100644 libcpp/file-map.c
- create mode 100644 libcpp/include/file-map.h
-
-diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
-index fec58bc..7a0af43 100644
---- a/gcc/c-family/c-opts.c
-+++ b/gcc/c-family/c-opts.c
-@@ -38,6 +38,14 @@ along with GCC; see the file COPYING3. If not see
- #include "opts.h"
- #include "plugin.h" /* For PLUGIN_INCLUDE_FILE event. */
- #include "mkdeps.h"
-+#include "file-map.h"
-+#include "c-target.h"
-+#include "tm.h" /* For BYTES_BIG_ENDIAN,
-+ DOLLARS_IN_IDENTIFIERS,
-+ STDC_0_IN_SYSTEM_HEADERS,
-+ TARGET_FLT_EVAL_METHOD_NON_DEFAULT and
-+ TARGET_OPTF. */
-+#include "tm_p.h" /* For C_COMMON_OVERRIDE_OPTIONS. */
- #include "dumpfile.h"
-
- #ifndef DOLLARS_IN_IDENTIFIERS
-@@ -503,6 +511,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
- cpp_opts->narrow_charset = arg;
- break;
-
-+ case OPT_ffile_prefix_map_:
-+ if (add_file_prefix_map (arg) < 0)
-+ error ("invalid argument %qs to -ffile-prefix-map", arg);
-+ break;
-+
- case OPT_fwide_exec_charset_:
- cpp_opts->wide_charset = arg;
- break;
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 660da6c..31f7b34 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1208,6 +1208,10 @@ fexec-charset=
- C ObjC C++ ObjC++ Joined RejectNegative
- -fexec-charset=<cset> Convert all strings and character constants to character set <cset>.
-
-+ffile-prefix-map=
-+C ObjC C++ ObjC++ Joined RejectNegative
-+-ffile-prefix-map=<old=new> Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE ()
-+
- fextended-identifiers
- C ObjC C++ ObjC++
- Permit universal character names (\\u and \\U) in identifiers.
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 80f2df5..a2bfcc0 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -21672,6 +21672,7 @@ gen_producer_string (void)
- case OPT_fltrans_output_list_:
- case OPT_fresolution_:
- case OPT_fdebug_prefix_map_:
-+ case OPT_ffile_prefix_map_:
- /* Ignore these. */
- continue;
- default:
-diff --git a/gcc/gimplify.c b/gcc/gimplify.c
-index e223e59..1433c25 100644
---- a/gcc/gimplify.c
-+++ b/gcc/gimplify.c
-@@ -57,6 +57,8 @@ along with GCC; see the file COPYING3. If not see
- #include "gomp-constants.h"
- #include "tree-dump.h"
- #include "gimple-walk.h"
-+#include "file-map.h"
-+
- #include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */
- #include "builtins.h"
-
-@@ -2432,6 +2434,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
- case BUILT_IN_FILE:
- {
- const char *locfile = LOCATION_FILE (EXPR_LOCATION (*expr_p));
-+ locfile = remap_file_filename (locfile);
- *expr_p = build_string_literal (strlen (locfile) + 1, locfile);
- return GS_OK;
- }
-diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
-index a7d7828..3d29572 100644
---- a/libcpp/Makefile.in
-+++ b/libcpp/Makefile.in
-@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
-
-
- libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
-- expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
-- mkdeps.o pch.o symtab.o traditional.o
-+ expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \
-+ macro.o mkdeps.o pch.o symtab.o traditional.o
-
- libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
-- expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
-- mkdeps.c pch.c symtab.c traditional.c
-+ expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \
-+ macro.c mkdeps.c pch.c symtab.c traditional.c
-
- all: libcpp.a $(USED_CATALOGS)
-
-@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
-
- TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
- include/line-map.h include/symtab.h include/cpp-id-data.h \
-- include/cpplib.h include/mkdeps.h system.h
-+ include/cpplib.h include/mkdeps.h system.h include/file-map.h
-
- TAGS: $(TAGS_SOURCES)
- cd $(srcdir) && etags $(TAGS_SOURCES)
-diff --git a/libcpp/file-map.c b/libcpp/file-map.c
-new file mode 100644
-index 0000000..18035ef
---- /dev/null
-+++ b/libcpp/file-map.c
-@@ -0,0 +1,92 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "file-map.h"
-+
-+/* Structure recording the mapping from source file and directory
-+ names at compile time to __FILE__ */
-+typedef struct file_prefix_map
-+{
-+ const char *old_prefix;
-+ const char *new_prefix;
-+ size_t old_len;
-+ size_t new_len;
-+ struct file_prefix_map *next;
-+} file_prefix_map;
-+
-+/* Linked list of such structures. */
-+static file_prefix_map *file_prefix_maps;
-+
-+/* Record prefix mapping of __FILE__. ARG is the argument to
-+ -ffile-prefix-map and must be of the form OLD=NEW. */
-+int
-+add_file_prefix_map (const char *arg)
-+{
-+ file_prefix_map *map;
-+ const char *p;
-+
-+ p = strchr (arg, '=');
-+ if (!p)
-+ {
-+ fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg);
-+ return -1;
-+ }
-+ map = XNEW (file_prefix_map);
-+ map->old_prefix = xstrndup (arg, p - arg);
-+ map->old_len = p - arg;
-+ p++;
-+ map->new_prefix = xstrdup (p);
-+ map->new_len = strlen (p);
-+ map->next = file_prefix_maps;
-+ file_prefix_maps = map;
-+
-+ return 0;
-+}
-+
-+/* Perform user-specified mapping of __FILE__ prefixes. Return
-+ the new name corresponding to filename. */
-+
-+const char *
-+remap_file_filename (const char *filename)
-+{
-+ file_prefix_map *map;
-+ char *s;
-+ const char *name;
-+ size_t name_len;
-+
-+ for (map = file_prefix_maps; map; map = map->next)
-+ if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ break;
-+ if (!map)
-+ return filename;
-+ name = filename + map->old_len;
-+ name_len = strlen (name) + 1;
-+ s = (char *) alloca (name_len + map->new_len);
-+ memcpy (s, map->new_prefix, map->new_len);
-+ memcpy (s + map->new_len, name, name_len);
-+
-+ return xstrdup (s);
-+}
-+
-+
-diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
-new file mode 100644
-index 0000000..8750315
---- /dev/null
-+++ b/libcpp/include/file-map.h
-@@ -0,0 +1,30 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#ifndef LIBCPP_FILE_MAP_H
-+#define LIBCPP_FILE_MAP_H
-+
-+const char * remap_file_filename (const char *filename);
-+
-+int add_file_prefix_map (const char *arg);
-+
-+#endif /* !LIBCPP_FILE_MAP_H */
-diff --git a/libcpp/macro.c b/libcpp/macro.c
-index c251553..3ceec3d 100644
---- a/libcpp/macro.c
-+++ b/libcpp/macro.c
-@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see
- #include "system.h"
- #include "cpplib.h"
- #include "internal.h"
-+#include "file-map.h"
-
- typedef struct macro_arg macro_arg;
- /* This structure represents the tokens of a macro argument. These
-@@ -301,6 +302,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node,
- if (!name)
- abort ();
- }
-+ name = remap_file_filename (name);
- len = strlen (name);
- buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
- result = buf;
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
deleted file mode 100644
index 0077f80..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 25c87c6cc40ec5cc6965f8bfb215bec01abd6d82 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 16 Mar 2016 05:39:59 -0400
-Subject: [PATCH 43/46] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
-
-The oe-core may use external toolchain to compile,
-which may not support -ffile-prefix-map.
-
-Since we use -fdebug-prefix-map to do the same thing,
-so we could reuse it to replace -ffile-prefix-map.
-
-Upstream-Status: Inappropriate[oe-core specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/opts-global.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/gcc/opts-global.c b/gcc/opts-global.c
-index b7e5232..121d7b9 100644
---- a/gcc/opts-global.c
-+++ b/gcc/opts-global.c
-@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
- #include "langhooks.h"
- #include "dbgcnt.h"
- #include "debug.h"
-+#include "file-map.h"
- #include "output.h"
- #include "plugin.h"
- #include "toplev.h"
-@@ -357,6 +358,9 @@ handle_common_deferred_options (void)
-
- case OPT_fdebug_prefix_map_:
- add_debug_prefix_map (opt->arg);
-+
-+ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
-+ add_file_prefix_map (opt->arg);
- break;
-
- case OPT_fdump_:
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
deleted file mode 100644
index 5d41af4..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 6ab23e88aef22bbabee7b9600c459ff39547bb66 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 24 Mar 2016 11:23:14 -0400
-Subject: [PATCH 44/46] gcc/final.c: -fdebug-prefix-map support to remap
- sources with relative path
-
-PR other/70428
-* final.c (remap_debug_filename): Use lrealpath to translate
-relative path before remapping
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/final.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/gcc/final.c b/gcc/final.c
-index 55cf509..23293e5 100644
---- a/gcc/final.c
-+++ b/gcc/final.c
-@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
- const char *name;
- size_t name_len;
-
-+ /* Support to remap filename with relative path */
-+ char *realpath = lrealpath (filename);
-+ if (realpath == NULL)
-+ return filename;
-+
- for (map = debug_prefix_maps; map; map = map->next)
-- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0)
- break;
- if (!map)
-- return filename;
-- name = filename + map->old_len;
-+ {
-+ free (realpath);
-+ return filename;
-+ }
-+ name = realpath + map->old_len;
- name_len = strlen (name) + 1;
- s = (char *) alloca (name_len + map->new_len);
- memcpy (s, map->new_prefix, map->new_len);
- memcpy (s + map->new_len, name, name_len);
-+ free (realpath);
- return ggc_strdup (s);
- }
-
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
deleted file mode 100644
index c62b727..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 5a47d404ea29e2547269e3ddf38754462d93f903 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Apr 2016 20:03:28 +0000
-Subject: [PATCH 45/46] libgcc: Add knob to use ldbl-128 on ppc
-
-musl does not support ldbl 128 so we can not assume
-that linux as a whole supports ldbl-128 bits, instead
-act upon configure option passed to gcc and assume no
-on musl and yes otherwise if no option is passed since
-default behaviour is to assume ldbl128 it does not
-change the defaults
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libgcc/Makefile.in | 1 +
- libgcc/config/rs6000/t-linux | 5 ++++-
- libgcc/configure | 18 ++++++++++++++++++
- libgcc/configure.ac | 12 ++++++++++++
- 4 files changed, 35 insertions(+), 1 deletion(-)
- mode change 100644 => 100755 libgcc/configure
-
-diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
-index f09b39b..296cf0f 100644
---- a/libgcc/Makefile.in
-+++ b/libgcc/Makefile.in
-@@ -43,6 +43,7 @@ enable_vtable_verify = @enable_vtable_verify@
- enable_decimal_float = @enable_decimal_float@
- fixed_point = @fixed_point@
- with_aix_soname = @with_aix_soname@
-+with_ldbl128 = @with_ldbl128@
-
- host_noncanonical = @host_noncanonical@
- real_host_noncanonical = @real_host_noncanonical@
-diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
-index 4f6d4c4..c50dd94 100644
---- a/libgcc/config/rs6000/t-linux
-+++ b/libgcc/config/rs6000/t-linux
-@@ -1,3 +1,6 @@
- SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
-+ifeq ($(with_ldbl128),yes)
-+HOST_LIBGCC2_CFLAGS += -mlong-double-128
-+endif
-+HOST_LIBGCC2_CFLAGS += -mno-minimal-toc
-diff --git a/libgcc/configure b/libgcc/configure
-old mode 100644
-new mode 100755
-index e7d6c75..e9a9019
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -614,6 +614,7 @@ build_vendor
- build_cpu
- build
- with_aix_soname
-+with_ldbl128
- enable_vtable_verify
- enable_shared
- libgcc_topdir
-@@ -663,6 +664,7 @@ with_cross_host
- with_ld
- enable_shared
- enable_vtable_verify
-+with_long_double_128
- with_aix_soname
- enable_version_specific_runtime_libs
- with_slibdir
-@@ -1319,6 +1321,7 @@ Optional Packages:
- --with-target-subdir=SUBDIR Configuring in a subdirectory for target
- --with-cross-host=HOST Configuring with a cross compiler
- --with-ld arrange to use the specified ld (full pathname)
-+ --with-long-double-128 use 128-bit long double by default
- --with-aix-soname=aix|svr4|both
- shared library versioning (aka "SONAME") variant to
- provide on AIX
-@@ -2201,6 +2204,21 @@ fi
-
-
-
-+# Check whether --with-long-double-128 was given.
-+if test "${with_long_double_128+set}" = set; then :
-+ withval=$with_long_double_128; with_ldbl128="$with_long_double_128"
-+else
-+ case "${host}" in
-+ power*-*-musl*)
-+ with_ldbl128="no";;
-+ *) with_ldbl128="yes";;
-+ esac
-+
-+fi
-+
-+
-+
-+
- # Check whether --with-aix-soname was given.
- if test "${with_aix_soname+set}" = set; then :
- withval=$with_aix_soname; case "${host}:${enable_shared}" in
-diff --git a/libgcc/configure.ac b/libgcc/configure.ac
-index 269997f..81dc3ba 100644
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -77,6 +77,18 @@ AC_ARG_ENABLE(vtable-verify,
- [enable_vtable_verify=no])
- AC_SUBST(enable_vtable_verify)
-
-+AC_ARG_WITH(long-double-128,
-+[AS_HELP_STRING([--with-long-double-128],
-+ [use 128-bit long double by default])],
-+ with_ldbl128="$with_long_double_128",
-+[case "${host}" in
-+ power*-*-musl*)
-+ with_ldbl128="no";;
-+ *) with_ldbl128="yes";;
-+ esac
-+])
-+AC_SUBST(with_ldbl128)
-+
- AC_ARG_WITH(aix-soname,
- [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
- [shared library versioning (aka "SONAME") variant to provide on AIX])],
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
deleted file mode 100644
index 390037f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 513bf3c33e2f551f08bd57605091d5ddeba3536b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 4 May 2016 21:11:34 -0700
-Subject: [PATCH 46/46] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
-
-Upstream-Status: Pending
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libgcc/config/t-slibgcc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
-index 8c5f890..29be909 100644
---- a/libgcc/config/t-slibgcc
-+++ b/libgcc/config/t-slibgcc
-@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
- $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
-
- SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-- $(SHLIB_LDFLAGS) \
-+ $(LDFLAGS) $(SHLIB_LDFLAGS) \
- -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
- $(SHLIB_OBJS) $(SHLIB_LC) && \
- rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
deleted file mode 100644
index 6b5da02..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 0a9ed0479203cb7e69c3745b0c259007410f39ba Mon Sep 17 00:00:00 2001
-From: Szabolcs Nagy <nsz@port70.net>
-Date: Sat, 24 Oct 2015 20:09:53 +0000
-Subject: [PATCH 47/47] libgcc_s: Use alias for __cpu_indicator_init instead of
- symver
-
-Adapter from
-
-https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html
-
-This fix was debated but hasnt been applied gcc upstream since
-they expect musl to support '@' in symbol versioning which is
-a sun/gnu versioning extention. This patch however avoids the
-need for the '@' symbols at all
-
-libgcc/Changelog:
-
-2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add.
- (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove.
-
- * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER.
-
-gcc/Changelog:
-
-2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init
- call __cpu_indicator_init_local instead of __cpu_indicator_init.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Denied
-
- gcc/config/i386/i386.c | 4 ++--
- libgcc/config/i386/cpuinfo.c | 6 +++---
- libgcc/config/i386/t-linux | 2 +-
- 3 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 861a029..1c97d72 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -40323,10 +40323,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
- {
- case IX86_BUILTIN_CPU_INIT:
- {
-- /* Make it call __cpu_indicator_init in libgcc. */
-+ /* Make it call __cpu_indicator_init_local in libgcc.a. */
- tree call_expr, fndecl, type;
- type = build_function_type_list (integer_type_node, NULL_TREE);
-- fndecl = build_fn_decl ("__cpu_indicator_init", type);
-+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
- call_expr = build_call_expr (fndecl, 0);
- return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
- }
-diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
-index 8c2248d..6c82f15 100644
---- a/libgcc/config/i386/cpuinfo.c
-+++ b/libgcc/config/i386/cpuinfo.c
-@@ -485,7 +485,7 @@ __cpu_indicator_init (void)
- return 0;
- }
-
--#if defined SHARED && defined USE_ELF_SYMVER
--__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
--__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
-+#ifndef SHARED
-+int __cpu_indicator_init_local (void)
-+ __attribute__ ((weak, alias ("__cpu_indicator_init")));
- #endif
-diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
-index 11bb46e..4f47f7b 100644
---- a/libgcc/config/i386/t-linux
-+++ b/libgcc/config/i386/t-linux
-@@ -3,4 +3,4 @@
- # t-slibgcc-elf-ver and t-linux
- SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
-+HOST_LIBGCC2_CFLAGS += -mlong-double-80
---
-2.9.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch
deleted file mode 100644
index 30c158d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 10595c03c39b4e980d2a00e16fc84e9caf82292e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 3 Feb 2017 12:56:00 -0800
-Subject: [PATCH 48/48] sync gcc stddef.h with musl
-
-musl defines ptrdiff_t size_t and wchar_t
-so dont define them here if musl is definining them
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gcc/ginclude/stddef.h | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
-index d711530d053..c315b7a97c1 100644
---- a/gcc/ginclude/stddef.h
-+++ b/gcc/ginclude/stddef.h
-@@ -134,6 +134,7 @@ _TYPE_wchar_t;
- #ifndef ___int_ptrdiff_t_h
- #ifndef _GCC_PTRDIFF_T
- #ifndef _PTRDIFF_T_DECLARED /* DragonFly */
-+#ifndef __DEFINED_ptrdiff_t /* musl */
- #define _PTRDIFF_T
- #define _T_PTRDIFF_
- #define _T_PTRDIFF
-@@ -143,10 +144,12 @@ _TYPE_wchar_t;
- #define ___int_ptrdiff_t_h
- #define _GCC_PTRDIFF_T
- #define _PTRDIFF_T_DECLARED
-+#define __DEFINED_ptrdiff_t /* musl */
- #ifndef __PTRDIFF_TYPE__
- #define __PTRDIFF_TYPE__ long int
- #endif
- typedef __PTRDIFF_TYPE__ ptrdiff_t;
-+#endif /* __DEFINED_ptrdiff_t */
- #endif /* _PTRDIFF_T_DECLARED */
- #endif /* _GCC_PTRDIFF_T */
- #endif /* ___int_ptrdiff_t_h */
-@@ -184,6 +187,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__ /* BeOS */
- #define __SIZE_T__ /* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -200,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- || defined(__DragonFly__) \
- || defined(__FreeBSD_kernel__)
-@@ -235,6 +240,7 @@ typedef long ssize_t;
- #endif /* _SIZE_T */
- #endif /* __SIZE_T__ */
- #endif /* __size_t__ */
-+#endif /* __DEFINED_size_t */
- #undef __need_size_t
- #endif /* _STDDEF_H or __need_size_t. */
-
-@@ -264,6 +270,7 @@ typedef long ssize_t;
- #ifndef ___int_wchar_t_h
- #ifndef __INT_WCHAR_T_H
- #ifndef _GCC_WCHAR_T
-+#ifndef __DEFINED_wchar_t /* musl */
- #define __wchar_t__ /* BeOS */
- #define __WCHAR_T__ /* Cray Unicos/Mk */
- #define _WCHAR_T
-@@ -279,6 +286,7 @@ typedef long ssize_t;
- #define __INT_WCHAR_T_H
- #define _GCC_WCHAR_T
- #define _WCHAR_T_DECLARED
-+#define __DEFINED_wchar_t /* musl */
-
- /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
- instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
-@@ -344,6 +352,7 @@ typedef __WCHAR_TYPE__ wchar_t;
- #endif
- #endif /* __WCHAR_T__ */
- #endif /* __wchar_t__ */
-+#endif /* __DEFINED_wchar_t musl */
- #undef __need_wchar_t
- #endif /* _STDDEF_H or __need_wchar_t. */
-
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch
deleted file mode 100644
index 73ab950..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Need to pass NO_PIE_CFLAGS to ALL_* so gcc doesn't fail when
-we compile it with older gcc and pie.
-
-Upstream-Status: Inappropriate [configuration]
-
-Maintained by: Gentoo Toolchain Project <toolchain@gentoo.org>
-Signed-off-by: Stephen Arnold <stephen.arnold42@gmail.com>
-
---- a/gcc/Makefile.in 2015-06-25 19:18:12.000000000 +0200
-+++ b/gcc/Makefile.in 2016-04-22 00:12:54.029178860 +0200
-@@ -991,10 +991,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@)
- ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
-
- # This is the variable to use when using $(COMPILER).
--ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
-+ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
-
- # This is the variable to use when using $(LINKER).
--ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
-+ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
-
- # Build and host support libraries.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch
deleted file mode 100644
index c266cfe..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-Backport and edit of patches from:
-https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=249957
-by jsm28 (Joseph Myers)
-
-Current glibc no longer gives the ucontext_t type the tag struct
-ucontext, to conform with POSIX namespace rules. This requires
-various linux-unwind.h files in libgcc, that were previously using
-struct ucontext, to be fixed to use ucontext_t instead. This is
-similar to the removal of the struct siginfo tag from siginfo_t some
-years ago.
-
-This patch changes those files to use ucontext_t instead. As the
-standard name that should be unconditionally safe, so this is not
-restricted to architectures supported by glibc, or conditioned on the
-glibc version.
-
-Upstream-Status: Backport
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
---- branches/gcc-6-branch/libgcc/config/aarch64/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/aarch64/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -52,7 +52,7 @@
- struct rt_sigframe
- {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- };
-
- struct rt_sigframe *rt_;
---- branches/gcc-6-branch/libgcc/config/alpha/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/alpha/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -51,7 +51,7 @@
- {
- struct rt_sigframe {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_ = context->cfa;
- sc = &rt_->uc.uc_mcontext;
- }
---- branches/gcc-6-branch/libgcc/config/bfin/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/bfin/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -52,7 +52,7 @@
- void *puc;
- char retcode[8];
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_ = context->cfa;
-
- /* The void * cast is necessary to avoid an aliasing warning.
---- branches/gcc-6-branch/libgcc/config/i386/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/i386/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -58,7 +58,7 @@
- if (*(unsigned char *)(pc+0) == 0x48
- && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
- {
-- struct ucontext *uc_ = context->cfa;
-+ ucontext_t *uc_ = context->cfa;
- /* The void * cast is necessary to avoid an aliasing warning.
- The aliasing warning is correct, but should not be a problem
- because it does not alias anything. */
-@@ -138,7 +138,7 @@
- siginfo_t *pinfo;
- void *puc;
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_ = context->cfa;
- /* The void * cast is necessary to avoid an aliasing warning.
- The aliasing warning is correct, but should not be a problem
---- branches/gcc-6-branch/libgcc/config/m68k/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/m68k/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -33,7 +33,7 @@
- /* <sys/ucontext.h> is unfortunately broken right now. */
- struct uw_ucontext {
- unsigned long uc_flags;
-- struct ucontext *uc_link;
-+ ucontext_t *uc_link;
- stack_t uc_stack;
- mcontext_t uc_mcontext;
- unsigned long uc_filler[80];
---- branches/gcc-6-branch/libgcc/config/nios2/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/nios2/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -38,7 +38,7 @@
-
- struct nios2_ucontext {
- unsigned long uc_flags;
-- struct ucontext *uc_link;
-+ ucontext_t *uc_link;
- stack_t uc_stack;
- struct nios2_mcontext uc_mcontext;
- sigset_t uc_sigmask; /* mask last for extensibility */
---- branches/gcc-6-branch/libgcc/config/pa/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/pa/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -80,7 +80,7 @@
- struct sigcontext *sc;
- struct rt_sigframe {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *frame;
-
- /* rt_sigreturn trampoline:
---- branches/gcc-6-branch/libgcc/config/sh/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/sh/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -180,7 +180,7 @@
- {
- struct rt_sigframe {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_ = context->cfa;
- /* The void * cast is necessary to avoid an aliasing warning.
- The aliasing warning is correct, but should not be a problem
---- branches/gcc-6-branch/libgcc/config/tilepro/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/tilepro/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -61,7 +61,7 @@
- struct rt_sigframe {
- unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_;
-
- /* Return if this is not a signal handler. */
---- branches/gcc-6-branch/libgcc/config/xtensa/linux-unwind.h 2017/07/04 10:22:56 249956
---- b/libgcc/config/xtensa/linux-unwind.h 2017/07/04 10:23:57 249957
-@@ -67,7 +67,7 @@
-
- struct rt_sigframe {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- } *rt_;
-
- /* movi a2, __NR_rt_sigreturn; syscall */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch
deleted file mode 100644
index 0214ab8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-From ad5bf450aef2ffee6d57ed193fabc5f72f8eaa65 Mon Sep 17 00:00:00 2001
-From: rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 19 Oct 2017 13:16:42 +0000
-Subject: [PATCH] [ARM] PR 82445 - suppress 32-bit aligned ldrd/strd peepholing
- with -mno-unaligned-access
-
-Peephole patterns exist in the arm backend to spot load/store
-operations to adjacent memory operations in order to convert them into
-ldrd/strd instructions. However, when we have strict alignment
-enforced, then we can only do this if the accesses are known to be
-64-bit aligned; this is unlikely to be the case for most loads. The
-patch adds some alignment checking to the code that validates the
-addresses for use in the peephole patterns. This should also fix
-incorrect generation of ldrd/strd with unaligned accesses that could
-previously have occurred on ARMv5e where all such operations must be
-64-bit aligned.
-
-I've added some new tests as well. In doing so I discovered that the
-ldrd/strd peephole tests could never fail since they would match the
-source file name in the scanned assembly as well as any instructions
-of the intended type. I've fixed those by tightening the scan results
-slightly.
-
-gcc:
-
-* config/arm/arm.c (align_ok_ldrd_strd): New function.
-(mem_ok_for_ldrd_strd): New parameter align. Extract the alignment of the
-mem into it.
-(gen_operands_ldrd_strd): Validate the alignment of the accesses.
-
-testsuite:
-
-* gcc.target/arm/peep-ldrd-1.c: Tighten test scan pattern.
-* gcc.target/arm/peep-strd-1.c: Likewise.
-* gcc.target/arm/peep-ldrd-2.c: New test.
-* gcc.target/arm/peep-strd-2.c: New test.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@253892 138bc75d-0d04-0410-961f-82ee72b054a4
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gcc/ChangeLog | 8 +++++++
- gcc/config/arm/arm.c | 27 ++++++++++++++++++----
- gcc/testsuite/ChangeLog | 8 +++++++
- gcc/testsuite/gcc.target/arm/peep-ldrd-1.c | 2 +-
- .../arm/{peep-ldrd-1.c => peep-ldrd-2.c} | 4 ++--
- gcc/testsuite/gcc.target/arm/peep-strd-1.c | 2 +-
- .../arm/{peep-strd-1.c => peep-strd-2.c} | 4 ++--
- 7 files changed, 44 insertions(+), 11 deletions(-)
- copy gcc/testsuite/gcc.target/arm/{peep-ldrd-1.c => peep-ldrd-2.c} (63%)
- copy gcc/testsuite/gcc.target/arm/{peep-strd-1.c => peep-strd-2.c} (58%)
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index 9c0813d598d..e3da9f77fb6 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -15926,12 +15926,23 @@ operands_ok_ldrd_strd (rtx rt, rtx rt2, rtx rn, HOST_WIDE_INT offset,
- return true;
- }
-
-+/* Return true if a 64-bit access with alignment ALIGN and with a
-+ constant offset OFFSET from the base pointer is permitted on this
-+ architecture. */
-+static bool
-+align_ok_ldrd_strd (HOST_WIDE_INT align, HOST_WIDE_INT offset)
-+{
-+ return (unaligned_access
-+ ? (align >= BITS_PER_WORD && (offset & 3) == 0)
-+ : (align >= 2 * BITS_PER_WORD && (offset & 7) == 0));
-+}
-+
- /* Helper for gen_operands_ldrd_strd. Returns true iff the memory
- operand MEM's address contains an immediate offset from the base
-- register and has no side effects, in which case it sets BASE and
-- OFFSET accordingly. */
-+ register and has no side effects, in which case it sets BASE,
-+ OFFSET and ALIGN accordingly. */
- static bool
--mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
-+mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset, HOST_WIDE_INT *align)
- {
- rtx addr;
-
-@@ -15950,6 +15961,7 @@ mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
- gcc_assert (MEM_P (mem));
-
- *offset = const0_rtx;
-+ *align = MEM_ALIGN (mem);
-
- addr = XEXP (mem, 0);
-
-@@ -15990,7 +16002,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- bool const_store, bool commute)
- {
- int nops = 2;
-- HOST_WIDE_INT offsets[2], offset;
-+ HOST_WIDE_INT offsets[2], offset, align[2];
- rtx base = NULL_RTX;
- rtx cur_base, cur_offset, tmp;
- int i, gap;
-@@ -16002,7 +16014,8 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- registers, and the corresponding memory offsets. */
- for (i = 0; i < nops; i++)
- {
-- if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset))
-+ if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset,
-+ &align[i]))
- return false;
-
- if (i == 0)
-@@ -16114,6 +16127,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- /* Swap the instructions such that lower memory is accessed first. */
- std::swap (operands[0], operands[1]);
- std::swap (operands[2], operands[3]);
-+ std::swap (align[0], align[1]);
- if (const_store)
- std::swap (operands[4], operands[5]);
- }
-@@ -16127,6 +16141,9 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- if (gap != 4)
- return false;
-
-+ if (!align_ok_ldrd_strd (align[0], offset))
-+ return false;
-+
- /* Make sure we generate legal instructions. */
- if (operands_ok_ldrd_strd (operands[0], operands[1], base, offset,
- false, load))
-diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-index eb2b86ee7b6..d49eff6b87e 100644
---- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
- *p = a;
- return a;
- }
--/* { dg-final { scan-assembler "ldrd" } } */
-+/* { dg-final { scan-assembler "ldrd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-similarity index 63%
-copy from gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-copy to gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-index eb2b86ee7b6..6822c2b1454 100644
---- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-@@ -1,6 +1,6 @@
- /* { dg-do compile } */
- /* { dg-require-effective-target arm_prefer_ldrd_strd } */
--/* { dg-options "-O2" } */
-+/* { dg-options "-O2 -mno-unaligned-access" } */
- int foo(int a, int b, int* p, int *q)
- {
- a = p[2] + p[3];
-@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
- *p = a;
- return a;
- }
--/* { dg-final { scan-assembler "ldrd" } } */
-+/* { dg-final { scan-assembler-not "ldrd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-index bd330769599..fe1beac7229 100644
---- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-@@ -6,4 +6,4 @@ void foo(int a, int b, int* p)
- p[2] = a;
- p[3] = b;
- }
--/* { dg-final { scan-assembler "strd" } } */
-+/* { dg-final { scan-assembler "strd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
-similarity index 58%
-copy from gcc/testsuite/gcc.target/arm/peep-strd-1.c
-copy to gcc/testsuite/gcc.target/arm/peep-strd-2.c
-index bd330769599..bfc5ebe9eec 100644
---- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
-@@ -1,9 +1,9 @@
- /* { dg-do compile } */
- /* { dg-require-effective-target arm_prefer_ldrd_strd } */
--/* { dg-options "-O2" } */
-+/* { dg-options "-O2 -mno-unaligned-access" } */
- void foo(int a, int b, int* p)
- {
- p[2] = a;
- p[3] = b;
- }
--/* { dg-final { scan-assembler "strd" } } */
-+/* { dg-final { scan-assembler-not "strd\\t" } } */
---
-2.15.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch
deleted file mode 100644
index 3f664c5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-enable-FL_LPAE-flag-for-armv7ve-cores.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 22fcc126fad61a8e9ddaaabbc8036644273642dc Mon Sep 17 00:00:00 2001
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 9 Nov 2017 14:34:28 +0000
-Subject: [PATCH] enable FL_LPAE flag for armv7ve cores
-
-The following commit added the FL_LPAE flag to FL_FOR_ARCH7VE, but
-neglected to also add it to the armv7ve compatible cores defined in
-arm-cores.def.
-
- https://github.com/gcc-mirror/gcc/commit/af2d9b9e58e8be576c53d94f30c48c68146b0c98
-
-The result is that gcc 6.4 now refuses to allow -march=armv7ve and
--mcpu=XXX to be used together, even when -mcpu is set to an armv7ve
-compatible core:
-
- arm-linux-gnueabi-gcc -march=armv7ve -mcpu=cortex-a7 -Werror ...
- error: switch -mcpu=cortex-a7 conflicts with -march=armv7ve switch [-Werror]
-
-Fix by defining flags for armv7ve compatible cores directly from
-FL_FOR_ARCH7VE, rather than re-creating the armv7ve flags
-independently by combining FL_FOR_ARCH7A with the armv7ve specific
-FL_THUMB_DIV and FL_ARM_DIV flags.
-
-Upstream-Status: Backport
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@254584 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- gcc/config/arm/arm-cores.def | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/config/arm/arm-cores.def b/gcc/config/arm/arm-cores.def
-index 829b839..ca37e6f 100644
---- a/gcc/config/arm/arm-cores.def
-+++ b/gcc/config/arm/arm-cores.def
-@@ -145,12 +145,12 @@ ARM_CORE("cortex-m0plus.small-multiply",cortexm0plussmallmultiply, cortexm0plus,
- /* V7 Architecture Processors */
- ARM_CORE("generic-armv7-a", genericv7a, genericv7a, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex)
- ARM_CORE("cortex-a5", cortexa5, cortexa5, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex_a5)
--ARM_CORE("cortex-a7", cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a7)
-+ARM_CORE("cortex-a7", cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a7)
- ARM_CORE("cortex-a8", cortexa8, cortexa8, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex_a8)
- ARM_CORE("cortex-a9", cortexa9, cortexa9, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), cortex_a9)
--ARM_CORE("cortex-a12", cortexa12, cortexa17, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a12)
--ARM_CORE("cortex-a15", cortexa15, cortexa15, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a15)
--ARM_CORE("cortex-a17", cortexa17, cortexa17, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a12)
-+ARM_CORE("cortex-a12", cortexa12, cortexa17, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a12)
-+ARM_CORE("cortex-a15", cortexa15, cortexa15, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a15)
-+ARM_CORE("cortex-a17", cortexa17, cortexa17, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a12)
- ARM_CORE("cortex-r4", cortexr4, cortexr4, 7R, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7R), cortex)
- ARM_CORE("cortex-r4f", cortexr4f, cortexr4f, 7R, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7R), cortex)
- ARM_CORE("cortex-r5", cortexr5, cortexr5, 7R, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_ARM_DIV | FL_FOR_ARCH7R), cortex)
-@@ -162,8 +162,8 @@ ARM_CORE("cortex-m3", cortexm3, cortexm3, 7M, ARM_FSET_MAKE_CPU1 (FL_LDSCHED |
- ARM_CORE("marvell-pj4", marvell_pj4, marvell_pj4, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7A), marvell_pj4)
-
- /* V7 big.LITTLE implementations */
--ARM_CORE("cortex-a15.cortex-a7", cortexa15cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a15)
--ARM_CORE("cortex-a17.cortex-a7", cortexa17cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV | FL_FOR_ARCH7A), cortex_a12)
-+ARM_CORE("cortex-a15.cortex-a7", cortexa15cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a15)
-+ARM_CORE("cortex-a17.cortex-a7", cortexa17cortexa7, cortexa7, 7A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_FOR_ARCH7VE), cortex_a12)
-
- /* V8 Architecture Processors */
- ARM_CORE("cortex-a32", cortexa32, cortexa53, 8A, ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_CRC32 | FL_FOR_ARCH8A), cortex_a35)
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-i386-Move-struct-ix86_frame-to-machine_function.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-i386-Move-struct-ix86_frame-to-machine_function.patch
deleted file mode 100644
index 00b0ffd..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0001-i386-Move-struct-ix86_frame-to-machine_function.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-From c2c7775c5587dc59b6756162d390d89d60971a16 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 15 Jan 2018 11:27:24 +0000
-Subject: [PATCH 01/12] i386: Move struct ix86_frame to machine_function
-
-Make ix86_frame available to i386 code generation. This is needed to
-backport the patch set of -mindirect-branch= to mitigate variant #2 of
-the speculative execution vulnerabilities on x86 processors identified
-by CVE-2017-5715, aka Spectre.
-
- Backport from mainline
- 2017-06-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- * config/i386/i386.c (ix86_frame): Moved to ...
- * config/i386/i386.h (ix86_frame): Here.
- (machine_function): Add frame.
- * config/i386/i386.c (ix86_compute_frame_layout): Repace the
- frame argument with &cfun->machine->frame.
- (ix86_can_use_return_insn_p): Don't pass &frame to
- ix86_compute_frame_layout. Copy frame from cfun->machine->frame.
- (ix86_can_eliminate): Likewise.
- (ix86_expand_prologue): Likewise.
- (ix86_expand_epilogue): Likewise.
- (ix86_expand_split_stack_prologue): Likewise.
-
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 68 ++++++++++----------------------------------------
- gcc/config/i386/i386.h | 53 ++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 65 insertions(+), 56 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 8b5faac..a1ff32b 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -2434,53 +2434,6 @@ struct GTY(()) stack_local_entry {
- struct stack_local_entry *next;
- };
-
--/* Structure describing stack frame layout.
-- Stack grows downward:
--
-- [arguments]
-- <- ARG_POINTER
-- saved pc
--
-- saved static chain if ix86_static_chain_on_stack
--
-- saved frame pointer if frame_pointer_needed
-- <- HARD_FRAME_POINTER
-- [saved regs]
-- <- regs_save_offset
-- [padding0]
--
-- [saved SSE regs]
-- <- sse_regs_save_offset
-- [padding1] |
-- | <- FRAME_POINTER
-- [va_arg registers] |
-- |
-- [frame] |
-- |
-- [padding2] | = to_allocate
-- <- STACK_POINTER
-- */
--struct ix86_frame
--{
-- int nsseregs;
-- int nregs;
-- int va_arg_size;
-- int red_zone_size;
-- int outgoing_arguments_size;
--
-- /* The offsets relative to ARG_POINTER. */
-- HOST_WIDE_INT frame_pointer_offset;
-- HOST_WIDE_INT hard_frame_pointer_offset;
-- HOST_WIDE_INT stack_pointer_offset;
-- HOST_WIDE_INT hfp_save_offset;
-- HOST_WIDE_INT reg_save_offset;
-- HOST_WIDE_INT sse_reg_save_offset;
--
-- /* When save_regs_using_mov is set, emit prologue using
-- move instead of push instructions. */
-- bool save_regs_using_mov;
--};
--
- /* Which cpu are we scheduling for. */
- enum attr_cpu ix86_schedule;
-
-@@ -2572,7 +2525,7 @@ static unsigned int ix86_function_arg_boundary (machine_mode,
- const_tree);
- static rtx ix86_static_chain (const_tree, bool);
- static int ix86_function_regparm (const_tree, const_tree);
--static void ix86_compute_frame_layout (struct ix86_frame *);
-+static void ix86_compute_frame_layout (void);
- static bool ix86_expand_vector_init_one_nonzero (bool, machine_mode,
- rtx, rtx, int);
- static void ix86_add_new_builtins (HOST_WIDE_INT);
-@@ -10944,7 +10897,8 @@ ix86_can_use_return_insn_p (void)
- if (crtl->args.pops_args && crtl->args.size >= 32768)
- return 0;
-
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = cfun->machine->frame;
- return (frame.stack_pointer_offset == UNITS_PER_WORD
- && (frame.nregs + frame.nsseregs) == 0);
- }
-@@ -11355,8 +11309,8 @@ ix86_can_eliminate (const int from, const int to)
- HOST_WIDE_INT
- ix86_initial_elimination_offset (int from, int to)
- {
-- struct ix86_frame frame;
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ struct ix86_frame frame = cfun->machine->frame;
-
- if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
- return frame.hard_frame_pointer_offset;
-@@ -11395,8 +11349,9 @@ ix86_builtin_setjmp_frame_value (void)
- /* Fill structure ix86_frame about frame of currently computed function. */
-
- static void
--ix86_compute_frame_layout (struct ix86_frame *frame)
-+ix86_compute_frame_layout (void)
- {
-+ struct ix86_frame *frame = &cfun->machine->frame;
- unsigned HOST_WIDE_INT stack_alignment_needed;
- HOST_WIDE_INT offset;
- unsigned HOST_WIDE_INT preferred_alignment;
-@@ -12702,7 +12657,8 @@ ix86_expand_prologue (void)
- m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
- m->fs.sp_valid = true;
-
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = m->frame;
-
- if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
- {
-@@ -13379,7 +13335,8 @@ ix86_expand_epilogue (int style)
- bool using_drap;
-
- ix86_finalize_stack_realign_flags ();
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = m->frame;
-
- m->fs.sp_valid = (!frame_pointer_needed
- || (crtl->sp_is_unchanging
-@@ -13876,7 +13833,8 @@ ix86_expand_split_stack_prologue (void)
- gcc_assert (flag_split_stack && reload_completed);
-
- ix86_finalize_stack_realign_flags ();
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = cfun->machine->frame;
- allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
-
- /* This is the label we will branch to if we have enough stack
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 8113f83..5414416 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2427,9 +2427,56 @@ enum avx_u128_state
-
- #define FASTCALL_PREFIX '@'
-
-+#ifndef USED_FOR_TARGET
-+/* Structure describing stack frame layout.
-+ Stack grows downward:
-+
-+ [arguments]
-+ <- ARG_POINTER
-+ saved pc
-+
-+ saved static chain if ix86_static_chain_on_stack
-+
-+ saved frame pointer if frame_pointer_needed
-+ <- HARD_FRAME_POINTER
-+ [saved regs]
-+ <- regs_save_offset
-+ [padding0]
-+
-+ [saved SSE regs]
-+ <- sse_regs_save_offset
-+ [padding1] |
-+ | <- FRAME_POINTER
-+ [va_arg registers] |
-+ |
-+ [frame] |
-+ |
-+ [padding2] | = to_allocate
-+ <- STACK_POINTER
-+ */
-+struct GTY(()) ix86_frame
-+{
-+ int nsseregs;
-+ int nregs;
-+ int va_arg_size;
-+ int red_zone_size;
-+ int outgoing_arguments_size;
-+
-+ /* The offsets relative to ARG_POINTER. */
-+ HOST_WIDE_INT frame_pointer_offset;
-+ HOST_WIDE_INT hard_frame_pointer_offset;
-+ HOST_WIDE_INT stack_pointer_offset;
-+ HOST_WIDE_INT hfp_save_offset;
-+ HOST_WIDE_INT reg_save_offset;
-+ HOST_WIDE_INT sse_reg_save_offset;
-+
-+ /* When save_regs_using_mov is set, emit prologue using
-+ move instead of push instructions. */
-+ bool save_regs_using_mov;
-+};
-+
- /* Machine specific frame tracking during prologue/epilogue generation. */
-
--#ifndef USED_FOR_TARGET
- struct GTY(()) machine_frame_state
- {
- /* This pair tracks the currently active CFA as reg+offset. When reg
-@@ -2475,6 +2522,9 @@ struct GTY(()) machine_function {
- int varargs_fpr_size;
- int optimize_mode_switching[MAX_386_ENTITIES];
-
-+ /* Cached initial frame layout for the current function. */
-+ struct ix86_frame frame;
-+
- /* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE
- has been computed for. */
- int use_fast_prologue_epilogue_nregs;
-@@ -2554,6 +2604,7 @@ struct GTY(()) machine_function {
- #define ix86_current_function_calls_tls_descriptor \
- (ix86_tls_descriptor_calls_expanded_in_cfun && df_regs_ever_live_p (SP_REG))
- #define ix86_static_chain_on_stack (cfun->machine->static_chain_on_stack)
-+#define ix86_red_zone_size (cfun->machine->frame.red_zone_size)
-
- /* Control behavior of x86_file_start. */
- #define X86_FILE_START_VERSION_DIRECTIVE false
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
deleted file mode 100644
index df65b08..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From fe2b3be3f4b6ec6b3a6f89c26016a3983b7cb351 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 15 Jan 2018 11:28:44 +0000
-Subject: [PATCH 02/12] i386: Use reference of struct ix86_frame to avoid copy
-
-When there is no need to make a copy of ix86_frame, we can use reference
-of struct ix86_frame to avoid copy.
-
- Backport from mainline
- 2017-11-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
- of struct ix86_frame.
- (ix86_initial_elimination_offset): Likewise.
- (ix86_expand_split_stack_prologue): Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index a1ff32b..13ebf10 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -10887,7 +10887,6 @@ symbolic_reference_mentioned_p (rtx op)
- bool
- ix86_can_use_return_insn_p (void)
- {
-- struct ix86_frame frame;
-
- if (! reload_completed || frame_pointer_needed)
- return 0;
-@@ -10898,7 +10897,7 @@ ix86_can_use_return_insn_p (void)
- return 0;
-
- ix86_compute_frame_layout ();
-- frame = cfun->machine->frame;
-+ struct ix86_frame &frame = cfun->machine->frame;
- return (frame.stack_pointer_offset == UNITS_PER_WORD
- && (frame.nregs + frame.nsseregs) == 0);
- }
-@@ -11310,7 +11309,7 @@ HOST_WIDE_INT
- ix86_initial_elimination_offset (int from, int to)
- {
- ix86_compute_frame_layout ();
-- struct ix86_frame frame = cfun->machine->frame;
-+ struct ix86_frame &frame = cfun->machine->frame;
-
- if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
- return frame.hard_frame_pointer_offset;
-@@ -13821,7 +13820,6 @@ static GTY(()) rtx split_stack_fn_large;
- void
- ix86_expand_split_stack_prologue (void)
- {
-- struct ix86_frame frame;
- HOST_WIDE_INT allocate;
- unsigned HOST_WIDE_INT args_size;
- rtx_code_label *label;
-@@ -13834,7 +13832,7 @@ ix86_expand_split_stack_prologue (void)
-
- ix86_finalize_stack_realign_flags ();
- ix86_compute_frame_layout ();
-- frame = cfun->machine->frame;
-+ struct ix86_frame &frame = cfun->machine->frame;
- allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
-
- /* This is the label we will branch to if we have enough stack
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
deleted file mode 100644
index a5ffd85..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 82243732dc63e9b90396a5ae4ad99ca36af81355 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Sat, 27 Jan 2018 13:10:24 +0000
-Subject: [PATCH 03/12] i386: Use const reference of struct ix86_frame to avoid
- copy
-
-We can use const reference of struct ix86_frame to avoid making a local
-copy of ix86_frame. ix86_expand_epilogue makes a local copy of struct
-ix86_frame and uses the reg_save_offset field as a local variable. This
-patch uses a separate local variable for reg_save_offset.
-
-Tested on x86-64 with ada.
-
- Backport from mainline
- PR target/83905
- * config/i386/i386.c (ix86_expand_prologue): Use cost reference
- of struct ix86_frame.
- (ix86_expand_epilogue): Likewise. Add a local variable for
- the reg_save_offset field in struct ix86_frame.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257123 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 24 ++++++++++++------------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 13ebf10..6c98f75 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -12633,7 +12633,6 @@ ix86_expand_prologue (void)
- {
- struct machine_function *m = cfun->machine;
- rtx insn, t;
-- struct ix86_frame frame;
- HOST_WIDE_INT allocate;
- bool int_registers_saved;
- bool sse_registers_saved;
-@@ -12657,7 +12656,7 @@ ix86_expand_prologue (void)
- m->fs.sp_valid = true;
-
- ix86_compute_frame_layout ();
-- frame = m->frame;
-+ const struct ix86_frame &frame = cfun->machine->frame;
-
- if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
- {
-@@ -13329,13 +13328,12 @@ ix86_expand_epilogue (int style)
- {
- struct machine_function *m = cfun->machine;
- struct machine_frame_state frame_state_save = m->fs;
-- struct ix86_frame frame;
- bool restore_regs_via_mov;
- bool using_drap;
-
- ix86_finalize_stack_realign_flags ();
- ix86_compute_frame_layout ();
-- frame = m->frame;
-+ const struct ix86_frame &frame = cfun->machine->frame;
-
- m->fs.sp_valid = (!frame_pointer_needed
- || (crtl->sp_is_unchanging
-@@ -13377,11 +13375,13 @@ ix86_expand_epilogue (int style)
- + UNITS_PER_WORD);
- }
-
-+ HOST_WIDE_INT reg_save_offset = frame.reg_save_offset;
-+
- /* Special care must be taken for the normal return case of a function
- using eh_return: the eax and edx registers are marked as saved, but
- not restored along this path. Adjust the save location to match. */
- if (crtl->calls_eh_return && style != 2)
-- frame.reg_save_offset -= 2 * UNITS_PER_WORD;
-+ reg_save_offset -= 2 * UNITS_PER_WORD;
-
- /* EH_RETURN requires the use of moves to function properly. */
- if (crtl->calls_eh_return)
-@@ -13397,11 +13397,11 @@ ix86_expand_epilogue (int style)
- else if (TARGET_EPILOGUE_USING_MOVE
- && cfun->machine->use_fast_prologue_epilogue
- && (frame.nregs > 1
-- || m->fs.sp_offset != frame.reg_save_offset))
-+ || m->fs.sp_offset != reg_save_offset))
- restore_regs_via_mov = true;
- else if (frame_pointer_needed
- && !frame.nregs
-- && m->fs.sp_offset != frame.reg_save_offset)
-+ && m->fs.sp_offset != reg_save_offset)
- restore_regs_via_mov = true;
- else if (frame_pointer_needed
- && TARGET_USE_LEAVE
-@@ -13439,7 +13439,7 @@ ix86_expand_epilogue (int style)
- rtx t;
-
- if (frame.nregs)
-- ix86_emit_restore_regs_using_mov (frame.reg_save_offset, style == 2);
-+ ix86_emit_restore_regs_using_mov (reg_save_offset, style == 2);
-
- /* eh_return epilogues need %ecx added to the stack pointer. */
- if (style == 2)
-@@ -13529,19 +13529,19 @@ ix86_expand_epilogue (int style)
- epilogues. */
- if (!m->fs.sp_valid
- || (TARGET_SEH
-- && (m->fs.sp_offset - frame.reg_save_offset
-+ && (m->fs.sp_offset - reg_save_offset
- >= SEH_MAX_FRAME_SIZE)))
- {
- pro_epilogue_adjust_stack (stack_pointer_rtx, hard_frame_pointer_rtx,
- GEN_INT (m->fs.fp_offset
-- - frame.reg_save_offset),
-+ - reg_save_offset),
- style, false);
- }
-- else if (m->fs.sp_offset != frame.reg_save_offset)
-+ else if (m->fs.sp_offset != reg_save_offset)
- {
- pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx,
- GEN_INT (m->fs.sp_offset
-- - frame.reg_save_offset),
-+ - reg_save_offset),
- style,
- m->fs.cfa_reg == stack_pointer_rtx);
- }
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0004-x86-Add-mindirect-branch.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0004-x86-Add-mindirect-branch.patch
deleted file mode 100644
index a9d6e5f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0004-x86-Add-mindirect-branch.patch
+++ /dev/null
@@ -1,2154 +0,0 @@
-From 6140c2c0bb2b61e69d0da84315e0433ff3520aaa Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:55 -0800
-Subject: [PATCH 04/12] x86: Add -mindirect-branch=
-
-Add -mindirect-branch= option to convert indirect call and jump to call
-and return thunks. The default is 'keep', which keeps indirect call and
-jump unmodified. 'thunk' converts indirect call and jump to call and
-return thunk. 'thunk-inline' converts indirect call and jump to inlined
-call and return thunk. 'thunk-extern' converts indirect call and jump to
-external call and return thunk provided in a separate object file. You
-can control this behavior for a specific function by using the function
-attribute indirect_branch.
-
-2 kinds of thunks are geneated. Memory thunk where the function address
-is at the top of the stack:
-
-__x86_indirect_thunk:
- call L2
-L1:
- pause
- lfence
- jmp L1
-L2:
- lea 8(%rsp), %rsp|lea 4(%esp), %esp
- ret
-
-Indirect jmp via memory, "jmp mem", is converted to
-
- push memory
- jmp __x86_indirect_thunk
-
-Indirect call via memory, "call mem", is converted to
-
- jmp L2
-L1:
- push [mem]
- jmp __x86_indirect_thunk
-L2:
- call L1
-
-Register thunk where the function address is in a register, reg:
-
-__x86_indirect_thunk_reg:
- call L2
-L1:
- pause
- lfence
- jmp L1
-L2:
- movq %reg, (%rsp)|movl %reg, (%esp)
- ret
-
-where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di,
-(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15.
-
-Indirect jmp via register, "jmp reg", is converted to
-
- jmp __x86_indirect_thunk_reg
-
-Indirect call via register, "call reg", is converted to
-
- call __x86_indirect_thunk_reg
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386-opts.h (indirect_branch): New.
- * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
- * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
- with local indirect jump when converting indirect call and jump.
- (ix86_set_indirect_branch_type): New.
- (ix86_set_current_function): Call ix86_set_indirect_branch_type.
- (indirectlabelno): New.
- (indirect_thunk_needed): Likewise.
- (indirect_thunk_bnd_needed): Likewise.
- (indirect_thunks_used): Likewise.
- (indirect_thunks_bnd_used): Likewise.
- (INDIRECT_LABEL): Likewise.
- (indirect_thunk_name): Likewise.
- (output_indirect_thunk): Likewise.
- (output_indirect_thunk_function): Likewise.
- (ix86_output_indirect_branch_via_reg): Likewise.
- (ix86_output_indirect_branch_via_push): Likewise.
- (ix86_output_indirect_branch): Likewise.
- (ix86_output_indirect_jmp): Likewise.
- (ix86_code_end): Call output_indirect_thunk_function if needed.
- (ix86_output_call_insn): Call ix86_output_indirect_branch if
- needed.
- (ix86_handle_fndecl_attribute): Handle indirect_branch.
- (ix86_attribute_table): Add indirect_branch.
- * config/i386/i386.h (machine_function): Add indirect_branch_type
- and has_local_indirect_jump.
- * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
- to true.
- (tablejump): Likewise.
- (*indirect_jump): Use ix86_output_indirect_jmp.
- (*tablejump_1): Likewise.
- (simple_return_indirect_internal): Likewise.
- * config/i386/i386.opt (mindirect-branch=): New option.
- (indirect_branch): New.
- (keep): Likewise.
- (thunk): Likewise.
- (thunk-inline): Likewise.
- (thunk-extern): Likewise.
- * doc/extend.texi: Document indirect_branch function attribute.
- * doc/invoke.texi: Document -mindirect-branch= option.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-1.c: New test.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386-opts.h | 13 +
- gcc/config/i386/i386-protos.h | 1 +
- gcc/config/i386/i386.c | 639 ++++++++++++++++++++-
- gcc/config/i386/i386.h | 7 +
- gcc/config/i386/i386.md | 26 +-
- gcc/config/i386/i386.opt | 20 +
- gcc/doc/extend.texi | 10 +
- gcc/doc/invoke.texi | 13 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 20 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 20 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 21 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 21 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 17 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 18 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 44 ++
- .../gcc.target/i386/indirect-thunk-attr-1.c | 23 +
- .../gcc.target/i386/indirect-thunk-attr-2.c | 21 +
- .../gcc.target/i386/indirect-thunk-attr-3.c | 23 +
- .../gcc.target/i386/indirect-thunk-attr-4.c | 22 +
- .../gcc.target/i386/indirect-thunk-attr-5.c | 22 +
- .../gcc.target/i386/indirect-thunk-attr-6.c | 21 +
- .../gcc.target/i386/indirect-thunk-attr-7.c | 44 ++
- .../gcc.target/i386/indirect-thunk-attr-8.c | 42 ++
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 20 +
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 21 +
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 19 +
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 20 +
- .../gcc.target/i386/indirect-thunk-extern-1.c | 19 +
- .../gcc.target/i386/indirect-thunk-extern-2.c | 19 +
- .../gcc.target/i386/indirect-thunk-extern-3.c | 20 +
- .../gcc.target/i386/indirect-thunk-extern-4.c | 20 +
- .../gcc.target/i386/indirect-thunk-extern-5.c | 16 +
- .../gcc.target/i386/indirect-thunk-extern-6.c | 17 +
- .../gcc.target/i386/indirect-thunk-extern-7.c | 43 ++
- .../gcc.target/i386/indirect-thunk-inline-1.c | 20 +
- .../gcc.target/i386/indirect-thunk-inline-2.c | 20 +
- .../gcc.target/i386/indirect-thunk-inline-3.c | 21 +
- .../gcc.target/i386/indirect-thunk-inline-4.c | 21 +
- .../gcc.target/i386/indirect-thunk-inline-5.c | 17 +
- .../gcc.target/i386/indirect-thunk-inline-6.c | 18 +
- .../gcc.target/i386/indirect-thunk-inline-7.c | 44 ++
- 41 files changed, 1486 insertions(+), 17 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-
-diff --git a/gcc/config/i386/i386-opts.h b/gcc/config/i386/i386-opts.h
-index b7f92e3..cc21152 100644
---- a/gcc/config/i386/i386-opts.h
-+++ b/gcc/config/i386/i386-opts.h
-@@ -99,4 +99,17 @@ enum stack_protector_guard {
- SSP_GLOBAL /* global canary */
- };
-
-+/* This is used to mitigate variant #2 of the speculative execution
-+ vulnerabilities on x86 processors identified by CVE-2017-5715, aka
-+ Spectre. They convert indirect branches and function returns to
-+ call and return thunks to avoid speculative execution via indirect
-+ call, jmp and ret. */
-+enum indirect_branch {
-+ indirect_branch_unset = 0,
-+ indirect_branch_keep,
-+ indirect_branch_thunk,
-+ indirect_branch_thunk_inline,
-+ indirect_branch_thunk_extern
-+};
-+
- #endif
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index ff47bc1..eca4cbf 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -311,6 +311,7 @@ extern enum attr_cpu ix86_schedule;
- #endif
-
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
-+extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- enum machine_mode mode);
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 6c98f75..0b9fc4d 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -3662,12 +3662,23 @@ make_pass_stv (gcc::context *ctxt)
- return new pass_stv (ctxt);
- }
-
--/* Return true if a red-zone is in use. */
-+/* Return true if a red-zone is in use. We can't use red-zone when
-+ there are local indirect jumps, like "indirect_jump" or "tablejump",
-+ which jumps to another place in the function, since "call" in the
-+ indirect thunk pushes the return address onto stack, destroying
-+ red-zone.
-+
-+ TODO: If we can reserve the first 2 WORDs, for PUSH and, another
-+ for CALL, in red-zone, we can allow local indirect jumps with
-+ indirect thunk. */
-
- bool
- ix86_using_red_zone (void)
- {
-- return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI;
-+ return (TARGET_RED_ZONE
-+ && !TARGET_64BIT_MS_ABI
-+ && (!cfun->machine->has_local_indirect_jump
-+ || cfun->machine->indirect_branch_type == indirect_branch_keep));
- }
-
- /* Return a string that documents the current -m options. The caller is
-@@ -6350,6 +6361,37 @@ ix86_reset_previous_fndecl (void)
- ix86_previous_fndecl = NULL_TREE;
- }
-
-+/* Set the indirect_branch_type field from the function FNDECL. */
-+
-+static void
-+ix86_set_indirect_branch_type (tree fndecl)
-+{
-+ if (cfun->machine->indirect_branch_type == indirect_branch_unset)
-+ {
-+ tree attr = lookup_attribute ("indirect_branch",
-+ DECL_ATTRIBUTES (fndecl));
-+ if (attr != NULL)
-+ {
-+ tree args = TREE_VALUE (attr);
-+ if (args == NULL)
-+ gcc_unreachable ();
-+ tree cst = TREE_VALUE (args);
-+ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_keep;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_thunk;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_thunk_inline;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_thunk_extern;
-+ else
-+ gcc_unreachable ();
-+ }
-+ else
-+ cfun->machine->indirect_branch_type = ix86_indirect_branch;
-+ }
-+}
-+
- /* Establish appropriate back-end context for processing the function
- FNDECL. The argument might be NULL to indicate processing at top
- level, outside of any function scope. */
-@@ -6360,7 +6402,13 @@ ix86_set_current_function (tree fndecl)
- several times in the course of compiling a function, and we don't want to
- slow things down too much or call target_reinit when it isn't safe. */
- if (fndecl == ix86_previous_fndecl)
-- return;
-+ {
-+ /* There may be 2 function bodies for the same function FNDECL,
-+ one is extern inline and one isn't. */
-+ if (fndecl != NULL_TREE)
-+ ix86_set_indirect_branch_type (fndecl);
-+ return;
-+ }
-
- tree old_tree;
- if (ix86_previous_fndecl == NULL_TREE)
-@@ -6377,6 +6425,8 @@ ix86_set_current_function (tree fndecl)
- return;
- }
-
-+ ix86_set_indirect_branch_type (fndecl);
-+
- tree new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
- if (new_tree == NULL_TREE)
- new_tree = target_option_default_node;
-@@ -10962,6 +11012,220 @@ ix86_setup_frame_addresses (void)
- # endif
- #endif
-
-+/* Label count for call and return thunks. It is used to make unique
-+ labels in call and return thunks. */
-+static int indirectlabelno;
-+
-+/* True if call and return thunk functions are needed. */
-+static bool indirect_thunk_needed = false;
-+/* True if call and return thunk functions with the BND prefix are
-+ needed. */
-+static bool indirect_thunk_bnd_needed = false;
-+
-+/* Bit masks of integer registers, which contain branch target, used
-+ by call and return thunks functions. */
-+static int indirect_thunks_used;
-+/* Bit masks of integer registers, which contain branch target, used
-+ by call and return thunks functions with the BND prefix. */
-+static int indirect_thunks_bnd_used;
-+
-+#ifndef INDIRECT_LABEL
-+# define INDIRECT_LABEL "LIND"
-+#endif
-+
-+/* Fills in the label name that should be used for the indirect thunk. */
-+
-+static void
-+indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
-+{
-+ if (USE_HIDDEN_LINKONCE)
-+ {
-+ const char *bnd = need_bnd_p ? "_bnd" : "";
-+ if (regno >= 0)
-+ {
-+ const char *reg_prefix;
-+ if (LEGACY_INT_REGNO_P (regno))
-+ reg_prefix = TARGET_64BIT ? "r" : "e";
-+ else
-+ reg_prefix = "";
-+ sprintf (name, "__x86_indirect_thunk%s_%s%s",
-+ bnd, reg_prefix, reg_names[regno]);
-+ }
-+ else
-+ sprintf (name, "__x86_indirect_thunk%s", bnd);
-+ }
-+ else
-+ {
-+ if (regno >= 0)
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITR", regno);
-+ }
-+ else
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+ }
-+ }
-+}
-+
-+/* Output a call and return thunk for indirect branch. If BND_P is
-+ true, the BND prefix is needed. If REGNO != -1, the function
-+ address is in REGNO and the call and return thunk looks like:
-+
-+ call L2
-+ L1:
-+ pause
-+ jmp L1
-+ L2:
-+ mov %REG, (%sp)
-+ ret
-+
-+ Otherwise, the function address is on the top of stack and the
-+ call and return thunk looks like:
-+
-+ call L2
-+ L1:
-+ pause
-+ jmp L1
-+ L2:
-+ lea WORD_SIZE(%sp), %sp
-+ ret
-+ */
-+
-+static void
-+output_indirect_thunk (bool need_bnd_p, int regno)
-+{
-+ char indirectlabel1[32];
-+ char indirectlabel2[32];
-+
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1, INDIRECT_LABEL,
-+ indirectlabelno++);
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2, INDIRECT_LABEL,
-+ indirectlabelno++);
-+
-+ /* Call */
-+ if (need_bnd_p)
-+ fputs ("\tbnd call\t", asm_out_file);
-+ else
-+ fputs ("\tcall\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel2);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+ /* Pause + lfence. */
-+ fprintf (asm_out_file, "\tpause\n\tlfence\n");
-+
-+ /* Jump. */
-+ fputs ("\tjmp\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel1);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+ if (regno >= 0)
-+ {
-+ /* MOV. */
-+ rtx xops[2];
-+ xops[0] = gen_rtx_MEM (word_mode, stack_pointer_rtx);
-+ xops[1] = gen_rtx_REG (word_mode, regno);
-+ output_asm_insn ("mov\t{%1, %0|%0, %1}", xops);
-+ }
-+ else
-+ {
-+ /* LEA. */
-+ rtx xops[2];
-+ xops[0] = stack_pointer_rtx;
-+ xops[1] = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
-+ output_asm_insn ("lea\t{%E1, %0|%0, %E1}", xops);
-+ }
-+
-+ if (need_bnd_p)
-+ fputs ("\tbnd ret\n", asm_out_file);
-+ else
-+ fputs ("\tret\n", asm_out_file);
-+}
-+
-+/* Output a funtion with a call and return thunk for indirect branch.
-+ If BND_P is true, the BND prefix is needed. If REGNO != -1, the
-+ function address is in REGNO. Otherwise, the function address is
-+ on the top of stack. */
-+
-+static void
-+output_indirect_thunk_function (bool need_bnd_p, int regno)
-+{
-+ char name[32];
-+ tree decl;
-+
-+ /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
-+ indirect_thunk_name (name, regno, need_bnd_p);
-+ decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
-+ get_identifier (name),
-+ build_function_type_list (void_type_node, NULL_TREE));
-+ DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
-+ NULL_TREE, void_type_node);
-+ TREE_PUBLIC (decl) = 1;
-+ TREE_STATIC (decl) = 1;
-+ DECL_IGNORED_P (decl) = 1;
-+
-+#if TARGET_MACHO
-+ if (TARGET_MACHO)
-+ {
-+ switch_to_section (darwin_sections[picbase_thunk_section]);
-+ fputs ("\t.weak_definition\t", asm_out_file);
-+ assemble_name (asm_out_file, name);
-+ fputs ("\n\t.private_extern\t", asm_out_file);
-+ assemble_name (asm_out_file, name);
-+ putc ('\n', asm_out_file);
-+ ASM_OUTPUT_LABEL (asm_out_file, name);
-+ DECL_WEAK (decl) = 1;
-+ }
-+ else
-+#endif
-+ if (USE_HIDDEN_LINKONCE)
-+ {
-+ cgraph_node::create (decl)->set_comdat_group (DECL_ASSEMBLER_NAME (decl));
-+
-+ targetm.asm_out.unique_section (decl, 0);
-+ switch_to_section (get_named_section (decl, NULL, 0));
-+
-+ targetm.asm_out.globalize_label (asm_out_file, name);
-+ fputs ("\t.hidden\t", asm_out_file);
-+ assemble_name (asm_out_file, name);
-+ putc ('\n', asm_out_file);
-+ ASM_DECLARE_FUNCTION_NAME (asm_out_file, name, decl);
-+ }
-+ else
-+ {
-+ switch_to_section (text_section);
-+ ASM_OUTPUT_LABEL (asm_out_file, name);
-+ }
-+
-+ DECL_INITIAL (decl) = make_node (BLOCK);
-+ current_function_decl = decl;
-+ allocate_struct_function (decl, false);
-+ init_function_start (decl);
-+ /* We're about to hide the function body from callees of final_* by
-+ emitting it directly; tell them we're a thunk, if they care. */
-+ cfun->is_thunk = true;
-+ first_function_block_is_cold = false;
-+ /* Make sure unwind info is emitted for the thunk if needed. */
-+ final_start_function (emit_barrier (), asm_out_file, 1);
-+
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ final_end_function ();
-+ init_insn_lengths ();
-+ free_after_compilation (cfun);
-+ set_cfun (NULL);
-+ current_function_decl = NULL;
-+}
-+
- static int pic_labels_used;
-
- /* Fills in the label name that should be used for a pc thunk for
-@@ -10988,11 +11252,32 @@ ix86_code_end (void)
- rtx xops[2];
- int regno;
-
-+ if (indirect_thunk_needed)
-+ output_indirect_thunk_function (false, -1);
-+ if (indirect_thunk_bnd_needed)
-+ output_indirect_thunk_function (true, -1);
-+
-+ for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
-+ {
-+ int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
-+ if ((indirect_thunks_used & (1 << i)))
-+ output_indirect_thunk_function (false, regno);
-+
-+ if ((indirect_thunks_bnd_used & (1 << i)))
-+ output_indirect_thunk_function (true, regno);
-+ }
-+
- for (regno = AX_REG; regno <= SP_REG; regno++)
- {
- char name[32];
- tree decl;
-
-+ if ((indirect_thunks_used & (1 << regno)))
-+ output_indirect_thunk_function (false, regno);
-+
-+ if ((indirect_thunks_bnd_used & (1 << regno)))
-+ output_indirect_thunk_function (true, regno);
-+
- if (!(pic_labels_used & (1 << regno)))
- continue;
-
-@@ -27369,12 +27654,292 @@ ix86_nopic_noplt_attribute_p (rtx call_op)
- return false;
- }
-
-+/* Output indirect branch via a call and return thunk. CALL_OP is a
-+ register which contains the branch target. XASM is the assembly
-+ template for CALL_OP. Branch is a tail call if SIBCALL_P is true.
-+ A normal call is converted to:
-+
-+ call __x86_indirect_thunk_reg
-+
-+ and a tail call is converted to:
-+
-+ jmp __x86_indirect_thunk_reg
-+ */
-+
-+static void
-+ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
-+{
-+ char thunk_name_buf[32];
-+ char *thunk_name;
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+ int regno = REGNO (call_op);
-+
-+ if (cfun->machine->indirect_branch_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
-+ {
-+ int i = regno;
-+ if (i >= FIRST_REX_INT_REG)
-+ i -= (FIRST_REX_INT_REG - LAST_INT_REG - 1);
-+ if (need_bnd_p)
-+ indirect_thunks_bnd_used |= 1 << i;
-+ else
-+ indirect_thunks_used |= 1 << i;
-+ }
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ thunk_name = thunk_name_buf;
-+ }
-+ else
-+ thunk_name = NULL;
-+
-+ if (sibcall_p)
-+ {
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+ }
-+ else
-+ {
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd call\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tcall\t%s\n", thunk_name);
-+ return;
-+ }
-+
-+ char indirectlabel1[32];
-+ char indirectlabel2[32];
-+
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+
-+ /* Jump. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd jmp\t", asm_out_file);
-+ else
-+ fputs ("\tjmp\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel2);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+ /* Call. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd call\t", asm_out_file);
-+ else
-+ fputs ("\tcall\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel1);
-+ fputc ('\n', asm_out_file);
-+ }
-+}
-+
-+/* Output indirect branch via a call and return thunk. CALL_OP is
-+ the branch target. XASM is the assembly template for CALL_OP.
-+ Branch is a tail call if SIBCALL_P is true. A normal call is
-+ converted to:
-+
-+ jmp L2
-+ L1:
-+ push CALL_OP
-+ jmp __x86_indirect_thunk
-+ L2:
-+ call L1
-+
-+ and a tail call is converted to:
-+
-+ push CALL_OP
-+ jmp __x86_indirect_thunk
-+ */
-+
-+static void
-+ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
-+ bool sibcall_p)
-+{
-+ char thunk_name_buf[32];
-+ char *thunk_name;
-+ char push_buf[64];
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+ int regno = -1;
-+
-+ if (cfun->machine->indirect_branch_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
-+ {
-+ if (need_bnd_p)
-+ indirect_thunk_bnd_needed = true;
-+ else
-+ indirect_thunk_needed = true;
-+ }
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ thunk_name = thunk_name_buf;
-+ }
-+ else
-+ thunk_name = NULL;
-+
-+ snprintf (push_buf, sizeof (push_buf), "push{%c}\t%s",
-+ TARGET_64BIT ? 'q' : 'l', xasm);
-+
-+ if (sibcall_p)
-+ {
-+ output_asm_insn (push_buf, &call_op);
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+ }
-+ else
-+ {
-+ char indirectlabel1[32];
-+ char indirectlabel2[32];
-+
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+
-+ /* Jump. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd jmp\t", asm_out_file);
-+ else
-+ fputs ("\tjmp\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel2);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+ /* An external function may be called via GOT, instead of PLT. */
-+ if (MEM_P (call_op))
-+ {
-+ struct ix86_address parts;
-+ rtx addr = XEXP (call_op, 0);
-+ if (ix86_decompose_address (addr, &parts)
-+ && parts.base == stack_pointer_rtx)
-+ {
-+ /* Since call will adjust stack by -UNITS_PER_WORD,
-+ we must convert "disp(stack, index, scale)" to
-+ "disp+UNITS_PER_WORD(stack, index, scale)". */
-+ if (parts.index)
-+ {
-+ addr = gen_rtx_MULT (Pmode, parts.index,
-+ GEN_INT (parts.scale));
-+ addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx,
-+ addr);
-+ }
-+ else
-+ addr = stack_pointer_rtx;
-+
-+ rtx disp;
-+ if (parts.disp != NULL_RTX)
-+ disp = plus_constant (Pmode, parts.disp,
-+ UNITS_PER_WORD);
-+ else
-+ disp = GEN_INT (UNITS_PER_WORD);
-+
-+ addr = gen_rtx_PLUS (Pmode, addr, disp);
-+ call_op = gen_rtx_MEM (GET_MODE (call_op), addr);
-+ }
-+ }
-+
-+ output_asm_insn (push_buf, &call_op);
-+
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+ /* Call. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd call\t", asm_out_file);
-+ else
-+ fputs ("\tcall\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel1);
-+ fputc ('\n', asm_out_file);
-+ }
-+}
-+
-+/* Output indirect branch via a call and return thunk. CALL_OP is
-+ the branch target. XASM is the assembly template for CALL_OP.
-+ Branch is a tail call if SIBCALL_P is true. */
-+
-+static void
-+ix86_output_indirect_branch (rtx call_op, const char *xasm,
-+ bool sibcall_p)
-+{
-+ if (REG_P (call_op))
-+ ix86_output_indirect_branch_via_reg (call_op, sibcall_p);
-+ else
-+ ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
-+}
-+/* Output indirect jump. CALL_OP is the jump target. Jump is a
-+ function return if RET_P is true. */
-+
-+const char *
-+ix86_output_indirect_jmp (rtx call_op, bool ret_p)
-+{
-+ if (cfun->machine->indirect_branch_type != indirect_branch_keep)
-+ {
-+ /* We can't have red-zone if this isn't a function return since
-+ "call" in the indirect thunk pushes the return address onto
-+ stack, destroying red-zone. */
-+ if (!ret_p && ix86_red_zone_size != 0)
-+ gcc_unreachable ();
-+
-+ ix86_output_indirect_branch (call_op, "%0", true);
-+ return "";
-+ }
-+ else
-+ return "%!jmp\t%A0";
-+}
-+
- /* Output the assembly for a call instruction. */
-
- const char *
- ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- {
- bool direct_p = constant_call_address_operand (call_op, VOIDmode);
-+ bool output_indirect_p
-+ = (!TARGET_SEH
-+ && cfun->machine->indirect_branch_type != indirect_branch_keep);
- bool seh_nop_p = false;
- const char *xasm;
-
-@@ -27383,7 +27948,13 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- if (direct_p)
- {
- if (ix86_nopic_noplt_attribute_p (call_op))
-- xasm = "%!jmp\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ {
-+ direct_p = false;
-+ if (output_indirect_p)
-+ xasm = "{%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ else
-+ xasm = "%!jmp\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ }
- else
- xasm = "%!jmp\t%P0";
- }
-@@ -27392,9 +27963,17 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- else if (TARGET_SEH)
- xasm = "%!rex.W jmp\t%A0";
- else
-- xasm = "%!jmp\t%A0";
-+ {
-+ if (output_indirect_p)
-+ xasm = "%0";
-+ else
-+ xasm = "%!jmp\t%A0";
-+ }
-
-- output_asm_insn (xasm, &call_op);
-+ if (output_indirect_p && !direct_p)
-+ ix86_output_indirect_branch (call_op, xasm, true);
-+ else
-+ output_asm_insn (xasm, &call_op);
- return "";
- }
-
-@@ -27431,14 +28010,28 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- if (direct_p)
- {
- if (ix86_nopic_noplt_attribute_p (call_op))
-- xasm = "%!call\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ {
-+ direct_p = false;
-+ if (output_indirect_p)
-+ xasm = "{%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ else
-+ xasm = "%!call\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ }
- else
- xasm = "%!call\t%P0";
- }
- else
-- xasm = "%!call\t%A0";
-+ {
-+ if (output_indirect_p)
-+ xasm = "%0";
-+ else
-+ xasm = "%!call\t%A0";
-+ }
-
-- output_asm_insn (xasm, &call_op);
-+ if (output_indirect_p && !direct_p)
-+ ix86_output_indirect_branch (call_op, xasm, false);
-+ else
-+ output_asm_insn (xasm, &call_op);
-
- if (seh_nop_p)
- return "nop";
-@@ -44836,7 +45429,7 @@ ix86_handle_struct_attribute (tree *node, tree name, tree, int,
- }
-
- static tree
--ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
-+ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
- bool *no_add_attrs)
- {
- if (TREE_CODE (*node) != FUNCTION_DECL)
-@@ -44845,6 +45438,29 @@ ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
- name);
- *no_add_attrs = true;
- }
-+
-+ if (is_attribute_p ("indirect_branch", name))
-+ {
-+ tree cst = TREE_VALUE (args);
-+ if (TREE_CODE (cst) != STRING_CST)
-+ {
-+ warning (OPT_Wattributes,
-+ "%qE attribute requires a string constant argument",
-+ name);
-+ *no_add_attrs = true;
-+ }
-+ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
-+ {
-+ warning (OPT_Wattributes,
-+ "argument to %qE attribute is not "
-+ "(keep|thunk|thunk-inline|thunk-extern)", name);
-+ *no_add_attrs = true;
-+ }
-+ }
-+
- return NULL_TREE;
- }
-
-@@ -49072,6 +49688,9 @@ static const struct attribute_spec ix86_attribute_table[] =
- false },
- { "callee_pop_aggregate_return", 1, 1, false, true, true,
- ix86_handle_callee_pop_aggregate_return, true },
-+ { "indirect_branch", 1, 1, true, false, false,
-+ ix86_handle_fndecl_attribute, false },
-+
- /* End element. */
- { NULL, 0, 0, false, false, false, NULL, false }
- };
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 5414416..9dccdb0 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2572,6 +2572,13 @@ struct GTY(()) machine_function {
- /* If true, it is safe to not save/restore DRAP register. */
- BOOL_BITFIELD no_drap_save_restore : 1;
-
-+ /* How to generate indirec branch. */
-+ ENUM_BITFIELD(indirect_branch) indirect_branch_type : 3;
-+
-+ /* If true, the current function has local indirect jumps, like
-+ "indirect_jump" or "tablejump". */
-+ BOOL_BITFIELD has_local_indirect_jump : 1;
-+
- /* If true, there is register available for argument passing. This
- is used only in ix86_function_ok_for_sibcall by 32-bit to determine
- if there is scratch register available for indirect sibcall. In
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index d2bfe31..153e162 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11807,13 +11807,18 @@
- {
- if (TARGET_X32)
- operands[0] = convert_memory_address (word_mode, operands[0]);
-+ cfun->machine->has_local_indirect_jump = true;
- })
-
- (define_insn "*indirect_jump"
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
- ""
-- "%!jmp\t%A0"
-- [(set_attr "type" "ibr")
-+ "* return ix86_output_indirect_jmp (operands[0], false);"
-+ [(set (attr "type")
-+ (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+ != indirect_branch_keep)")
-+ (const_string "multi")
-+ (const_string "ibr")))
- (set_attr "length_immediate" "0")
- (set_attr "maybe_prefix_bnd" "1")])
-
-@@ -11856,14 +11861,19 @@
-
- if (TARGET_X32)
- operands[0] = convert_memory_address (word_mode, operands[0]);
-+ cfun->machine->has_local_indirect_jump = true;
- })
-
- (define_insn "*tablejump_1"
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
- (use (label_ref (match_operand 1)))]
- ""
-- "%!jmp\t%A0"
-- [(set_attr "type" "ibr")
-+ "* return ix86_output_indirect_jmp (operands[0], false);"
-+ [(set (attr "type")
-+ (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+ != indirect_branch_keep)")
-+ (const_string "multi")
-+ (const_string "ibr")))
- (set_attr "length_immediate" "0")
- (set_attr "maybe_prefix_bnd" "1")])
-
-@@ -12520,8 +12530,12 @@
- [(simple_return)
- (use (match_operand:SI 0 "register_operand" "r"))]
- "reload_completed"
-- "%!jmp\t%A0"
-- [(set_attr "type" "ibr")
-+ "* return ix86_output_indirect_jmp (operands[0], true);"
-+ [(set (attr "type")
-+ (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+ != indirect_branch_keep)")
-+ (const_string "multi")
-+ (const_string "ibr")))
- (set_attr "length_immediate" "0")
- (set_attr "maybe_prefix_bnd" "1")])
-
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index f304b62..5ffa334 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -897,3 +897,23 @@ Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
- mmitigate-rop
- Target Var(flag_mitigate_rop) Init(0)
- Attempt to avoid generating instruction sequences containing ret bytes.
-+
-+mindirect-branch=
-+Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
-+Convert indirect call and jump to call and return thunks.
-+
-+Enum
-+Name(indirect_branch) Type(enum indirect_branch)
-+Known indirect branch choices (for use with the -mindirect-branch= option):
-+
-+EnumValue
-+Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk) Value(indirect_branch_thunk)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 8cc4f7e..8668dae 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -5419,6 +5419,16 @@ Specify which floating-point unit to use. You must specify the
- @code{target("fpmath=sse,387")} option as
- @code{target("fpmath=sse+387")} because the comma would separate
- different options.
-+
-+@item indirect_branch("@var{choice}")
-+@cindex @code{indirect_branch} function attribute, x86
-+On x86 targets, the @code{indirect_branch} attribute causes the compiler
-+to convert indirect call and jump with @var{choice}. @samp{keep}
-+keeps indirect call and jump unmodified. @samp{thunk} converts indirect
-+call and jump to call and return thunk. @samp{thunk-inline} converts
-+indirect call and jump to inlined call and return thunk.
-+@samp{thunk-extern} converts indirect call and jump to external call
-+and return thunk provided in a separate object file.
- @end table
-
- On the x86, the inliner does not inline a
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index b066f7b..ff9a194 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1169,7 +1169,7 @@ See RS/6000 and PowerPC Options.
- -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
---mmitigate-rop}
-+-mmitigate-rop -mindirect-branch=@var{choice}}
-
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24218,6 +24218,17 @@ opcodes, to mitigate against certain forms of attack. At the moment,
- this option is limited in what it can do and should not be relied
- on to provide serious protection.
-
-+@item -mindirect-branch=@var{choice}
-+@opindex -mindirect-branch
-+Convert indirect call and jump with @var{choice}. The default is
-+@samp{keep}, which keeps indirect call and jump unmodified.
-+@samp{thunk} converts indirect call and jump to call and return thunk.
-+@samp{thunk-inline} converts indirect call and jump to inlined call
-+and return thunk. @samp{thunk-extern} converts indirect call and jump
-+to external call and return thunk provided in a separate object file.
-+You can control this behavior for a specific function by using the
-+function attribute @code{indirect_branch}. @xref{Function Attributes}.
-+
- @end table
-
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-new file mode 100644
-index 0000000..d983e1c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-new file mode 100644
-index 0000000..58f09b4
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-new file mode 100644
-index 0000000..f20d35c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-new file mode 100644
-index 0000000..0eff8fb
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-new file mode 100644
-index 0000000..a25b20d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+ bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-new file mode 100644
-index 0000000..cff114a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-new file mode 100644
-index 0000000..afdb600
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-new file mode 100644
-index 0000000..d64d978
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+extern void male_indirect_jump (long)
-+ __attribute__ ((indirect_branch("thunk")));
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-new file mode 100644
-index 0000000..9306745
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk")))
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-new file mode 100644
-index 0000000..97744d6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+extern int male_indirect_jump (long)
-+ __attribute__ ((indirect_branch("thunk-inline")));
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-new file mode 100644
-index 0000000..bfce3ea
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk-inline")))
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-new file mode 100644
-index 0000000..0833606
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+extern int male_indirect_jump (long)
-+ __attribute__ ((indirect_branch("thunk-extern")));
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-new file mode 100644
-index 0000000..2eba0fb
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-new file mode 100644
-index 0000000..f58427e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-new file mode 100644
-index 0000000..564ed39
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-@@ -0,0 +1,42 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+__attribute__ ((indirect_branch("keep")))
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-new file mode 100644
-index 0000000..50fbee2
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile { target { ! x32 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+void (*dispatch) (char *);
-+char buf[10];
-+
-+void
-+foo (void)
-+{
-+ dispatch (buf);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-new file mode 100644
-index 0000000..2976e67
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile { target { ! x32 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+void (*dispatch) (char *);
-+char buf[10];
-+
-+int
-+foo (void)
-+{
-+ dispatch (buf);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-new file mode 100644
-index 0000000..da4bc98
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+
-+void bar (char *);
-+char buf[10];
-+
-+void
-+foo (void)
-+{
-+ bar (buf);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-new file mode 100644
-index 0000000..c64d12e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+
-+void bar (char *);
-+char buf[10];
-+
-+int
-+foo (void)
-+{
-+ bar (buf);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-new file mode 100644
-index 0000000..49f27b4
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-new file mode 100644
-index 0000000..a1e3eb6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-new file mode 100644
-index 0000000..395634e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-new file mode 100644
-index 0000000..fd3f633
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-new file mode 100644
-index 0000000..ba2f92b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -0,0 +1,16 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+ bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-new file mode 100644
-index 0000000..0c5a2d4
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-new file mode 100644
-index 0000000..6652523
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -0,0 +1,43 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-new file mode 100644
-index 0000000..68c0ff7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-new file mode 100644
-index 0000000..e2da1fc
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-new file mode 100644
-index 0000000..244fec7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-new file mode 100644
-index 0000000..107ebe3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-new file mode 100644
-index 0000000..17b04ef
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+ bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-new file mode 100644
-index 0000000..d9eb112
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-new file mode 100644
-index 0000000..d02b1dc
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0005-x86-Add-mfunction-return.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0005-x86-Add-mfunction-return.patch
deleted file mode 100644
index 5354c77..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0005-x86-Add-mfunction-return.patch
+++ /dev/null
@@ -1,1570 +0,0 @@
-From e3270814b9e0caad63fbcdfd7ae9da2d52c97497 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 05/12] x86: Add -mfunction-return=
-
-Add -mfunction-return= option to convert function return to call and
-return thunks. The default is 'keep', which keeps function return
-unmodified. 'thunk' converts function return to call and return thunk.
-'thunk-inline' converts function return to inlined call and return thunk.
-'thunk-extern' converts function return to external call and return
-thunk provided in a separate object file. You can control this behavior
-for a specific function by using the function attribute function_return.
-
-Function return thunk is the same as memory thunk for -mindirect-branch=
-where the return address is at the top of the stack:
-
-__x86_return_thunk:
- call L2
-L1:
- pause
- lfence
- jmp L1
-L2:
- lea 8(%rsp), %rsp|lea 4(%esp), %esp
- ret
-
-and function return becomes
-
- jmp __x86_return_thunk
-
--mindirect-branch= tests are updated with -mfunction-return=keep to
-avoid false test failures when -mfunction-return=thunk is added to
-RUNTESTFLAGS for "make check".
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386-protos.h (ix86_output_function_return): New.
- * config/i386/i386.c (ix86_set_indirect_branch_type): Also
- set function_return_type.
- (indirect_thunk_name): Add ret_p to indicate thunk for function
- return.
- (output_indirect_thunk_function): Pass false to
- indirect_thunk_name.
- (ix86_output_indirect_branch_via_reg): Likewise.
- (ix86_output_indirect_branch_via_push): Likewise.
- (output_indirect_thunk_function): Create alias for function
- return thunk if regno < 0.
- (ix86_output_function_return): New function.
- (ix86_handle_fndecl_attribute): Handle function_return.
- (ix86_attribute_table): Add function_return.
- * config/i386/i386.h (machine_function): Add
- function_return_type.
- * config/i386/i386.md (simple_return_internal): Use
- ix86_output_function_return.
- (simple_return_internal_long): Likewise.
- * config/i386/i386.opt (mfunction-return=): New option.
- (indirect_branch): Mention -mfunction-return=.
- * doc/extend.texi: Document function_return function attribute.
- * doc/invoke.texi: Document -mfunction-return= option.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
- -mfunction-return=keep.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
- * gcc.target/i386/ret-thunk-1.c: New test.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
- * gcc.target/i386/ret-thunk-16.c: Likewise.
- * gcc.target/i386/ret-thunk-2.c: Likewise.
- * gcc.target/i386/ret-thunk-3.c: Likewise.
- * gcc.target/i386/ret-thunk-4.c: Likewise.
- * gcc.target/i386/ret-thunk-5.c: Likewise.
- * gcc.target/i386/ret-thunk-6.c: Likewise.
- * gcc.target/i386/ret-thunk-7.c: Likewise.
- * gcc.target/i386/ret-thunk-8.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Likewise.
-
-i386: Don't use ASM_OUTPUT_DEF for TARGET_MACHO
-
-ASM_OUTPUT_DEF isn't defined for TARGET_MACHO. Use ASM_OUTPUT_LABEL to
-generate the __x86_return_thunk label, instead of the set directive.
-Update testcase to remove the __x86_return_thunk label check. Since
--fno-pic is ignored on Darwin, update testcases to sscan or "push"
-only on Linux.
-
-gcc/
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/83839
- * config/i386/i386.c (output_indirect_thunk_function): Use
- ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
- for __x86.return_thunk.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/83839
- * gcc.target/i386/indirect-thunk-1.c: Scan for "push" only on
- Linux.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-4.c: Likewise.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Don't check the
- __x86_return_thunk label.
- Scan for "push" only for Linux.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386-protos.h | 1 +
- gcc/config/i386/i386.c | 152 +++++++++++++++++++--
- gcc/config/i386/i386.h | 3 +
- gcc/config/i386/i386.md | 9 +-
- gcc/config/i386/i386.opt | 6 +-
- gcc/doc/extend.texi | 9 ++
- gcc/doc/invoke.texi | 14 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-3.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-4.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-5.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-6.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-7.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-8.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-3.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-4.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-7.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-7.c | 4 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-1.c | 13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 23 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 23 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-16.c | 18 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-2.c | 13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-3.c | 12 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-4.c | 12 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-5.c | 15 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-6.c | 14 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-7.c | 13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-8.c | 14 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 24 ++++
- 56 files changed, 516 insertions(+), 74 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-11.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-12.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-13.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-14.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-15.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-16.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index eca4cbf..620d70e 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -312,6 +312,7 @@ extern enum attr_cpu ix86_schedule;
-
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
- extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
-+extern const char * ix86_output_function_return (bool long_p);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- enum machine_mode mode);
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 0b9fc4d..34e26a3 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -6390,6 +6390,31 @@ ix86_set_indirect_branch_type (tree fndecl)
- else
- cfun->machine->indirect_branch_type = ix86_indirect_branch;
- }
-+
-+ if (cfun->machine->function_return_type == indirect_branch_unset)
-+ {
-+ tree attr = lookup_attribute ("function_return",
-+ DECL_ATTRIBUTES (fndecl));
-+ if (attr != NULL)
-+ {
-+ tree args = TREE_VALUE (attr);
-+ if (args == NULL)
-+ gcc_unreachable ();
-+ tree cst = TREE_VALUE (args);
-+ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
-+ cfun->machine->function_return_type = indirect_branch_keep;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
-+ cfun->machine->function_return_type = indirect_branch_thunk;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
-+ cfun->machine->function_return_type = indirect_branch_thunk_inline;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
-+ cfun->machine->function_return_type = indirect_branch_thunk_extern;
-+ else
-+ gcc_unreachable ();
-+ }
-+ else
-+ cfun->machine->function_return_type = ix86_function_return;
-+ }
- }
-
- /* Establish appropriate back-end context for processing the function
-@@ -11036,8 +11061,12 @@ static int indirect_thunks_bnd_used;
- /* Fills in the label name that should be used for the indirect thunk. */
-
- static void
--indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
-+indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
-+ bool ret_p)
- {
-+ if (regno >= 0 && ret_p)
-+ gcc_unreachable ();
-+
- if (USE_HIDDEN_LINKONCE)
- {
- const char *bnd = need_bnd_p ? "_bnd" : "";
-@@ -11052,7 +11081,10 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
- bnd, reg_prefix, reg_names[regno]);
- }
- else
-- sprintf (name, "__x86_indirect_thunk%s", bnd);
-+ {
-+ const char *ret = ret_p ? "return" : "indirect";
-+ sprintf (name, "__x86_%s_thunk%s", ret, bnd);
-+ }
- }
- else
- {
-@@ -11065,10 +11097,20 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
- }
- else
- {
-- if (need_bnd_p)
-- ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+ if (ret_p)
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LRTB", 0);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LRT", 0);
-+ }
- else
-- ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+ }
- }
- }
- }
-@@ -11163,7 +11205,7 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- tree decl;
-
- /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
-- indirect_thunk_name (name, regno, need_bnd_p);
-+ indirect_thunk_name (name, regno, need_bnd_p, false);
- decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
- get_identifier (name),
- build_function_type_list (void_type_node, NULL_TREE));
-@@ -11206,6 +11248,36 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-+ if (regno < 0)
-+ {
-+ /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
-+ char alias[32];
-+
-+ indirect_thunk_name (alias, regno, need_bnd_p, true);
-+#if TARGET_MACHO
-+ if (TARGET_MACHO)
-+ {
-+ fputs ("\t.weak_definition\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ fputs ("\n\t.private_extern\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ putc ('\n', asm_out_file);
-+ ASM_OUTPUT_LABEL (asm_out_file, alias);
-+ }
-+#else
-+ ASM_OUTPUT_DEF (asm_out_file, alias, name);
-+ if (USE_HIDDEN_LINKONCE)
-+ {
-+ fputs ("\t.globl\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ putc ('\n', asm_out_file);
-+ fputs ("\t.hidden\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ putc ('\n', asm_out_file);
-+ }
-+#endif
-+ }
-+
- DECL_INITIAL (decl) = make_node (BLOCK);
- current_function_decl = decl;
- allocate_struct_function (decl, false);
-@@ -27687,7 +27759,7 @@ ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
- else
- indirect_thunks_used |= 1 << i;
- }
-- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
- thunk_name = thunk_name_buf;
- }
- else
-@@ -27796,7 +27868,7 @@ ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
- else
- indirect_thunk_needed = true;
- }
-- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
- thunk_name = thunk_name_buf;
- }
- else
-@@ -27931,6 +28003,46 @@ ix86_output_indirect_jmp (rtx call_op, bool ret_p)
- return "%!jmp\t%A0";
- }
-
-+/* Output function return. CALL_OP is the jump target. Add a REP
-+ prefix to RET if LONG_P is true and function return is kept. */
-+
-+const char *
-+ix86_output_function_return (bool long_p)
-+{
-+ if (cfun->machine->function_return_type != indirect_branch_keep)
-+ {
-+ char thunk_name[32];
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+
-+ if (cfun->machine->function_return_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ bool need_thunk = (cfun->machine->function_return_type
-+ == indirect_branch_thunk);
-+ indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
-+ if (need_bnd_p)
-+ {
-+ indirect_thunk_bnd_needed |= need_thunk;
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ }
-+ else
-+ {
-+ indirect_thunk_needed |= need_thunk;
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, -1);
-+
-+ return "";
-+ }
-+
-+ if (!long_p || ix86_bnd_prefixed_insn_p (current_output_insn))
-+ return "%!ret";
-+
-+ return "rep%; ret";
-+}
-+
- /* Output the assembly for a call instruction. */
-
- const char *
-@@ -45461,6 +45573,28 @@ ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
- }
- }
-
-+ if (is_attribute_p ("function_return", name))
-+ {
-+ tree cst = TREE_VALUE (args);
-+ if (TREE_CODE (cst) != STRING_CST)
-+ {
-+ warning (OPT_Wattributes,
-+ "%qE attribute requires a string constant argument",
-+ name);
-+ *no_add_attrs = true;
-+ }
-+ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
-+ {
-+ warning (OPT_Wattributes,
-+ "argument to %qE attribute is not "
-+ "(keep|thunk|thunk-inline|thunk-extern)", name);
-+ *no_add_attrs = true;
-+ }
-+ }
-+
- return NULL_TREE;
- }
-
-@@ -49690,6 +49824,8 @@ static const struct attribute_spec ix86_attribute_table[] =
- ix86_handle_callee_pop_aggregate_return, true },
- { "indirect_branch", 1, 1, true, false, false,
- ix86_handle_fndecl_attribute, false },
-+ { "function_return", 1, 1, true, false, false,
-+ ix86_handle_fndecl_attribute, false },
-
- /* End element. */
- { NULL, 0, 0, false, false, false, NULL, false }
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 9dccdb0..b34bc11 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2579,6 +2579,9 @@ struct GTY(()) machine_function {
- "indirect_jump" or "tablejump". */
- BOOL_BITFIELD has_local_indirect_jump : 1;
-
-+ /* How to generate function return. */
-+ ENUM_BITFIELD(indirect_branch) function_return_type : 3;
-+
- /* If true, there is register available for argument passing. This
- is used only in ix86_function_ok_for_sibcall by 32-bit to determine
- if there is scratch register available for indirect sibcall. In
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 153e162..2da671e 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -12489,7 +12489,7 @@
- (define_insn "simple_return_internal"
- [(simple_return)]
- "reload_completed"
-- "%!ret"
-+ "* return ix86_output_function_return (false);"
- [(set_attr "length" "1")
- (set_attr "atom_unit" "jeu")
- (set_attr "length_immediate" "0")
-@@ -12503,12 +12503,7 @@
- [(simple_return)
- (unspec [(const_int 0)] UNSPEC_REP)]
- "reload_completed"
--{
-- if (ix86_bnd_prefixed_insn_p (insn))
-- return "%!ret";
--
-- return "rep%; ret";
--}
-+ "* return ix86_output_function_return (true);"
- [(set_attr "length" "2")
- (set_attr "atom_unit" "jeu")
- (set_attr "length_immediate" "0")
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index 5ffa334..ad5916f 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -902,9 +902,13 @@ mindirect-branch=
- Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
- Convert indirect call and jump to call and return thunks.
-
-+mfunction-return=
-+Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_function_return) Init(indirect_branch_keep)
-+Convert function return to call and return thunk.
-+
- Enum
- Name(indirect_branch) Type(enum indirect_branch)
--Known indirect branch choices (for use with the -mindirect-branch= option):
-+Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
-
- EnumValue
- Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 8668dae..2cb6bd1 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -5429,6 +5429,15 @@ call and jump to call and return thunk. @samp{thunk-inline} converts
- indirect call and jump to inlined call and return thunk.
- @samp{thunk-extern} converts indirect call and jump to external call
- and return thunk provided in a separate object file.
-+
-+@item function_return("@var{choice}")
-+@cindex @code{function_return} function attribute, x86
-+On x86 targets, the @code{function_return} attribute causes the compiler
-+to convert function return with @var{choice}. @samp{keep} keeps function
-+return unmodified. @samp{thunk} converts function return to call and
-+return thunk. @samp{thunk-inline} converts function return to inlined
-+call and return thunk. @samp{thunk-extern} converts function return to
-+external call and return thunk provided in a separate object file.
- @end table
-
- On the x86, the inliner does not inline a
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index ff9a194..fa63dc5 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1169,7 +1169,8 @@ See RS/6000 and PowerPC Options.
- -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
---mmitigate-rop -mindirect-branch=@var{choice}}
-+-mmitigate-rop -mindirect-branch=@var{choice} @gol
-+-mfunction-return=@var{choice}}
-
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24229,6 +24230,17 @@ to external call and return thunk provided in a separate object file.
- You can control this behavior for a specific function by using the
- function attribute @code{indirect_branch}. @xref{Function Attributes}.
-
-+@item -mfunction-return=@var{choice}
-+@opindex -mfunction-return
-+Convert function return with @var{choice}. The default is @samp{keep},
-+which keeps function return unmodified. @samp{thunk} converts function
-+return to call and return thunk. @samp{thunk-inline} converts function
-+return to inlined call and return thunk. @samp{thunk-extern} converts
-+function return to external call and return thunk provided in a separate
-+object file. You can control this behavior for a specific function by
-+using the function attribute @code{function_return}.
-+@xref{Function Attributes}.
-+
- @end table
-
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index d983e1c..e365ef5 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index 58f09b4..05a51ad 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index f20d35c..3c0d4c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 0eff8fb..14d4ef6 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index a25b20d..b4836c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index cff114a..1f06bd1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index afdb600..bc6b47a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index d64d978..2257be3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index 9306745..e9cfdc5 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index 97744d6..f938db0 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index bfce3ea..4e58599 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index 0833606..b8d5024 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index 2eba0fb..455adab 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index f58427e..4595b84 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -36,7 +36,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-index 564ed39..d730d31 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index 50fbee2..5e3e118 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-@@ -10,7 +10,7 @@ foo (void)
- dispatch (buf);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index 2976e67..2801aa4 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-@@ -11,7 +11,7 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index da4bc98..70b4fb3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index c64d12e..3baf03e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index 49f27b4..edeb264 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index a1e3eb6..1d00413 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index 395634e..06ebf1c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index fd3f633..1c8f944 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index ba2f92b..21740ac 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index 0c5a2d4..a77c1f4 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index 6652523..86e9fd1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 68c0ff7..3ecde87 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index e2da1fc..df32a19 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 244fec7..9540996 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index 107ebe3..f3db6e2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index 17b04ef..0f687c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index d9eb112..b27c6fc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index d02b1dc..764a375 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-1.c b/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
-new file mode 100644
-index 0000000..7223f67
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-new file mode 100644
-index 0000000..3a6727b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-new file mode 100644
-index 0000000..b8f6818
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-new file mode 100644
-index 0000000..01b0a02
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-new file mode 100644
-index 0000000..4b497b5
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+extern void (*bar) (void);
-+extern int foo (void) __attribute__ ((function_return("thunk")));
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-new file mode 100644
-index 0000000..4ae4c44
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("thunk-inline")))
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-new file mode 100644
-index 0000000..5b5bc76
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("thunk-extern"), indirect_branch("thunk")))
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-16.c b/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
-new file mode 100644
-index 0000000..a16cad1
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("keep"), indirect_branch("keep")))
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-2.c b/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
-new file mode 100644
-index 0000000..c6659e3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-3.c b/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
-new file mode 100644
-index 0000000..0f7f388
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
-@@ -0,0 +1,12 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-4.c b/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
-new file mode 100644
-index 0000000..9ae37e8
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
-@@ -0,0 +1,12 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-5.c b/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
-new file mode 100644
-index 0000000..4bd0d2a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
-@@ -0,0 +1,15 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+extern void foo (void) __attribute__ ((function_return("thunk")));
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-6.c b/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
-new file mode 100644
-index 0000000..053841f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
-@@ -0,0 +1,14 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+__attribute__ ((function_return("thunk-inline")))
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-7.c b/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
-new file mode 100644
-index 0000000..262e678
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+__attribute__ ((function_return("thunk-extern")))
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-8.c b/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
-new file mode 100644
-index 0000000..c1658e9
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
-@@ -0,0 +1,14 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+extern void foo (void) __attribute__ ((function_return("keep")));
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-new file mode 100644
-index 0000000..fa24a1f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -0,0 +1,24 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0006-x86-Add-mindirect-branch-register.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0006-x86-Add-mindirect-branch-register.patch
deleted file mode 100644
index ad73691..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0006-x86-Add-mindirect-branch-register.patch
+++ /dev/null
@@ -1,946 +0,0 @@
-From 3f1c39fb543884d36e759a6dc196a8e914eb4f73 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 06/12] x86: Add -mindirect-branch-register
-
-Add -mindirect-branch-register to force indirect branch via register.
-This is implemented by disabling patterns of indirect branch via memory,
-similar to TARGET_X32.
-
--mindirect-branch= and -mfunction-return= tests are updated with
--mno-indirect-branch-register to avoid false test failures when
--mindirect-branch-register is added to RUNTESTFLAGS for "make check".
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/constraints.md (Bs): Disallow memory operand for
- -mindirect-branch-register.
- (Bw): Likewise.
- * config/i386/predicates.md (indirect_branch_operand): Likewise.
- (GOT_memory_operand): Likewise.
- (call_insn_operand): Likewise.
- (sibcall_insn_operand): Likewise.
- (GOT32_symbol_operand): Likewise.
- * config/i386/i386.md (indirect_jump): Call convert_memory_address
- for -mindirect-branch-register.
- (tablejump): Likewise.
- (*sibcall_memory): Likewise.
- (*sibcall_value_memory): Likewise.
- Disallow peepholes of indirect call and jump via memory for
- -mindirect-branch-register.
- (*call_pop): Replace m with Bw.
- (*call_value_pop): Likewise.
- (*sibcall_pop_memory): Replace m with Bs.
- * config/i386/i386.opt (mindirect-branch-register): New option.
- * doc/invoke.texi: Document -mindirect-branch-register option.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
- -mno-indirect-branch-register.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-1.c: New test.
- * gcc.target/i386/indirect-thunk-register-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
-
-i386: Rename to ix86_indirect_branch_register
-
-Rename the variable for -mindirect-branch-register to
-ix86_indirect_branch_register to match the command-line option name.
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/constraints.md (Bs): Replace
- ix86_indirect_branch_thunk_register with
- ix86_indirect_branch_register.
- (Bw): Likewise.
- * config/i386/i386.md (indirect_jump): Likewise.
- (tablejump): Likewise.
- (*sibcall_memory): Likewise.
- (*sibcall_value_memory): Likewise.
- Peepholes of indirect call and jump via memory: Likewise.
- * config/i386/i386.opt: Likewise.
- * config/i386/predicates.md (indirect_branch_operand): Likewise.
- (GOT_memory_operand): Likewise.
- (call_insn_operand): Likewise.
- (sibcall_insn_operand): Likewise.
- (GOT32_symbol_operand): Likewise.
-
-x86: Rewrite ix86_indirect_branch_register logic
-
-Rewrite ix86_indirect_branch_register logic with
-
-(and (not (match_test "ix86_indirect_branch_register"))
- (original condition before r256662))
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/predicates.md (constant_call_address_operand):
- Rewrite ix86_indirect_branch_register logic.
- (sibcall_insn_operand): Likewise.
-
-Don't check ix86_indirect_branch_register for GOT operand
-
-Since GOT_memory_operand and GOT32_symbol_operand are simple pattern
-matches, don't check ix86_indirect_branch_register here. If needed,
--mindirect-branch= will convert indirect branch via GOT slot to a call
-and return thunk.
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/constraints.md (Bs): Update
- ix86_indirect_branch_register check. Don't check
- ix86_indirect_branch_register with GOT_memory_operand.
- (Bw): Likewise.
- * config/i386/predicates.md (GOT_memory_operand): Don't check
- ix86_indirect_branch_register here.
- (GOT32_symbol_operand): Likewise.
-
-i386: Rewrite indirect_branch_operand logic
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/predicates.md (indirect_branch_operand): Rewrite
- ix86_indirect_branch_register logic.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/constraints.md | 6 ++--
- gcc/config/i386/i386.md | 34 ++++++++++++++--------
- gcc/config/i386/i386.opt | 4 +++
- gcc/config/i386/predicates.md | 21 +++++++------
- gcc/doc/invoke.texi | 6 +++-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-register-1.c | 22 ++++++++++++++
- .../gcc.target/i386/indirect-thunk-register-2.c | 20 +++++++++++++
- .../gcc.target/i386/indirect-thunk-register-3.c | 19 ++++++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 2 +-
- 47 files changed, 147 insertions(+), 63 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-
-diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
-index 1a4c701..9204c8e 100644
---- a/gcc/config/i386/constraints.md
-+++ b/gcc/config/i386/constraints.md
-@@ -172,14 +172,16 @@
-
- (define_constraint "Bs"
- "@internal Sibcall memory operand."
-- (ior (and (not (match_test "TARGET_X32"))
-+ (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (not (match_test "TARGET_X32"))
- (match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
- (match_operand 0 "GOT_memory_operand"))))
-
- (define_constraint "Bw"
- "@internal Call memory operand."
-- (ior (and (not (match_test "TARGET_X32"))
-+ (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
- (match_operand 0 "GOT_memory_operand"))))
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 2da671e..05a88ff 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11805,7 +11805,7 @@
- [(set (pc) (match_operand 0 "indirect_branch_operand"))]
- ""
- {
-- if (TARGET_X32)
-+ if (TARGET_X32 || ix86_indirect_branch_register)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -11859,7 +11859,7 @@
- OPTAB_DIRECT);
- }
-
-- if (TARGET_X32)
-+ if (TARGET_X32 || ix86_indirect_branch_register)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -12048,7 +12048,7 @@
- [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
- (match_operand 1))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32"
-+ "!TARGET_X32 && !ix86_indirect_branch_register"
- "* return ix86_output_call_insn (insn, operands[0]);"
- [(set_attr "type" "call")])
-
-@@ -12057,7 +12057,9 @@
- (match_operand:W 1 "memory_operand"))
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
- [(parallel [(call (mem:QI (match_dup 1))
-@@ -12070,7 +12072,9 @@
- (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
- [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-@@ -12092,7 +12096,7 @@
- })
-
- (define_insn "*call_pop"
-- [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lmBz"))
-+ [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lBwBz"))
- (match_operand 1))
- (set (reg:SI SP_REG)
- (plus:SI (reg:SI SP_REG)
-@@ -12112,7 +12116,7 @@
- [(set_attr "type" "call")])
-
- (define_insn "*sibcall_pop_memory"
-- [(call (mem:QI (match_operand:SI 0 "memory_operand" "m"))
-+ [(call (mem:QI (match_operand:SI 0 "memory_operand" "Bs"))
- (match_operand 1))
- (set (reg:SI SP_REG)
- (plus:SI (reg:SI SP_REG)
-@@ -12166,7 +12170,9 @@
- [(set (match_operand:W 0 "register_operand")
- (match_operand:W 1 "memory_operand"))
- (set (pc) (match_dup 0))]
-- "!TARGET_X32 && peep2_reg_dead_p (2, operands[0])"
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && peep2_reg_dead_p (2, operands[0])"
- [(set (pc) (match_dup 1))])
-
- ;; Call subroutine, returning value in operand 0
-@@ -12244,7 +12250,7 @@
- (call (mem:QI (match_operand:W 1 "memory_operand" "m"))
- (match_operand 2)))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32"
-+ "!TARGET_X32 && !ix86_indirect_branch_register"
- "* return ix86_output_call_insn (insn, operands[1]);"
- [(set_attr "type" "callv")])
-
-@@ -12254,7 +12260,9 @@
- (set (match_operand 2)
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
- [(parallel [(set (match_dup 2)
-@@ -12269,7 +12277,9 @@
- (set (match_operand 2)
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
- [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-@@ -12294,7 +12304,7 @@
-
- (define_insn "*call_value_pop"
- [(set (match_operand 0)
-- (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lmBz"))
-+ (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lBwBz"))
- (match_operand 2)))
- (set (reg:SI SP_REG)
- (plus:SI (reg:SI SP_REG)
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index ad5916f..a97f84f 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -921,3 +921,7 @@ Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
-
- EnumValue
- Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
-+
-+mindirect-branch-register
-+Target Report Var(ix86_indirect_branch_register) Init(0)
-+Force indirect call and jump via register.
-diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
-index 93dda7b..d1f0a7d 100644
---- a/gcc/config/i386/predicates.md
-+++ b/gcc/config/i386/predicates.md
-@@ -593,7 +593,8 @@
- ;; Test for a valid operand for indirect branch.
- (define_predicate "indirect_branch_operand"
- (ior (match_operand 0 "register_operand")
-- (and (not (match_test "TARGET_X32"))
-+ (and (not (match_test "ix86_indirect_branch_register"))
-+ (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))))
-
- ;; Return true if OP is a memory operands that can be used in sibcalls.
-@@ -636,20 +637,22 @@
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "call_register_no_elim_operand")
-- (ior (and (not (match_test "TARGET_X32"))
-- (match_operand 0 "memory_operand"))
-- (and (match_test "TARGET_X32 && Pmode == DImode")
-- (match_operand 0 "GOT_memory_operand")))))
-+ (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_X32"))
-+ (match_operand 0 "memory_operand"))
-+ (and (match_test "TARGET_X32 && Pmode == DImode")
-+ (match_operand 0 "GOT_memory_operand"))))))
-
- ;; Similarly, but for tail calls, in which we cannot allow memory references.
- (define_special_predicate "sibcall_insn_operand"
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "register_no_elim_operand")
-- (ior (and (not (match_test "TARGET_X32"))
-- (match_operand 0 "sibcall_memory_operand"))
-- (and (match_test "TARGET_X32 && Pmode == DImode")
-- (match_operand 0 "GOT_memory_operand")))))
-+ (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_X32"))
-+ (match_operand 0 "sibcall_memory_operand"))
-+ (and (match_test "TARGET_X32 && Pmode == DImode")
-+ (match_operand 0 "GOT_memory_operand"))))))
-
- ;; Return true if OP is a 32-bit GOT symbol operand.
- (define_predicate "GOT32_symbol_operand"
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index fa63dc5..ad9f295 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1170,7 +1170,7 @@ See RS/6000 and PowerPC Options.
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
- -mmitigate-rop -mindirect-branch=@var{choice} @gol
---mfunction-return=@var{choice}}
-+-mfunction-return=@var{choice} -mindirect-branch-register}
-
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24241,6 +24241,10 @@ object file. You can control this behavior for a specific function by
- using the function attribute @code{function_return}.
- @xref{Function Attributes}.
-
-+@item -mindirect-branch-register
-+@opindex -mindirect-branch-register
-+Force indirect call and jump via register.
-+
- @end table
-
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index e365ef5..60d0988 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index 05a51ad..aac7516 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index 3c0d4c3..9e24a38 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 14d4ef6..127b5d9 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index b4836c3..fcaa18d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index 1f06bd1..e464928 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index bc6b47a..17c2d0f 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index 2257be3..9194ccf 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index e9cfdc5..e51f261 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index f938db0..4aeec18 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index 4e58599..ac0e599 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index b8d5024..573cf1e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index 455adab..b2b37fc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index 4595b84..4a43e19 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index 5e3e118..ac84ab6 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index 2801aa4..ce655e8 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index 70b4fb3..d34485a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index 3baf03e..0e19830 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index edeb264..579441f 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index 1d00413..c92e6f2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index 06ebf1c..d9964c2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index 1c8f944..d4dca4d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index 21740ac..5c07e02 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index a77c1f4..3eb4406 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index 86e9fd1..aece938 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 3ecde87..3aba5e8 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index df32a19..0f0181d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 9540996..2eef6f3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index f3db6e2..e825a10 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index 0f687c3..c6d77e1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index b27c6fc..6454827 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index 764a375..c67066c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
-new file mode 100644
-index 0000000..7d396a3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk\n" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk_bnd\n" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
-new file mode 100644
-index 0000000..e7e616b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-new file mode 100644
-index 0000000..5320e92
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not {\t(pause|pause|nop)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-index 3a6727b..e6fea84 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-index b8f6818..e239ec4 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-index 01b0a02..fa31813 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-index 4b497b5..fd5b41f 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- extern void (*bar) (void);
- extern int foo (void) __attribute__ ((function_return("thunk")));
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-index 4ae4c44..d606373 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-index 5b5bc76..75e45e2 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-index fa24a1f..d1db41c 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0007-x86-Add-V-register-operand-modifier.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0007-x86-Add-V-register-operand-modifier.patch
deleted file mode 100644
index cec84fe..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0007-x86-Add-V-register-operand-modifier.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From 8f0efd692eb8db06d6c00b759c872bd2170b7f7b Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 07/12] x86: Add 'V' register operand modifier
-
-Add 'V', a special modifier which prints the name of the full integer
-register without '%'. For
-
-extern void (*func_p) (void);
-
-void
-foo (void)
-{
- asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
-}
-
-it generates:
-
-foo:
- movq func_p(%rip), %rax
- call __x86_indirect_thunk_rax
- ret
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (print_reg): Print the name of the full
- integer register without '%'.
- (ix86_print_operand): Handle 'V'.
- * doc/extend.texi: Document 'V' modifier.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-register-4.c: New test.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 13 ++++++++++++-
- gcc/doc/extend.texi | 3 +++
- gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c | 13 +++++++++++++
- 3 files changed, 28 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 34e26a3..eeca7e5 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -16869,6 +16869,7 @@ put_condition_code (enum rtx_code code, machine_mode mode, bool reverse,
- If CODE is 'h', pretend the reg is the 'high' byte register.
- If CODE is 'y', print "st(0)" instead of "st", if the reg is stack op.
- If CODE is 'd', duplicate the operand for AVX instruction.
-+ If CODE is 'V', print naked full integer register name without %.
- */
-
- void
-@@ -16879,7 +16880,7 @@ print_reg (rtx x, int code, FILE *file)
- unsigned int regno;
- bool duplicated;
-
-- if (ASSEMBLER_DIALECT == ASM_ATT)
-+ if (ASSEMBLER_DIALECT == ASM_ATT && code != 'V')
- putc ('%', file);
-
- if (x == pc_rtx)
-@@ -16922,6 +16923,14 @@ print_reg (rtx x, int code, FILE *file)
- && regno != FPSR_REG
- && regno != FPCR_REG);
-
-+ if (code == 'V')
-+ {
-+ if (GENERAL_REGNO_P (regno))
-+ msize = GET_MODE_SIZE (word_mode);
-+ else
-+ error ("'V' modifier on non-integer register");
-+ }
-+
- duplicated = code == 'd' && TARGET_AVX;
-
- switch (msize)
-@@ -17035,6 +17044,7 @@ print_reg (rtx x, int code, FILE *file)
- & -- print some in-use local-dynamic symbol name.
- H -- print a memory address offset by 8; used for sse high-parts
- Y -- print condition for XOP pcom* instruction.
-+ V -- print naked full integer register name without %.
- + -- print a branch hint as 'cs' or 'ds' prefix
- ; -- print a semicolon (after prefixes due to bug in older gas).
- ~ -- print "i" if TARGET_AVX2, "f" otherwise.
-@@ -17259,6 +17269,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
- case 'X':
- case 'P':
- case 'p':
-+ case 'V':
- break;
-
- case 's':
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 2cb6bd1..76ba1d4 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -8511,6 +8511,9 @@ The table below shows the list of supported modifiers and their effects.
- @tab @code{2}
- @end multitable
-
-+@code{V} is a special modifier which prints the name of the full integer
-+register without @code{%}.
-+
- @anchor{x86floatingpointasmoperands}
- @subsubsection x86 Floating-Point @code{asm} Operands
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-new file mode 100644
-index 0000000..f0cd9b7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=keep -fno-pic" } */
-+
-+extern void (*func_p) (void);
-+
-+void
-+foo (void)
-+{
-+ asm("call __x86_indirect_thunk_%V0" : : "a" (func_p));
-+}
-+
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_eax" { target ia32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_rax" { target { ! ia32 } } } } */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch
deleted file mode 100644
index d8a5810..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch
+++ /dev/null
@@ -1,304 +0,0 @@
-From 8e0d9bf93e2e2ec03c544572aef4b03a8e7090f3 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 13 Jan 2018 18:01:54 -0800
-Subject: [PATCH 08/12] x86: Disallow -mindirect-branch=/-mfunction-return=
- with -mcmodel=large
-
-Since the thunk function may not be reachable in large code model,
--mcmodel=large is incompatible with -mindirect-branch=thunk,
--mindirect-branch=thunk-extern, -mfunction-return=thunk and
--mfunction-return=thunk-extern. Issue an error when they are used with
--mcmodel=large.
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
- -mcmodel=large with -mindirect-branch=thunk,
- -mindirect-branch=thunk-extern, -mfunction-return=thunk and
- -mfunction-return=thunk-extern.
- * doc/invoke.texi: Document -mcmodel=large is incompatible with
- -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
- -mfunction-return=thunk and -mfunction-return=thunk-extern.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-10.c: New test.
- * gcc.target/i386/indirect-thunk-8.c: Likewise.
- * gcc.target/i386/indirect-thunk-9.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-10.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-11.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-9.c: Likewise.
- * gcc.target/i386/ret-thunk-17.c: Likewise.
- * gcc.target/i386/ret-thunk-18.c: Likewise.
- * gcc.target/i386/ret-thunk-19.c: Likewise.
- * gcc.target/i386/ret-thunk-20.c: Likewise.
- * gcc.target/i386/ret-thunk-21.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 26 ++++++++++++++++++++++
- gcc/doc/invoke.texi | 11 +++++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-10.c | 7 ++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-8.c | 7 ++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-9.c | 7 ++++++
- .../gcc.target/i386/indirect-thunk-attr-10.c | 9 ++++++++
- .../gcc.target/i386/indirect-thunk-attr-11.c | 9 ++++++++
- .../gcc.target/i386/indirect-thunk-attr-9.c | 9 ++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-17.c | 7 ++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-18.c | 8 +++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-19.c | 8 +++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-20.c | 9 ++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-21.c | 9 ++++++++
- 13 files changed, 126 insertions(+)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-17.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-18.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-19.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-20.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index eeca7e5..9c038be 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -6389,6 +6389,19 @@ ix86_set_indirect_branch_type (tree fndecl)
- }
- else
- cfun->machine->indirect_branch_type = ix86_indirect_branch;
-+
-+ /* -mcmodel=large is not compatible with -mindirect-branch=thunk
-+ nor -mindirect-branch=thunk-extern. */
-+ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
-+ && ((cfun->machine->indirect_branch_type
-+ == indirect_branch_thunk_extern)
-+ || (cfun->machine->indirect_branch_type
-+ == indirect_branch_thunk)))
-+ error ("%<-mindirect-branch=%s%> and %<-mcmodel=large%> are not "
-+ "compatible",
-+ ((cfun->machine->indirect_branch_type
-+ == indirect_branch_thunk_extern)
-+ ? "thunk-extern" : "thunk"));
- }
-
- if (cfun->machine->function_return_type == indirect_branch_unset)
-@@ -6414,6 +6427,19 @@ ix86_set_indirect_branch_type (tree fndecl)
- }
- else
- cfun->machine->function_return_type = ix86_function_return;
-+
-+ /* -mcmodel=large is not compatible with -mfunction-return=thunk
-+ nor -mfunction-return=thunk-extern. */
-+ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
-+ && ((cfun->machine->function_return_type
-+ == indirect_branch_thunk_extern)
-+ || (cfun->machine->function_return_type
-+ == indirect_branch_thunk)))
-+ error ("%<-mfunction-return=%s%> and %<-mcmodel=large%> are not "
-+ "compatible",
-+ ((cfun->machine->function_return_type
-+ == indirect_branch_thunk_extern)
-+ ? "thunk-extern" : "thunk"));
- }
- }
-
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index ad9f295..48e827f 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -24230,6 +24230,11 @@ to external call and return thunk provided in a separate object file.
- You can control this behavior for a specific function by using the
- function attribute @code{indirect_branch}. @xref{Function Attributes}.
-
-+Note that @option{-mcmodel=large} is incompatible with
-+@option{-mindirect-branch=thunk} nor
-+@option{-mindirect-branch=thunk-extern} since the thunk function may
-+not be reachable in large code model.
-+
- @item -mfunction-return=@var{choice}
- @opindex -mfunction-return
- Convert function return with @var{choice}. The default is @samp{keep},
-@@ -24241,6 +24246,12 @@ object file. You can control this behavior for a specific function by
- using the function attribute @code{function_return}.
- @xref{Function Attributes}.
-
-+Note that @option{-mcmodel=large} is incompatible with
-+@option{-mfunction-return=thunk} nor
-+@option{-mfunction-return=thunk-extern} since the thunk function may
-+not be reachable in large code model.
-+
-+
- @item -mindirect-branch-register
- @opindex -mindirect-branch-register
- Force indirect call and jump via register.
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
-new file mode 100644
-index 0000000..a0674bd
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
-new file mode 100644
-index 0000000..7a80a89
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
-new file mode 100644
-index 0000000..d4d45c5
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
-new file mode 100644
-index 0000000..3a2aead
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
-new file mode 100644
-index 0000000..8e52f03
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk-inline")))
-+void
-+bar (void)
-+{
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
-new file mode 100644
-index 0000000..bdaa4f6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-17.c b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
-new file mode 100644
-index 0000000..0605e2c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-18.c b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
-new file mode 100644
-index 0000000..307019d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
-@@ -0,0 +1,8 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-19.c b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
-new file mode 100644
-index 0000000..772617f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
-@@ -0,0 +1,8 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+
-+__attribute__ ((function_return("thunk")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-20.c b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
-new file mode 100644
-index 0000000..1e9f9bd
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((function_return("thunk-extern")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-21.c b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-new file mode 100644
-index 0000000..eea07f7
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((function_return("thunk-inline")))
-+void
-+bar (void)
-+{
-+}
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch
deleted file mode 100644
index 7364a2c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 3eff2adada2b1667b0e76496fa559e0c248ecd84 Mon Sep 17 00:00:00 2001
-From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 25 Jan 2018 19:39:01 +0000
-Subject: [PATCH 09/12] Use INVALID_REGNUM in indirect thunk processing
-
- Backport from mainline
- 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
-
- * config/i386/i386.c (indirect_thunk_name): Declare regno
- as unsigned int. Compare regno with INVALID_REGNUM.
- (output_indirect_thunk): Ditto.
- (output_indirect_thunk_function): Ditto.
- (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
- in the call to output_indirect_thunk_function.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257067 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 30 +++++++++++++++---------------
- 1 file changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 9c038be..4012657 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -11087,16 +11087,16 @@ static int indirect_thunks_bnd_used;
- /* Fills in the label name that should be used for the indirect thunk. */
-
- static void
--indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
-- bool ret_p)
-+indirect_thunk_name (char name[32], unsigned int regno,
-+ bool need_bnd_p, bool ret_p)
- {
-- if (regno >= 0 && ret_p)
-+ if (regno != INVALID_REGNUM && ret_p)
- gcc_unreachable ();
-
- if (USE_HIDDEN_LINKONCE)
- {
- const char *bnd = need_bnd_p ? "_bnd" : "";
-- if (regno >= 0)
-+ if (regno != INVALID_REGNUM)
- {
- const char *reg_prefix;
- if (LEGACY_INT_REGNO_P (regno))
-@@ -11114,7 +11114,7 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
- }
- else
- {
-- if (regno >= 0)
-+ if (regno != INVALID_REGNUM)
- {
- if (need_bnd_p)
- ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
-@@ -11166,7 +11166,7 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
- */
-
- static void
--output_indirect_thunk (bool need_bnd_p, int regno)
-+output_indirect_thunk (bool need_bnd_p, unsigned int regno)
- {
- char indirectlabel1[32];
- char indirectlabel2[32];
-@@ -11196,7 +11196,7 @@ output_indirect_thunk (bool need_bnd_p, int regno)
-
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-
-- if (regno >= 0)
-+ if (regno != INVALID_REGNUM)
- {
- /* MOV. */
- rtx xops[2];
-@@ -11220,12 +11220,12 @@ output_indirect_thunk (bool need_bnd_p, int regno)
- }
-
- /* Output a funtion with a call and return thunk for indirect branch.
-- If BND_P is true, the BND prefix is needed. If REGNO != -1, the
-- function address is in REGNO. Otherwise, the function address is
-+ If BND_P is true, the BND prefix is needed. If REGNO != INVALID_REGNUM,
-+ the function address is in REGNO. Otherwise, the function address is
- on the top of stack. */
-
- static void
--output_indirect_thunk_function (bool need_bnd_p, int regno)
-+output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
- {
- char name[32];
- tree decl;
-@@ -11274,7 +11274,7 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-- if (regno < 0)
-+ if (regno == INVALID_REGNUM)
- {
- /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
- char alias[32];
-@@ -11348,16 +11348,16 @@ static void
- ix86_code_end (void)
- {
- rtx xops[2];
-- int regno;
-+ unsigned int regno;
-
- if (indirect_thunk_needed)
-- output_indirect_thunk_function (false, -1);
-+ output_indirect_thunk_function (false, INVALID_REGNUM);
- if (indirect_thunk_bnd_needed)
-- output_indirect_thunk_function (true, -1);
-+ output_indirect_thunk_function (true, INVALID_REGNUM);
-
- for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
- {
-- int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
-+ unsigned int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
- if ((indirect_thunks_used & (1 << i)))
- output_indirect_thunk_function (false, regno);
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch
deleted file mode 100644
index 080d741..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From c4300d9ad683e693c90d02d4f1b13183bf2d4acc Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 2 Feb 2018 16:47:02 +0000
-Subject: [PATCH 10/12] i386: Pass INVALID_REGNUM as invalid register number
-
- Backport from mainline
- * config/i386/i386.c (ix86_output_function_return): Pass
- INVALID_REGNUM, instead of -1, as invalid register number to
- indirect_thunk_name and output_indirect_thunk.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257341 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 4012657..66502ee 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -28056,7 +28056,8 @@ ix86_output_function_return (bool long_p)
- {
- bool need_thunk = (cfun->machine->function_return_type
- == indirect_branch_thunk);
-- indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
-+ indirect_thunk_name (thunk_name, INVALID_REGNUM, need_bnd_p,
-+ true);
- if (need_bnd_p)
- {
- indirect_thunk_bnd_needed |= need_thunk;
-@@ -28069,7 +28070,7 @@ ix86_output_function_return (bool long_p)
- }
- }
- else
-- output_indirect_thunk (need_bnd_p, -1);
-+ output_indirect_thunk (need_bnd_p, INVALID_REGNUM);
-
- return "";
- }
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0011-i386-Update-mfunction-return-for-return-with-pop.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0011-i386-Update-mfunction-return-for-return-with-pop.patch
deleted file mode 100644
index 3b036fb..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0011-i386-Update-mfunction-return-for-return-with-pop.patch
+++ /dev/null
@@ -1,453 +0,0 @@
-From b3a2269c7884378a9afd394ac7e669aab0443b57 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 26 Feb 2018 15:29:30 +0000
-Subject: [PATCH 11/12] i386: Update -mfunction-return= for return with pop
-
-When -mfunction-return= is used, simple_return_pop_internal should pop
-return address into ECX register, adjust stack by bytes to pop from stack
-and jump to the return thunk via ECX register.
-
-Revision 257992 removed the bool argument from ix86_output_indirect_jmp.
-Update comments to reflect it.
-
-Tested on i686 and x86-64.
-
- Backport from mainline
- * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
-
- PR target/84530
- * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
- the bool argument.
- (ix86_output_indirect_function_return): New prototype.
- (ix86_split_simple_return_pop_internal): Likewise.
- * config/i386/i386.c (indirect_return_via_cx): New.
- (indirect_return_via_cx_bnd): Likewise.
- (indirect_thunk_name): Handle return va CX_REG.
- (output_indirect_thunk_function): Create alias for
- __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
- (ix86_output_indirect_jmp): Remove the bool argument.
- (ix86_output_indirect_function_return): New function.
- (ix86_split_simple_return_pop_internal): Likewise.
- * config/i386/i386.md (*indirect_jump): Don't pass false
- to ix86_output_indirect_jmp.
- (*tablejump_1): Likewise.
- (simple_return_pop_internal): Change it to define_insn_and_split.
- Call ix86_split_simple_return_pop_internal to split it for
- -mfunction-return=.
- (simple_return_indirect_internal): Call
- ix86_output_indirect_function_return instead of
- ix86_output_indirect_jmp.
-
-gcc/testsuite/
-
- Backport from mainline
- PR target/84530
- * gcc.target/i386/ret-thunk-22.c: New test.
- * gcc.target/i386/ret-thunk-23.c: Likewise.
- * gcc.target/i386/ret-thunk-24.c: Likewise.
- * gcc.target/i386/ret-thunk-25.c: Likewise.
- * gcc.target/i386/ret-thunk-26.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/i386-protos.h | 4 +-
- gcc/config/i386/i386.c | 127 +++++++++++++++++++++++----
- gcc/config/i386/i386.md | 11 ++-
- gcc/testsuite/gcc.target/i386/ret-thunk-22.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-23.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-24.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-25.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-26.c | 40 +++++++++
- 8 files changed, 222 insertions(+), 20 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-22.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-23.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-24.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-25.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index 620d70e..c7a0ccb5 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -311,8 +311,10 @@ extern enum attr_cpu ix86_schedule;
- #endif
-
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
--extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
-+extern const char * ix86_output_indirect_jmp (rtx call_op);
- extern const char * ix86_output_function_return (bool long_p);
-+extern const char * ix86_output_indirect_function_return (rtx ret_op);
-+extern void ix86_split_simple_return_pop_internal (rtx);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- enum machine_mode mode);
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 66502ee..21c3c18 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -11080,6 +11080,12 @@ static int indirect_thunks_used;
- by call and return thunks functions with the BND prefix. */
- static int indirect_thunks_bnd_used;
-
-+/* True if return thunk function via CX is needed. */
-+static bool indirect_return_via_cx;
-+/* True if return thunk function via CX with the BND prefix is
-+ needed. */
-+static bool indirect_return_via_cx_bnd;
-+
- #ifndef INDIRECT_LABEL
- # define INDIRECT_LABEL "LIND"
- #endif
-@@ -11090,12 +11096,13 @@ static void
- indirect_thunk_name (char name[32], unsigned int regno,
- bool need_bnd_p, bool ret_p)
- {
-- if (regno != INVALID_REGNUM && ret_p)
-+ if (regno != INVALID_REGNUM && regno != CX_REG && ret_p)
- gcc_unreachable ();
-
- if (USE_HIDDEN_LINKONCE)
- {
- const char *bnd = need_bnd_p ? "_bnd" : "";
-+ const char *ret = ret_p ? "return" : "indirect";
- if (regno != INVALID_REGNUM)
- {
- const char *reg_prefix;
-@@ -11103,14 +11110,11 @@ indirect_thunk_name (char name[32], unsigned int regno,
- reg_prefix = TARGET_64BIT ? "r" : "e";
- else
- reg_prefix = "";
-- sprintf (name, "__x86_indirect_thunk%s_%s%s",
-- bnd, reg_prefix, reg_names[regno]);
-+ sprintf (name, "__x86_%s_thunk%s_%s%s",
-+ ret, bnd, reg_prefix, reg_names[regno]);
- }
- else
-- {
-- const char *ret = ret_p ? "return" : "indirect";
-- sprintf (name, "__x86_%s_thunk%s", ret, bnd);
-- }
-+ sprintf (name, "__x86_%s_thunk%s", ret, bnd);
- }
- else
- {
-@@ -11274,9 +11278,23 @@ output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-+ /* Create alias for __x86_return_thunk/__x86_return_thunk_bnd or
-+ __x86_return_thunk_ecx/__x86_return_thunk_ecx_bnd. */
-+ bool need_alias;
- if (regno == INVALID_REGNUM)
-+ need_alias = true;
-+ else if (regno == CX_REG)
-+ {
-+ if (need_bnd_p)
-+ need_alias = indirect_return_via_cx_bnd;
-+ else
-+ need_alias = indirect_return_via_cx;
-+ }
-+ else
-+ need_alias = false;
-+
-+ if (need_alias)
- {
-- /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
- char alias[32];
-
- indirect_thunk_name (alias, regno, need_bnd_p, true);
-@@ -28019,18 +28037,17 @@ ix86_output_indirect_branch (rtx call_op, const char *xasm,
- else
- ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
- }
--/* Output indirect jump. CALL_OP is the jump target. Jump is a
-- function return if RET_P is true. */
-+
-+/* Output indirect jump. CALL_OP is the jump target. */
-
- const char *
--ix86_output_indirect_jmp (rtx call_op, bool ret_p)
-+ix86_output_indirect_jmp (rtx call_op)
- {
- if (cfun->machine->indirect_branch_type != indirect_branch_keep)
- {
-- /* We can't have red-zone if this isn't a function return since
-- "call" in the indirect thunk pushes the return address onto
-- stack, destroying red-zone. */
-- if (!ret_p && ix86_red_zone_size != 0)
-+ /* We can't have red-zone since "call" in the indirect thunk
-+ pushes the return address onto stack, destroying red-zone. */
-+ if (ix86_red_zone_size != 0)
- gcc_unreachable ();
-
- ix86_output_indirect_branch (call_op, "%0", true);
-@@ -28081,6 +28098,86 @@ ix86_output_function_return (bool long_p)
- return "rep%; ret";
- }
-
-+/* Output indirect function return. RET_OP is the function return
-+ target. */
-+
-+const char *
-+ix86_output_indirect_function_return (rtx ret_op)
-+{
-+ if (cfun->machine->function_return_type != indirect_branch_keep)
-+ {
-+ char thunk_name[32];
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+ unsigned int regno = REGNO (ret_op);
-+ gcc_assert (regno == CX_REG);
-+
-+ if (cfun->machine->function_return_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ bool need_thunk = (cfun->machine->function_return_type
-+ == indirect_branch_thunk);
-+ indirect_thunk_name (thunk_name, regno, need_bnd_p, true);
-+ if (need_bnd_p)
-+ {
-+ if (need_thunk)
-+ {
-+ indirect_return_via_cx_bnd = true;
-+ indirect_thunks_bnd_used |= 1 << CX_REG;
-+ }
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ }
-+ else
-+ {
-+ if (need_thunk)
-+ {
-+ indirect_return_via_cx = true;
-+ indirect_thunks_used |= 1 << CX_REG;
-+ }
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ return "";
-+ }
-+ else
-+ return "%!jmp\t%A0";
-+}
-+
-+/* Split simple return with popping POPC bytes from stack to indirect
-+ branch with stack adjustment . */
-+
-+void
-+ix86_split_simple_return_pop_internal (rtx popc)
-+{
-+ struct machine_function *m = cfun->machine;
-+ rtx ecx = gen_rtx_REG (SImode, CX_REG);
-+ rtx_insn *insn;
-+
-+ /* There is no "pascal" calling convention in any 64bit ABI. */
-+ gcc_assert (!TARGET_64BIT);
-+
-+ insn = emit_insn (gen_pop (ecx));
-+ m->fs.cfa_offset -= UNITS_PER_WORD;
-+ m->fs.sp_offset -= UNITS_PER_WORD;
-+
-+ rtx x = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
-+ x = gen_rtx_SET (stack_pointer_rtx, x);
-+ add_reg_note (insn, REG_CFA_ADJUST_CFA, x);
-+ add_reg_note (insn, REG_CFA_REGISTER, gen_rtx_SET (ecx, pc_rtx));
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+
-+ x = gen_rtx_PLUS (Pmode, stack_pointer_rtx, popc);
-+ x = gen_rtx_SET (stack_pointer_rtx, x);
-+ insn = emit_insn (x);
-+ add_reg_note (insn, REG_CFA_ADJUST_CFA, x);
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+
-+ /* Now return address is in ECX. */
-+ emit_jump_insn (gen_simple_return_indirect_internal (ecx));
-+}
-+
- /* Output the assembly for a call instruction. */
-
- const char *
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 05a88ff..857466a 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11813,7 +11813,7 @@
- (define_insn "*indirect_jump"
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
- ""
-- "* return ix86_output_indirect_jmp (operands[0], false);"
-+ "* return ix86_output_indirect_jmp (operands[0]);"
- [(set (attr "type")
- (if_then_else (match_test "(cfun->machine->indirect_branch_type
- != indirect_branch_keep)")
-@@ -11868,7 +11868,7 @@
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
- (use (label_ref (match_operand 1)))]
- ""
-- "* return ix86_output_indirect_jmp (operands[0], false);"
-+ "* return ix86_output_indirect_jmp (operands[0]);"
- [(set (attr "type")
- (if_then_else (match_test "(cfun->machine->indirect_branch_type
- != indirect_branch_keep)")
-@@ -12520,11 +12520,14 @@
- (set_attr "prefix_rep" "1")
- (set_attr "modrm" "0")])
-
--(define_insn "simple_return_pop_internal"
-+(define_insn_and_split "simple_return_pop_internal"
- [(simple_return)
- (use (match_operand:SI 0 "const_int_operand"))]
- "reload_completed"
- "%!ret\t%0"
-+ "&& cfun->machine->function_return_type != indirect_branch_keep"
-+ [(const_int 0)]
-+ "ix86_split_simple_return_pop_internal (operands[0]); DONE;"
- [(set_attr "length" "3")
- (set_attr "atom_unit" "jeu")
- (set_attr "length_immediate" "2")
-@@ -12535,7 +12538,7 @@
- [(simple_return)
- (use (match_operand:SI 0 "register_operand" "r"))]
- "reload_completed"
-- "* return ix86_output_indirect_jmp (operands[0], true);"
-+ "* return ix86_output_indirect_function_return (operands[0]);"
- [(set (attr "type")
- (if_then_else (match_test "(cfun->machine->indirect_branch_type
- != indirect_branch_keep)")
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-22.c b/gcc/testsuite/gcc.target/i386/ret-thunk-22.c
-new file mode 100644
-index 0000000..89e086d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-22.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-23.c b/gcc/testsuite/gcc.target/i386/ret-thunk-23.c
-new file mode 100644
-index 0000000..43f0cca
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-23.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not {\tpause} } } */
-+/* { dg-final { scan-assembler-not {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-24.c b/gcc/testsuite/gcc.target/i386/ret-thunk-24.c
-new file mode 100644
-index 0000000..8729e35
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-24.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-25.c b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c
-new file mode 100644
-index 0000000..f73553c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_bnd_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-26.c b/gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-new file mode 100644
-index 0000000..9144e98
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-@@ -0,0 +1,40 @@
-+/* PR target/r84530 */
-+/* { dg-do run } */
-+/* { dg-options "-Os -mfunction-return=thunk" } */
-+
-+struct S { int i; };
-+__attribute__((const, noinline, noclone))
-+struct S foo (int x)
-+{
-+ struct S s;
-+ s.i = x;
-+ return s;
-+}
-+
-+int a[2048], b[2048], c[2048], d[2048];
-+struct S e[2048];
-+
-+__attribute__((noinline, noclone)) void
-+bar (void)
-+{
-+ int i;
-+ for (i = 0; i < 1024; i++)
-+ {
-+ e[i] = foo (i);
-+ a[i+2] = a[i] + a[i+1];
-+ b[10] = b[10] + i;
-+ c[i] = c[2047 - i];
-+ d[i] = d[i + 1];
-+ }
-+}
-+
-+int
-+main ()
-+{
-+ int i;
-+ bar ();
-+ for (i = 0; i < 1024; i++)
-+ if (e[i].i != i)
-+ __builtin_abort ();
-+ return 0;
-+}
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch
deleted file mode 100644
index b50ac5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch
+++ /dev/null
@@ -1,1004 +0,0 @@
-From 7ba192d11a43d24ce427a3dfce0ad0592bd52830 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 26 Feb 2018 17:00:46 +0000
-Subject: [PATCH 12/12] i386: Add TARGET_INDIRECT_BRANCH_REGISTER
-
-For
-
----
-struct C {
- virtual ~C();
- virtual void f();
-};
-
-void
-f (C *p)
-{
- p->f();
- p->f();
-}
----
-
--mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates:
-
-_Z1fP1C:
-.LFB0:
- .cfi_startproc
- pushq %rbx
- .cfi_def_cfa_offset 16
- .cfi_offset 3, -16
- movq (%rdi), %rax
- movq %rdi, %rbx
- jmp .LIND1
-.LIND0:
- pushq 16(%rax)
- jmp __x86_indirect_thunk
-.LIND1:
- call .LIND0
- movq (%rbx), %rax
- movq %rbx, %rdi
- popq %rbx
- .cfi_def_cfa_offset 8
- movq 16(%rax), %rax
- jmp __x86_indirect_thunk_rax
- .cfi_endproc
-
-x86-64 is supposed to have asynchronous unwind tables by default, but
-there is nothing that reflects the change in the (relative) frame
-address after .LIND0. That region really has to be moved outside of
-the .cfi_startproc/.cfi_endproc bracket.
-
-This patch adds TARGET_INDIRECT_BRANCH_REGISTER to force indirect
-branch via register whenever -mindirect-branch= is used. Now,
--mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates:
-
-_Z1fP1C:
-.LFB0:
- .cfi_startproc
- pushq %rbx
- .cfi_def_cfa_offset 16
- .cfi_offset 3, -16
- movq (%rdi), %rax
- movq %rdi, %rbx
- movq 16(%rax), %rax
- call __x86_indirect_thunk_rax
- movq (%rbx), %rax
- movq %rbx, %rdi
- popq %rbx
- .cfi_def_cfa_offset 8
- movq 16(%rax), %rax
- jmp __x86_indirect_thunk_rax
- .cfi_endproc
-
-so that "-mindirect-branch=thunk-extern" is equivalent to
-"-mindirect-branch=thunk-extern -mindirect-branch-register", which is
-used by Linux kernel.
-
-gcc/
-
- Backport from mainline
- PR target/84039
- * config/i386/constraints.md (Bs): Replace
- ix86_indirect_branch_register with
- TARGET_INDIRECT_BRANCH_REGISTER.
- (Bw): Likewise.
- * config/i386/i386.md (indirect_jump): Likewise.
- (tablejump): Likewise.
- (*sibcall_memory): Likewise.
- (*sibcall_value_memory): Likewise.
- Peepholes of indirect call and jump via memory: Likewise.
- (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
- (*sibcall_value_GOT_32): Likewise.
- * config/i386/predicates.md (indirect_branch_operand): Likewise.
- (GOT_memory_operand): Likewise.
- (call_insn_operand): Likewise.
- (sibcall_insn_operand): Likewise.
- (GOT32_symbol_operand): Likewise.
- * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
-
-gcc/testsuite/
-
- Backport from mainline
- PR target/84039
- * gcc.target/i386/indirect-thunk-1.c: Updated.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Likewise.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
----
- gcc/config/i386/constraints.md | 4 ++--
- gcc/config/i386/i386.h | 5 ++++
- gcc/config/i386/i386.md | 28 +++++++++++++---------
- gcc/config/i386/predicates.md | 6 ++---
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 6 +++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 12 ++++++----
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-attr-1.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-attr-2.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-attr-3.c | 3 +--
- .../gcc.target/i386/indirect-thunk-attr-4.c | 3 +--
- .../gcc.target/i386/indirect-thunk-attr-5.c | 9 ++++---
- .../gcc.target/i386/indirect-thunk-attr-6.c | 9 ++++---
- .../gcc.target/i386/indirect-thunk-attr-7.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 6 ++---
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 6 ++---
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 7 +++---
- .../gcc.target/i386/indirect-thunk-extern-1.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-extern-2.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-extern-3.c | 9 ++++---
- .../gcc.target/i386/indirect-thunk-extern-4.c | 6 ++---
- .../gcc.target/i386/indirect-thunk-extern-5.c | 6 +++--
- .../gcc.target/i386/indirect-thunk-extern-6.c | 8 +++----
- .../gcc.target/i386/indirect-thunk-extern-7.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-inline-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c | 3 ++-
- .../gcc.target/i386/indirect-thunk-inline-6.c | 3 ++-
- .../gcc.target/i386/indirect-thunk-inline-7.c | 4 ++--
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 9 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 9 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 8 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 5 ++--
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 7 +++---
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 7 +++---
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 13 ++++------
- 43 files changed, 128 insertions(+), 141 deletions(-)
-
-diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
-index 9204c8e..ef684a9 100644
---- a/gcc/config/i386/constraints.md
-+++ b/gcc/config/i386/constraints.md
-@@ -172,7 +172,7 @@
-
- (define_constraint "Bs"
- "@internal Sibcall memory operand."
-- (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (not (match_test "TARGET_X32"))
- (match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-@@ -180,7 +180,7 @@
-
- (define_constraint "Bw"
- "@internal Call memory operand."
-- (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index b34bc11..1816d71 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2676,6 +2676,11 @@ extern void debug_dispatch_window (int);
- #define TARGET_RECIP_VEC_DIV ((recip_mask & RECIP_MASK_VEC_DIV) != 0)
- #define TARGET_RECIP_VEC_SQRT ((recip_mask & RECIP_MASK_VEC_SQRT) != 0)
-
-+
-+#define TARGET_INDIRECT_BRANCH_REGISTER \
-+ (ix86_indirect_branch_register \
-+ || cfun->machine->indirect_branch_type != indirect_branch_keep)
-+
- #define IX86_HLE_ACQUIRE (1 << 16)
- #define IX86_HLE_RELEASE (1 << 17)
-
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 857466a..6a6dc26 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11805,7 +11805,7 @@
- [(set (pc) (match_operand 0 "indirect_branch_operand"))]
- ""
- {
-- if (TARGET_X32 || ix86_indirect_branch_register)
-+ if (TARGET_X32 || TARGET_INDIRECT_BRANCH_REGISTER)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -11859,7 +11859,7 @@
- OPTAB_DIRECT);
- }
-
-- if (TARGET_X32 || ix86_indirect_branch_register)
-+ if (TARGET_X32 || TARGET_INDIRECT_BRANCH_REGISTER)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -12029,7 +12029,10 @@
- (match_operand:SI 0 "register_no_elim_operand" "U")
- (match_operand:SI 1 "GOT32_symbol_operand"))))
- (match_operand 2))]
-- "!TARGET_MACHO && !TARGET_64BIT && SIBLING_CALL_P (insn)"
-+ "!TARGET_MACHO
-+ && !TARGET_64BIT
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
-+ && SIBLING_CALL_P (insn)"
- {
- rtx fnaddr = gen_rtx_PLUS (Pmode, operands[0], operands[1]);
- fnaddr = gen_const_mem (Pmode, fnaddr);
-@@ -12048,7 +12051,7 @@
- [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
- (match_operand 1))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32 && !ix86_indirect_branch_register"
-+ "!TARGET_X32 && !TARGET_INDIRECT_BRANCH_REGISTER"
- "* return ix86_output_call_insn (insn, operands[0]);"
- [(set_attr "type" "call")])
-
-@@ -12058,7 +12061,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-@@ -12073,7 +12076,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-@@ -12171,7 +12174,7 @@
- (match_operand:W 1 "memory_operand"))
- (set (pc) (match_dup 0))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && peep2_reg_dead_p (2, operands[0])"
- [(set (pc) (match_dup 1))])
-
-@@ -12229,7 +12232,10 @@
- (match_operand:SI 1 "register_no_elim_operand" "U")
- (match_operand:SI 2 "GOT32_symbol_operand"))))
- (match_operand 3)))]
-- "!TARGET_MACHO && !TARGET_64BIT && SIBLING_CALL_P (insn)"
-+ "!TARGET_MACHO
-+ && !TARGET_64BIT
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
-+ && SIBLING_CALL_P (insn)"
- {
- rtx fnaddr = gen_rtx_PLUS (Pmode, operands[1], operands[2]);
- fnaddr = gen_const_mem (Pmode, fnaddr);
-@@ -12250,7 +12256,7 @@
- (call (mem:QI (match_operand:W 1 "memory_operand" "m"))
- (match_operand 2)))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32 && !ix86_indirect_branch_register"
-+ "!TARGET_X32 && !TARGET_INDIRECT_BRANCH_REGISTER"
- "* return ix86_output_call_insn (insn, operands[1]);"
- [(set_attr "type" "callv")])
-
-@@ -12261,7 +12267,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-@@ -12278,7 +12284,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
-index d1f0a7d..5f8a98f 100644
---- a/gcc/config/i386/predicates.md
-+++ b/gcc/config/i386/predicates.md
-@@ -593,7 +593,7 @@
- ;; Test for a valid operand for indirect branch.
- (define_predicate "indirect_branch_operand"
- (ior (match_operand 0 "register_operand")
-- (and (not (match_test "ix86_indirect_branch_register"))
-+ (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))))
-
-@@ -637,7 +637,7 @@
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "call_register_no_elim_operand")
-- (and (not (match_test "ix86_indirect_branch_register"))
-+ (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (ior (and (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-@@ -648,7 +648,7 @@
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "register_no_elim_operand")
-- (and (not (match_test "ix86_indirect_branch_register"))
-+ (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (ior (and (not (match_test "TARGET_X32"))
- (match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index 60d0988..6e94d2c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index aac7516..3c46707 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index 9e24a38..2c7fb52 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 127b5d9..0d3f895 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index fcaa18d..fb26c00 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -9,8 +9,10 @@ foo (void)
- bar ();
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index e464928..aa03fbd 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -10,9 +10,13 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 { target x32 } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index 17c2d0f..3c72036 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -35,9 +35,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index 9194ccf..7106407 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -14,9 +14,8 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index e51f261..27c7e5b 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index 4aeec18..89a2bac 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -14,10 +14,9 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
- /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index ac0e599..3eb83c3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -13,10 +13,9 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
- /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index 573cf1e..0098dd1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -14,9 +14,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index b2b37fc..ece8de1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -13,9 +13,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index 4a43e19..d53fc88 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -36,9 +36,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index ac84ab6..73d16ba 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -10,9 +10,9 @@ foo (void)
- dispatch (buf);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index ce655e8..856751a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -11,10 +11,8 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index d34485a..42312f6 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -10,8 +10,9 @@ foo (void)
- bar (buf);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index 0e19830..c8ca102 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -11,10 +11,9 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 1 } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index 579441f..c09dd0a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index c92e6f2..826425a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index d9964c2..3856268 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index d4dca4d..1ae49b1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -12,9 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index 5c07e02..5328239 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -9,8 +9,10 @@ foo (void)
- bar ();
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index 3eb4406..8ae4348 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -10,8 +10,8 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index aece938..2b9a33e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -35,9 +35,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 3aba5e8..869d904 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index 0f0181d..c5c16ed 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 2eef6f3..4a63ebe 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index e825a10..a395ffc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index c6d77e1..21cbfd3 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -9,7 +9,8 @@ foo (void)
- bar ();
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index 6454827..d1300f1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -10,7 +10,8 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index c67066c..ea00924 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -35,8 +35,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-index e6fea84..af9023a 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -15,9 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler-times {\tpause} 2 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 2 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-index e239ec4..ba467c5 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -15,9 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-index fa31813..43e57ca 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -15,8 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-index fd5b41f..55f156c 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -14,9 +14,8 @@ foo (void)
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler-times {\tpause} 2 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 2 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-index d606373..1c79043 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -16,7 +16,6 @@ foo (void)
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-index 75e45e2..58aba31 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -16,7 +16,6 @@ foo (void)
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-index d1db41c..d2df8b8 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -14,11 +14,8 @@ foo (void)
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
--/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
--/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
deleted file mode 100644
index 47bcd8e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 0fa7102d76376b27ae4bbc10848600aac6ed71d2 Mon Sep 17 00:00:00 2001
-From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 17 Jul 2017 19:41:08 +0000
-Subject: [PATCH] Backported from mainline 2017-07-14 Jakub
- Jelinek <jakub@redhat.com>
-
- PR sanitizer/81066
- * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
- * sanitizer_common/sanitizer_linux.cc: Likewise.
- * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
- * tsan/tsan_platform_linux.cc: Likewise.
-
-[Romain cherry-pick on gcc-6-branch from gcc-7-branch]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250287 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
----
- libsanitizer/sanitizer_common/sanitizer_linux.cc | 3 +--
- libsanitizer/sanitizer_common/sanitizer_linux.h | 4 +---
- libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +-
- libsanitizer/tsan/tsan_platform_linux.cc | 2 +-
- 4 files changed, 4 insertions(+), 7 deletions(-)
-
-diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
-index 2cefa20..223d9c6 100644
---- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
-+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
-@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
- }
- #endif
-
--uptr internal_sigaltstack(const struct sigaltstack *ss,
-- struct sigaltstack *oss) {
-+uptr internal_sigaltstack(const void *ss, void *oss) {
- return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
- }
-
-diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
-index 4497702..1594058 100644
---- a/libsanitizer/sanitizer_common/sanitizer_linux.h
-+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
-@@ -19,7 +19,6 @@
- #include "sanitizer_platform_limits_posix.h"
-
- struct link_map; // Opaque type returned by dlopen().
--struct sigaltstack;
-
- namespace __sanitizer {
- // Dirent structure for getdents(). Note that this structure is different from
-@@ -28,8 +27,7 @@ struct linux_dirent;
-
- // Syscall wrappers.
- uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
--uptr internal_sigaltstack(const struct sigaltstack* ss,
-- struct sigaltstack* oss);
-+uptr internal_sigaltstack(const void* ss, void* oss);
- uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
- __sanitizer_sigset_t *oldset);
- void internal_sigfillset(__sanitizer_sigset_t *set);
-diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
-index c919e4f..014162af 100644
---- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
-+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
-@@ -267,7 +267,7 @@ static int TracerThread(void* argument) {
-
- // Alternate stack for signal handling.
- InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
-- struct sigaltstack handler_stack;
-+ stack_t handler_stack;
- internal_memset(&handler_stack, 0, sizeof(handler_stack));
- handler_stack.ss_sp = handler_stack_memory.data();
- handler_stack.ss_size = kHandlerStackSize;
-diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
-index 09cec5f..908f4fe 100644
---- a/libsanitizer/tsan/tsan_platform_linux.cc
-+++ b/libsanitizer/tsan/tsan_platform_linux.cc
-@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) {
- int ExtractResolvFDs(void *state, int *fds, int nfd) {
- #if SANITIZER_LINUX
- int cnt = 0;
-- __res_state *statp = (__res_state*)state;
-+ struct __res_state *statp = (struct __res_state*)state;
- for (int i = 0; i < MAXNS && cnt < nfd; i++) {
- if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
- fds[cnt++] = statp->_u._ext.nssocks[i];
---
-2.9.4
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/CVE-2016-6131.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/CVE-2016-6131.patch
deleted file mode 100644
index 3cdbb2d..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.4/backport/CVE-2016-6131.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From 59a0e4bd8391962f62600ae3ac95ab0fba74d464 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 4 Aug 2016 16:53:18 +0000
-Subject: [PATCH] Fix for PR71696 in Libiberty Demangler
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[BZ #71696] -- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696
-
-2016-08-04 Marcel Böhme <boehme.marcel@gmail.com>
-
- PR c++/71696
- * cplus-dem.c: Prevent infinite recursion when there is a cycle
- in the referencing of remembered mangled types.
- (work_stuff): New stack to keep track of the remembered mangled
- types that are currently being processed.
- (push_processed_type): New method to push currently processed
- remembered type onto the stack.
- (pop_processed_type): New method to pop currently processed
- remembered type from the stack.
- (work_stuff_copy_to_from): Copy values of new variables.
- (delete_non_B_K_work_stuff): Free stack memory.
- (demangle_args): Push/Pop currently processed remembered type.
- (do_type): Do not demangle a cyclic reference and push/pop
- referenced remembered type.
-
-cherry-picked from commit of
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239143 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport [master]
-CVE: CVE-2016-6131
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- libiberty/ChangeLog | 17 ++++++++
- libiberty/cplus-dem.c | 78 ++++++++++++++++++++++++++++++++---
- libiberty/testsuite/demangle-expected | 18 ++++++++
- 3 files changed, 108 insertions(+), 5 deletions(-)
-
-Index: gcc-6.4.0/libiberty/cplus-dem.c
-===================================================================
---- gcc-6.4.0.orig/libiberty/cplus-dem.c
-+++ gcc-6.4.0/libiberty/cplus-dem.c
-@@ -144,6 +144,9 @@ struct work_stuff
- string* previous_argument; /* The last function argument demangled. */
- int nrepeats; /* The number of times to repeat the previous
- argument. */
-+ int *proctypevec; /* Indices of currently processed remembered typevecs. */
-+ int proctypevec_size;
-+ int nproctypes;
- };
-
- #define PRINT_ANSI_QUALIFIERS (work -> options & DMGL_ANSI)
-@@ -435,6 +438,10 @@ iterate_demangle_function (struct work_s
-
- static void remember_type (struct work_stuff *, const char *, int);
-
-+static void push_processed_type (struct work_stuff *, int);
-+
-+static void pop_processed_type (struct work_stuff *);
-+
- static void remember_Btype (struct work_stuff *, const char *, int, int);
-
- static int register_Btype (struct work_stuff *);
-@@ -1301,6 +1308,10 @@ work_stuff_copy_to_from (struct work_stu
- memcpy (to->btypevec[i], from->btypevec[i], len);
- }
-
-+ if (from->proctypevec)
-+ to->proctypevec =
-+ XDUPVEC (int, from->proctypevec, from->proctypevec_size);
-+
- if (from->ntmpl_args)
- to->tmpl_argvec = XNEWVEC (char *, from->ntmpl_args);
-
-@@ -1329,11 +1340,17 @@ delete_non_B_K_work_stuff (struct work_s
- /* Discard the remembered types, if any. */
-
- forget_types (work);
-- if (work -> typevec != NULL)
-+ if (work->typevec != NULL)
- {
-- free ((char *) work -> typevec);
-- work -> typevec = NULL;
-- work -> typevec_size = 0;
-+ free ((char *) work->typevec);
-+ work->typevec = NULL;
-+ work->typevec_size = 0;
-+ }
-+ if (work->proctypevec != NULL)
-+ {
-+ free (work->proctypevec);
-+ work->proctypevec = NULL;
-+ work->proctypevec_size = 0;
- }
- if (work->tmpl_argvec)
- {
-@@ -3552,6 +3569,8 @@ static int
- do_type (struct work_stuff *work, const char **mangled, string *result)
- {
- int n;
-+ int i;
-+ int is_proctypevec;
- int done;
- int success;
- string decl;
-@@ -3564,6 +3583,7 @@ do_type (struct work_stuff *work, const
-
- done = 0;
- success = 1;
-+ is_proctypevec = 0;
- while (success && !done)
- {
- int member;
-@@ -3616,8 +3636,15 @@ do_type (struct work_stuff *work, const
- success = 0;
- }
- else
-+ for (i = 0; i < work->nproctypes; i++)
-+ if (work -> proctypevec [i] == n)
-+ success = 0;
-+
-+ if (success)
- {
-- remembered_type = work -> typevec[n];
-+ is_proctypevec = 1;
-+ push_processed_type (work, n);
-+ remembered_type = work->typevec[n];
- mangled = &remembered_type;
- }
- break;
-@@ -3840,6 +3867,9 @@ do_type (struct work_stuff *work, const
- string_delete (result);
- string_delete (&decl);
-
-+ if (is_proctypevec)
-+ pop_processed_type (work);
-+
- if (success)
- /* Assume an integral type, if we're not sure. */
- return (int) ((tk == tk_none) ? tk_integral : tk);
-@@ -4252,6 +4282,41 @@ do_arg (struct work_stuff *work, const c
- }
-
- static void
-+push_processed_type (struct work_stuff *work, int typevec_index)
-+{
-+ if (work->nproctypes >= work->proctypevec_size)
-+ {
-+ if (!work->proctypevec_size)
-+ {
-+ work->proctypevec_size = 4;
-+ work->proctypevec = XNEWVEC (int, work->proctypevec_size);
-+ }
-+ else
-+ {
-+ if (work->proctypevec_size < 16)
-+ /* Double when small. */
-+ work->proctypevec_size *= 2;
-+ else
-+ {
-+ /* Grow slower when large. */
-+ if (work->proctypevec_size > (INT_MAX / 3) * 2)
-+ xmalloc_failed (INT_MAX);
-+ work->proctypevec_size = (work->proctypevec_size * 3 / 2);
-+ }
-+ work->proctypevec
-+ = XRESIZEVEC (int, work->proctypevec, work->proctypevec_size);
-+ }
-+ }
-+ work->proctypevec [work->nproctypes++] = typevec_index;
-+}
-+
-+static void
-+pop_processed_type (struct work_stuff *work)
-+{
-+ work->nproctypes--;
-+}
-+
-+static void
- remember_type (struct work_stuff *work, const char *start, int len)
- {
- char *tem;
-@@ -4515,10 +4580,13 @@ demangle_args (struct work_stuff *work,
- {
- string_append (declp, ", ");
- }
-+ push_processed_type (work, t);
- if (!do_arg (work, &tem, &arg))
- {
-+ pop_processed_type (work);
- return (0);
- }
-+ pop_processed_type (work);
- if (PRINT_ARG_TYPES)
- {
- string_appends (declp, &arg);
-Index: gcc-6.4.0/libiberty/testsuite/demangle-expected
-===================================================================
---- gcc-6.4.0.orig/libiberty/testsuite/demangle-expected
-+++ gcc-6.4.0/libiberty/testsuite/demangle-expected
-@@ -4491,3 +4491,21 @@ void eat<int*, Foo()::{lambda(auto:1*, a
-
- _Z3eatIPiZ3BarIsEvvEUlPsPT_PT0_E0_EvRS3_RS5_
- void eat<int*, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}>(int*&, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}&)
-+#
-+# Tests write access violation PR70926
-+
-+0__Ot2m02R5T0000500000
-+0__Ot2m02R5T0000500000
-+#
-+
-+0__GT50000000000_
-+0__GT50000000000_
-+#
-+
-+__t2m05B500000000000000000_
-+__t2m05B500000000000000000_
-+#
-+# Tests stack overflow PR71696
-+
-+__10%0__S4_0T0T0
-+%0<>::%0(%0<>)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
index 2dc3db8..d968c32 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -10,8 +10,8 @@
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-7.3:${FILE_DIRNAME}/gcc-7.3/backport:"
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
+DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
+NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native"
LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
@@ -73,12 +73,12 @@
file://0047-sync-gcc-stddef.h-with-musl.patch \
file://0048-gcc-Enable-static-PIE.patch \
file://fix-segmentation-fault-precompiled-hdr.patch \
- file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \
file://no-sse-fix-test-case-failures.patch \
${BACKPORTS} \
"
BACKPORTS = "\
file://0001-Fix-internal-compiler-error-in-testcase.patch \
+ file://0001-PR-rtl-optimization-83030.patch \
"
SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2"
@@ -101,7 +101,7 @@
--disable-bootstrap \
--disable-libmudflap \
--with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
+ ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \
--enable-linker-build-id \
--with-ppl=no \
--with-cloog=no \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-rtl-optimization-83030.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-rtl-optimization-83030.patch
new file mode 100644
index 0000000..71f7988
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-rtl-optimization-83030.patch
@@ -0,0 +1,272 @@
+From f5c4a9440f15ccf6775659910a2014a5494ee86e Mon Sep 17 00:00:00 2001
+From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Nov 2017 21:43:22 +0000
+Subject: [PATCH] PR rtl-optimization/83030 * doc/rtl.texi (Flags
+ in an RTL Expression): Alphabetize, add entry for CROSSING_JUMP_P and
+ mention usage of 'jump' for JUMP_INSNs. (Insns): Delete entry for
+ REG_CROSSING_JUMP in register notes. * bb-reorder.c
+ (update_crossing_jump_flags): Do not test whether the CROSSING_JUMP_P flag
+ is already set before setting it. * cfgrtl.c (fixup_partition_crossing):
+ Likewise. * reorg.c (relax_delay_slots): Do not consider a
+ CROSSING_JUMP_P insn as useless.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255083 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+
+This patch removes changes to Changelog from the original upstream patch.
+This will help us avoid conflicts.
+
+Original backport to GCC 7.x by Amruta Pawar <Amruta.Pawar@kpit.com>
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+---
+ gcc/bb-reorder.c | 5 +--
+ gcc/cfgrtl.c | 3 +-
+ gcc/doc/rtl.texi | 129 ++++++++++++++++++++++++++++---------------------------
+ gcc/reorg.c | 7 +--
+ 5 files changed, 84 insertions(+), 72 deletions(-)
+
+diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
+index 55e6dc6..794283c 100644
+--- a/gcc/bb-reorder.c
++++ b/gcc/bb-reorder.c
+@@ -2236,10 +2236,7 @@ update_crossing_jump_flags (void)
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ if (e->flags & EDGE_CROSSING)
+ {
+- if (JUMP_P (BB_END (bb))
+- /* Some flags were added during fix_up_fall_thru_edges, via
+- force_nonfallthru_and_redirect. */
+- && !CROSSING_JUMP_P (BB_END (bb)))
++ if (JUMP_P (BB_END (bb)))
+ CROSSING_JUMP_P (BB_END (bb)) = 1;
+ break;
+ }
+diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
+index d6e5ac0..a2ad075 100644
+--- a/gcc/cfgrtl.c
++++ b/gcc/cfgrtl.c
+@@ -1334,8 +1334,7 @@ fixup_partition_crossing (edge e)
+ if (BB_PARTITION (e->src) != BB_PARTITION (e->dest))
+ {
+ e->flags |= EDGE_CROSSING;
+- if (JUMP_P (BB_END (e->src))
+- && !CROSSING_JUMP_P (BB_END (e->src)))
++ if (JUMP_P (BB_END (e->src)))
+ CROSSING_JUMP_P (BB_END (e->src)) = 1;
+ }
+ else if (BB_PARTITION (e->src) == BB_PARTITION (e->dest))
+diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
+index 21524f5..a58eedc 100644
+--- a/gcc/doc/rtl.texi
++++ b/gcc/doc/rtl.texi
+@@ -565,6 +565,16 @@ that are used in certain types of expression. Most often they
+ are accessed with the following macros, which expand into lvalues.
+
+ @table @code
++@findex CROSSING_JUMP_P
++@cindex @code{jump_insn} and @samp{/j}
++@item CROSSING_JUMP_P (@var{x})
++Nonzero in a @code{jump_insn} if it crosses between hot and cold sections,
++which could potentially be very far apart in the executable. The presence
++of this flag indicates to other optimizations that this branching instruction
++should not be ``collapsed'' into a simpler branching construct. It is used
++when the optimization to partition basic blocks into hot and cold sections
++is turned on.
++
+ @findex CONSTANT_POOL_ADDRESS_P
+ @cindex @code{symbol_ref} and @samp{/u}
+ @cindex @code{unchanging}, in @code{symbol_ref}
+@@ -577,37 +587,6 @@ In either case GCC assumes these addresses can be addressed directly,
+ perhaps with the help of base registers.
+ Stored in the @code{unchanging} field and printed as @samp{/u}.
+
+-@findex RTL_CONST_CALL_P
+-@cindex @code{call_insn} and @samp{/u}
+-@cindex @code{unchanging}, in @code{call_insn}
+-@item RTL_CONST_CALL_P (@var{x})
+-In a @code{call_insn} indicates that the insn represents a call to a
+-const function. Stored in the @code{unchanging} field and printed as
+-@samp{/u}.
+-
+-@findex RTL_PURE_CALL_P
+-@cindex @code{call_insn} and @samp{/i}
+-@cindex @code{return_val}, in @code{call_insn}
+-@item RTL_PURE_CALL_P (@var{x})
+-In a @code{call_insn} indicates that the insn represents a call to a
+-pure function. Stored in the @code{return_val} field and printed as
+-@samp{/i}.
+-
+-@findex RTL_CONST_OR_PURE_CALL_P
+-@cindex @code{call_insn} and @samp{/u} or @samp{/i}
+-@item RTL_CONST_OR_PURE_CALL_P (@var{x})
+-In a @code{call_insn}, true if @code{RTL_CONST_CALL_P} or
+-@code{RTL_PURE_CALL_P} is true.
+-
+-@findex RTL_LOOPING_CONST_OR_PURE_CALL_P
+-@cindex @code{call_insn} and @samp{/c}
+-@cindex @code{call}, in @code{call_insn}
+-@item RTL_LOOPING_CONST_OR_PURE_CALL_P (@var{x})
+-In a @code{call_insn} indicates that the insn represents a possibly
+-infinite looping call to a const or pure function. Stored in the
+-@code{call} field and printed as @samp{/c}. Only true if one of
+-@code{RTL_CONST_CALL_P} or @code{RTL_PURE_CALL_P} is true.
+-
+ @findex INSN_ANNULLED_BRANCH_P
+ @cindex @code{jump_insn} and @samp{/u}
+ @cindex @code{call_insn} and @samp{/u}
+@@ -702,6 +681,29 @@ Stored in the @code{call} field and printed as @samp{/c}.
+ Nonzero in a @code{mem} if the memory reference holds a pointer.
+ Stored in the @code{frame_related} field and printed as @samp{/f}.
+
++@findex MEM_READONLY_P
++@cindex @code{mem} and @samp{/u}
++@cindex @code{unchanging}, in @code{mem}
++@item MEM_READONLY_P (@var{x})
++Nonzero in a @code{mem}, if the memory is statically allocated and read-only.
++
++Read-only in this context means never modified during the lifetime of the
++program, not necessarily in ROM or in write-disabled pages. A common
++example of the later is a shared library's global offset table. This
++table is initialized by the runtime loader, so the memory is technically
++writable, but after control is transferred from the runtime loader to the
++application, this memory will never be subsequently modified.
++
++Stored in the @code{unchanging} field and printed as @samp{/u}.
++
++@findex PREFETCH_SCHEDULE_BARRIER_P
++@cindex @code{prefetch} and @samp{/v}
++@cindex @code{volatile}, in @code{prefetch}
++@item PREFETCH_SCHEDULE_BARRIER_P (@var{x})
++In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
++No other INSNs will be moved over it.
++Stored in the @code{volatil} field and printed as @samp{/v}.
++
+ @findex REG_FUNCTION_VALUE_P
+ @cindex @code{reg} and @samp{/i}
+ @cindex @code{return_val}, in @code{reg}
+@@ -731,6 +733,37 @@ The same hard register may be used also for collecting the values of
+ functions called by this one, but @code{REG_FUNCTION_VALUE_P} is zero
+ in this kind of use.
+
++@findex RTL_CONST_CALL_P
++@cindex @code{call_insn} and @samp{/u}
++@cindex @code{unchanging}, in @code{call_insn}
++@item RTL_CONST_CALL_P (@var{x})
++In a @code{call_insn} indicates that the insn represents a call to a
++const function. Stored in the @code{unchanging} field and printed as
++@samp{/u}.
++
++@findex RTL_PURE_CALL_P
++@cindex @code{call_insn} and @samp{/i}
++@cindex @code{return_val}, in @code{call_insn}
++@item RTL_PURE_CALL_P (@var{x})
++In a @code{call_insn} indicates that the insn represents a call to a
++pure function. Stored in the @code{return_val} field and printed as
++@samp{/i}.
++
++@findex RTL_CONST_OR_PURE_CALL_P
++@cindex @code{call_insn} and @samp{/u} or @samp{/i}
++@item RTL_CONST_OR_PURE_CALL_P (@var{x})
++In a @code{call_insn}, true if @code{RTL_CONST_CALL_P} or
++@code{RTL_PURE_CALL_P} is true.
++
++@findex RTL_LOOPING_CONST_OR_PURE_CALL_P
++@cindex @code{call_insn} and @samp{/c}
++@cindex @code{call}, in @code{call_insn}
++@item RTL_LOOPING_CONST_OR_PURE_CALL_P (@var{x})
++In a @code{call_insn} indicates that the insn represents a possibly
++infinite looping call to a const or pure function. Stored in the
++@code{call} field and printed as @samp{/c}. Only true if one of
++@code{RTL_CONST_CALL_P} or @code{RTL_PURE_CALL_P} is true.
++
+ @findex RTX_FRAME_RELATED_P
+ @cindex @code{insn} and @samp{/f}
+ @cindex @code{call_insn} and @samp{/f}
+@@ -765,21 +798,6 @@ computation performed by this instruction, i.e., one that
+ This flag is required for exception handling support on targets with RTL
+ prologues.
+
+-@findex MEM_READONLY_P
+-@cindex @code{mem} and @samp{/u}
+-@cindex @code{unchanging}, in @code{mem}
+-@item MEM_READONLY_P (@var{x})
+-Nonzero in a @code{mem}, if the memory is statically allocated and read-only.
+-
+-Read-only in this context means never modified during the lifetime of the
+-program, not necessarily in ROM or in write-disabled pages. A common
+-example of the later is a shared library's global offset table. This
+-table is initialized by the runtime loader, so the memory is technically
+-writable, but after control is transferred from the runtime loader to the
+-application, this memory will never be subsequently modified.
+-
+-Stored in the @code{unchanging} field and printed as @samp{/u}.
+-
+ @findex SCHED_GROUP_P
+ @cindex @code{insn} and @samp{/s}
+ @cindex @code{call_insn} and @samp{/s}
+@@ -879,14 +897,6 @@ Stored in the @code{volatil} field and printed as @samp{/v}.
+ Most uses of @code{SYMBOL_REF_FLAG} are historic and may be subsumed
+ by @code{SYMBOL_REF_FLAGS}. Certainly use of @code{SYMBOL_REF_FLAGS}
+ is mandatory if the target requires more than one bit of storage.
+-
+-@findex PREFETCH_SCHEDULE_BARRIER_P
+-@cindex @code{prefetch} and @samp{/v}
+-@cindex @code{volatile}, in @code{prefetch}
+-@item PREFETCH_SCHEDULE_BARRIER_P (@var{x})
+-In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
+-No other INSNs will be moved over it.
+-Stored in the @code{volatil} field and printed as @samp{/v}.
+ @end table
+
+ These are the fields to which the above macros refer:
+@@ -974,6 +985,8 @@ In a @code{set}, 1 means it is for a return.
+
+ In a @code{call_insn}, 1 means it is a sibling call.
+
++In a @code{jump_insn}, 1 means it is a crossing jump.
++
+ In an RTL dump, this flag is represented as @samp{/j}.
+
+ @findex unchanging
+@@ -3887,16 +3900,6 @@ multiple targets; the last label in the insn (in the highest numbered
+ insn-field) goes into the @code{JUMP_LABEL} field and does not have a
+ @code{REG_LABEL_TARGET} note. @xref{Insns, JUMP_LABEL}.
+
+-@findex REG_CROSSING_JUMP
+-@item REG_CROSSING_JUMP
+-This insn is a branching instruction (either an unconditional jump or
+-an indirect jump) which crosses between hot and cold sections, which
+-could potentially be very far apart in the executable. The presence
+-of this note indicates to other optimizations that this branching
+-instruction should not be ``collapsed'' into a simpler branching
+-construct. It is used when the optimization to partition basic blocks
+-into hot and cold sections is turned on.
+-
+ @findex REG_SETJMP
+ @item REG_SETJMP
+ Appears attached to each @code{CALL_INSN} to @code{setjmp} or a
+diff --git a/gcc/reorg.c b/gcc/reorg.c
+index 5914af6..77f3fe7 100644
+--- a/gcc/reorg.c
++++ b/gcc/reorg.c
+@@ -3360,10 +3360,11 @@ relax_delay_slots (rtx_insn *first)
+ }
+
+ /* See if we have a simple (conditional) jump that is useless. */
+- if (! INSN_ANNULLED_BRANCH_P (delay_jump_insn)
+- && ! condjump_in_parallel_p (delay_jump_insn)
++ if (!CROSSING_JUMP_P (delay_jump_insn)
++ && !INSN_ANNULLED_BRANCH_P (delay_jump_insn)
++ && !condjump_in_parallel_p (delay_jump_insn)
+ && prev_active_insn (as_a<rtx_insn *> (target_label)) == insn
+- && ! BARRIER_P (prev_nonnote_insn (as_a<rtx_insn *> (target_label)))
++ && !BARRIER_P (prev_nonnote_insn (as_a<rtx_insn *> (target_label)))
+ /* If the last insn in the delay slot sets CC0 for some insn,
+ various code assumes that it is in a delay slot. We could
+ put it back where it belonged and delete the register notes,
+--
+1.8.5.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
deleted file mode 100644
index 5a14d04..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 16210e6270e200cd4892a90ecef608906be3a130 Mon Sep 17 00:00:00 2001
-From: Kito Cheng <kito.cheng@gmail.com>
-Date: Thu, 4 May 2017 02:11:13 +0800
-Subject: [PATCH] RISC-V: Handle non-legitimate address in
- riscv_legitimize_move
-
-GCC may generate non-legitimate address due to we allow some
-load/store with non-legitimate address in pic.md.
-
- 2017-05-12 Kito Cheng <kito.cheng@gmail.com>
-
- * config/riscv/riscv.c (riscv_legitimize_move): Handle
- non-legitimate address.
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gcc/ChangeLog | 5 +++++
- gcc/config/riscv/riscv.c | 16 ++++++++++++++++
- 2 files changed, 21 insertions(+)
-
-diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
-index f7fec4bfcf8..d519be1659a 100644
---- a/gcc/config/riscv/riscv.c
-+++ b/gcc/config/riscv/riscv.c
-@@ -1385,6 +1385,22 @@ riscv_legitimize_move (enum machine_mode mode, rtx dest, rtx src)
- return true;
- }
-
-+ /* RISC-V GCC may generate non-legitimate address due to we provide some
-+ pattern for optimize access PIC local symbol and it's make GCC generate
-+ unrecognizable instruction during optmizing. */
-+
-+ if (MEM_P (dest) && !riscv_legitimate_address_p (mode, XEXP (dest, 0),
-+ reload_completed))
-+ {
-+ XEXP (dest, 0) = riscv_force_address (XEXP (dest, 0), mode);
-+ }
-+
-+ if (MEM_P (src) && !riscv_legitimate_address_p (mode, XEXP (src, 0),
-+ reload_completed))
-+ {
-+ XEXP (src, 0) = riscv_force_address (XEXP (src, 0), mode);
-+ }
-+
- return false;
- }
-
---
-2.14.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 6d77620..bdd6f7e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -3,7 +3,7 @@
SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native"
GCCMULTILIB = "--enable-multilib"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb
deleted file mode 100644
index bf53c5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross-canadian.inc
-
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb
deleted file mode 100644
index 4c73e5c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-cross-initial.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.4.bb
deleted file mode 100644
index b43cca0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb
deleted file mode 100644
index fd90e11..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb
-require gcc-crosssdk-initial.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb
deleted file mode 100644
index 40a6c4f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-crosssdk.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
index d3d4bd3..7629fa5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -34,6 +34,18 @@
# libmudflap
# libgfortran needs separate recipe due to libquadmath dependency
+SLIB = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+SLIB_NEW = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
+DEBUG_PREFIX_MAP_class-target = " \
+ -fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \
+ -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
+ -fdebug-prefix-map=${SLIB}=${SLIB_NEW} \
+ -fdebug-prefix-map=${SLIB}/include=${SLIB_NEW}/libstdc++-v3/../include \
+ -fdebug-prefix-map=${SLIB}/libiberty=${SLIB_NEW}/libstdc++-v3/../libiberty \
+ -fdebug-prefix-map=${B}=${SLIB_NEW} \
+ "
+
do_configure () {
export CXX="${CXX} -nostdinc++ -nostdlib++"
for d in libgcc ${RUNTIMETARGET}; do
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.4.bb
deleted file mode 100644
index 8f31e77..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-runtime.inc
-
-FILES_libgomp-dev += "\
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
-"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index 3183b29..3b7e002 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -61,15 +61,19 @@
RDEPENDS_liblsan-dev += "${PN}"
RDEPENDS_libtsan-dev += "${PN}"
RRECOMMENDS_${PN} += "libasan libubsan"
-RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
RRECOMMENDS_${PN}_append_x86 = " liblsan"
+RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_powerpc64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_aarch64 = " liblsan libtsan"
do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
-# MIPS, aarch64, and SPARC are broken.
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm).*-linux'
+# Only x86, powerpc, sparc, s390, arm, and aarch64 are supported
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64).*-linux'
+# musl is currently broken entirely
+COMPATIBLE_HOST_libc-musl = 'null'
FILES_libasan += "${libdir}/libasan.so.*"
FILES_libasan-dev += "\
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb
deleted file mode 100644
index 601f666..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-sanitizers.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.4.bb
deleted file mode 100644
index b890fa3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.4.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require recipes-devtools/gcc/gcc-source.inc
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.4.bb
deleted file mode 100644
index 2c618df..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.4.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-target.inc
-
-# Building with thumb enabled on armv4t fails with
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
-ARM_INSTRUCTION_SET_armv4 = "arm"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.4.bb
deleted file mode 100644
index 19f253f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc-initial.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
index 1500fb5..5f1dff6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
@@ -28,7 +28,7 @@
FILES_${PN}-dev = "\
${base_libdir}/libgcc*.so \
- ${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
+ ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
${libdir}/${TARGET_SYS}/${BINV}* \
${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.4.bb
deleted file mode 100644
index a5152f2..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
index 5f5d4af..0523764 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
@@ -6,22 +6,28 @@
"
do_configure () {
- rm -rf ${B}/${TARGET_SYS}/libgfortran/
- mkdir -p ${B}/${TARGET_SYS}/libgfortran/
- cd ${B}/${TARGET_SYS}/libgfortran/
- chmod a+x ${S}/libgfortran/configure
- relpath=${@os.path.relpath("${S}/libgfortran", "${B}/${TARGET_SYS}/libgfortran")}
- $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
- # Easiest way to stop bad RPATHs getting into the library since we have a
- # broken libtool here
- sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/libgfortran/libtool
+ for target in libbacktrace libgfortran
+ do
+ rm -rf ${B}/${TARGET_SYS}/$target/
+ mkdir -p ${B}/${TARGET_SYS}/$target/
+ cd ${B}/${TARGET_SYS}/$target/
+ chmod a+x ${S}/$target/configure
+ relpath=${@os.path.relpath("${S}", "${B}/${TARGET_SYS}")}
+ ../$relpath/$target/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+ # Easiest way to stop bad RPATHs getting into the library since we have a
+ # broken libtool here
+ sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/$target/libtool
+ done
}
EXTRACONFFUNCS += "extract_stashed_builddir"
do_configure[depends] += "${COMPILERDEP}"
do_compile () {
- cd ${B}/${TARGET_SYS}/libgfortran/
- oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libgfortran/
+ for target in libbacktrace libgfortran
+ do
+ cd ${B}/${TARGET_SYS}/$target/
+ oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$target/
+ done
}
do_install () {
@@ -67,5 +73,5 @@
python __anonymous () {
f = d.getVar("FORTRAN")
if "fortran" not in f:
- raise bb.parse.SkipPackage("libgfortran needs fortran support to be enabled in the compiler")
+ raise bb.parse.SkipRecipe("libgfortran needs fortran support to be enabled in the compiler")
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.4.bb
deleted file mode 100644
index 71dd8b4..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgfortran.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.1.inc
similarity index 85%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.1.inc
index 227abd9..4a5299b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.1.inc
@@ -16,8 +16,9 @@
file://0009-Change-order-of-CFLAGS.patch \
file://0010-resolve-restrict-keyword-conflict.patch \
file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \
+ file://0012-Unbreak-GDBserver-build-for-x32.patch \
file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
"
-SRC_URI[md5sum] = "c3d35cd949084be53b92cc1e03485f88"
-SRC_URI[sha256sum] = "f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee"
+SRC_URI[md5sum] = "48cac527e6f3018b865ece021e9723ac"
+SRC_URI[sha256sum] = "3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
index 9164a2b..039577b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
@@ -5,6 +5,7 @@
LTTNGUST = "lttng-ust"
LTTNGUST_aarch64 = ""
+LTTNGUST_riscv64 = ""
LTTNGUST_mipsarch = ""
LTTNGUST_sh4 = ""
LTTNGUST_libc-musl = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index 3ff1989..4fc6747 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -13,9 +13,9 @@
# Overrides PACKAGECONFIG variables in gdb-common.inc
PACKAGECONFIG ??= "python readline"
PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
- nativesdk-python3-core nativesdk-python3-lang nativesdk-python3-re \
+ nativesdk-python3-core \
nativesdk-python3-codecs nativesdk-python3-netclient \
- nativesdk-python3-importlib"
+ "
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch
new file mode 100644
index 0000000..18a3ce3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0012-Unbreak-GDBserver-build-for-x32.patch
@@ -0,0 +1,101 @@
+From 3e1e401053ea5f02a9e9c65abddd31a03baa1bd1 Mon Sep 17 00:00:00 2001
+From: Yao Qi <yao.qi@linaro.org>
+Date: Fri, 29 Dec 2017 12:57:25 +0800
+Subject: [PATCH] Unbreak GDBserver build for x32
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When I verify my target description changes, I build GDB and GDBserver for
+x32, but it failed.
+
+/../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘const target_desc* get_ipa_tdesc(int)’:
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:184:10: error: ‘X86_TDESC_AVX512’ was not declared in this scope
+ case X86_TDESC_AVX512:
+ ^
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:185:14: error: ‘tdesc_x32_avx512_linux’ was not declared in this scope
+ return tdesc_x32_avx512_linux;
+ ^
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘void initialize_low_tracepoint()’:
+../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:282:36: error: ‘init_registers_x32_avx512_linux’ was not declared in this scope
+ init_registers_x32_avx512_linux ();
+ ^
+
+ipa_x32_linux_regobj use to be there, but removed by
+22049425ce40324139be82d9a6ec518c46b65815 by mistake.
+
+gdb/gdbserver:
+
+2017-08-04 Yao Qi <yao.qi@linaro.org>
+
+ * configure.srv (ipa_x32_linux_regobj): New.
+ * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
+ instead of X86_TDESC_AVX512.
+ (initialize_low_tracepoint): Call
+ init_registers_x32_avx_avx512_linux.
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=f02fd7745d003d65fd3b981618e07b874b721d79]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ ChangeLog | 8 ++++++++
+ gdb/gdbserver/configure.srv | 1 +
+ gdb/gdbserver/linux-amd64-ipa.c | 6 +++---
+ 3 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 4ac2d63..b5b8228 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,11 @@
++ 2017-08-04 Yao Qi <yao.qi@linaro.org>
++
++ * configure.srv (ipa_x32_linux_regobj): New.
++ * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
++ instead of X86_TDESC_AVX512.
++ (initialize_low_tracepoint): Call
++ init_registers_x32_avx_avx512_linux.
++
+ 2017-04-13 Andrew Jenner <andrew@codesourcery.com>
+
+ * config.sub: Sync with master version in config project.
+diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
+index d00d9e2..56951c8 100644
+--- a/gdb/gdbserver/configure.srv
++++ b/gdb/gdbserver/configure.srv
+@@ -31,6 +31,7 @@ srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx-avx512-linux.o
+
+ ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o i386-avx-mpx-linux-ipa.o i386-avx-avx512-linux-ipa.o i386-avx-mpx-avx512-pku-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o"
+ ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx-avx512-linux-ipa.o amd64-avx-mpx-avx512-pku-linux-ipa.o amd64-mpx-linux-ipa.o"
++ipa_x32_linux_regobj="x32-linux-ipa.o x32-avx-linux-ipa.o x32-avx-avx512-linux-ipa.o"
+ ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-cell32l-ipa.o powerpc-vsx32l-ipa.o powerpc-isa205-32l-ipa.o powerpc-isa205-altivec32l-ipa.o powerpc-isa205-vsx32l-ipa.o powerpc-e500l-ipa.o powerpc-64l-ipa.o powerpc-altivec64l-ipa.o powerpc-cell64l-ipa.o powerpc-vsx64l-ipa.o powerpc-isa205-64l-ipa.o powerpc-isa205-altivec64l-ipa.o powerpc-isa205-vsx64l-ipa.o"
+
+ srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml i386/32bit-pkeys.xml"
+diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c
+index 67f36c2..683339b 100644
+--- a/gdb/gdbserver/linux-amd64-ipa.c
++++ b/gdb/gdbserver/linux-amd64-ipa.c
+@@ -181,8 +181,8 @@ get_ipa_tdesc (int idx)
+ return tdesc_x32_linux;
+ case X86_TDESC_AVX:
+ return tdesc_x32_avx_linux;
+- case X86_TDESC_AVX512:
+- return tdesc_x32_avx512_linux;
++ case X86_TDESC_AVX_AVX512:
++ return tdesc_x32_avx_avx512_linux;
+ default:
+ break;
+ }
+@@ -279,7 +279,7 @@ initialize_low_tracepoint (void)
+ #if defined __ILP32__
+ init_registers_x32_linux ();
+ init_registers_x32_avx_linux ();
+- init_registers_x32_avx512_linux ();
++ init_registers_x32_avx_avx512_linux ();
+ #else
+ init_registers_amd64_linux ();
+ init_registers_amd64_avx_linux ();
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
index 9b4c128..dd9d792 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
@@ -116,6 +116,7 @@
${datadir}/gitweb/gitweb.cgi \
${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \
${datadir}/git-core/templates/hooks/pre-rebase.sample \
+ ${datadir}/git-core/templates/hooks/fsmonitor-watchman.sample \
"
# Git tools requiring perl
@@ -125,6 +126,7 @@
${libdir}/perl \
${datadir}/perl \
"
+
RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
# git-tk package with gitk and git-gui
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb
deleted file mode 100644
index b3e3887..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require git.inc
-
-EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
- ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
- "
-EXTRA_OEMAKE += "NO_GETTEXT=1"
-
-SRC_URI[tarball.md5sum] = "d2dc550f6693ba7e5b16212b2714f59f"
-SRC_URI[tarball.sha256sum] = "1497001772f630d49809e981672edfe3e3ce1a1d18e905cd539c4d2f4dbcd75a"
-SRC_URI[manpages.md5sum] = "3037d11a4f4cdd19435871c267ca48b4"
-SRC_URI[manpages.sha256sum] = "f9b302eeb08ce08934e7afb42280ce9294411fbf5f7b6ac3fcc236e8031f10c5"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.16.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.16.1.bb
new file mode 100644
index 0000000..9dc4eba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.16.1.bb
@@ -0,0 +1,11 @@
+require git.inc
+
+EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
+ ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
+ "
+EXTRA_OEMAKE += "NO_GETTEXT=1"
+
+SRC_URI[tarball.md5sum] = "37467da8e79e72f28598d667f219f75e"
+SRC_URI[tarball.sha256sum] = "56cfa48af2b289bba172ca0a47c29f0083f5846cf4759978b70988e4f07fc9fd"
+SRC_URI[manpages.md5sum] = "5587407f3c28446af12fde3f3131ba34"
+SRC_URI[manpages.sha256sum] = "d499e825f429d76862be415f579c20cc26b046573a3a39237acaf9682cb71be7"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/glide/glide_0.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/glide/glide_0.13.1.bb
new file mode 100644
index 0000000..1a5b145
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/glide/glide_0.13.1.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Vendor Package Management for Golang"
+HOMEPAGE = "https://glide.sh"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=54905cf894f8cc416a92f4fc350c35b2"
+
+GO_IMPORT = "github.com/Masterminds/glide"
+SRC_URI = "git://${GO_IMPORT}"
+SRCREV = "67790b3dbede72cfdc54aa53be4706322c9499e0"
+
+inherit go
+
+RDEPENDS_${PN}-dev += "bash"
+RDEPENDS_${PN}-ptest += "bash"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 4fded60..8de8138 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -14,7 +14,7 @@
SRC_URI = "git://git.savannah.gnu.org/config.git \
file://gnu-configize.in"
S = "${WORKDIR}/git"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10.inc
new file mode 100644
index 0000000..3a135bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10.inc
@@ -0,0 +1,24 @@
+require go-common.inc
+
+GO_BASEVERSION = "1.10"
+GO_MINOR = ".2"
+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-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch \
+"
+
+SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
+
+SRC_URI[main.md5sum] = "c63b35075bed693bbfc84d4a6262948a"
+SRC_URI[main.sha256sum] = "6264609c6b9cd8ed8e02ca84605d727ce1898d74efa79841660b2e3e985a98bd"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
new file mode 100644
index 0000000..3bb33b0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
@@ -0,0 +1,33 @@
+From 7a7de46129fa6859fb6311096eb9f54c53c7fe2f Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Mon, 19 Feb 2018 08:49:33 -0800
+Subject: [PATCH 1/9] 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 603f7b5060..f891123f9c 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -82,11 +82,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})
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
new file mode 100644
index 0000000..74f37a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -0,0 +1,220 @@
+From 8b2feaee81d7a16adc59e61d06c1e7314d3a5408 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Mon, 19 Feb 2018 08:50:59 -0800
+Subject: [PATCH 2/9] 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 f891123f9c..ebacfbfdbc 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -113,7 +113,7 @@ func findEnv(env []cfg.EnvVar, name string) string {
+ func ExtraEnvVars() []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 c4c1500eb2..b0f6b45647 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -173,6 +173,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
+@@ -189,7 +191,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)
+@@ -197,13 +199,13 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ fmt.Fprintf(h, "omitdebug %v standard %v local %v prefix %q\n", p.Internal.OmitDebug, p.Standard, p.Internal.Local, p.Internal.LocalPrefix)
+ if len(p.CgoFiles)+len(p.SwigFiles) > 0 {
+ fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
+- cppflags, cflags, cxxflags, fflags, _, _ := b.CFlags(p)
+- fmt.Fprintf(h, "CC=%q %q %q\n", b.ccExe(), cppflags, cflags)
++ cppflags, cflags, cxxflags, fflags, _, _ := b.CFlags(p, true)
++ fmt.Fprintf(h, "CC=%q %q %q\n", b.ccExe(true), cppflags, cflags)
+ 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?
+ }
+@@ -1731,33 +1733,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
+@@ -1766,11 +1768,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
+ }
+
+@@ -1920,8 +1925,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 {
+@@ -1939,6 +1959,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
+ }
+@@ -1954,7 +1981,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
+ }
+@@ -2306,7 +2333,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
+ }
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
new file mode 100644
index 0000000..818fe66
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
@@ -0,0 +1,64 @@
+From acd179b49f1fc8d6f7f69e569fb4a56039c725a1 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 05:24:20 -0800
+Subject: [PATCH 3/9] 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 | 6 +++++-
+ src/go/build/build.go | 2 +-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index 49ed80033e..afc615b5c2 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -220,7 +220,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
+diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
+index 1de4f0dc79..4f6010d660 100644
+--- a/src/cmd/go/internal/cfg/cfg.go
++++ b/src/cmd/go/internal/cfg/cfg.go
+@@ -96,7 +96,11 @@ func init() {
+ // as the tool directory does not move based on environment 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)
++ }
+ }
+
+ func findGOROOT() string {
+diff --git a/src/go/build/build.go b/src/go/build/build.go
+index 68fb423983..81b1b32270 100644
+--- a/src/go/build/build.go
++++ b/src/go/build/build.go
+@@ -1594,7 +1594,7 @@ func init() {
+ }
+
+ // ToolDir is the directory containing build tools.
+-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH))
+
+ // IsLocalImport reports whether the import path is
+ // a local import path, like ".", "..", "./foo", or "../foo".
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
new file mode 100644
index 0000000..c23ca94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
@@ -0,0 +1,47 @@
+From 85252f0bd8743223eb778edbe9fb31dff17a23d8 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 06:26:10 -0800
+Subject: [PATCH 4/9] 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 6dcaf64122..11cbb8a8bb 100644
+--- a/src/cmd/link/internal/ld/lib.go
++++ b/src/cmd/link/internal/ld/lib.go
+@@ -1134,6 +1134,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.
+@@ -1145,6 +1146,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")
+@@ -1153,6 +1156,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)))
+ }
+ }
+
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
new file mode 100644
index 0000000..67a9393
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -0,0 +1,40 @@
+From 16124d84648f4dfdfa4738c5660b5400b30bf9da Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 06:32:45 -0800
+Subject: [PATCH 5/9] 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 93a5c43d11..3a63682bc4 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -162,7 +162,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)
+@@ -193,7 +193,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.
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
new file mode 100644
index 0000000..9fe6996
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
@@ -0,0 +1,277 @@
+From 2f07af34697c61decdcfa5b11434451fbcf37704 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 10:03:48 -0800
+Subject: [PATCH 6/9] 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 | 149 +++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 111 insertions(+), 38 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index afc615b5c2..36262665b2 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -38,6 +38,7 @@ var (
+ goldflags string
+ workdir string
+ tooldir string
++ build_tooldir string
+ oldgoos string
+ oldgoarch string
+ exe string
+@@ -49,6 +50,7 @@ var (
+
+ rebuildall bool
+ defaultclang bool
++ crossBuild bool
+
+ vflag int // verbosity
+ )
+@@ -223,6 +225,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
+@@ -252,7 +256,6 @@ func compilerEnv(envName, def string) map[string]string {
+ if gohostos != goos || gohostarch != goarch {
+ m[gohostos+"/"+gohostarch] = m[""]
+ }
+- m[""] = env
+ }
+
+ for _, goos := range okgoos {
+@@ -479,8 +482,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))
+@@ -1130,11 +1135,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.
+@@ -1182,8 +1205,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 {
+@@ -1212,7 +1240,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")
+@@ -1249,45 +1281,82 @@ 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")
++ 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)
+ }
+- 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)
+- }
+- goInstall(goBootstrap, "std", "cmd")
+- checkNotStale(goBootstrap, "std", "cmd")
+- checkNotStale(cmdGo, "std", "cmd")
+- 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
+@@ -1305,7 +1374,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 {
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
new file mode 100644
index 0000000..7242762
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
@@ -0,0 +1,108 @@
+From f98aa287941417226a6e4f78759f8a5e19732cde Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Fri, 2 Mar 2018 06:00:20 -0800
+Subject: [PATCH 7/9] 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(+)
+
+diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go
+index 9f1f8f8a50..a382880474 100644
+--- a/src/cmd/go/internal/work/action.go
++++ b/src/cmd/go/internal/work/action.go
+@@ -563,6 +563,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) {
+ 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
+diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
+index 57b7b00879..e2ba95420e 100644
+--- a/src/cmd/go/internal/work/build.go
++++ b/src/cmd/go/internal/work/build.go
+@@ -143,6 +143,7 @@ See also: go install, go get, go clean.
+ }
+
+ const concurrentGCBackendCompilationEnabledByDefault = true
++var goRootPrecious bool = true
+
+ func init() {
+ // break init cycle
+@@ -156,6 +157,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
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index b0f6b45647..c8f266a8ad 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -371,6 +371,23 @@ func (b *Builder) build(a *Action) (err error) {
+ return fmt.Errorf("missing or invalid binary-only package")
+ }
+
++ 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
++ }
++ if b.ComputeStaleOnly {
++ a.Package.Stale = true
++ a.Package.StaleReason = "missing or invalid GOROOT-resident package"
++ return nil
++ }
++ }
++
+ if err := b.Mkdir(a.Objdir); err != nil {
+ return err
+ }
+@@ -1097,6 +1114,14 @@ func BuildInstallFunc(b *Builder, a *Action) (err error) {
+ 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
+ }
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
new file mode 100644
index 0000000..1e75417
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
@@ -0,0 +1,58 @@
+From 41b90ed7af10a071ccfeede6a429e0d80518436d Mon Sep 17 00:00:00 2001
+From: Cherry Zhang <cherryyz@google.com>
+Date: Sat, 17 Feb 2018 10:31:39 -0500
+Subject: [PATCH 8/9] cmd/internal/obj/arm64: fix branch-too-far with TBZ like
+ instructions
+
+The compiler now emits TBZ like instructions, but the assembler's
+too-far-branch patch code didn't include that case. Add it.
+
+Fixes #23889.
+
+Change-Id: Ib75f9250c660b9fb652835fbc83263a5d5073dc5
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ src/cmd/internal/obj/arm64/asm7.go | 11 +++++++++--
+ src/cmd/internal/obj/arm64/asm_test.go | 1 +
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/internal/obj/arm64/asm7.go b/src/cmd/internal/obj/arm64/asm7.go
+index ca81238c93..b1ee552489 100644
+--- a/src/cmd/internal/obj/arm64/asm7.go
++++ b/src/cmd/internal/obj/arm64/asm7.go
+@@ -696,9 +696,16 @@ func span7(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
+ o = c.oplook(p)
+
+ /* very large branches */
+- if (o.type_ == 7 || o.type_ == 39) && p.Pcond != nil { // 7: BEQ and like, 39: CBZ and like
++ if (o.type_ == 7 || o.type_ == 39 || o.type_ == 40) && p.Pcond != nil { // 7: BEQ and like, 39: CBZ and like, 40: TBZ and like
+ otxt := p.Pcond.Pc - pc
+- if otxt <= -(1<<18)+10 || otxt >= (1<<18)-10 {
++ var toofar bool
++ switch o.type_ {
++ case 7, 39: // branch instruction encodes 19 bits
++ toofar = otxt <= -(1<<20)+10 || otxt >= (1<<20)-10
++ case 40: // branch instruction encodes 14 bits
++ toofar = otxt <= -(1<<15)+10 || otxt >= (1<<15)-10
++ }
++ if toofar {
+ q := c.newprog()
+ q.Link = p.Link
+ p.Link = q
+diff --git a/src/cmd/internal/obj/arm64/asm_test.go b/src/cmd/internal/obj/arm64/asm_test.go
+index 369c48f510..3e0c9c13a6 100644
+--- a/src/cmd/internal/obj/arm64/asm_test.go
++++ b/src/cmd/internal/obj/arm64/asm_test.go
+@@ -52,6 +52,7 @@ func TestLarge(t *testing.T) {
+ // gen generates a very large program, with a very far conditional branch.
+ func gen(buf *bytes.Buffer) {
+ fmt.Fprintln(buf, "TEXT f(SB),0,$0-0")
++ fmt.Fprintln(buf, "TBZ $5, R0, label")
+ fmt.Fprintln(buf, "CBZ R0, label")
+ fmt.Fprintln(buf, "BEQ label")
+ for i := 0; i < 1<<19; i++ {
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
new file mode 100644
index 0000000..06b00b3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
@@ -0,0 +1,130 @@
+From f575d85c4bd9b2903223d6c0dcc38a12775d582f Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sun, 18 Feb 2018 08:24:05 -0800
+Subject: [PATCH 9/9] 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 87e809166a..f522a63034 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 da16f92345..fd14940ede 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 6b386ad737..99863712cc 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 c5d3451c39..fd85e6368d 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 83974e5b56..097224f6da 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 273d9b42cb..a503abe8ea 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 9ac7eb8217..3825ff7abe 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 6a744dc04e..d81f392549 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",
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
index 2823304..a942f6d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
@@ -1,7 +1,7 @@
require go-common.inc
GO_BASEVERSION = "1.9"
-GO_MINOR = ".4"
+GO_MINOR = ".6"
PV .= "${GO_MINOR}"
FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
@@ -22,5 +22,5 @@
"
SRC_URI_append_libc-musl = " file://set-external-linker.patch"
-SRC_URI[main.md5sum] = "6816441fd6680c63865cdd5cb8bc1960"
-SRC_URI[main.sha256sum] = "0573a8df33168977185aa44173305e5a0450f55213600e94541604b75d46dc06"
+SRC_URI[main.md5sum] = "52c1a3063291036597552d3fed0b2917"
+SRC_URI[main.sha256sum] = "36f4059be658f7f07091e27fe04bb9e97a0c4836eb446e4c5bac3c90ff9e5828"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc
index 9af6873..11d55c4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc
@@ -17,10 +17,17 @@
SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz;name=main"
S = "${WORKDIR}/go"
B = "${S}"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.src\.tar"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
SSTATE_SCAN_CMD = "true"
+export GOROOT_OVERRIDE = "1"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
+export GOCACHE = "off"
+export CGO_ENABLED = "1"
+
do_compile_prepend() {
BUILD_CC=${BUILD_CC}
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
index 8afda6b..ea68b88 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -7,34 +7,29 @@
export GOHOSTOS = "${BUILD_GOOS}"
export GOHOSTARCH = "${BUILD_GOARCH}"
-export GOHOSTOS_CROSS = "${HOST_GOOS}"
-export GOHOSTARCH_CROSS = "${HOST_GOARCH}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
-export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
-CC = "${HOST_PREFIX}gcc"
-export CGO_CFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${CFLAGS}"
-export CGO_LDFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}"
-export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}"'
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS} ${HOST_CC_ARCH} ${LDFLAGS}"'
do_configure[noexec] = "1"
do_compile() {
- export GOBIN="${B}/bin"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
+ export CC_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+ export CXX_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
cd src
./make.bash --host-only --no-banner
cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
make_wrapper() {
- rm -f ${D}${bindir}/$2
- cat <<END >${D}${bindir}/$2
+ rm -f ${D}${bindir}/$2
+ cat <<END >${D}${bindir}/$2
#!/bin/sh
here=\`dirname \$0\`
native_goroot=\`readlink -f \$here/../../lib/${TARGET_SYS}/go\`
@@ -42,11 +37,12 @@
export GOOS="${TARGET_GOOS}"
test -n "\$GOARM" || export GOARM="${TARGET_GOARM}"
test -n "\$GO386" || export GO386="${TARGET_GO386}"
+test -n "\$GOMIPS" || export GOMIPS="${TARGET_GOMIPS}"
export GOTOOLDIR="\$native_goroot/pkg/tool/${HOST_GOTUPLE}"
test -n "\$GOROOT" || export GOROOT="\$OECORE_TARGET_SYSROOT/${target_libdir}/go"
\$here/../../lib/${TARGET_SYS}/go/bin/$1 "\$@"
END
- chmod +x ${D}${bindir}/$2
+ chmod +x ${D}${bindir}/$2
}
do_install() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.10.bb
new file mode 100644
index 0000000..7ac9449
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.10.bb
@@ -0,0 +1,2 @@
+require go-cross-canadian.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
index 7ac9449..367a967 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
@@ -1,2 +1,12 @@
require go-cross-canadian.inc
require go-${PV}.inc
+
+export GOHOSTOS_CROSS = "${HOST_GOOS}"
+export GOHOSTARCH_CROSS = "${HOST_GOARCH}"
+export CC_FOR_TARGET = "${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+export CXX_FOR_TARGET = "${HOST_PREFIX}g++ --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+
+do_compile_prepend() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
index 3ac7211..44f230b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
@@ -1,7 +1,7 @@
inherit cross
PROVIDES = "virtual/${TARGET_PREFIX}go"
-DEPENDS += "go-native"
+DEPENDS = "go-native"
PN = "go-cross-${TARGET_ARCH}"
@@ -11,52 +11,52 @@
export GOARCH = "${TARGET_GOARCH}"
export GOARM = "${TARGET_GOARM}"
export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
-export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export GOCACHE = "off"
CC = "${@d.getVar('BUILD_CC').strip()}"
do_configure[noexec] = "1"
do_compile() {
- export GOBIN="${B}/bin"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
- cd src
- ./make.bash --host-only
- cd ${B}
+ export CC_FOR_${GOOS}_${GOARCH}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+ export CXX_FOR_${GOOS}_${GOARCh}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+ cd src
+ ./make.bash --host-only --no-banner
+ cd ${B}
}
-
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
make_wrapper() {
- rm -f ${D}${bindir}/$2
- cat <<END >${D}${bindir}/$2
+ rm -f ${D}${bindir}/$2
+ cat <<END >${D}${bindir}/$2
#!/bin/bash
here=\`dirname \$0\`
export GOARCH="${TARGET_GOARCH}"
export GOOS="${TARGET_GOOS}"
export GOARM="\${GOARM:-${TARGET_GOARM}}"
export GO386="\${GO386:-${TARGET_GO386}}"
+export GOMIPS="\${GOMIPS:-${TARGET_GOMIPS}}"
\$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
END
- chmod +x ${D}${bindir}/$2
+ chmod +x ${D}${bindir}/$2
}
do_install() {
- install -d ${D}${libdir}/go
- cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
- install -d ${D}${libdir}/go/src
- (cd ${S}/src; for d in *; do \
- [ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \
- done)
- rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
- install -d ${D}${bindir} ${D}${libdir}/go/bin
- for f in ${B}/bin/*
- do
- base=`basename $f`
- install -m755 $f ${D}${libdir}/go/bin
- make_wrapper $base ${TARGET_PREFIX}$base
- done
+ install -d ${D}${libdir}/go
+ cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
+ install -d ${D}${libdir}/go/src
+ (cd ${S}/src; for d in *; do \
+ [ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \
+ done)
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
+ install -d ${D}${bindir} ${D}${libdir}/go/bin
+ for f in ${B}/bin/*
+ do
+ base=`basename $f`
+ install -m755 $f ${D}${libdir}/go/bin
+ make_wrapper $base ${TARGET_PREFIX}$base
+ done
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.10.bb
new file mode 100644
index 0000000..80b5a03
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.10.bb
@@ -0,0 +1,2 @@
+require go-cross.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
index 80b5a03..4739c7d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
@@ -1,2 +1,10 @@
require go-cross.inc
require go-${PV}.inc
+
+export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+
+do_compile_prepend() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
index f67e4b9..4391b32 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
@@ -10,22 +10,18 @@
export GOARCH = "${TARGET_GOARCH}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
-export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
-export GO_INSTALL = "cmd"
-CC = "${@d.getVar('BUILD_CC').strip()}"
do_configure[noexec] = "1"
do_compile() {
- export GOBIN="${B}/bin"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
+ export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
+ export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
cd src
- ./make.bash --host-only
+ ./make.bash --host-only --no-banner
cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
make_wrapper() {
rm -f ${D}${bindir}/$2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.10.bb
new file mode 100644
index 0000000..1857c8a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.10.bb
@@ -0,0 +1,2 @@
+require go-crosssdk.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
index 1857c8a..3ac629b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
@@ -1,2 +1,11 @@
require go-crosssdk.inc
require go-${PV}.inc
+
+export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export GO_INSTALL = "cmd"
+
+do_compile_prepend() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch
new file mode 100644
index 0000000..34ec987
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep/0001-Add-support-for-mips-mips64.patch
@@ -0,0 +1,54 @@
+From f0fb80604385ae3266a472601ef685896b4cc0af Mon Sep 17 00:00:00 2001
+From: Vladimir Stefanovic <vladimir.stefanovic@imgtec.com>
+Date: Fri, 17 Feb 2017 20:44:43 +0100
+Subject: [PATCH] Add support for mips, mips64
+
+---
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ vendor/github.com/boltdb/bolt/bolt_mips64x.go | 12 ++++++++++++
+ vendor/github.com/boltdb/bolt/bolt_mipsx.go | 12 ++++++++++++
+ 2 files changed, 24 insertions(+)
+ create mode 100644 vendor/github.com/boltdb/bolt/bolt_mips64x.go
+ create mode 100644 vendor/github.com/boltdb/bolt/bolt_mipsx.go
+
+diff --git a/vendor/github.com/boltdb/bolt/bolt_mips64x.go b/vendor/github.com/boltdb/bolt/bolt_mips64x.go
+new file mode 100644
+index 00000000..134b578b
+--- /dev/null
++++ b/vendor/github.com/boltdb/bolt/bolt_mips64x.go
+@@ -0,0 +1,12 @@
++// +build mips64 mips64le
++
++package bolt
++
++// maxMapSize represents the largest mmap size supported by Bolt.
++const maxMapSize = 0x8000000000 // 512GB
++
++// maxAllocSize is the size used when creating array pointers.
++const maxAllocSize = 0x7FFFFFFF
++
++// Are unaligned load/stores broken on this arch?
++var brokenUnaligned = false
+diff --git a/vendor/github.com/boltdb/bolt/bolt_mipsx.go b/vendor/github.com/boltdb/bolt/bolt_mipsx.go
+new file mode 100644
+index 00000000..d5ecb059
+--- /dev/null
++++ b/vendor/github.com/boltdb/bolt/bolt_mipsx.go
+@@ -0,0 +1,12 @@
++// +build mips mipsle
++
++package bolt
++
++// maxMapSize represents the largest mmap size supported by Bolt.
++const maxMapSize = 0x40000000 // 1GB
++
++// maxAllocSize is the size used when creating array pointers.
++const maxAllocSize = 0xFFFFFFF
++
++// Are unaligned load/stores broken on this arch?
++var brokenUnaligned = false
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb
deleted file mode 100644
index abfeb48..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Dependency management tool for Golang"
-HOMEPAGE = "https://github.com/golang/dep"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=1bad315647751fab0007812f70d42c0d"
-
-GO_IMPORT = "github.com/golang/dep"
-SRC_URI = "git://${GO_IMPORT}"
-
-# Points to 0.3.0 tag
-SRCREV = "7a91b794bbfbf1f3b8b79823799316451127801b"
-
-inherit go
-
-GO_INSTALL = "${GO_IMPORT}/cmd/dep"
-
-RDEPENDS_${PN}-dev += "bash"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.4.1.bb
new file mode 100644
index 0000000..d82e637
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.4.1.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Dependency management tool for Golang"
+HOMEPAGE = "https://github.com/golang/dep"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=1bad315647751fab0007812f70d42c0d"
+
+GO_IMPORT = "github.com/golang/dep"
+SRC_URI = "git://${GO_IMPORT} \
+ file://0001-Add-support-for-mips-mips64.patch;patchdir=src/github.com/golang/dep \
+ "
+
+# Points to 0.4.1 tag
+SRCREV = "37d9ea0ac16f0e0a05afc3b60e1ac8c364b6c329"
+
+inherit go
+
+GO_INSTALL = "${GO_IMPORT}/cmd/dep"
+
+RDEPENDS_${PN}-dev += "bash"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
index 95db1c2..b76fb08 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
@@ -4,34 +4,31 @@
inherit native
-SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4"
-SRC_URI[bootstrap.md5sum] = "dfb604511115dd402a77a553a5923a04"
-SRC_URI[bootstrap.sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959"
+SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4"
+SRC_URI[bootstrap.md5sum] = "dbf727a4b0e365bf88d97cbfde590016"
+SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52"
export GOOS = "${BUILD_GOOS}"
export GOARCH = "${BUILD_GOARCH}"
CC = "${@d.getVar('BUILD_CC').strip()}"
-export CGO_ENABLED = "1"
+GOMAKEARGS ?= "--no-banner"
do_configure() {
- cd ${WORKDIR}/go1.4/go/src
- CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
+ cd ${WORKDIR}/go1.4/go/src
+ CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
}
do_compile() {
- export GOBIN="${B}/bin"
export GOROOT_FINAL="${nonstaging_libdir}/go"
export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go"
- rm -rf ${GOBIN}
- mkdir ${GOBIN}
-
- export TMPDIR=${WORKDIR}/build-tmp
- mkdir -p ${WORKDIR}/build-tmp
cd src
- ./make.bash --host-only
+ ./make.bash ${GOMAKEARGS}
+ cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin"
make_wrapper() {
rm -f ${D}${bindir}/$2$3
@@ -51,7 +48,7 @@
(cd ${S}/src; for d in *; do \
[ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
done)
- rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
install -d ${D}${bindir} ${D}${libdir}/go/bin
for f in ${B}/bin/*
do
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.10.bb
new file mode 100644
index 0000000..bbf3c0d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.10.bb
@@ -0,0 +1,2 @@
+require ${PN}.inc
+require go-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
index bbf3c0d..8621e1d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
@@ -1,2 +1,4 @@
require ${PN}.inc
require go-${PV}.inc
+
+GOMAKEARGS = "--host-only --no-banner"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
index 29ae86e..0041e8a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
@@ -8,13 +8,16 @@
export GOARCH = "${TARGET_GOARCH}"
export GOARM = "${TARGET_GOARM}"
export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
-export GO_TARGET_INSTALL = "std"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${CC}"
-export CXX_FOR_TARGET="${CXX}"
-export GOROOT_OVERRIDE = "1"
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_CPPFLAGS = "${CPPFLAGS}"
+export CGO_CXXFLAGS = "${CXXFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+
+GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
+GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"'
do_configure() {
:
@@ -25,21 +28,20 @@
}
do_compile() {
- export GOBIN="${B}/bin"
- export CC="${@d.getVar('BUILD_CC').strip()}"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
+ export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
+ export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
+
cd src
- ./make.bash --host-only
- cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
- rm -rf ${B}/pkg/${TARGET_GOTUPLE}
- ./make.bash --target-only
+ ./make.bash --target-only --no-banner std
if [ -n "${GO_DYNLINK}" ]; then
- cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
- GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
+ export GOTOOLDIR="${B}/pkg/tool/native_native"
+ CC="$CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}" GOARCH="${TARGET_GOARCH}" GOOS="${TARGET_GOOS}" GOROOT=${B} \
+ $GOTOOLDIR/go_bootstrap install -linkshared -buildmode=shared ${GO_SHLIB_LDFLAGS} std
fi
cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
do_install() {
install -d ${D}${libdir}/go/src
@@ -54,20 +56,10 @@
find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do
cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
done
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
rm -f ${D}${libdir}/go/src/cmd/dist/dist
}
-# Remove test binaries that cannot be relocated
-do_install_append_class-nativesdk() {
- rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
-}
-
-# These testdata directories aren't needed for builds and contain binaries
-# that can cause errors in sysroot_strip(), so just remove them.
-sysroot_stage_all_append() {
- find ${SYSROOT_DESTDIR}${libdir}/go/src -depth -type d -name 'testdata' -exec rm -rf {} \;
-}
-
ALLOW_EMPTY_${PN} = "1"
FILES_${PN} = "${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*${SOLIBSDEV}"
FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \
@@ -78,8 +70,6 @@
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.shlibname \
-"
-FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.a \
@@ -88,11 +78,15 @@
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.a \
"
-# The testdata directories in the source tree include some binaries for various
-# architectures, scripts, and .a files
-INSANE_SKIP_${PN}-dev = "staticdev ldflags file-rdeps arch"
+FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE}"
+
+# Go sources include some scripts and pre-built binaries for
+# multiple architectures. The static .a files for dynamically-linked
+# runtime are also required in -dev.
+INSANE_SKIP_${PN}-dev = "staticdev file-rdeps arch"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_SYSROOT_STRIP = "1"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.10.bb
new file mode 100644
index 0000000..43b68b4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.10.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-runtime.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb
index 43b68b4..d5279ea 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb
@@ -1,2 +1,23 @@
require go-${PV}.inc
require go-runtime.inc
+
+export GO_TARGET_INSTALL = "std"
+export CC_FOR_TARGET = "${CC}"
+export CXX_FOR_TARGET = "${CXX}"
+
+do_compile() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+ export CC=$BUILD_CC
+
+ cd src
+ CGO_CFLAGS="${BUILD_CFLAGS}" CGO_LDFLAGS="${BUILD_LDFLAGS}" ./make.bash --host-only
+ cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
+ rm -rf ${B}/pkg/${TARGET_GOTUPLE}
+ ./make.bash --target-only
+ if [ -n "${GO_DYNLINK}" ]; then
+ cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
+ GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
+ fi
+ cd ${B}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
index cac5d78..29a1344 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
@@ -1,4 +1,3 @@
-inherit goarch
DEPENDS = "virtual/${TARGET_PREFIX}go go-native"
DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
@@ -8,41 +7,34 @@
export GOARCH = "${TARGET_GOARCH}"
export GOARM = "${TARGET_GOARM}"
export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET = "${CC}"
-export CXX_FOR_TARGET = "${CXX}"
-export GO_TARGET_INSTALL = "cmd"
-export GO_FLAGS = "-a"
GO_LDFLAGS = ""
GO_LDFLAGS_class-nativesdk = "-linkmode external"
export GO_LDFLAGS
-SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
-SECURITY_LDFLAGS = ""
+CC_append_class-nativesdk = " ${SECURITY_NOPIE_CFLAGS}"
do_configure[noexec] = "1"
do_compile() {
- export GOBIN="${B}/bin"
- export CC="${@d.getVar('BUILD_CC').strip()}"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
-
- export TMPDIR=${WORKDIR}/build-tmp
- mkdir -p ${WORKDIR}/build-tmp
+ export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
+ export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
cd src
- ./make.bash
+ ./make.bash --target-only --no-banner
cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
do_install() {
install -d ${D}${libdir}/go/pkg/tool
cp --preserve=mode,timestamps -R ${B}/pkg/tool/${TARGET_GOTUPLE} ${D}${libdir}/go/pkg/tool/
install -d ${D}${libdir}/go/src
cp --preserve=mode,timestamps -R ${S}/src/cmd ${D}${libdir}/go/src/
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
install -d ${D}${libdir}/go/bin
install -d ${D}${bindir}
for f in ${B}/${GO_BUILD_BINDIR}/*; do
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.10.bb
new file mode 100644
index 0000000..c67e2cb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.10.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-target.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
index c67e2cb..ec5a314 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
@@ -1,2 +1,17 @@
require go-${PV}.inc
require go-target.inc
+
+export GO_TARGET_INSTALL = "cmd"
+export GO_FLAGS = "-a"
+export CC_FOR_TARGET = "${CC}"
+export CXX_FOR_TARGET = "${CXX}"
+
+do_compile() {
+ export GOBIN="${B}/bin"
+ export TMPDIR="$GOTMPDIR"
+ export CC=$BUILD_CC
+
+ cd src
+ ./make.bash
+ cd ${B}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.5.bb
similarity index 79%
rename from import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.5.bb
index 64dc32c..2dd6d38 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.5.bb
@@ -6,8 +6,8 @@
SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "544aca496a7d89de3e5d99e56a2f03d3"
-SRC_URI[sha256sum] = "d4ecf697d13f14dd1a78c5995f06459bff706fd1ce593d1c02d81667c0207753"
+SRC_URI[md5sum] = "1c886063c9e0ab463906de804596aa2f"
+SRC_URI[sha256sum] = "7ca60b2519fdbe97f463fe2df66a6188d18b514bfd44127d985f0234ee2461b1"
inherit autotools native
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch
new file mode 100644
index 0000000..5b1a538
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch
@@ -0,0 +1,32 @@
+From 01674fefe3bd24fd93412fbb3eb4e85fe70c80aa Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Mon, 18 Dec 2017 16:01:39 +0200
+Subject: [PATCH] i2c-tools: eeprog/Module.mk: Add missing dependency
+
+Absence of this dependency caused parallel build to run into a race
+and break.
+
+Upstream-Status: Accepted
+https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/commit/?id=f87c97317012a3b96b67237925893b8ffd5f4f50
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ eeprog/Module.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/eeprog/Module.mk b/eeprog/Module.mk
+index 9d36869..d215855 100644
+--- a/eeprog/Module.mk
++++ b/eeprog/Module.mk
+@@ -20,7 +20,7 @@ EEPROG_TARGETS := eeprog
+ # Programs
+ #
+
+-$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o
++$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(EEPROG_LDFLAGS)
+
+ #
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch
new file mode 100644
index 0000000..426b433
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch
@@ -0,0 +1,37 @@
+From a6a59693066fd8da81f7107479df3e32a129247d Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Wed, 6 Dec 2017 09:55:04 +0100
+Subject: [PATCH] lib/Module.mk: Add missing dependencies
+
+The lib symlinks lacked a dependency to the actual library file, so
+parallel builds could run into a race and break.
+
+Upstream-Status: Backport
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ lib/Module.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Module.mk b/lib/Module.mk
+index 432a051..fd2c8c4 100644
+--- a/lib/Module.mk
++++ b/lib/Module.mk
+@@ -42,11 +42,11 @@ endif
+ $(LIB_DIR)/$(LIB_SHLIBNAME): $(LIB_DIR)/smbus.o
+ $(CC) -shared $(LDFLAGS) -Wl,--version-script=$(LIB_DIR)/libi2c.map -Wl,-soname,$(LIB_SHSONAME) -o $@ $^ -lc
+
+-$(LIB_DIR)/$(LIB_SHSONAME):
++$(LIB_DIR)/$(LIB_SHSONAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
+ $(RM) $@
+ $(LN) $(LIB_SHLIBNAME) $@
+
+-$(LIB_DIR)/$(LIB_SHBASENAME):
++$(LIB_DIR)/$(LIB_SHBASENAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
+ $(RM) $@
+ $(LN) $(LIB_SHLIBNAME) $@
+
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch
new file mode 100644
index 0000000..33cf2d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch
@@ -0,0 +1,66 @@
+From 08b0d67ba7eceb862cb17f52eb1911e9579726ea Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Thu, 14 Dec 2017 08:52:26 +0100
+Subject: [PATCH] tools/Module.mk: Add missing dependencies
+
+Better build the library before building the tools which link against
+it, otherwise parallel builds could run into a race and break.
+
+Upstream-Status: Backport
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
+Acked-by: Angelo Compagnucci <angelo@amarulasolutions.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ lib/Module.mk | 7 +++++++
+ tools/Module.mk | 10 +++++-----
+ 2 files changed, 12 insertions(+), 5 deletions(-)
+
+Index: i2c-tools-4.0/lib/Module.mk
+===================================================================
+--- i2c-tools-4.0.orig/lib/Module.mk
++++ i2c-tools-4.0/lib/Module.mk
+@@ -35,6 +35,13 @@ LIB_TARGETS += $(LIB_STLIBNAME)
+ LIB_OBJECTS += smbus.ao
+ endif
+
++# Library file to link against (static or dynamic)
++ifeq ($(USE_STATIC_LIB),1)
++LIB_DEPS := $(LIB_DIR)/$(LIB_STLIBNAME)
++else
++LIB_DEPS := $(LIB_DIR)/$(LIB_SHBASENAME)
++endif
++
+ #
+ # Libraries
+ #
+Index: i2c-tools-4.0/tools/Module.mk
+===================================================================
+--- i2c-tools-4.0.orig/tools/Module.mk
++++ i2c-tools-4.0/tools/Module.mk
+@@ -24,19 +24,19 @@ TOOLS_TARGETS := i2cdetect i2cdump i2cse
+ # Programs
+ #
+
+-$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o
++$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+-$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+-$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+-$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+-$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
++$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
+
+ #
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/Module.mk b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/Module.mk
deleted file mode 100644
index fcaf72f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/Module.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-# EEPROMER
-#
-# Licensed under the GNU General Public License.
-
-EEPROMER_DIR := eepromer
-
-EEPROMER_CFLAGS := -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
- -Wcast-align -Wwrite-strings -Wnested-externs -Winline \
- -W -Wundef -Wmissing-prototypes -Iinclude
-
-EEPROMER_TARGETS := eepromer eeprom eeprog
-
-#
-# Programs
-#
-
-$(EEPROMER_DIR)/eepromer: $(EEPROMER_DIR)/eepromer.o
- $(CC) $(LDFLAGS) -o $@ $^
-
-$(EEPROMER_DIR)/eeprom: $(EEPROMER_DIR)/eeprom.o
- $(CC) $(LDFLAGS) -o $@ $^
-
-$(EEPROMER_DIR)/eeprog: $(EEPROMER_DIR)/eeprog.o $(EEPROMER_DIR)/24cXX.o
- $(CC) $(LDFLAGS) -o $@ $^
-
-#
-# Objects
-#
-
-$(EEPROMER_DIR)/eepromer.o: $(EEPROMER_DIR)/eepromer.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/eeprom.o: $(EEPROMER_DIR)/eeprom.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/eeprog.o: $(EEPROMER_DIR)/eeprog.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-$(EEPROMER_DIR)/24cXX.o: $(EEPROMER_DIR)/24cXX.c
- $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
-
-#
-# Commands
-#
-
-all-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-
-strip-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
- strip $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
-
-clean-eepromer:
- $(RM) $(addprefix $(EEPROMER_DIR)/,*.o $(EEPROMER_TARGETS))
-
-install-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
- $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
- for program in $(EEPROMER_TARGETS) ; do \
- $(INSTALL_PROGRAM) $(EEPROMER_DIR)/$$program $(DESTDIR)$(sbindir) ; done
-
-uninstall-eepromer:
- for program in $(EEPROMER_TARGETS) ; do \
- $(RM) $(DESTDIR)$(sbindir)/$$program ; \
- $(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done
-
-all: all-eepromer
-
-strip: strip-eepromer
-
-clean: clean-eepromer
-
-install: install-eepromer
-
-uninstall: uninstall-eepromer
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
new file mode 100644
index 0000000..703688d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
@@ -0,0 +1,98 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 226bc03acca44cf4b300597308064c44676b6f4b Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Tue, 23 Jan 2018 14:24:16 +0100
+Subject: Delete duplicate i2c-dev.h
+
+The <linux/i2c-dev.h> header file is provided by the kernel, so drop
+our own copy of this file.
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+Acked-by: Wolfram Sang <wsa@the-dreams.de>
+---
+ include/linux/i2c-dev.h | 72 -------------------------------------------------
+ 1 file changed, 72 deletions(-)
+ delete mode 100644 include/linux/i2c-dev.h
+
+diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
+deleted file mode 100644
+index 839d25a..0000000
+--- a/include/linux/i2c-dev.h
++++ /dev/null
+@@ -1,72 +0,0 @@
+-/*
+- i2c-dev.h - i2c-bus driver, char device interface
+-
+- Copyright (C) 1995-97 Simon G. Vogl
+- Copyright (C) 1998-99 Frodo Looijaard <frodol@dds.nl>
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software
+- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+- MA 02110-1301 USA.
+-*/
+-
+-#ifndef _LINUX_I2C_DEV_H
+-#define _LINUX_I2C_DEV_H
+-
+-#include <linux/types.h>
+-
+-
+-/* /dev/i2c-X ioctl commands. The ioctl's parameter is always an
+- * unsigned long, except for:
+- * - I2C_FUNCS, takes pointer to an unsigned long
+- * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data
+- * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data
+- */
+-#define I2C_RETRIES 0x0701 /* number of times a device address should
+- be polled when not acknowledging */
+-#define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */
+-
+-/* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses
+- * are NOT supported! (due to code brokenness)
+- */
+-#define I2C_SLAVE 0x0703 /* Use this slave address */
+-#define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it
+- is already in use by a driver! */
+-#define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */
+-
+-#define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */
+-
+-#define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */
+-
+-#define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */
+-#define I2C_SMBUS 0x0720 /* SMBus transfer */
+-
+-
+-/* This is the structure as used in the I2C_SMBUS ioctl call */
+-struct i2c_smbus_ioctl_data {
+- __u8 read_write;
+- __u8 command;
+- __u32 size;
+- union i2c_smbus_data *data;
+-};
+-
+-/* This is the structure as used in the I2C_RDWR ioctl call */
+-struct i2c_rdwr_ioctl_data {
+- struct i2c_msg *msgs; /* pointers to i2c_msgs */
+- __u32 nmsgs; /* number of i2c_msgs */
+-};
+-
+-#define I2C_RDRW_IOCTL_MAX_MSGS 42
+-
+-
+-#endif /* _LINUX_I2C_DEV_H */
+--
+cgit v1.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
deleted file mode 100644
index c017252..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Set of i2c tools for linux"
-HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools"
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2 \
- file://Module.mk \
-"
-SRC_URI[md5sum] = "7104a1043d11a5e2c7b131614eb1b962"
-SRC_URI[sha256sum] = "db5e69f2e2a6e3aa2ecdfe6a5f490b149c504468770f58921c8c5b8a7860a441"
-
-inherit autotools-brokensep
-
-do_compile_prepend() {
- cp ${WORKDIR}/Module.mk ${S}/eepromer/
- sed -i 's#/usr/local#/usr#' ${S}/Makefile
- echo "include eepromer/Module.mk" >> ${S}/Makefile
-}
-
-do_install_append() {
- install -d ${D}${includedir}/linux
- install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h
- rm -f ${D}${includedir}/linux/i2c-dev.h
-}
-
-PACKAGES =+ "${PN}-misc"
-FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
- ${bindir}/ddcmon \
- ${bindir}/decode-edid \
- ${bindir}/decode-dimms \
- ${bindir}/decode-vaio \
- "
-RDEPENDS_${PN}-misc = "${PN} perl"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
new file mode 100644
index 0000000..01ac47f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Set of i2c tools for linux"
+HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \
+ file://0001-lib-Module.mk-Add-missing-dependencies.patch \
+ file://0001-tools-Module.mk-Add-missing-dependencies.patch \
+ file://0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch \
+ file://remove-i2c-dev.patch \
+"
+
+SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa"
+SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403"
+
+EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \
+ incdir=${includedir} libdir=${libdir} \
+ mandir=${mandir} \
+ EXTRA=eeprog"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
+
+PACKAGES =+ "${PN}-misc"
+FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
+ ${bindir}/ddcmon \
+ ${bindir}/decode-edid \
+ ${bindir}/decode-dimms \
+ ${bindir}/decode-vaio \
+ "
+RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \
+ perl-module-constant perl-module-file-basename \
+ perl-module-fcntl perl-module-strict perl-module-vars \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
index 7e4dbc4..64b5e20 100755
--- a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
@@ -4,69 +4,208 @@
# Copyright (C) 2004 by the Icecream Authors
# GPL
-target_files=
+target_paths=
+target_aliases=
-is_contained ()
+# Always prints, optionally to a log file
+print_output ()
{
- case " $target_files " in
- *" $1 "* ) return 0 ;;
- *"=$1 "* ) return 0;;
- * ) return 1 ;;
- esac
+ if test -n "$log_path"; then
+ echo "$@" | tee -a "$log_path"
+ else
+ echo "$@"
+ fi
+}
+
+# Only prints if the debug flag is specified
+print_debug ()
+{
+ if test -n "$debug"; then
+ print_output "$@"
+ fi
+}
+
+is_dynamic_elf ()
+{
+ # Is the file an dynamically linked ELF executable?
+ (file -L "$1" | grep 'ELF' > /dev/null 2>&1) && (! file -L "$1" | grep 'static' > /dev/null 2>&1)
+}
+
+fix_rpath ()
+{
+ # Patches the RPATH for a file. When the program is executed in the chroot
+ # be iceccd, /proc is not mounted. As such, $ORIGIN can't be resolved. To
+ # work around this, replace all instances of $ORIGIN in RPATH with the
+ # known chroot path to the executables directory
+ local path="$1"
+ local origin="$2"
+ if ! is_dynamic_elf "$path"; then
+ return
+ fi
+ local old_rpath="`$PATCHELF --print-rpath "$path"`"
+ local new_rpath="`echo "$old_rpath" | \
+ sed 's/.*\[\(.*\)\]/\1/g' | \
+ sed "s,\\\$ORIGIN,/$origin,g"`"
+
+ if test -n "$new_rpath"; then
+ print_debug "Converting RPATH '$old_rpath' -> '$new_rpath'"
+ $PATCHELF --set-rpath "$new_rpath" "$path"
+ fi
+}
+
+add_path ()
+{
+ case " $target_paths " in
+ *" $1 "*)
+ return 1
+ ;;
+ *)
+ target_paths="$target_paths $1"
+ return 0
+ ;;
+ esac
+}
+
+add_alias ()
+{
+ if test "$1" != "$2"; then
+ local alias="$1=$2"
+ case " $target_aliases " in
+ *" $alias "*)
+ ;;
+ *)
+ print_debug "Adding alias '$2' -> '$1'"
+ target_aliases="$target_aliases $alias"
+ ;;
+ esac
+ fi
+}
+
+normalize_path ()
+{
+ # Normalizes the path to a file or directory, removing all "." and ".."
+ # entries. Use pwd -L to explicitly prevent symlink expansion
+ local path=$1
+ if test -f "$path"; then
+ pushd $(dirname $path) > /dev/null 2>&1
+ dir_path=$(pwd -L)
+ path=$dir_path/$(basename $path)
+ popd > /dev/null 2>&1
+ elif test -d "$path"; then
+ pushd $path > /dev/null 2>&1
+ path=$(pwd -L)
+ popd > /dev/null 2>&1
+ fi
+ echo $path
+}
+
+add_file_common()
+{
+ local p="$1"
+ local path="$2"
+ local alias="$3"
+
+ add_alias "$path" "$p"
+ if test -n "$alias"; then
+ add_alias "$path" "$alias"
+ fi
+
+ add_path "$path" || return 1
+ print_debug "Adding file '$path'"
+
+ return 0
+}
+
+add_deps()
+{
+ local path="$1"
+ local interp="$2"
+
+ if test -n "$interp" && test -x "$interp"; then
+ # Use the dynamic loaders --list argument to list the
+ # dependencies. The program may have a different program
+ # interpreter (typical when using uninative tarballs), which is
+ # why we can't just call ldd.
+ deps="`$interp --list "$path"`"
+ else
+ deps="`ldd "$path"`"
+ fi
+
+ print_debug "Dependencies are:"
+ print_debug "$deps"
+ if test -n "$deps"; then
+ for lib in $deps; do
+ # ldd now outputs ld as /lib/ld-linux.so.xx on current nptl
+ # based glibc this regexp parse the outputs like:
+ # ldd /usr/bin/gcc
+ # linux-gate.so.1 => (0xffffe000)
+ # libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
+ # /lib/ld-linux.so.2 (0xb7fe8000)
+ # covering both situations ( with => and without )
+ lib="`echo "$lib" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`"
+
+ test -f "$lib" || continue
+ # Check whether the same library also exists in the parent
+ # directory, and prefer that on the assumption that it is a
+ # more generic one.
+ local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
+ test -f "$baselib" && lib=$baselib
+ add_dependency "$lib" "$interp"
+ done
+ fi
+}
+
+add_dependency()
+{
+ local p=`normalize_path $1`
+ # readlink is required for Yocto, so we can use it
+ local path=`readlink -f "$p"`
+ local interp="$2"
+
+ add_file_common "$p" "$path" || return
+
+ if test -x "$path" && is_dynamic_elf "$path"; then
+ add_deps "$path" "$interp"
+ fi
}
add_file ()
{
- local name="$1"
- local path="$1";
- if test -n "$2"; then
- name="$2"
- fi
- test -z "$name" && return
- # ls -H isn't really the same as readlink, but
- # readlink is not portable enough.
- path=`ls -H $path`
- toadd="$name=$path"
- is_contained "$toadd" && return
- if test -z "$silent"; then
- echo "adding file $toadd"
- fi
- target_files="$target_files $toadd"
- if test -x "$path"; then
- # Only call ldd when it makes sense
- if file -L "$path" | grep 'ELF' > /dev/null 2>&1; then
- if ! file -L "$path" | grep 'static' > /dev/null 2>&1; then
- # ldd now outputs ld as /lib/ld-linux.so.xx on current nptl based glibc
- # this regexp parse the outputs like:
- # ldd /usr/bin/gcc
- # linux-gate.so.1 => (0xffffe000)
- # libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
- # /lib/ld-linux.so.2 (0xb7fe8000)
- # covering both situations ( with => and without )
- for lib in `ldd "$path" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`; do
- test -f "$lib" || continue
- # Check wether the same library also exists in the parent directory,
- # and prefer that on the assumption that it is a more generic one.
- local baselib=`echo "$lib" | sed 's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
- test -f "$baselib" && lib=$baselib
- add_file "$lib"
- done
- fi
+ local p=`normalize_path $1`
+ # readlink is required for Yocto, so we can use it
+ local path=`readlink -f "$p"`
+
+ add_file_common "$p" "$path" "$2" || return
+
+ if test -x "$path" && is_dynamic_elf "$path"; then
+ # Request the program interpeter (dynamic loader)
+ interp=`readelf -W -l "$path" | grep "Requesting program interpreter:" | sed "s/\s*\[Requesting program interpreter:\s*\(.*\)\]/\1/g"`
+ print_debug "Interpreter is '$interp'"
+
+ add_deps "$path" "$interp"
fi
- fi
}
-# backward compat
-if test "$1" = "--respect-path"; then
- shift
-fi
-
-#add a --silent switch to avoid "broken pipe" errors when calling this scipt from within OE
-if test "$1" = "--silent"; then
- silent=1
- shift
-fi
-
+while test -n "$1"; do
+ case "$1" in
+ --respect-path)
+ # Ignore for backward compatability
+ ;;
+ --debug)
+ debug=1
+ ;;
+ --log)
+ do_log=1
+ ;;
+ --extra=*)
+ extra_tools="$extra_tools ${1#--extra=}"
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
added_gcc=$1
shift
@@ -76,19 +215,35 @@
shift
archive_name=$1
+if test -n "$do_log"; then
+ log_path="$archive_name.log"
+ rm -f "$log_path"
+fi
+
+if test -z "$PATCHELF"; then
+ PATCHELF=`which patchelf 2> /dev/null`
+fi
+if test -z "$PATCHELF"; then
+ PATCHELF=`which patchelf-uninative 2> /dev/null`
+fi
+if test -z "$PATCHELF"; then
+ print_output "patchelf is required"
+ exit 1
+fi
+
if test -z "$added_gcc" || test -z "$added_gxx" ; then
- echo "usage: $0 <gcc_path> <g++_path>"
- exit 1
+ print_output "usage: $0 <gcc_path> <g++_path>"
+ exit 1
fi
if ! test -x "$added_gcc" ; then
- echo "'$added_gcc' is no executable."
- exit 1
+ print_output "'$added_gcc' is not executable."
+ exit 1
fi
if ! test -x "$added_gxx" ; then
- echo "'$added_gcc' is no executable."
- exit 1
+ print_output "'$added_gcc' is not executable."
+ exit 1
fi
@@ -97,96 +252,131 @@
add_file $added_gxx /usr/bin/g++
if test -z "$added_as" ; then
- add_file /usr/bin/as /usr/bin/as
+ add_file /usr/bin/as /usr/bin/as
else
- if ! test -x "$added_as" ; then
- echo "'$added_as' is no executable."
- exit 1
- fi
+ if ! test -x "$added_as" ; then
+ print_output "'$added_as' is not executable."
+ exit 1
+ fi
- add_file $added_as /usr/bin/as
+ add_file $added_as /usr/bin/as
fi
add_file `$added_gcc -print-prog-name=cc1` /usr/bin/cc1
add_file `$added_gxx -print-prog-name=cc1plus` /usr/bin/cc1plus
specfile=`$added_gcc -print-file-name=specs`
if test -n "$specfile" && test -e "$specfile"; then
- add_file "$specfile"
+ add_file "$specfile"
fi
ltofile=`$added_gcc -print-prog-name=lto1`
-pluginfile="${ltofile%lto1}liblto_plugin.so"
+pluginfile=`normalize_path "${ltofile%lto1}liblto_plugin.so"`
if test -r "$pluginfile"
then
- add_file $pluginfile ${pluginfile#*usr}
- add_file $pluginfile /usr${pluginfile#*usr}
+ add_file $pluginfile ${pluginfile#*usr}
+ add_file $pluginfile /usr${pluginfile#*usr}
fi
+# for testing the environment is usable at all
+if test -x /bin/true; then
+ add_file /bin/true
+elif test -x /usr/bin/true; then
+ add_file /usr/bin/true /bin/true
+else
+ print_output "'true' not found"
+ exit 1
+fi
+
+for extra in $extra_tools; do
+ if test -x "$extra"; then
+ add_file "$extra"
+ else
+ print_output "'$extra' not found"
+ exit 1
+ fi
+done
+
+link_rel ()
+{
+ local target="$1"
+ local name="$2"
+ local base="$3"
+
+ local prefix=`dirname $name`
+
+ prefix=`echo $prefix | sed 's,[^/]\+,..,g' | sed 's,^/*,,g'`
+
+ ln -s $prefix/$target $base/$name
+}
+
tempdir=`mktemp -d /tmp/iceccenvXXXXXX`
-new_target_files=
-for i in $target_files; do
- case $i in
- *=/*)
+target_files=
+for path in $target_paths; do
+ mkdir -p $tempdir/`dirname $path`
+ cp -pH $path $tempdir/$path
+
+ if test -f $tempdir/$path -a -x $tempdir/$path; then
+ strip -s $tempdir/$path 2>/dev/null
+ fi
+
+ fix_rpath $tempdir/$path `dirname $path`
+ target_files="$target_files $path"
+done
+
+for i in $target_aliases; do
target=`echo $i | cut -d= -f1`
- path=`echo $i | cut -d= -f2`
- ;;
- *)
- path=$i
- target=$i
- ;;
- esac
- mkdir -p $tempdir/`dirname $target`
- cp -p $path $tempdir/$target
- if test -f $tempdir/$target -a -x $tempdir/$target; then
- strip -s $tempdir/$target 2>/dev/null
- fi
- target=`echo $target | cut -b2-`
- new_target_files="$new_target_files $target"
+ link_name=`echo $i | cut -d= -f2`
+
+ mkdir -p $tempdir/`dirname $link_name`
+ # Relative links are used because the files are checked for being
+ # executable outside the chroot
+ link_rel $target $link_name $tempdir
+
+ link_name=`echo $link_name | cut -b2-`
+ target_files="$target_files $link_name"
done
#sort the files
-target_files=`for i in $new_target_files; do echo $i; done | sort`
+target_files=`for i in $target_files; do echo $i; done | sort`
#test if an archive name was supplied
#if not use the md5 of all files as the archive name
if test -z "$archive_name"; then
- md5sum=NONE
- for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
- if test -x $file; then
- md5sum=$file
- break
- fi
- done
+ md5sum=NONE
+ for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
+ if test -x $file; then
+ md5sum=$file
+ break
+ fi
+ done
- #calculate md5 and use it as the archive name
- archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
- if test -z "$silent"; then
- echo "Couldn't compute MD5 sum."
- fi
- exit 2
- }
- mydir=`pwd`
-else
- mydir="`dirname "$archive_name"`"
-
- #check if we have a full path or only a filename
- if test "$mydir" = "." ; then
+ #calculate md5 and use it as the archive name
+ archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
+ print_output "Couldn't compute MD5 sum."
+ exit 2
+ }
mydir=`pwd`
- else
- mydir=""
- fi
+else
+ mydir="`dirname "$archive_name"`"
+
+ #check if we have a full path or only a filename
+ if test "$mydir" = "." ; then
+ mydir=`pwd`
+ else
+ mydir=""
+ fi
fi
-if test -z "$silent"; then
-echo "creating $archive_name"
-fi
+print_output "creating $archive_name"
cd $tempdir
-tar -czhf "$mydir/$archive_name" $target_files || {
- if test -z "$silent"; then
- echo "Couldn't create archive"
- fi
- exit 3
+# Add everything in the temp directory. Tar doesn't like to be given files with
+# ".." in them, which frequently happens in $target_files, and will strip off
+# the path prefix past the offending "..". This makes the archive generate
+# incorrectly
+tar -czf "$mydir/$archive_name" . || {
+ print_output "Couldn't create archive"
+ exit 3
}
cd ..
rm -rf $tempdir
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
similarity index 98%
rename from import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
index f8f4aef..053945e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
@@ -12,8 +12,6 @@
DEPENDS = ""
INHIBIT_DEFAULT_DEPS = "1"
-inherit native
-
# This is needed, because otherwise there is dependency loop from quilt-native
# Dependency loop #1 found:
# Task 10907 (meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_install) (dependent Tasks ['quilt-native, do_compile'])
@@ -34,3 +32,5 @@
install -d ${D}/${bindir}
install -m 0755 ${WORKDIR}/icecc-create-env ${D}/${bindir}
}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
new file mode 100644
index 0000000..9476007
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+if [ -z "$ICECC_PATH" ]; then
+ ICECC_PATH=$(which icecc 2> /dev/null)
+fi
+
+if [ -n "$ICECC_PATH" ]; then
+ # Default to disabling the caret workaround. If set to "1", icecc will
+ # locally recompile any files that have warnings, which can adversely
+ # affect performance.
+ #
+ # See: https://github.com/icecc/icecream/issues/190
+ if [ -z "$ICECC_CARET_WORKAROUND" ]; then
+ ICECC_CARET_WORKAROUND="0"
+ fi
+ if [ "$ICECC_CARET_WORKAROUND" != "1" ]; then
+ CFLAGS="$CFLAGS -fno-diagnostics-show-caret"
+ CXXFLAGS="$CXXFLAGS -fno-diagnostics-show-caret"
+ fi
+ export ICECC_PATH ICECC_CARET_WORKAROUND
+ export ICECC_VERSION="$OECORE_NATIVE_SYSROOT/usr/share/icecream/@TOOLCHAIN_ENV@"
+ export ICECC="$(which ${CROSS_COMPILE}gcc)"
+ export ICECXX="$(which ${CROSS_COMPILE}g++)"
+ export ICEAS="$(which ${CROSS_COMPILE}as)"
+ export PATH="$OECORE_NATIVE_SYSROOT/usr/share/icecream/bin:$PATH"
+else
+ echo "Icecc not found. Disabling distributed compiling"
+fi
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
new file mode 100644
index 0000000..0480826
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+# Setup environment
+for env_setup_script in `ls $1/environment-setup-*`; do
+ . $env_setup_script
+done
+
+# ICECC_PATH will have been found icecc-env.sh
+if [ -z "$ICECC_PATH" ]; then
+ exit 0
+fi
+
+echo "Setting up IceCream distributed compiling..."
+
+# Create the environment
+mkdir -p "`dirname $ICECC_VERSION`"
+icecc-create-env $ICECC $ICECXX $ICEAS $ICECC_VERSION || exit $?
+
+# Create symbolic links
+d="$OECORE_NATIVE_SYSROOT/usr/share/icecream/bin"
+mkdir -p "$d"
+ln -s "$ICECC_PATH" "$d/${CROSS_COMPILE}gcc"
+ln -s "$ICECC_PATH" "$d/${CROSS_COMPILE}g++"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
new file mode 100644
index 0000000..9d2750e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
@@ -0,0 +1,38 @@
+# Copyright (c) 2018 Joshua Watt, Garmin International,Inc.
+# Released under the MIT license (see COPYING.MIT for the terms)
+SUMMARY = "Generates Icecream toolchain for SDK"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/icecc-env.sh;beginline=2;endline=20;md5=dd6b68c1efed8a9fb04e409b3b287d47"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "\
+ file://icecc-env.sh \
+ file://icecc-setup.sh \
+ "
+
+inherit nativesdk
+
+ENV_NAME="${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}-${DISTRO_VERSION}.tar.gz"
+
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}${SDKPATHNATIVE}${datadir}/icecream/bin
+
+ install -d ${D}${SDKPATHNATIVE}/environment-setup.d/
+ install -m 0644 ${WORKDIR}/icecc-env.sh ${D}${SDKPATHNATIVE}/environment-setup.d/
+ sed -i ${D}${SDKPATHNATIVE}/environment-setup.d/icecc-env.sh \
+ -e "s,@TOOLCHAIN_ENV@,${ENV_NAME},g"
+
+ install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+ install -m 0755 ${WORKDIR}/icecc-setup.sh ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+ sed -i ${D}${SDKPATHNATIVE}/post-relocate-setup.d/icecc-setup.sh \
+ -e "s,@TOOLCHAIN_ENV@,${ENV_NAME},g"
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${SDKPATHNATIVE}"
+RDEPENDS_${PN} += "nativesdk-icecc-create-env"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
index eb52172..f1049e4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/perl-522-deprecations.patch
@@ -10,9 +10,11 @@
Upstream-Status: Submitted (https://bugs.launchpad.net/intltool/+bug/1465010)
Signed-off-by: Ross Burton <ross.burton@intel.com>
---- intltool-0.51.0-ORIG/intltool-update.in 2015-05-27 00:20:43.038379963 +0200
-+++ intltool-0.51.0/intltool-update.in 2015-05-27 00:23:53.309078052 +0200
-@@ -1062,7 +1062,7 @@
+Index: intltool-0.51.0/intltool-update.in
+===================================================================
+--- intltool-0.51.0.orig/intltool-update.in
++++ intltool-0.51.0/intltool-update.in
+@@ -1062,7 +1062,7 @@ sub SubstituteVariable
}
}
@@ -21,7 +23,7 @@
{
my $rest = $3;
my $untouched = $1;
-@@ -1190,10 +1190,10 @@
+@@ -1190,10 +1190,10 @@ sub FindPackageName
$name =~ s/\(+$//g;
$version =~ s/\(+$//g;
@@ -36,7 +38,7 @@
}
if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
-@@ -1219,11 +1219,11 @@
+@@ -1219,11 +1219,11 @@ sub FindPackageName
$version =~ s/\(+$//g;
$bugurl =~ s/\(+$//g if (defined $bugurl);
@@ -52,4 +54,4 @@
+ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+\}?/);
}
- # \s makes this not work, why?
\ No newline at end of file
+ # \s makes this not work, why?
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch
deleted file mode 100644
index 537be5e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 7b24f8bd95ad4f7d00c93ca2ad998c14a0266dbe Mon Sep 17 00:00:00 2001
-From: marxin <mliska@suse.cz>
-Date: Tue, 21 Mar 2017 08:42:11 +0100
-Subject: [PATCH] Add FALLTHRU comment to handle GCC7 warnings.
-
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- json_object.c | 1 +
- json_tokener.c | 1 +
- linkhash.c | 22 +++++++++++-----------
- 3 files changed, 13 insertions(+), 11 deletions(-)
-
-diff --git a/json_object.c b/json_object.c
-index 6cc73bc..77e8b21 100644
---- a/json_object.c
-+++ b/json_object.c
-@@ -552,6 +552,7 @@ int64_t json_object_get_int64(struct json_object *jso)
- return jso->o.c_boolean;
- case json_type_string:
- if (json_parse_int64(jso->o.c_string.str, &cint) == 0) return cint;
-+ /* FALLTHRU */
- default:
- return 0;
- }
-diff --git a/json_tokener.c b/json_tokener.c
-index 9a76293..ae7b1ae 100644
---- a/json_tokener.c
-+++ b/json_tokener.c
-@@ -305,6 +305,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
- tok->err = json_tokener_error_parse_unexpected;
- goto out;
- }
-+ /* FALLTHRU */
- case '"':
- state = json_tokener_state_string;
- printbuf_reset(tok->pb);
-diff --git a/linkhash.c b/linkhash.c
-index 712c387..74e3b0f 100644
---- a/linkhash.c
-+++ b/linkhash.c
-@@ -376,17 +376,17 @@ static uint32_t hashlittle( const void *key, size_t length, uint32_t initval)
- /*-------------------------------- last block: affect all 32 bits of (c) */
- switch(length) /* all the case statements fall through */
- {
-- case 12: c+=((uint32_t)k[11])<<24;
-- case 11: c+=((uint32_t)k[10])<<16;
-- case 10: c+=((uint32_t)k[9])<<8;
-- case 9 : c+=k[8];
-- case 8 : b+=((uint32_t)k[7])<<24;
-- case 7 : b+=((uint32_t)k[6])<<16;
-- case 6 : b+=((uint32_t)k[5])<<8;
-- case 5 : b+=k[4];
-- case 4 : a+=((uint32_t)k[3])<<24;
-- case 3 : a+=((uint32_t)k[2])<<16;
-- case 2 : a+=((uint32_t)k[1])<<8;
-+ case 12: c+=((uint32_t)k[11])<<24; /* FALLTHRU */
-+ case 11: c+=((uint32_t)k[10])<<16; /* FALLTHRU */
-+ case 10: c+=((uint32_t)k[9])<<8; /* FALLTHRU */
-+ case 9 : c+=k[8]; /* FALLTHRU */
-+ case 8 : b+=((uint32_t)k[7])<<24; /* FALLTHRU */
-+ case 7 : b+=((uint32_t)k[6])<<16; /* FALLTHRU */
-+ case 6 : b+=((uint32_t)k[5])<<8; /* FALLTHRU */
-+ case 5 : b+=k[4]; /* FALLTHRU */
-+ case 4 : a+=((uint32_t)k[3])<<24; /* FALLTHRU */
-+ case 3 : a+=((uint32_t)k[2])<<16; /* FALLTHRU */
-+ case 2 : a+=((uint32_t)k[1])<<8; /* FALLTHRU */
- case 1 : a+=k[0];
- break;
- case 0 : return c;
---
-2.12.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.13.bb
similarity index 75%
rename from import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.13.bb
index 401cf13..06319de 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.13.bb
@@ -5,18 +5,17 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
- file://0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch \
"
-SRC_URI[md5sum] = "55f7853f7d8cf664554ce3fa71bf1c7d"
-SRC_URI[sha256sum] = "2a136451a7932d80b7d197b10441e26e39428d67b1443ec43bbba824705e1123"
+SRC_URI[md5sum] = "11fc5d90c77375e5fc8401e8b9efbf21"
+SRC_URI[sha256sum] = "0316780be9ad16c42d7c26b015a784fd5df4b0909fef0aba51cfb13e492ac24d"
UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+).tar"
# json-c releases page is fetching the list of releases in some weird XML format
# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/
#UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html"
-RECIPE_UPSTREAM_VERSION = "0.12.1"
-RECIPE_UPSTREAM_DATE = "Jun 07, 2016"
-CHECK_DATE = "Apr 19, 2017"
+RECIPE_UPSTREAM_VERSION = "0.13"
+RECIPE_UPSTREAM_DATE = "Dec 07, 2017"
+CHECK_DATE = "Jan 31, 2018"
RPROVIDES_${PN} = "libjson"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
index 280edb7..cbd0362 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
@@ -1,7 +1,8 @@
-From 3012a93745223751cc979e3770207a09a075bec6 Mon Sep 17 00:00:00 2001
+From 2bf0666544293dcfac2f67b678e24353acdcd4e7 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 7 Feb 2017 12:16:03 +0200
-Subject: [PATCH 5/5] Get parameters for both libsolv and libsolvext (libdnf is
+Subject: [PATCH 2/2] Get parameters for both libsolv and libsolvext (libdnf is
+
using both)
Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
@@ -12,12 +13,12 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8b2ab9a..e2d33d7 100644
+index ca280f3..6ab9827 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@ find_package (PkgConfig REQUIRED)
SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
- PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
-PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
@@ -25,5 +26,5 @@
if (ENABLE_RHSM_SUPPORT)
pkg_check_modules (RHSM REQUIRED librhsm)
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
index 1ea9310..6cf48a4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
@@ -1,7 +1,8 @@
-From 55cbe6f40fe0836385e1a7241ec811cbe99e5840 Mon Sep 17 00:00:00 2001
+From bcea5c5063a2d5f07dbe6f40aee30370fc4ba656 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:24:50 +0200
-Subject: [PATCH 4/5] Set libsolv variables with pkg-config (cmake's own module
+Subject: [PATCH 1/2] Set libsolv variables with pkg-config (cmake's own module
+
doesn't work properly).
Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
@@ -12,12 +13,12 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a75df04..8b2ab9a 100644
+index 8875bbf..ca280f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,8 @@ find_package (PkgConfig REQUIRED)
SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
- PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
-find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext)
+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
@@ -26,5 +27,5 @@
pkg_check_modules (RHSM REQUIRED librhsm)
include_directories (${RHSM_INCLUDE_DIRS})
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb
similarity index 95%
rename from import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb
index 01d9346..4fc1d6d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.11.1.bb
@@ -10,7 +10,7 @@
file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
"
-SRCREV = "1b19950e82d88eec28d01b4e7c1da712c941201d"
+SRCREV = "60f979bd8db651229c559c1412f1eb880257127d"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
deleted file mode 100644
index 08a58f1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 36d87919223db9b054862ad38cdda8d9222a2bab Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 30 Dec 2016 18:04:35 +0200
-Subject: [PATCH 1/4] Correctly set the library installation directory
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- librepo/CMakeLists.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/librepo/CMakeLists.txt b/librepo/CMakeLists.txt
-index 2fe76d8..5026def 100644
---- a/librepo/CMakeLists.txt
-+++ b/librepo/CMakeLists.txt
-@@ -60,7 +60,8 @@ CONFIGURE_FILE("version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.h" @ONLY)
- IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
- SET (LIB_SUFFIX "64")
- ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
--SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
-+#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
-+SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
-
- INSTALL(FILES ${librepo_HEADERS} DESTINATION include/librepo)
- INSTALL(TARGETS librepo LIBRARY DESTINATION ${LIB_INSTALL_DIR})
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
index 7138dfc..d69deb5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
@@ -1,41 +1,62 @@
-From 1570ad33dd7e5d83f3ee80bd104b114709ac1e34 Mon Sep 17 00:00:00 2001
+From 5b6849d9d7e030c3a521b5245d86f853b0271a61 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:05:36 +0200
-Subject: [PATCH 2/4] Do not try to obtain PYTHON_INSTALL_DIR by running
+Subject: [PATCH 1/2] Do not try to obtain PYTHON_INSTALL_DIR by running
python.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
- librepo/python/python2/CMakeLists.txt | 2 +-
- librepo/python/python3/CMakeLists.txt | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ librepo/python/python2/CMakeLists.txt | 12 ++++++------
+ librepo/python/python3/CMakeLists.txt | 12 ++++++------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/librepo/python/python2/CMakeLists.txt b/librepo/python/python2/CMakeLists.txt
-index 3615e17..cffa99f 100644
+index 5ffbd62..90d3c22 100644
--- a/librepo/python/python2/CMakeLists.txt
+++ b/librepo/python/python2/CMakeLists.txt
-@@ -1,6 +1,6 @@
+@@ -1,11 +1,11 @@
FIND_PACKAGE (PythonLibs 2 )
FIND_PACKAGE (PythonInterp 2 REQUIRED)
--EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
-+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+-from sys import stdout
+-from distutils import sysconfig
+-path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+-stdout.write(path)"
+-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
++#from sys import stdout
++#from distutils import sysconfig
++#path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
++#stdout.write(path)"
++#OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
diff --git a/librepo/python/python3/CMakeLists.txt b/librepo/python/python3/CMakeLists.txt
-index dfecac9..38bcc72 100644
+index 47559f7..b39adc2 100644
--- a/librepo/python/python3/CMakeLists.txt
+++ b/librepo/python/python3/CMakeLists.txt
-@@ -10,7 +10,7 @@ message("--- ${PYTHON_INCLUDE_DIR}")
+@@ -10,12 +10,12 @@ message("--- ${PYTHON_INCLUDE_DIR}")
FIND_PACKAGE(PythonLibs 3.0)
FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
--EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
-+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+-from sys import stdout
+-from distutils import sysconfig
+-path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+-stdout.write(path)"
+-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
++#from sys import stdout
++#from distutils import sysconfig
++#path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
++#stdout.write(path)"
++#OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
MESSAGE(STATUS "Python3 install dir is ${PYTHON_INSTALL_DIR}")
--
-2.11.0
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
deleted file mode 100644
index 89ca60e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b1a5c92dbd1d11f1afdc094fccea64de334d2783 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 30 Dec 2016 18:06:24 +0200
-Subject: [PATCH 3/4] tests: fix a race when deleting temporary directories
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- tests/python/tests/test_yum_repo_downloading.py | 2 +-
- tests/python/tests/test_yum_repo_locating.py | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/python/tests/test_yum_repo_downloading.py b/tests/python/tests/test_yum_repo_downloading.py
-index ad597dc..4a32519 100644
---- a/tests/python/tests/test_yum_repo_downloading.py
-+++ b/tests/python/tests/test_yum_repo_downloading.py
-@@ -32,7 +32,7 @@ class TestCaseYumRepoDownloading(TestCaseWithFlask):
- os.environ.pop('GNUPGHOME')
- else:
- os.environ['GNUPGHOME'] = self._gnupghome
-- shutil.rmtree(self.tmpdir)
-+ shutil.rmtree(self.tmpdir, True)
-
- def test_download_repo_01(self):
- h = librepo.Handle()
-diff --git a/tests/python/tests/test_yum_repo_locating.py b/tests/python/tests/test_yum_repo_locating.py
-index 8f4bea5..db4294c 100644
---- a/tests/python/tests/test_yum_repo_locating.py
-+++ b/tests/python/tests/test_yum_repo_locating.py
-@@ -34,7 +34,7 @@ class TestCaseYumRepoLocating(TestCase):
- os.environ.pop('GNUPGHOME')
- else:
- os.environ['GNUPGHOME'] = self._gnupghome
-- shutil.rmtree(self.tmpdir)
-+ shutil.rmtree(self.tmpdir, True)
-
- def test_read_mirrorlist(self):
- h = librepo.Handle()
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch
deleted file mode 100644
index b0c7d1c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a4bbbccce6edc1a2d1bd475506e2975fd7696c88 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 8 Jun 2017 16:31:30 +0800
-Subject: [PATCH] Fix typo: correct LRO_SSLVERIFYHOST with
- CURLOPT_SSL_VERIFYHOST
-
-In commit 51d32c6cd88ba0139c32793183fd6a236c1ef456
----
-Author: Tomas Mlcoch <tmlcoch@redhat.com>
-Date: Mon May 5 14:31:35 2014 +0200
-
- Add LRO_SSLVERIFYPEER and LRO_SSLVERIFYHOST options (RhBug: 1093014)
----
-
-It incorrectly setopt CURLOPT_SSL_VERIFYPEER for LRO_SSLVERIFYHOST.
-Use CURLOPT_SSL_VERIFYHOST to correct.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- librepo/handle.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/librepo/handle.c b/librepo/handle.c
-index ccea79b..ff39db4 100644
---- a/librepo/handle.c
-+++ b/librepo/handle.c
-@@ -629,7 +629,7 @@ lr_handle_setopt(LrHandle *handle,
-
- case LRO_SSLVERIFYHOST:
- handle->sslverifyhost = va_arg(arg, long) ? 2 : 0;
-- c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYPEER, handle->sslverifyhost);
-+ c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYHOST, handle->sslverifyhost);
- break;
-
- case LRO_SSLCLIENTCERT:
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_1.8.1.bb
similarity index 60%
rename from import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_1.8.1.bb
index 3238b14..4569885 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_1.8.1.bb
@@ -3,23 +3,19 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
SRC_URI = "git://github.com/rpm-software-management/librepo.git \
- file://0001-Correctly-set-the-library-installation-directory.patch \
file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \
- file://0003-tests-fix-a-race-when-deleting-temporary-directories.patch \
file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
- file://0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch \
"
-PV = "1.7.20+git${SRCPV}"
-SRCREV = "e1137cbbda78fecb192146300790680a5bc811b1"
+SRCREV = "7b9b7bf388f3f059529c6f50c40b30919fef30f9"
S = "${WORKDIR}/git"
-DEPENDS = "curl expat glib-2.0 openssl attr libcheck gpgme"
+DEPENDS = "curl expat glib-2.0 openssl attr gpgme"
inherit cmake distutils3-base pkgconfig
-EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF"
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
new file mode 100644
index 0000000..2809e4c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
@@ -0,0 +1,41 @@
+From 7f7743ce233fcd735ec580c75270413493658aa6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 19 Apr 2018 18:08:31 -0700
+Subject: [PATCH] Disable generating a native llvm-config
+
+OpenEmbedded already builds this as part of llvm-native
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tools/llvm-config/CMakeLists.txt | 16 ----------------
+ 1 file changed, 16 deletions(-)
+
+diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
+index 25f99cec978..c45e9b642a8 100644
+--- a/tools/llvm-config/CMakeLists.txt
++++ b/tools/llvm-config/CMakeLists.txt
+@@ -63,19 +63,3 @@ endif()
+
+ # Add the dependency on the generation step.
+ add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH})
+-
+-if(CMAKE_CROSSCOMPILING)
+- set(${project}_LLVM_CONFIG_EXE "${LLVM_NATIVE_BUILD}/bin/llvm-config")
+- set(${project}_LLVM_CONFIG_EXE ${${project}_LLVM_CONFIG_EXE} PARENT_SCOPE)
+-
+- add_custom_command(OUTPUT "${${project}_LLVM_CONFIG_EXE}"
+- COMMAND ${CMAKE_COMMAND} --build . --target llvm-config --config $<CONFIGURATION>
+- DEPENDS ${LLVM_NATIVE_BUILD}/CMakeCache.txt
+- WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
+- COMMENT "Building native llvm-config..."
+- USES_TERMINAL)
+- add_custom_target(${project}NativeLLVMConfig DEPENDS ${${project}_LLVM_CONFIG_EXE})
+- add_dependencies(${project}NativeLLVMConfig CONFIGURE_LLVM_NATIVE)
+-
+- add_dependencies(llvm-config ${project}NativeLLVMConfig)
+-endif(CMAKE_CROSSCOMPILING)
+--
+2.17.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
index e251799..209764c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -1,4 +1,4 @@
-From 28293e48cf1a52004c6a78de448718441f9e05f9 Mon Sep 17 00:00:00 2001
+From 96558c4f25d5132936014f6f2d6252cfdfdf478a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 21 May 2016 00:33:20 +0000
Subject: [PATCH 1/2] llvm: TargetLibraryInfo: Undefine libc functions if they
@@ -15,10 +15,10 @@
1 file changed, 21 insertions(+)
diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def
-index 9cbe917c146..aff8419cf54 100644
+index a461ed813b9..f9fd9faeee0 100644
--- a/include/llvm/Analysis/TargetLibraryInfo.def
+++ b/include/llvm/Analysis/TargetLibraryInfo.def
-@@ -656,6 +656,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
+@@ -665,6 +665,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
TLI_DEFINE_ENUM_INTERNAL(fopen)
TLI_DEFINE_STRING_INTERNAL("fopen")
/// FILE *fopen64(const char *filename, const char *opentype)
@@ -28,7 +28,7 @@
TLI_DEFINE_ENUM_INTERNAL(fopen64)
TLI_DEFINE_STRING_INTERNAL("fopen64")
/// int fprintf(FILE *stream, const char *format, ...);
-@@ -691,6 +694,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
+@@ -700,6 +703,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
/// int fseeko(FILE *stream, off_t offset, int whence);
TLI_DEFINE_ENUM_INTERNAL(fseeko)
TLI_DEFINE_STRING_INTERNAL("fseeko")
@@ -38,7 +38,7 @@
/// int fseeko64(FILE *stream, off64_t offset, int whence)
TLI_DEFINE_ENUM_INTERNAL(fseeko64)
TLI_DEFINE_STRING_INTERNAL("fseeko64")
-@@ -701,6 +707,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
+@@ -710,6 +716,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
TLI_DEFINE_ENUM_INTERNAL(fstat)
TLI_DEFINE_STRING_INTERNAL("fstat")
/// int fstat64(int filedes, struct stat64 *buf)
@@ -48,7 +48,7 @@
TLI_DEFINE_ENUM_INTERNAL(fstat64)
TLI_DEFINE_STRING_INTERNAL("fstat64")
/// int fstatvfs(int fildes, struct statvfs *buf);
-@@ -716,6 +725,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
+@@ -725,6 +734,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
TLI_DEFINE_ENUM_INTERNAL(ftello)
TLI_DEFINE_STRING_INTERNAL("ftello")
/// off64_t ftello64(FILE *stream)
@@ -58,7 +58,7 @@
TLI_DEFINE_ENUM_INTERNAL(ftello64)
TLI_DEFINE_STRING_INTERNAL("ftello64")
/// int ftrylockfile(FILE *file);
-@@ -836,6 +848,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
+@@ -845,6 +857,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
TLI_DEFINE_ENUM_INTERNAL(lstat)
TLI_DEFINE_STRING_INTERNAL("lstat")
/// int lstat64(const char *path, struct stat64 *buf);
@@ -68,7 +68,7 @@
TLI_DEFINE_ENUM_INTERNAL(lstat64)
TLI_DEFINE_STRING_INTERNAL("lstat64")
/// void *malloc(size_t size);
-@@ -1055,6 +1070,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
+@@ -1064,6 +1079,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
TLI_DEFINE_ENUM_INTERNAL(stat)
TLI_DEFINE_STRING_INTERNAL("stat")
/// int stat64(const char *path, struct stat64 *buf);
@@ -78,7 +78,7 @@
TLI_DEFINE_ENUM_INTERNAL(stat64)
TLI_DEFINE_STRING_INTERNAL("stat64")
/// int statvfs(const char *path, struct statvfs *buf);
-@@ -1184,6 +1202,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
+@@ -1193,6 +1211,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
TLI_DEFINE_ENUM_INTERNAL(tmpfile)
TLI_DEFINE_STRING_INTERNAL("tmpfile")
/// FILE *tmpfile64(void)
@@ -89,5 +89,5 @@
TLI_DEFINE_STRING_INTERNAL("tmpfile64")
/// int toascii(int c);
--
-2.13.1
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
index 832bd72..21d2f81 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
@@ -1,4 +1,4 @@
-From d776487bac17650704614248d19d1e6b35775001 Mon Sep 17 00:00:00 2001
+From 2f8ea767afdaa440c6368040630e1b3ea6a0977a Mon Sep 17 00:00:00 2001
From: Martin Kelly <mkelly@xevo.com>
Date: Fri, 19 May 2017 00:22:57 -0700
Subject: [PATCH 2/2] llvm: allow env override of exe path
@@ -35,5 +35,5 @@
// allow taking the address of ::main however.
void *P = (void *)(intptr_t)GetExecutablePath;
--
-2.13.1
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
index f06fa49..cb3bba6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
@@ -8,7 +8,7 @@
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=e825e017edc35cfd58e26116e5251771"
-DEPENDS = "libffi libxml2-native zlib ninja-native llvm-native"
+DEPENDS = "libffi libxml2 zlib ninja-native llvm-native"
RDEPENDS_${PN}_append_class-target = " ncurses-terminfo"
@@ -19,14 +19,16 @@
LLVM_RELEASE = "${PV}"
LLVM_DIR = "llvm${LLVM_RELEASE}"
-SRCREV = "9a5c333388cbb54a0ce3a67c4f539f5e590a089b"
-PV = "5.0"
+SRCREV = "089d4c0c490687db6c75f1d074e99c4d42936a50"
+PV = "6.0"
+BRANCH = "release_60"
PATCH_VERSION = "0"
-SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=release_50;protocol=http \
+SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=${BRANCH};protocol=http \
file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
file://0002-llvm-allow-env-override-of-exe-path.patch \
+ file://0001-Disable-generating-a-native-llvm-config.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
@@ -84,15 +86,15 @@
}
do_compile() {
- NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE}
+ ninja -v ${PARALLEL_MAKE}
}
do_compile_class-native() {
- NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
+ ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
}
do_install() {
- NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
+ DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config
install -d ${D}${bindir}/${LLVM_DIR}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc
index d7c8648..ee8bee4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-1.4.18.inc
@@ -1,22 +1,29 @@
-require m4.inc
+SUMMARY = "Traditional Unix macro processor"
+HOMEPAGE = "https://www.gnu.org/software/m4/m4.html"
+DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 \
+compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
+GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
-EXTRA_OECONF += "--without-libsigsegv-prefix"
+inherit autotools texinfo
+
+SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
+ file://ac_config_links.patch \
+ file://remove-gets.patch \
+ "
+
+SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
+
+SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
+SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede"
-SRC_URI += "file://ac_config_links.patch \
- file://remove-gets.patch \
- "
-
-SRC_URI_append_class-target = "\
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-
# Fix "Argument list too long" error when len(TMPDIR) = 410
acpaths = "-I ./m4"
-SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
-SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
+EXTRA_OECONF += "--without-libsigsegv-prefix"
+
+EXTRA_OEMAKE += "'infodir=${infodir}'"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
index 06d8aa2..407ad89 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
@@ -11,3 +11,4 @@
oe_runconf
}
+UPSTREAM_CHECK_URI = "${GNU_MIRROR}/m4/"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc
deleted file mode 100644
index 2002594..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-SUMMARY = "Traditional Unix macro processor"
-HOMEPAGE = "https://www.gnu.org/software/m4/m4.html"
-DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 \
-compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
-GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
-
-inherit autotools texinfo
-
-EXTRA_OEMAKE += "'infodir=${infodir}'"
-SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
index 275c0b2..71edf59 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
@@ -14,10 +14,11 @@
2009-11-10 Esben Haabendal <eha@doredevelopment.dk>
-diff -urN m4-1.4.13.orig/configure m4-1.4.13/configure
---- m4-1.4.13.orig/configure 2009-11-10 10:54:00.301707097 +0100
-+++ m4-1.4.13/configure 2009-11-10 10:54:17.314206379 +0100
-@@ -14860,8 +14860,8 @@
+Index: m4-1.4.18/configure
+===================================================================
+--- m4-1.4.18.orig/configure
++++ m4-1.4.18/configure
+@@ -24415,8 +24415,8 @@ $as_echo "#define GNULIB_TEST_GETTIMEOFD
# only, it does not matter if we skip the link with older autoconf.
# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
# builds, so use a shell variable to bypass this.
@@ -27,4 +28,4 @@
+ # ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
-
+ :
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc b/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc
index 849b742..b8905bc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make.inc
@@ -5,7 +5,10 @@
HOMEPAGE = "http://www.gnu.org/software/make/"
SECTION = "devel"
-SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2"
+SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2 \
+ file://0001-glob-Do-not-assume-glibc-glob-internals.patch \
+ file://0002-glob-Do-not-assume-glibc-glob-internals.patch \
+ "
inherit autotools gettext pkgconfig texinfo
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
new file mode 100644
index 0000000..2b6e4d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0001-glob-Do-not-assume-glibc-glob-internals.patch
@@ -0,0 +1,70 @@
+From c90a7dda6c572f79b8e78da44b6ebf8704edef65 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 24 Sep 2017 09:12:58 -0400
+Subject: [PATCH 1/2] glob: Do not assume glibc glob internals.
+
+It has been proposed that glibc glob start using gl_lstat,
+which the API allows it to do. GNU 'make' should not get in
+the way of this. See:
+https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
+
+* dir.c (local_lstat): New function, like local_stat.
+(dir_setup_glob): Use it to initialize gl_lstat too, as the API
+requires.
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ dir.c | 29 +++++++++++++++++++++++++++--
+ 1 file changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/dir.c b/dir.c
+index f34bbf5..12eef30 100644
+--- a/dir.c
++++ b/dir.c
+@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf)
+ }
+ #endif
+
++/* Similarly for lstat. */
++#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
++# ifndef VMS
++# ifndef HAVE_SYS_STAT_H
++int lstat (const char *path, struct stat *sbuf);
++# endif
++# else
++ /* We are done with the fake lstat. Go back to the real lstat */
++# ifdef lstat
++# undef lstat
++# endif
++# endif
++# define local_lstat lstat
++#elif defined(WINDOWS32)
++/* Windows doesn't support lstat(). */
++# define local_lstat local_stat
++#else
++static int
++local_lstat (const char *path, struct stat *buf)
++{
++ int e;
++ EINTRLOOP (e, lstat (path, buf));
++ return e;
++}
++#endif
++
+ void
+ dir_setup_glob (glob_t *gl)
+ {
+ gl->gl_opendir = open_dirstream;
+ gl->gl_readdir = read_dirstream;
+ gl->gl_closedir = free;
++ gl->gl_lstat = local_lstat;
+ gl->gl_stat = local_stat;
+- /* We don't bother setting gl_lstat, since glob never calls it.
+- The slot is only there for compatibility with 4.4 BSD. */
+ }
+
+ void
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
new file mode 100644
index 0000000..d49acd9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make/0002-glob-Do-not-assume-glibc-glob-internals.patch
@@ -0,0 +1,38 @@
+From 9858702dbd1e137262c06765919937660879f63c Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 24 Sep 2017 09:12:58 -0400
+Subject: [PATCH 2/2] glob: Do not assume glibc glob internals.
+
+It has been proposed that glibc glob start using gl_lstat,
+which the API allows it to do. GNU 'make' should not get in
+the way of this. See:
+https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
+
+* dir.c (local_lstat): New function, like local_stat.
+(dir_setup_glob): Use it to initialize gl_lstat too, as the API
+requires.
+---
+Upstream-Status: Backport
+
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 64ec870..e87901c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -399,10 +399,9 @@ AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
+ #include <glob.h>
+ #include <fnmatch.h>
+
+-#define GLOB_INTERFACE_VERSION 1
+ #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
+ # include <gnu-versions.h>
+-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
++if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
+ gnu glob
+ # endif
+ #endif],
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch
new file mode 100644
index 0000000..97778c3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch
@@ -0,0 +1,30 @@
+From 4676224dbdff0f7107e8cbdbe0eab19c855f1454 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 17 Nov 2017 13:18:28 +0200
+Subject: [PATCH] Linker rules: move {cross_args} in front of {output_args}
+
+The previous order was found to break linking in some cases
+(e.g. when -no-pic -fno-PIC was present in {cross_args}.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/backend/ninjabackend.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
+index bb281e1..969b70e 100644
+--- a/mesonbuild/backend/ninjabackend.py
++++ b/mesonbuild/backend/ninjabackend.py
+@@ -1501,7 +1501,7 @@ int dummy;
+ rspfile_content = $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing
+ '''
+ else:
+- command_template = ' command = {executable} $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing\n'
++ command_template = ' command = {executable} $ARGS {cross_args} {output_args} $in $LINK_ARGS $aliasing\n'
+ command = command_template.format(
+ executable=' '.join(compiler.get_linker_exelist()),
+ cross_args=' '.join(cross_args),
+--
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
new file mode 100644
index 0000000..1912e94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
@@ -0,0 +1,113 @@
+From c5692cac9c555664281377a82bf8b1e46934f437 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:16:41 +0300
+Subject: [PATCH 1/3] gtkdoc: fix issues that arise when cross-compiling
+
+Specifically:
+1) Make it possible to specify a wrapper for executing binaries
+(usually, some kind of target hardware emulator, such as qemu)
+2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will
+try to guess them, incorrectly.
+3) If things break down, print the full command with arguments,
+not just the binary name.
+4) Correctly determine the compiler/linker executables and cross-options when cross-compiling
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/gnome.py | 18 +++++++++++++++---
+ mesonbuild/scripts/gtkdochelper.py | 9 +++++++--
+ 2 files changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 56765a5..4f7fe30 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -769,6 +769,10 @@ This will become a hard error in the future.''')
+ '--mode=' + mode]
+ if namespace:
+ args.append('--namespace=' + namespace)
++ gtkdoc_exe_wrapper = state.environment.cross_info.config["properties"].get('gtkdoc_exe_wrapper', None)
++ if gtkdoc_exe_wrapper is not None:
++ args.append('--gtkdoc-exe-wrapper=' + gtkdoc_exe_wrapper)
++
+ args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
+ args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
+ args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs)
+@@ -796,14 +800,22 @@ This will become a hard error in the future.''')
+ raise MesonException(
+ 'Gir include dirs should be include_directories().')
+ cflags.update(get_include_args(inc_dirs))
++
++ cross_c_args = " ".join(state.environment.cross_info.config["properties"].get('c_args', ""))
++ cross_link_args = " ".join(state.environment.cross_info.config["properties"].get('c_link_args', ""))
++
+ if cflags:
+- args += ['--cflags=%s' % ' '.join(cflags)]
++ args += ['--cflags=%s %s' % (cross_c_args,' '.join(cflags))]
+ if ldflags:
+- args += ['--ldflags=%s' % ' '.join(ldflags)]
++ args += ['--ldflags=%s %s' % (cross_link_args, ' '.join(ldflags))]
+ compiler = state.environment.coredata.compilers.get('c')
+- if compiler:
++ cross_compiler = state.environment.coredata.cross_compilers.get('c')
++ if compiler and not state.environment.is_cross_build():
+ args += ['--cc=%s' % ' '.join(compiler.get_exelist())]
+ args += ['--ld=%s' % ' '.join(compiler.get_linker_exelist())]
++ elif cross_compiler and state.environment.is_cross_build():
++ args += ['--cc=%s' % ' '.join(cross_compiler.get_exelist())]
++ args += ['--ld=%s' % ' '.join(cross_compiler.get_linker_exelist())]
+
+ return args
+
+diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
+index 4406b28..b846827 100644
+--- a/mesonbuild/scripts/gtkdochelper.py
++++ b/mesonbuild/scripts/gtkdochelper.py
+@@ -44,13 +44,14 @@ parser.add_argument('--ignore-headers', dest='ignore_headers', default='')
+ parser.add_argument('--namespace', dest='namespace', default='')
+ parser.add_argument('--mode', dest='mode', default='')
+ parser.add_argument('--installdir', dest='install_dir')
++parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper')
+
+ def gtkdoc_run_check(cmd, cwd):
+ # Put stderr into stdout since we want to print it out anyway.
+ # This preserves the order of messages.
+ p, out = Popen_safe(cmd, cwd=cwd, stderr=subprocess.STDOUT)[0:2]
+ if p.returncode != 0:
+- err_msg = ["{!r} failed with status {:d}".format(cmd[0], p.returncode)]
++ err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)]
+ if out:
+ err_msg.append(out)
+ raise MesonException('\n'.join(err_msg))
+@@ -58,7 +59,7 @@ def gtkdoc_run_check(cmd, cwd):
+ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
+ main_file, module,
+ html_args, scan_args, fixxref_args, mkdb_args,
+- gobject_typesfile, scanobjs_args, ld, cc, ldflags, cflags,
++ gobject_typesfile, scanobjs_args, gtkdoc_exe_wrapper, ld, cc, ldflags, cflags,
+ html_assets, content_files, ignore_headers, namespace,
+ expand_content_files, mode):
+ print("Building documentation for %s" % module)
+@@ -111,6 +112,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
+ if gobject_typesfile:
+ scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + ['--types=' + gobject_typesfile,
+ '--module=' + module,
++ '--run=' + gtkdoc_exe_wrapper,
++ '--cc=' + cc,
++ '--ld=' + ld,
+ '--cflags=' + cflags,
+ '--ldflags=' + ldflags,
+ '--ld=' + ld]
+@@ -207,6 +211,7 @@ def run(args):
+ mkdbargs,
+ options.gobject_typesfile,
+ scanobjsargs,
++ options.gtkdoc_exe_wrapper,
+ options.ld,
+ options.cc,
+ options.ldflags,
+--
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
new file mode 100644
index 0000000..ded42d1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
@@ -0,0 +1,42 @@
+From 972667e0d789a6969a5d79249404f3539f891810 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:18:47 +0300
+Subject: [PATCH 1/2] gobject-introspection: determine g-ir-scanner and
+ g-ir-compiler paths from pkgconfig
+
+Do not hardcode the name of those binaries; gobject-introspection
+provides them via pkgconfig, and they can be set to something else
+(for example when cross-compiling).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/gnome.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 4f7fe30..9610cf6 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -390,8 +390,6 @@ class GnomeModule(ExtensionModule):
+ raise MesonException('Gir takes one argument')
+ if kwargs.get('install_dir'):
+ raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
+- giscanner = find_program('g-ir-scanner', 'Gir')
+- gicompiler = find_program('g-ir-compiler', 'Gir')
+ girtarget = args[0]
+ while hasattr(girtarget, 'held_object'):
+ girtarget = girtarget.held_object
+@@ -402,6 +400,8 @@ class GnomeModule(ExtensionModule):
+ self.gir_dep = PkgConfigDependency('gobject-introspection-1.0',
+ state.environment,
+ {'native': True})
++ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
++ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
+ pkgargs = self.gir_dep.get_compile_args()
+ except Exception:
+ raise MesonException('gobject-introspection dependency was not found, gir cannot be generated.')
+--
+2.15.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
new file mode 100644
index 0000000..af5e6a1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
@@ -0,0 +1,114 @@
+From ffa72eac56558aa4171dd70ac1e9c27a07338fa2 Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Wed, 15 Nov 2017 15:05:01 +0100
+Subject: [PATCH 4/4] native_bindir
+
+Some libraries, like QT, have pre-processors that convert their input
+files into something that the cross-compiler can process. We find the
+path of those pre-processors via pkg-config-native instead of
+pkg-config.
+
+This path forces the use of pkg-config-native for host_bins arguments.
+
+There are some discussions upstream to merge this patch, but I presonaly believe
+that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+
+---
+ mesonbuild/dependencies/base.py | 16 ++++++++++------
+ mesonbuild/dependencies/ui.py | 6 +++---
+ 2 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
+index bf79bc5..c9fd08c 100644
+--- a/mesonbuild/dependencies/base.py
++++ b/mesonbuild/dependencies/base.py
+@@ -131,7 +131,7 @@ class Dependency:
+ def need_threads(self):
+ return False
+
+- def get_pkgconfig_variable(self, variable_name, kwargs):
++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+ raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
+
+ def get_configtool_variable(self, variable_name):
+@@ -150,7 +150,7 @@ class InternalDependency(Dependency):
+ self.sources = sources
+ self.ext_deps = ext_deps
+
+- def get_pkgconfig_variable(self, variable_name, kwargs):
++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+ raise DependencyException('Method "get_pkgconfig_variable()" is '
+ 'invalid for an internal dependency')
+
+@@ -425,10 +425,14 @@ class PkgConfigDependency(ExternalDependency):
+ return s.format(self.__class__.__name__, self.name, self.is_found,
+ self.version_reqs)
+
+- def _call_pkgbin(self, args, env=None):
++ def _call_pkgbin(self, args, env=None, use_native=False):
+ if not env:
+ env = os.environ
+- p, out = Popen_safe([self.pkgbin] + args, env=env)[0:2]
++ if use_native:
++ pkgbin = [self.pkgbin + "-native"]
++ else:
++ pkgbin = [self.pkgbin]
++ p, out = Popen_safe(pkgbin + args, env=env)[0:2]
+ return p.returncode, out.strip()
+
+ def _convert_mingw_paths(self, args):
+@@ -522,7 +526,7 @@ class PkgConfigDependency(ExternalDependency):
+ # linkers such as MSVC, so prepend them.
+ self.link_args = ['-L' + lp for lp in libpaths] + self.link_args
+
+- def get_pkgconfig_variable(self, variable_name, kwargs):
++ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
+ options = ['--variable=' + variable_name, self.name]
+
+ if 'define_variable' in kwargs:
+@@ -535,7 +539,7 @@ class PkgConfigDependency(ExternalDependency):
+
+ options = ['--define-variable=' + '='.join(definition)] + options
+
+- ret, out = self._call_pkgbin(options)
++ ret, out = self._call_pkgbin(options, use_native=use_native)
+ variable = ''
+ if ret != 0:
+ if self.required:
+diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
+index 1db518c..4ed1d04 100644
+--- a/mesonbuild/dependencies/ui.py
++++ b/mesonbuild/dependencies/ui.py
+@@ -239,7 +239,7 @@ class QtBaseDependency(ExternalDependency):
+ self.bindir = self.get_pkgconfig_host_bins(core)
+ if not self.bindir:
+ # If exec_prefix is not defined, the pkg-config file is broken
+- prefix = core.get_pkgconfig_variable('exec_prefix', {})
++ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True)
+ if prefix:
+ self.bindir = os.path.join(prefix, 'bin')
+
+@@ -359,7 +359,7 @@ class Qt4Dependency(QtBaseDependency):
+ applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
+ for application in applications:
+ try:
+- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}))
++ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True))
+ except MesonException:
+ pass
+
+@@ -369,7 +369,7 @@ class Qt5Dependency(QtBaseDependency):
+ QtBaseDependency.__init__(self, 'qt5', env, kwargs)
+
+ def get_pkgconfig_host_bins(self, core):
+- return core.get_pkgconfig_variable('host_bins', {})
++ return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
+
+
+ # There are three different ways of depending on SDL2:
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/meson/meson_0.44.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson_0.44.1.bb
new file mode 100644
index 0000000..6a81dab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/meson/meson_0.44.1.bb
@@ -0,0 +1,21 @@
+HOMEPAGE = "http://mesonbuild.com"
+SUMMARY = "A high performance build system"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar.gz \
+ file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
+ file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
+ file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \
+ file://0003-native_bindir.patch \
+ "
+SRC_URI[md5sum] = "82b1198bf714b5a4da84bfe8376c79cc"
+SRC_URI[sha256sum] = "2ea1a721574adb23160b6481191bcc1173f374e02b0ff3bb0ae85d988d97e4fa"
+UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
+
+inherit setuptools3
+
+RDEPENDS_${PN} = "ninja python3-core python3-modules"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c
deleted file mode 100644
index cb6faa8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c
+++ /dev/null
@@ -1,348 +0,0 @@
-0xfc, 0xfa, 0xa3, 0x9c, 0x02, 0x01, 0x00, 0x89, 0x1d, 0xa0, 0x02, 0x01, 0x00, 0x83, 0xfc, 0x00,
-0x74, 0x09, 0x8b, 0x44, 0x24, 0x04, 0xa3, 0xa4, 0x02, 0x01, 0x00, 0x8b, 0x25, 0x80, 0x14, 0x01,
-0x00, 0x6a, 0x00, 0x9d, 0x31, 0xc0, 0xbf, 0xb8, 0x15, 0x01, 0x00, 0xb9, 0x44, 0x58, 0x01, 0x00,
-0x29, 0xf9, 0xfc, 0xf3, 0xaa, 0xbe, 0xba, 0x02, 0x01, 0x00, 0xbf, 0x00, 0x10, 0x02, 0x00, 0xb9,
-0x70, 0x00, 0x00, 0x00, 0xf3, 0xa4, 0x0f, 0x01, 0x15, 0xb4, 0x02, 0x01, 0x00, 0x0f, 0x01, 0x1d,
-0xae, 0x02, 0x01, 0x00, 0xb8, 0x18, 0x00, 0x00, 0x00, 0x8e, 0xd8, 0x8e, 0xc0, 0x8e, 0xe0, 0x8e,
-0xe8, 0x8e, 0xd0, 0x68, 0x90, 0x14, 0x01, 0x00, 0xff, 0x35, 0xa4, 0x02, 0x01, 0x00, 0xff, 0x35,
-0xa0, 0x02, 0x01, 0x00, 0xff, 0x35, 0x9c, 0x02, 0x01, 0x00, 0xe8, 0xe3, 0x08, 0x00, 0x00, 0x89,
-0xc6, 0x83, 0xc4, 0x10, 0x6a, 0x00, 0x9d, 0x31, 0xdb, 0xa1, 0xac, 0x14, 0x01, 0x00, 0x83, 0xf8,
-0x01, 0x74, 0x13, 0x31, 0xc0, 0x31, 0xc9, 0x31, 0xd2, 0x31, 0xff, 0x31, 0xed, 0x6a, 0x10, 0xa1,
-0xa8, 0x14, 0x01, 0x00, 0x50, 0xcb, 0x89, 0xf0, 0xbe, 0x2a, 0x03, 0x01, 0x00, 0xbf, 0x00, 0x20,
-0x02, 0x00, 0xb9, 0x20, 0x00, 0x00, 0x00, 0xf3, 0xa4, 0x89, 0xc6, 0x0f, 0x01, 0x15, 0x2a, 0x03,
-0x01, 0x00, 0x31, 0xc0, 0x0f, 0xba, 0xe8, 0x05, 0x0f, 0x22, 0xe0, 0xbf, 0x00, 0x30, 0x02, 0x00,
-0x31, 0xc0, 0xb9, 0x00, 0x18, 0x00, 0x00, 0xf3, 0xab, 0xbf, 0x00, 0x30, 0x02, 0x00, 0x8d, 0x87,
-0x07, 0x10, 0x00, 0x00, 0x89, 0x07, 0xbf, 0x00, 0x40, 0x02, 0x00, 0x8d, 0x87, 0x07, 0x10, 0x00,
-0x00, 0xb9, 0x04, 0x00, 0x00, 0x00, 0x89, 0x07, 0x05, 0x00, 0x10, 0x00, 0x00, 0x83, 0xc7, 0x08,
-0x49, 0x75, 0xf3, 0xbf, 0x00, 0x50, 0x02, 0x00, 0xb8, 0x83, 0x01, 0x00, 0x00, 0xb9, 0x00, 0x08,
-0x00, 0x00, 0x89, 0x07, 0x05, 0x00, 0x00, 0x20, 0x00, 0x83, 0xc7, 0x08, 0x49, 0x75, 0xf3, 0xb8,
-0x00, 0x30, 0x02, 0x00, 0x0f, 0x22, 0xd8, 0xb9, 0x80, 0x00, 0x00, 0xc0, 0x0f, 0x32, 0x0f, 0xba,
-0xe8, 0x08, 0x0f, 0x30, 0x6a, 0x10, 0xa1, 0xa8, 0x14, 0x01, 0x00, 0x50, 0x31, 0xc0, 0x0f, 0xba,
-0xe8, 0x1f, 0x0f, 0xba, 0xe8, 0x00, 0x0f, 0x22, 0xc0, 0xcb, 0x55, 0x89, 0xe5, 0x53, 0x56, 0x57,
-0x8b, 0x7d, 0x08, 0x81, 0xef, 0x00, 0x00, 0x01, 0x00, 0x8b, 0x75, 0x0c, 0x56, 0xe8, 0xfc, 0x00,
-0x00, 0x00, 0x66, 0x31, 0xdb, 0x66, 0xb8, 0x20, 0xe8, 0x00, 0x00, 0x66, 0xba, 0x50, 0x41, 0x4d,
-0x53, 0x66, 0xb9, 0x14, 0x00, 0x00, 0x00, 0xcd, 0x15, 0x72, 0x18, 0x66, 0x3d, 0x50, 0x41, 0x4d,
-0x53, 0x75, 0x10, 0x66, 0x4e, 0x66, 0x85, 0xf6, 0x74, 0x09, 0x83, 0xc7, 0x14, 0x66, 0x83, 0xfb,
-0x00, 0x75, 0xd2, 0x66, 0xe8, 0x82, 0x00, 0x00, 0x00, 0x58, 0x29, 0xf0, 0x5f, 0x5e, 0x5b, 0x89,
-0xec, 0x5d, 0xc3, 0x53, 0x56, 0x57, 0xe8, 0xb3, 0x00, 0x00, 0x00, 0xf9, 0x31, 0xc9, 0x31, 0xd2,
-0xb8, 0x01, 0xe8, 0xcd, 0x15, 0x72, 0x28, 0x83, 0xf9, 0x00, 0x75, 0x09, 0x83, 0xfa, 0x00, 0x75,
-0x04, 0x89, 0xc1, 0x89, 0xda, 0x66, 0x81, 0xe2, 0xff, 0xff, 0x00, 0x00, 0x66, 0xc1, 0xe2, 0x06,
-0x66, 0x89, 0xd0, 0x66, 0x81, 0xe1, 0xff, 0xff, 0x00, 0x00, 0x66, 0x01, 0xc8, 0xeb, 0x03, 0x66,
-0x31, 0xc0, 0x66, 0xe8, 0x33, 0x00, 0x00, 0x00, 0x5f, 0x5e, 0x5b, 0xc3, 0x53, 0x56, 0x57, 0xe8,
-0x6a, 0x00, 0x00, 0x00, 0xb4, 0x88, 0xcd, 0x15, 0x66, 0x25, 0xff, 0xff, 0x00, 0x00, 0x66, 0xe8,
-0x17, 0x00, 0x00, 0x00, 0x5f, 0x5e, 0x5b, 0xc3, 0xe8, 0x51, 0x00, 0x00, 0x00, 0xcd, 0x12, 0x89,
-0xc1, 0x66, 0xe8, 0x04, 0x00, 0x00, 0x00, 0x66, 0x89, 0xc8, 0xc3, 0xfa, 0x2e, 0x67, 0x0f, 0x01,
-0x15, 0xb4, 0x02, 0x00, 0x00, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xc8, 0x01, 0x0f, 0x22, 0xc0, 0x66,
-0xea, 0x37, 0x02, 0x01, 0x00, 0x10, 0x00, 0xb8, 0x18, 0x00, 0x00, 0x00, 0x8e, 0xd8, 0x8e, 0xc0,
-0x8e, 0xd0, 0x81, 0xc4, 0x00, 0x00, 0x01, 0x00, 0x31, 0xc0, 0x8e, 0xe0, 0x8e, 0xe8, 0x58, 0x05,
-0x00, 0x00, 0x01, 0x00, 0x50, 0x2e, 0x0f, 0x01, 0x1d, 0xae, 0x02, 0x01, 0x00, 0xc3, 0x58, 0x2d,
-0x00, 0x00, 0x01, 0x00, 0x50, 0x81, 0xec, 0x00, 0x00, 0x01, 0x00, 0xea, 0x72, 0x02, 0x00, 0x00,
-0x08, 0x00, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xe0, 0xfe, 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x84, 0x02,
-0x00, 0x00, 0x00, 0x10, 0x8c, 0xc8, 0x8e, 0xd8, 0x8e, 0xc0, 0x8e, 0xd0, 0x8e, 0xe0, 0x8e, 0xe8,
-0x2e, 0x67, 0x0f, 0x01, 0x1d, 0xa8, 0x02, 0x00, 0x00, 0xfb, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x9b, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a,
-0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x93,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a,
-0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0x20, 0x00, 0x00, 0x20, 0x02, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a,
-0xaf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0x55, 0x89, 0xc1, 0x89, 0xe5, 0xba,
-0xfd, 0x03, 0x00, 0x00, 0xec, 0xa8, 0x20, 0x74, 0xfb, 0xba, 0xf8, 0x03, 0x00, 0x00, 0x88, 0xc8,
-0xee, 0xba, 0xfd, 0x03, 0x00, 0x00, 0xec, 0xa8, 0x40, 0x74, 0xfb, 0x5d, 0xc3, 0x55, 0x83, 0xf8,
-0x0a, 0x89, 0xe5, 0x53, 0x89, 0xc3, 0x75, 0x0a, 0xb8, 0x0d, 0x00, 0x00, 0x00, 0xe8, 0xc8, 0xff,
-0xff, 0xff, 0x89, 0xd8, 0x5b, 0x5d, 0xeb, 0xc2, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec,
-0x44, 0x8d, 0x5d, 0x0c, 0x8b, 0x7d, 0x08, 0x0f, 0xbe, 0x07, 0x84, 0xc0, 0x0f, 0x84, 0x68, 0x01,
-0x00, 0x00, 0x3c, 0x25, 0x74, 0x0d, 0xe8, 0xc2, 0xff, 0xff, 0xff, 0x89, 0x7d, 0xbc, 0xe9, 0x4e,
-0x01, 0x00, 0x00, 0x8d, 0x47, 0x01, 0x89, 0x45, 0xbc, 0x8a, 0x47, 0x01, 0x3c, 0x73, 0x75, 0x1a,
-0x89, 0xd8, 0x83, 0xc3, 0x04, 0x8b, 0x30, 0x0f, 0xbe, 0x06, 0x84, 0xc0, 0x0f, 0x84, 0x2f, 0x01,
-0x00, 0x00, 0xe8, 0x96, 0xff, 0xff, 0xff, 0x46, 0xeb, 0xed, 0x3c, 0x4c, 0x75, 0x0d, 0x8d, 0x47,
-0x02, 0xbe, 0x3c, 0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x38, 0x3c, 0x6c, 0x75, 0x0d, 0x8d,
-0x47, 0x02, 0xbe, 0x1c, 0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x27, 0xbe, 0x1c, 0x00, 0x00,
-0x00, 0x3c, 0x68, 0x75, 0x1e, 0x80, 0x7f, 0x02, 0x68, 0x74, 0x0d, 0x8d, 0x47, 0x02, 0xbe, 0x0c,
-0x00, 0x00, 0x00, 0x89, 0x45, 0xbc, 0xeb, 0x0b, 0x8d, 0x47, 0x03, 0xbe, 0x04, 0x00, 0x00, 0x00,
-0x89, 0x45, 0xbc, 0x8b, 0x45, 0xbc, 0x8a, 0x00, 0x88, 0xc2, 0x83, 0xca, 0x20, 0x80, 0xfa, 0x78,
-0x75, 0x5b, 0x8b, 0x13, 0x83, 0xfe, 0x1c, 0x7e, 0x0e, 0x8b, 0x4b, 0x04, 0x89, 0x55, 0xb0, 0x89,
-0x4d, 0xb4, 0x83, 0xc3, 0x08, 0xeb, 0x0b, 0x31, 0xc9, 0x89, 0x55, 0xb0, 0x89, 0x4d, 0xb4, 0x83,
-0xc3, 0x04, 0x83, 0xe0, 0x20, 0x8d, 0x7d, 0xc8, 0x88, 0x45, 0xbb, 0x89, 0xf1, 0x8b, 0x55, 0xb4,
-0x8b, 0x45, 0xb0, 0x0f, 0xad, 0xd0, 0xd3, 0xea, 0xf6, 0xc1, 0x20, 0x74, 0x02, 0x89, 0xd0, 0x83,
-0xe0, 0x0f, 0x8a, 0x55, 0xbb, 0x47, 0x0a, 0x90, 0x14, 0x10, 0x01, 0x00, 0x88, 0x57, 0xff, 0x83,
-0xe9, 0x04, 0x79, 0xd9, 0xc1, 0xee, 0x02, 0x8d, 0x74, 0x35, 0xc9, 0xeb, 0x62, 0x3c, 0x64, 0x75,
-0x4a, 0x8b, 0x03, 0x83, 0xfe, 0x1c, 0x7e, 0x05, 0x83, 0xc3, 0x08, 0xeb, 0x03, 0x83, 0xc3, 0x04,
-0x8d, 0x4d, 0xc8, 0x85, 0xc0, 0x79, 0x09, 0xc6, 0x45, 0xc8, 0x2d, 0x8d, 0x4d, 0xc9, 0xf7, 0xd8,
-0x89, 0xce, 0xbf, 0x0a, 0x00, 0x00, 0x00, 0x99, 0x46, 0xf7, 0xff, 0x83, 0xc2, 0x30, 0x85, 0xc0,
-0x88, 0x56, 0xff, 0x75, 0xf2, 0x89, 0xf0, 0x48, 0x39, 0xc1, 0x73, 0x23, 0x0f, 0xb6, 0x38, 0x8a,
-0x11, 0x41, 0x88, 0x10, 0x89, 0xfa, 0x88, 0x51, 0xff, 0xeb, 0xec, 0x3c, 0x63, 0x75, 0x0a, 0x8b,
-0x03, 0x83, 0xc3, 0x04, 0x88, 0x45, 0xc8, 0xeb, 0x03, 0x88, 0x45, 0xc8, 0x8d, 0x75, 0xc9, 0x8d,
-0x7d, 0xc8, 0x39, 0xf7, 0x73, 0x0b, 0x0f, 0xbe, 0x07, 0x47, 0xe8, 0x6e, 0xfe, 0xff, 0xff, 0xeb,
-0xf1, 0x8b, 0x7d, 0xbc, 0x47, 0xe9, 0x8d, 0xfe, 0xff, 0xff, 0x83, 0xc4, 0x44, 0x5b, 0x5e, 0x5f,
-0x5d, 0xc3, 0x55, 0x31, 0xc9, 0x89, 0xe5, 0x56, 0x53, 0x31, 0xdb, 0x83, 0xec, 0x10, 0x39, 0xd3,
-0x74, 0x23, 0x0f, 0xb6, 0x34, 0x18, 0xf6, 0xc3, 0x01, 0x74, 0x03, 0xc1, 0xe6, 0x08, 0x01, 0xf1,
-0x81, 0xf9, 0xff, 0xff, 0x00, 0x00, 0x76, 0x0a, 0x89, 0xce, 0xc1, 0xee, 0x10, 0x01, 0xf1, 0x0f,
-0xb7, 0xc9, 0x43, 0xeb, 0xd9, 0x88, 0x4d, 0xf6, 0xc1, 0xe9, 0x08, 0x88, 0x4d, 0xf7, 0x0f, 0xb7,
-0x45, 0xf6, 0x83, 0xc4, 0x10, 0x5b, 0x5e, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x89,
-0xc3, 0x51, 0x89, 0x55, 0xf0, 0x3b, 0x5d, 0xf0, 0x73, 0x5f, 0x81, 0x3b, 0x4c, 0x42, 0x49, 0x4f,
-0x74, 0x05, 0x83, 0xc3, 0x10, 0xeb, 0xee, 0x83, 0x7b, 0x04, 0x18, 0x75, 0xf5, 0xba, 0x18, 0x00,
-0x00, 0x00, 0x89, 0xd8, 0xe8, 0x89, 0xff, 0xff, 0xff, 0xf7, 0xd0, 0x66, 0x85, 0xc0, 0x75, 0xe2,
-0x8d, 0x73, 0x18, 0x8b, 0x53, 0x0c, 0x89, 0xf0, 0xe8, 0x75, 0xff, 0xff, 0xff, 0xf7, 0xd0, 0x0f,
-0xb7, 0xc0, 0x39, 0x43, 0x10, 0x75, 0xcb, 0x8b, 0x4b, 0x0c, 0x31, 0xc0, 0x01, 0xf1, 0x39, 0xf1,
-0x76, 0x10, 0x89, 0xcf, 0x8b, 0x56, 0x04, 0x29, 0xf7, 0x39, 0xfa, 0x77, 0x05, 0x40, 0x01, 0xd6,
-0xeb, 0xec, 0x39, 0x43, 0x14, 0x75, 0xab, 0xeb, 0x02, 0x31, 0xdb, 0x5a, 0x89, 0xd8, 0x5b, 0x5e,
-0x5f, 0x5d, 0xc3, 0x55, 0xba, 0x00, 0x10, 0x00, 0x00, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x89, 0xc3,
-0x31, 0xc0, 0x51, 0xe8, 0x71, 0xff, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x17, 0xba, 0x00, 0x00, 0x10,
-0x00, 0xb8, 0x00, 0x00, 0x0f, 0x00, 0xe8, 0x5e, 0xff, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x04, 0x31,
-0xc0, 0xeb, 0x2f, 0x8b, 0x50, 0x04, 0x01, 0xc2, 0x83, 0x3a, 0x11, 0x75, 0x16, 0x8b, 0x72, 0x08,
-0x89, 0xf2, 0x89, 0xf0, 0x81, 0xc2, 0x00, 0x10, 0x00, 0x00, 0xe8, 0x3a, 0xff, 0xff, 0xff, 0x85,
-0xc0, 0x74, 0xdc, 0x89, 0x43, 0x28, 0xc7, 0x43, 0x24, 0x01, 0x00, 0x00, 0x00, 0xb8, 0x01, 0x00,
-0x00, 0x00, 0x5a, 0x5b, 0x5e, 0x5f, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec,
-0x14, 0x89, 0x55, 0xe8, 0x8b, 0x75, 0x0c, 0x8b, 0x5d, 0x08, 0x89, 0x75, 0xe4, 0x89, 0x4d, 0xec,
-0x0f, 0xb6, 0xb0, 0xe8, 0x01, 0x00, 0x00, 0x89, 0x5d, 0xe0, 0x8b, 0x7d, 0x10, 0x83, 0xfe, 0x1f,
-0x7f, 0x32, 0x89, 0xf3, 0x6b, 0xf6, 0x14, 0x01, 0xc6, 0x43, 0x89, 0x96, 0xd0, 0x02, 0x00, 0x00,
-0x89, 0x8e, 0xd4, 0x02, 0x00, 0x00, 0x8b, 0x55, 0xe0, 0x8b, 0x4d, 0xe4, 0x89, 0x96, 0xd8, 0x02,
-0x00, 0x00, 0x89, 0x8e, 0xdc, 0x02, 0x00, 0x00, 0x89, 0xbe, 0xe0, 0x02, 0x00, 0x00, 0x88, 0x98,
-0xe8, 0x01, 0x00, 0x00, 0x4f, 0x75, 0x65, 0x8b, 0x5d, 0xe0, 0x8b, 0x75, 0xe4, 0x03, 0x5d, 0xe8,
-0x13, 0x75, 0xec, 0x89, 0xd9, 0x89, 0xf3, 0xbe, 0xff, 0xff, 0x3f, 0x00, 0x81, 0xfb, 0xff, 0x03,
-0x00, 0x00, 0x77, 0x13, 0x0f, 0xac, 0xd9, 0x0a, 0x89, 0xce, 0x81, 0xf9, 0xff, 0xff, 0x3f, 0x00,
-0x76, 0x05, 0xbe, 0xff, 0xff, 0x3f, 0x00, 0x8b, 0xb8, 0xe0, 0x01, 0x00, 0x00, 0x8d, 0x97, 0x00,
-0x04, 0x00, 0x00, 0x39, 0xf2, 0x73, 0x25, 0x8d, 0x96, 0x00, 0xfc, 0xff, 0xff, 0x89, 0x90, 0xe0,
-0x01, 0x00, 0x00, 0x81, 0xfa, 0xff, 0xff, 0x00, 0x00, 0x77, 0x0b, 0x66, 0x81, 0xee, 0x00, 0x04,
-0x66, 0x89, 0x70, 0x02, 0xeb, 0x06, 0x66, 0xc7, 0x40, 0x02, 0x00, 0xfc, 0x83, 0xc4, 0x14, 0x5b,
-0x5e, 0x5f, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0xec, 0x5d, 0xc3, 0x55, 0x89, 0xe5,
-0x8b, 0x55, 0x08, 0x66, 0xed, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0xed, 0x5d, 0xc3,
-0x55, 0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b, 0x55, 0x0c, 0xee, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b,
-0x45, 0x08, 0x8b, 0x55, 0x0c, 0x66, 0xef, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b,
-0x55, 0x0c, 0xef, 0x5d, 0xc3, 0x55, 0x31, 0xc0, 0x89, 0xe5, 0x8b, 0x55, 0x08, 0x3b, 0x45, 0x0c,
-0x74, 0x09, 0x80, 0x3c, 0x02, 0x00, 0x74, 0x03, 0x40, 0xeb, 0xf2, 0x5d, 0xc3, 0x55, 0x31, 0xd2,
-0x89, 0xe5, 0x8b, 0x45, 0x08, 0x8b, 0x4d, 0x0c, 0x3b, 0x55, 0x10, 0x74, 0x06, 0x88, 0x0c, 0x10,
-0x42, 0xeb, 0xf5, 0x5d, 0xc3, 0x55, 0x31, 0xd2, 0x89, 0xe5, 0x53, 0x8b, 0x45, 0x08, 0x8b, 0x4d,
-0x0c, 0x3b, 0x55, 0x10, 0x74, 0x09, 0x8a, 0x1c, 0x11, 0x88, 0x1c, 0x10, 0x42, 0xeb, 0xf2, 0x5b,
-0x5d, 0xc3, 0x55, 0x31, 0xc9, 0x89, 0xe5, 0x3b, 0x4d, 0x10, 0x74, 0x17, 0x8b, 0x45, 0x08, 0x0f,
-0xb6, 0x10, 0x8b, 0x45, 0x0c, 0x0f, 0xb6, 0x00, 0x38, 0xc2, 0x74, 0x04, 0x29, 0xd0, 0xeb, 0x05,
-0x41, 0xeb, 0xe4, 0x31, 0xc0, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x8b, 0x45, 0x08,
-0x68, 0x00, 0x01, 0x00, 0x00, 0x8b, 0x4d, 0x10, 0x8d, 0x98, 0x00, 0x08, 0x00, 0x00, 0x53, 0xe8,
-0x71, 0xff, 0xff, 0xff, 0x01, 0xc3, 0x5e, 0x81, 0xf9, 0xfe, 0x00, 0x00, 0x00, 0x5f, 0x8d, 0x73,
-0x01, 0xc6, 0x03, 0x20, 0x7e, 0x05, 0xb9, 0xff, 0x00, 0x00, 0x00, 0x51, 0xff, 0x75, 0x0c, 0xe8,
-0x51, 0xff, 0xff, 0xff, 0x5a, 0x59, 0x50, 0xff, 0x75, 0x0c, 0x89, 0xc7, 0x56, 0xe8, 0x73, 0xff,
-0xff, 0xff, 0x83, 0xc4, 0x0c, 0xc6, 0x44, 0x3b, 0x01, 0x00, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f,
-0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x8b, 0x45, 0x10, 0x8b, 0x55, 0x0c, 0x89, 0x45, 0x0c, 0x8b, 0x45,
-0x08, 0x89, 0x55, 0x10, 0x8b, 0x40, 0x10, 0x89, 0x45, 0x08, 0x5d, 0xeb, 0x8a, 0x55, 0x89, 0xe5,
-0x57, 0x56, 0x53, 0x8b, 0x5d, 0x08, 0x68, 0x00, 0x10, 0x00, 0x00, 0x6a, 0x00, 0xff, 0x73, 0x10,
-0xe8, 0x18, 0xff, 0xff, 0xff, 0x8b, 0x43, 0x10, 0xc7, 0x40, 0x0e, 0x19, 0x01, 0x10, 0x00, 0xc7,
-0x00, 0x00, 0x19, 0x00, 0x00, 0xc7, 0x40, 0x04, 0x00, 0x00, 0x00, 0x50, 0xc6, 0x80, 0xe8, 0x01,
-0x00, 0x00, 0x00, 0x8d, 0xb8, 0x00, 0x08, 0x00, 0x00, 0x66, 0xc7, 0x40, 0x0a, 0x00, 0x00, 0xc7,
-0x40, 0x20, 0x3f, 0xa3, 0x00, 0x08, 0x89, 0xb8, 0x28, 0x02, 0x00, 0x00, 0x8b, 0x43, 0x0c, 0x68,
-0xff, 0x00, 0x00, 0x00, 0x8d, 0x48, 0x28, 0x51, 0xe8, 0xb8, 0xfe, 0xff, 0xff, 0x5a, 0x5e, 0x89,
-0xc6, 0x50, 0x51, 0x57, 0xe8, 0xdc, 0xfe, 0xff, 0xff, 0x8b, 0x43, 0x10, 0x83, 0xc0, 0x40, 0xc6,
-0x84, 0x30, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x6a, 0x40, 0x6a, 0x00, 0x50, 0xe8, 0xac, 0xfe, 0xff,
-0xff, 0x83, 0xc4, 0x24, 0x8b, 0x43, 0x10, 0x83, 0xe8, 0x80, 0x6a, 0x20, 0x6a, 0x00, 0x50, 0xe8,
-0x99, 0xfe, 0xff, 0xff, 0x8b, 0x53, 0x0c, 0x8b, 0x43, 0x10, 0x05, 0x02, 0x02, 0x00, 0x00, 0x8b,
-0x4a, 0x14, 0x66, 0x8b, 0x52, 0x16, 0x66, 0x89, 0x48, 0xf6, 0x66, 0x89, 0x50, 0xfa, 0x66, 0xc7,
-0x80, 0x9e, 0xfe, 0xff, 0xff, 0x00, 0x00, 0xc7, 0x40, 0xde, 0x00, 0x00, 0x00, 0x00, 0x66, 0xc7,
-0x80, 0x00, 0xfe, 0xff, 0xff, 0x00, 0x00, 0x66, 0xc7, 0x40, 0xf0, 0xff, 0xff, 0xc6, 0x40, 0xfd,
-0x00, 0x6a, 0x04, 0x68, 0x25, 0x10, 0x01, 0x00, 0x50, 0xe8, 0x67, 0xfe, 0xff, 0xff, 0x8b, 0x43,
-0x10, 0x66, 0xc7, 0x80, 0x10, 0x02, 0x00, 0x00, 0x50, 0x00, 0x83, 0xc4, 0x18, 0x8b, 0x4b, 0x0c,
-0x66, 0xc7, 0x80, 0x06, 0x02, 0x00, 0x00, 0x01, 0x02, 0xc7, 0x80, 0x18, 0x02, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xc7, 0x80, 0x1c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8b, 0x51, 0x24,
-0x85, 0xd2, 0x74, 0x0f, 0x8b, 0x49, 0x20, 0x89, 0x90, 0x1c, 0x02, 0x00, 0x00, 0x89, 0x88, 0x18,
-0x02, 0x00, 0x00, 0xc7, 0x43, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f,
-0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x57, 0x56, 0x53, 0x83, 0xec, 0x4c, 0xc7, 0x45, 0xc8, 0x00, 0x00,
-0x02, 0x00, 0x8b, 0x45, 0x08, 0x89, 0x45, 0xb8, 0x8b, 0x45, 0x0c, 0x89, 0x45, 0xbc, 0x8b, 0x45,
-0x10, 0x89, 0x45, 0xc0, 0x8b, 0x45, 0x14, 0x89, 0x45, 0xc4, 0x8d, 0x45, 0xb8, 0x50, 0xe8, 0x9a,
-0xfe, 0xff, 0xff, 0x8b, 0x45, 0xb8, 0x59, 0x3d, 0x02, 0xb0, 0xad, 0x2b, 0x75, 0x09, 0xc7, 0x45,
-0xcc, 0x01, 0x00, 0x00, 0x00, 0xeb, 0x21, 0x31, 0xf6, 0x3d, 0x07, 0xb0, 0x11, 0x0a, 0x75, 0x2c,
-0x8b, 0x45, 0xbc, 0x8b, 0x10, 0xe8, 0x58, 0xfb, 0xff, 0xff, 0xf7, 0xd0, 0x66, 0x85, 0xc0, 0x75,
-0x0e, 0xc7, 0x45, 0xd0, 0x01, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x00, 0x00, 0x00, 0xeb, 0x0d, 0x50,
-0x68, 0x2a, 0x10, 0x01, 0x00, 0xe8, 0xae, 0xf9, 0xff, 0xff, 0x58, 0x5a, 0x31, 0xdb, 0x81, 0x7d,
-0xb8, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x03, 0x8b, 0x5d, 0xbc, 0x8b, 0x45, 0xc0, 0x85, 0xc0, 0x74,
-0x0a, 0x81, 0x38, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x02, 0x89, 0xc3, 0x85, 0xf6, 0x0f, 0x85, 0xce,
-0x00, 0x00, 0x00, 0x85, 0xdb, 0x0f, 0x84, 0xc6, 0x00, 0x00, 0x00, 0x66, 0x83, 0x7b, 0x08, 0x00,
-0x74, 0x0f, 0x8b, 0x53, 0x04, 0x89, 0xd8, 0xe8, 0xf6, 0xfa, 0xff, 0xff, 0xf7, 0xd0, 0x0f, 0xb7,
-0xf0, 0x8b, 0x4b, 0x04, 0x8d, 0x43, 0x0c, 0x01, 0xd9, 0x31, 0xff, 0x89, 0x4d, 0xb4, 0x39, 0x45,
-0xb4, 0x76, 0x1f, 0x8b, 0x08, 0x8b, 0x50, 0x04, 0x83, 0xc1, 0x03, 0x83, 0xc2, 0x03, 0x83, 0xe1,
-0xfc, 0x83, 0xe2, 0xfc, 0x8d, 0x54, 0x11, 0x0c, 0x01, 0xd0, 0x39, 0x45, 0xb4, 0x72, 0x03, 0x47,
-0xeb, 0xdc, 0x81, 0x3b, 0x07, 0xb0, 0x1f, 0x0e, 0x75, 0x1b, 0x85, 0xf6, 0x75, 0x17, 0x0f, 0xb7,
-0x43, 0x0a, 0x39, 0xf8, 0x75, 0x0f, 0xc7, 0x45, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x89, 0x5d, 0xc0,
-0xe9, 0x95, 0x00, 0x00, 0x00, 0x50, 0x68, 0x4d, 0x10, 0x01, 0x00, 0xe8, 0x08, 0xf9, 0xff, 0xff,
-0x56, 0x68, 0x67, 0x10, 0x01, 0x00, 0xe8, 0xfd, 0xf8, 0xff, 0xff, 0x57, 0x68, 0x79, 0x10, 0x01,
-0x00, 0xe8, 0xf2, 0xf8, 0xff, 0xff, 0x53, 0x68, 0x8b, 0x10, 0x01, 0x00, 0xe8, 0xe7, 0xf8, 0xff,
-0xff, 0x83, 0xc4, 0x20, 0xff, 0x73, 0x04, 0x68, 0x9d, 0x10, 0x01, 0x00, 0xe8, 0xd7, 0xf8, 0xff,
-0xff, 0xff, 0x33, 0x68, 0xaf, 0x10, 0x01, 0x00, 0xe8, 0xcb, 0xf8, 0xff, 0xff, 0x0f, 0xb7, 0x43,
-0x0a, 0x50, 0x68, 0xc1, 0x10, 0x01, 0x00, 0xe8, 0xbc, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x18, 0xeb,
-0x04, 0x85, 0xf6, 0x75, 0x35, 0x51, 0x68, 0xd3, 0x10, 0x01, 0x00, 0xe8, 0xa8, 0xf8, 0xff, 0xff,
-0xff, 0x75, 0xb8, 0x68, 0xee, 0x10, 0x01, 0x00, 0xe8, 0x9b, 0xf8, 0xff, 0xff, 0xff, 0x75, 0xbc,
-0x68, 0xf7, 0x10, 0x01, 0x00, 0xe8, 0x8e, 0xf8, 0xff, 0xff, 0xff, 0x75, 0xc0, 0x68, 0x00, 0x11,
-0x01, 0x00, 0xe8, 0x81, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x20, 0xc7, 0x45, 0xd8, 0x00, 0x00, 0x00,
-0x00, 0xc7, 0x45, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7d, 0xd4, 0x00, 0x0f, 0x84, 0xfc, 0x00,
-0x00, 0x00, 0x8b, 0x7d, 0xc0, 0x8d, 0x57, 0x0c, 0x03, 0x7f, 0x04, 0x39, 0xd7, 0x76, 0x51, 0x8b,
-0x32, 0x8b, 0x5a, 0x04, 0x89, 0x5d, 0xb4, 0x83, 0xc3, 0x03, 0x8d, 0x4e, 0x03, 0x83, 0xe3, 0xfc,
-0x83, 0xe1, 0xfc, 0x8d, 0x42, 0x0c, 0x01, 0xcb, 0x01, 0xc3, 0x39, 0xdf, 0x72, 0x32, 0x83, 0x7a,
-0x08, 0x01, 0x75, 0x28, 0x85, 0xf6, 0x75, 0x24, 0x89, 0x55, 0xb0, 0x89, 0x4d, 0xac, 0x52, 0x6a,
-0x00, 0x6a, 0x00, 0x50, 0xe8, 0x29, 0xfc, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x89, 0xc6, 0x85, 0xc0,
-0x8b, 0x55, 0xb0, 0x8b, 0x4d, 0xac, 0x0f, 0x84, 0x1d, 0x04, 0x00, 0x00, 0x89, 0xda, 0xeb, 0xab,
-0x31, 0xd2, 0x31, 0xff, 0x31, 0xf6, 0x85, 0xd2, 0x0f, 0x95, 0xc3, 0xf7, 0xc6, 0x01, 0x00, 0x00,
-0x00, 0x75, 0x34, 0x84, 0xdb, 0x74, 0x30, 0x31, 0xf6, 0x83, 0x7a, 0x04, 0x0a, 0x75, 0x28, 0x89,
-0x55, 0xb4, 0x50, 0x6a, 0x0a, 0x68, 0x35, 0x11, 0x01, 0x00, 0x57, 0xe8, 0xe2, 0xfb, 0xff, 0xff,
-0x83, 0xc4, 0x10, 0x8b, 0x55, 0xb4, 0x85, 0xc0, 0x75, 0x0d, 0x8d, 0x45, 0xb8, 0xe8, 0x11, 0xfa,
-0xff, 0xff, 0x8b, 0x55, 0xb4, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x0f, 0x84, 0xdb, 0x74, 0x0b, 0x31,
-0xc0, 0x83, 0x7a, 0x04, 0x00, 0x0f, 0x94, 0xc0, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x25, 0x84, 0xdb,
-0x74, 0x21, 0x83, 0x7a, 0x04, 0x01, 0x75, 0x1b, 0x50, 0x6a, 0x01, 0x68, 0x66, 0x10, 0x01, 0x00,
-0x57, 0xe8, 0x9c, 0xfb, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x85, 0xc0, 0x0f, 0x94, 0xc0, 0x0f, 0xb6,
-0xc0, 0x89, 0xc6, 0x85, 0xf6, 0x75, 0x13, 0x84, 0xdb, 0x74, 0x0f, 0x57, 0x68, 0x0a, 0x11, 0x01,
-0x00, 0xe8, 0x72, 0xf7, 0xff, 0xff, 0x5f, 0x58, 0xeb, 0x04, 0x85, 0xf6, 0x75, 0x13, 0x8d, 0x45,
-0xb8, 0xe8, 0xad, 0xf9, 0xff, 0xff, 0x85, 0xc0, 0x75, 0x07, 0xc7, 0x45, 0xd8, 0x01, 0x00, 0x00,
-0x00, 0x51, 0x68, 0x25, 0x11, 0x01, 0x00, 0xe8, 0x4c, 0xf7, 0xff, 0xff, 0x5b, 0x83, 0x7d, 0xdc,
-0x00, 0x5e, 0x74, 0x0d, 0x50, 0x68, 0x34, 0x11, 0x01, 0x00, 0xe8, 0x39, 0xf7, 0xff, 0xff, 0x58,
-0x5a, 0x83, 0x7d, 0xd8, 0x00, 0x74, 0x0d, 0x53, 0x68, 0x3f, 0x11, 0x01, 0x00, 0xe8, 0x26, 0xf7,
-0xff, 0xff, 0x5e, 0x5f, 0x50, 0x68, 0x65, 0x10, 0x01, 0x00, 0xe8, 0x19, 0xf7, 0xff, 0xff, 0x5a,
-0x83, 0x7d, 0xdc, 0x00, 0x59, 0x75, 0x31, 0x83, 0x7d, 0xd8, 0x00, 0x0f, 0x84, 0x16, 0x01, 0x00,
-0x00, 0x50, 0x50, 0x6a, 0x20, 0x68, 0xc4, 0x55, 0x01, 0x00, 0xe8, 0xbb, 0xf4, 0xff, 0xff, 0xbb,
-0xc0, 0x55, 0x01, 0x00, 0xa3, 0xc0, 0x55, 0x01, 0x00, 0x83, 0xc4, 0x10, 0xc7, 0x45, 0xb4, 0x00,
-0x00, 0x00, 0x00, 0xe9, 0xaa, 0x00, 0x00, 0x00, 0x8b, 0x45, 0xe0, 0x8d, 0x58, 0x18, 0x8b, 0x48,
-0x0c, 0x01, 0xd9, 0x89, 0x4d, 0xb4, 0x39, 0x5d, 0xb4, 0x76, 0xbc, 0x8b, 0x55, 0xb4, 0x8b, 0x43,
-0x04, 0x29, 0xda, 0x39, 0xd0, 0x77, 0xb0, 0x83, 0x3b, 0x01, 0x75, 0x4f, 0x83, 0xe8, 0x08, 0xb9,
-0x14, 0x00, 0x00, 0x00, 0x31, 0xd2, 0x8d, 0x73, 0x08, 0xf7, 0xf1, 0x89, 0x45, 0xb0, 0x31, 0xff,
-0x39, 0x7d, 0xb0, 0x7e, 0x2f, 0x83, 0xff, 0x1f, 0x7f, 0x2a, 0x31, 0xc0, 0x8b, 0x16, 0x83, 0x7e,
-0x10, 0x01, 0x0f, 0x95, 0xc0, 0x83, 0xec, 0x04, 0x40, 0x8b, 0x4e, 0x04, 0x47, 0x50, 0x8b, 0x45,
-0xc8, 0xff, 0x76, 0x0c, 0xff, 0x76, 0x08, 0x83, 0xc6, 0x14, 0xe8, 0x29, 0xf9, 0xff, 0xff, 0x83,
-0xc4, 0x10, 0xeb, 0xcc, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5b, 0x04, 0xeb, 0x96,
-0x8b, 0x43, 0x14, 0x8b, 0x53, 0x04, 0x8b, 0x4b, 0x08, 0x8b, 0x73, 0x0c, 0x8b, 0x7b, 0x10, 0x83,
-0xf8, 0x01, 0x75, 0x07, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x83, 0xec, 0x04, 0x83, 0xc3,
-0x14, 0x50, 0x8b, 0x45, 0xb0, 0x57, 0x56, 0xe8, 0xec, 0xf8, 0xff, 0xff, 0xff, 0x45, 0xb4, 0x83,
-0xc4, 0x10, 0x8b, 0x45, 0xb4, 0x3b, 0x05, 0xc0, 0x55, 0x01, 0x00, 0x8b, 0x45, 0xc8, 0x89, 0x45,
-0xb0, 0x7c, 0xbd, 0xe8, 0x3b, 0xf4, 0xff, 0xff, 0x8b, 0x7d, 0xb0, 0x89, 0x87, 0xe0, 0x01, 0x00,
-0x00, 0x8b, 0x5d, 0xc8, 0xe8, 0x73, 0xf4, 0xff, 0xff, 0x66, 0x89, 0x43, 0x02, 0x8b, 0x45, 0xc8,
-0x83, 0xb8, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x75, 0x07, 0x66, 0x83, 0x78, 0x02, 0x00, 0x74, 0x07,
-0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7d, 0xcc, 0x00, 0x0f, 0x84, 0xb9, 0x00, 0x00,
-0x00, 0x8b, 0x75, 0xbc, 0x8b, 0x55, 0xc8, 0x83, 0x7d, 0xe4, 0x00, 0x8b, 0x1e, 0x74, 0x4d, 0xf6,
-0xc3, 0x01, 0x74, 0x48, 0x8b, 0x46, 0x08, 0x05, 0x00, 0x04, 0x00, 0x00, 0x3d, 0xff, 0xff, 0x3f,
-0x00, 0x76, 0x05, 0xb8, 0xff, 0xff, 0x3f, 0x00, 0x8b, 0xba, 0xe0, 0x01, 0x00, 0x00, 0x8d, 0x8f,
-0x00, 0x04, 0x00, 0x00, 0x39, 0xc1, 0x73, 0x24, 0x8d, 0x88, 0x00, 0xfc, 0xff, 0xff, 0x89, 0x8a,
-0xe0, 0x01, 0x00, 0x00, 0x81, 0xf9, 0xff, 0xff, 0x00, 0x00, 0x77, 0x0a, 0x66, 0x2d, 0x00, 0x04,
-0x66, 0x89, 0x42, 0x02, 0xeb, 0x06, 0x66, 0xc7, 0x42, 0x02, 0x00, 0xfc, 0x80, 0xe3, 0x04, 0x74,
-0x0f, 0x50, 0x6a, 0xff, 0xff, 0x76, 0x10, 0x52, 0xe8, 0xaa, 0xf9, 0xff, 0xff, 0x83, 0xc4, 0x10,
-0x83, 0x7d, 0xe4, 0x00, 0x0f, 0x84, 0xbd, 0x01, 0x00, 0x00, 0xf6, 0x06, 0x40, 0x0f, 0x84, 0xb4,
-0x01, 0x00, 0x00, 0x8b, 0x5e, 0x30, 0x8b, 0x46, 0x2c, 0x01, 0xd8, 0x8b, 0x7d, 0xc8, 0x89, 0x45,
-0xb4, 0x8b, 0x73, 0xfc, 0x39, 0x5d, 0xb4, 0x0f, 0x86, 0x9a, 0x01, 0x00, 0x00, 0x8b, 0x13, 0x8b,
-0x4b, 0x04, 0x50, 0x89, 0xf8, 0xff, 0x73, 0x10, 0xff, 0x73, 0x0c, 0xff, 0x73, 0x08, 0x01, 0xf3,
-0xe8, 0xe3, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0xeb, 0xda, 0x83, 0x7d, 0xd0, 0x00, 0x0f, 0x84,
-0xaa, 0x00, 0x00, 0x00, 0x8b, 0x75, 0xbc, 0x8b, 0x46, 0x0c, 0x85, 0xc0, 0x74, 0x10, 0x52, 0x50,
-0xff, 0x76, 0x08, 0xff, 0x75, 0xc8, 0xe8, 0x3c, 0xf9, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x8b, 0x46,
-0x14, 0x8b, 0x5e, 0x10, 0x89, 0x45, 0xb4, 0x83, 0x7d, 0xb4, 0x00, 0x0f, 0x84, 0x46, 0x01, 0x00,
-0x00, 0x83, 0x3b, 0x01, 0x75, 0x6b, 0x83, 0x7d, 0xe4, 0x00, 0x74, 0x65, 0x8b, 0x45, 0xc8, 0xb9,
-0x14, 0x00, 0x00, 0x00, 0x89, 0x45, 0xb0, 0x8b, 0x43, 0x04, 0x83, 0xe8, 0x08, 0x31, 0xd2, 0xf7,
-0xf1, 0x89, 0x45, 0xac, 0x8d, 0x73, 0x08, 0x31, 0xff, 0x39, 0x7d, 0xac, 0x7e, 0x3c, 0x83, 0xff,
-0x1f, 0x7f, 0x37, 0x8b, 0x46, 0x10, 0x8d, 0x50, 0xff, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x83, 0xfa,
-0x03, 0x77, 0x07, 0x0f, 0xb6, 0x82, 0x10, 0x10, 0x01, 0x00, 0x83, 0xec, 0x04, 0x8b, 0x16, 0x8b,
-0x4e, 0x04, 0x47, 0x50, 0x8b, 0x45, 0xb0, 0xff, 0x76, 0x0c, 0xff, 0x76, 0x08, 0x83, 0xc6, 0x14,
-0xe8, 0x43, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0xeb, 0xbf, 0xc7, 0x45, 0xe4, 0x00, 0x00, 0x00,
-0x00, 0x8b, 0x43, 0x04, 0x01, 0xc3, 0x29, 0x45, 0xb4, 0xe9, 0x79, 0xff, 0xff, 0xff, 0x83, 0x7d,
-0xd4, 0x00, 0x0f, 0x84, 0xbf, 0x00, 0x00, 0x00, 0x8b, 0x55, 0xc0, 0x8b, 0x7a, 0x04, 0x8d, 0x42,
-0x0c, 0x01, 0xd7, 0x39, 0xc7, 0x0f, 0x86, 0xac, 0x00, 0x00, 0x00, 0x8b, 0x10, 0x8d, 0x48, 0x0c,
-0x8d, 0x5a, 0x03, 0x83, 0xe3, 0xfc, 0x8d, 0x34, 0x19, 0x8b, 0x58, 0x04, 0x89, 0x75, 0xb4, 0x8d,
-0x73, 0x03, 0x83, 0xe6, 0xfc, 0x03, 0x75, 0xb4, 0x89, 0x75, 0xb0, 0x39, 0xf7, 0x0f, 0x82, 0x84,
-0x00, 0x00, 0x00, 0x8b, 0x35, 0x70, 0x14, 0x01, 0x00, 0x8b, 0x40, 0x08, 0x89, 0x75, 0xac, 0x39,
-0x05, 0x78, 0x14, 0x01, 0x00, 0x8b, 0x35, 0x74, 0x14, 0x01, 0x00, 0x75, 0x27, 0x3b, 0x55, 0xac,
-0x75, 0x22, 0x50, 0x52, 0x56, 0x51, 0xe8, 0x17, 0xf8, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x85, 0xc0,
-0x75, 0x12, 0x52, 0x8d, 0x45, 0xb8, 0xff, 0x75, 0xb4, 0x53, 0x50, 0xff, 0x15, 0x7c, 0x14, 0x01,
-0x00, 0x83, 0xc4, 0x10, 0x8b, 0x45, 0xb0, 0xeb, 0x8a, 0x8d, 0x7c, 0x0a, 0x0c, 0x83, 0x7d, 0xb4,
-0x07, 0x0f, 0x85, 0xdf, 0xfb, 0xff, 0xff, 0x89, 0x55, 0xb4, 0x50, 0x6a, 0x07, 0x68, 0x40, 0x11,
-0x01, 0x00, 0x57, 0xe8, 0xda, 0xf7, 0xff, 0xff, 0x83, 0xc4, 0x10, 0x8b, 0x55, 0xb4, 0x85, 0xc0,
-0x0f, 0x85, 0xc0, 0xfb, 0xff, 0xff, 0xc7, 0x45, 0xd8, 0x01, 0x00, 0x00, 0x00, 0xbe, 0x01, 0x00,
-0x00, 0x00, 0xe9, 0xaf, 0xfb, 0xff, 0xff, 0xb0, 0x80, 0xe6, 0x70, 0x31, 0xc0, 0xe6, 0xf0, 0xe6,
-0xf1, 0xb0, 0x11, 0xe6, 0x20, 0xe6, 0xa0, 0xb0, 0x20, 0xe6, 0x21, 0xb0, 0x28, 0xe6, 0xa1, 0xb0,
-0x04, 0xe6, 0x21, 0xb0, 0x02, 0xe6, 0xa1, 0xb0, 0x01, 0xe6, 0x21, 0xe6, 0xa1, 0xb0, 0xff, 0xe6,
-0xa1, 0xb0, 0xfb, 0xe6, 0x21, 0x8b, 0x45, 0xc8, 0x8d, 0x65, 0xf4, 0x5b, 0x5e, 0x5f, 0x5d, 0xc3,
-0x01, 0x02, 0x03, 0x04, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42,
-0x43, 0x44, 0x45, 0x46, 0x00, 0x48, 0x64, 0x72, 0x53, 0x00, 0x42, 0x61, 0x64, 0x20, 0x75, 0x6e,
-0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65,
-0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x21, 0x0a, 0x00, 0x42, 0x61, 0x64,
-0x20, 0x45, 0x4c, 0x46, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x74,
-0x61, 0x62, 0x6c, 0x65, 0x21, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73,
-0x75, 0x6d, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63,
-0x6f, 0x75, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x20, 0x68, 0x64, 0x72, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x62, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a, 0x00, 0x62,
-0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x3d, 0x20, 0x25, 0x78, 0x0a,
-0x00, 0x20, 0x20, 0x62, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x25,
-0x78, 0x0a, 0x00, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x6c,
-0x6f, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x21, 0x0a, 0x00, 0x74, 0x79,
-0x70, 0x65, 0x3d, 0x25, 0x78, 0x0a, 0x00, 0x64, 0x61, 0x74, 0x61, 0x3d, 0x25, 0x78, 0x0a, 0x00,
-0x70, 0x61, 0x72, 0x61, 0x6d, 0x3d, 0x25, 0x78, 0x0a, 0x00, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77,
-0x6e, 0x20, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3a,
-0x20, 0x25, 0x73, 0x0a, 0x00, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x74, 0x79,
-0x70, 0x65, 0x3a, 0x00, 0x20, 0x4c, 0x69, 0x6e, 0x75, 0x78, 0x42, 0x49, 0x4f, 0x53, 0x00, 0x20,
-0x50, 0x43, 0x42, 0x49, 0x4f, 0x53, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x7a, 0x52, 0x00, 0x01, 0x7c, 0x08, 0x01, 0x1b, 0x0c, 0x04, 0x04, 0x88, 0x01, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xe2, 0xf1, 0xff, 0xff, 0x23, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x5d, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x20, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0xe5, 0xf1, 0xff, 0xff, 0x1b, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x45, 0x0d, 0x05, 0x41, 0x83, 0x03, 0x51, 0xc3, 0x41, 0xc5,
-0x0c, 0x04, 0x04, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xdc, 0xf1, 0xff, 0xff,
-0x8a, 0x01, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03,
-0x86, 0x04, 0x83, 0x05, 0x03, 0x7d, 0x01, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04,
-0x04, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x36, 0xf3, 0xff, 0xff,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x42, 0x86, 0x03,
-0x83, 0x04, 0x7d, 0xc3, 0x41, 0xc6, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x28, 0x00, 0x00, 0x00,
-0xb8, 0x00, 0x00, 0x00, 0x55, 0xf3, 0xff, 0xff, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08,
-0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, 0x02, 0x70, 0xc3, 0x41,
-0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x28, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
-0xa3, 0xf3, 0xff, 0xff, 0x65, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x47, 0x0d,
-0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05, 0x02, 0x56, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41,
-0xc5, 0x0c, 0x04, 0x04, 0x28, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0xdc, 0xf3, 0xff, 0xff,
-0xcc, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03,
-0x86, 0x04, 0x83, 0x05, 0x02, 0xbf, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04,
-0x1c, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x7c, 0xf4, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x45, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x5c, 0x01, 0x00, 0x00, 0x65, 0xf4, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x4f, 0xf4, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x45, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x38, 0xf4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x48, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0xf4, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x49, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x11, 0xf4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x48, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfd, 0xf3, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x52, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x1c, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0xf5, 0xf3, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x52, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x20, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0xed, 0xf3, 0xff, 0xff, 0x1d, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x41, 0x83, 0x03, 0x55, 0xc3, 0x41, 0xc5,
-0x0c, 0x04, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0xe6, 0xf3, 0xff, 0xff,
-0x25, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x44, 0x0d, 0x05, 0x5f, 0xc5, 0x0c,
-0x04, 0x04, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0xeb, 0xf3, 0xff, 0xff,
-0x5b, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03,
-0x86, 0x04, 0x83, 0x05, 0x02, 0x51, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04,
-0x1c, 0x00, 0x00, 0x00, 0xac, 0x02, 0x00, 0x00, 0x1a, 0xf4, 0xff, 0xff, 0x1b, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x56, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
-0x2c, 0x00, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x15, 0xf4, 0xff, 0xff, 0x35, 0x01, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x43, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05,
-0x03, 0x2b, 0x01, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, 0x00,
-0x2c, 0x00, 0x00, 0x00, 0xfc, 0x02, 0x00, 0x00, 0x1a, 0xf5, 0xff, 0xff, 0xae, 0x06, 0x00, 0x00,
-0x00, 0x41, 0x0e, 0x08, 0x85, 0x02, 0x42, 0x0d, 0x05, 0x46, 0x87, 0x03, 0x86, 0x04, 0x83, 0x05,
-0x03, 0xa1, 0x06, 0xc3, 0x41, 0xc6, 0x41, 0xc7, 0x41, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x66, 0x10, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0x08, 0x01, 0x00,
-0xc0, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xa5, 0xa5, 0xa5, 0xa5, 0x70, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
-0x8c, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4f, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x41,
-0x47, 0x45, 0x3d, 0x68, 0x65, 0x61, 0x64, 0x2e, 0x53, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c,
-0x65, 0x3d, 0x74, 0x74, 0x79, 0x53, 0x30, 0x20, 0x69, 0x70, 0x3d, 0x64, 0x68, 0x63, 0x70, 0x20,
-0x72, 0x6f, 0x6f, 0x74, 0x3d, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x66, 0x73, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
deleted file mode 100644
index a162eb7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 14 Jul 2012 14:14:07 -0700
-Subject: [PATCH] mkelfimage: Fix cross build
-
-Make the tool to be cross compilable, by separating the variables for build
-tools from those for the target. Also modified to obey LDFLAGS.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-
-Upstream-Status: Pending
-
----
- Makefile.conf.in | 3 +++
- configure.ac | 7 +++++--
- linux-i386/Makefile | 2 +-
- linux-ia64/Makefile | 2 +-
- main/Makefile | 4 ++--
- 5 files changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/Makefile.conf.in b/Makefile.conf.in
-index 4645e44..dcb6cf2 100644
---- a/Makefile.conf.in
-+++ b/Makefile.conf.in
-@@ -17,6 +17,9 @@ DEFS=@DEFS@
- LIBS=@LIBS@
- HOST_CC=@HOST_CC@
- HOST_CFLAGS=@HOST_CFLAGS@ $(DEFS)
-+CC=@CC@
-+CFLAGS=@CFLAGS@ $(DEFS)
-+LDFLAGS=@LDFLAGS@
-
- I386_CC =@I386_CC@
- I386_LD =@I386_LD@
-diff --git a/configure.ac b/configure.ac
-index 652b952..0f2ac72 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -70,6 +70,9 @@ if test "with_default" != no ; then
- AC_MSG_ERROR([cc not found])
- fi
- eval "${with_default}_CC='$CC'"
-+ if test "x$HOST_CC" = 'x'; then
-+ AC_CHECK_PROG([HOST_CC], [$CC], [$CC], [gcc], [$PATH])
-+ fi
- AC_PROG_CPP
- if test "$CPP" = no; then
- AC_MSG_ERROR([cpp not found])
-@@ -172,8 +175,8 @@ fi
-
- dnl ---Output variables...
-
--HOST_CC=$CC
--HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
-+CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)"
-+HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)"
-
- dnl TODO: figure out how to set these appropriately for compilers other than gcc
- I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
-diff --git a/linux-i386/Makefile b/linux-i386/Makefile
-index 51531d6..7e8aa3c 100644
---- a/linux-i386/Makefile
-+++ b/linux-i386/Makefile
-@@ -4,7 +4,7 @@ LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
-
- $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+ $(CC) $(CFLAGS) -c -g $< -o $@
-
-
- ifdef I386_CC
-diff --git a/linux-ia64/Makefile b/linux-ia64/Makefile
-index 38f5d8c..5df8870 100644
---- a/linux-ia64/Makefile
-+++ b/linux-ia64/Makefile
-@@ -4,7 +4,7 @@ LIA64_DEP=Makefile Makefile.conf $(LIA64_DIR)/Makefile
-
- $(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c $(LIA64_DIR)/convert.bin.c $(LIA64_DEP)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+ $(CC) $(CFLAGS) -c -g $< -o $@
-
- ifdef IA64_CC
-
-diff --git a/main/Makefile b/main/Makefile
-index 403b0a4..cd53613 100644
---- a/main/Makefile
-+++ b/main/Makefile
-@@ -4,11 +4,11 @@ MKELF_OBJS=$(OBJDIR)/main/mkelfImage.o \
-
- $(OBJDIR)/sbin/mkelfImage: $(MKELF_OBJS) $(DEPS)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-
- $(OBJDIR)/main/mkelfImage.o: main/mkelfImage.c include/mkelfImage.h $(DEPS)
- $(MKDIR) -p $(@D)
-- $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
-+ $(CC) $(CFLAGS) -c $< -o $@
-
- $(OBJDIR)/man/man8/mkelfImage.8: main/mkelfImage.man
- $(MKDIR) -p $(@D)
---
-2.8.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
deleted file mode 100644
index be54754..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/fix-makefile-to-find-libz.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Let makefile find libz and zlib.h by CFLAGS and LDFLAGS.
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Upstream-Status: Pending
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0f2ac72..f9099a2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -62,7 +62,7 @@ AC_CHECK_PROG([RPM], rpm, rpm, [], [$PATH])
- AC_CHECK_PROG([SED], sed, sed, [], [$PATH])
- AC_CHECK_PROG([FIND], find, find, [], [$PATH])
-
--AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS -lz"]))
-+AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS $LDFLAGS -lz"]))
-
- dnl Find the default programs
- if test "with_default" != no ; then
-@@ -176,7 +176,7 @@ fi
- dnl ---Output variables...
-
- CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)"
--HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)"
-+HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS) $CFLAGS"
-
- dnl TODO: figure out how to set these appropriately for compilers other than gcc
- I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
deleted file mode 100644
index 330fa7c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Utility for creating ELF boot images for ELF-based Linux kernel images"
-HOMEPAGE = "http://www.coreboot.org/Mkelfimage"
-SECTION = "devel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a"
-
-SRCREV = "686a48a339b3200184c27e7f98d4c03180b2be6c"
-PV = "4.0+git${SRCPV}"
-RECIPE_NO_UPDATE_REASON = "mkelfimage has been removed in coreboot 4.1 release: \
-http://review.coreboot.org/gitweb?p=coreboot.git;a=commit;h=34fc4ab80b507739e2580d490dff67fcfdde11ea"
-
-
-DEPENDS += "zlib"
-
-SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
- file://cross-compile.patch \
- "
-SRC_URI_append_class-native = " \
- file://fix-makefile-to-find-libz.patch \
- file://convert.bin.c \
-"
-
-CLEANBROKEN = "1"
-
-S = "${WORKDIR}/git/util/mkelfImage"
-
-CACHED_CONFIGUREVARS += "\
- HOST_CC='${BUILD_CC}' \
- HOST_CFLAGS='${BUILD_CFLAGS}' \
- HOST_CPPFLAGS='${BUILD_CPPFLAGS}' \
- I386_CFLAGS='-fno-stack-protector' \
- IA64_CFLAGS='-fno-stack-protector' \
-"
-EXTRA_OECONF_append_x86-64 = " --with-i386=${HOST_SYS}"
-
-inherit autotools-brokensep
-
-do_configure_prepend-class-native() {
- cp ${WORKDIR}/convert.bin.c ${S}/linux-i386/
-}
-
-do_install_append() {
- rmdir ${D}${datadir}/mkelfImage/elf32-i386
- rmdir ${D}${datadir}/mkelfImage
- chown root:root ${D}/${sbindir}/mkelfImage
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
index 7d6d62e..17d9af4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
@@ -1,7 +1,7 @@
-From f172101130604e4a9efa5746f4d8d30de99a0fdc Mon Sep 17 00:00:00 2001
+From dcb45256970b15b672d0004533826c94083356e5 Mon Sep 17 00:00:00 2001
From: Yuanjie Huang <yuanjie.huang@windriver.com>
Date: Fri, 17 Apr 2015 14:48:20 +0800
-Subject: [PATCH] avoid failure on symbol provided by application
+Subject: [PATCH 4/6] avoid failure on symbol provided by application
Upstream-Status: Pending
@@ -13,12 +13,13 @@
of symbols.
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+
---
src/mklibs | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/src/mklibs b/src/mklibs
-index c5614ea..b0d9034 100755
+index a3533c0..66b7a09 100755
--- a/src/mklibs
+++ b/src/mklibs
@@ -133,9 +133,9 @@ class Symbol(object):
@@ -31,9 +32,9 @@
- self.weak, self.library = weak, library
+ self.weak, self.library, self.object = weak, library, object
- # Return undefined symbols in an object as a set of tuples (name, weakness)
- def undefined_symbols(obj):
-@@ -144,6 +144,11 @@ def undefined_symbols(obj):
+ def symbol_is_blacklisted(name):
+ # The ARM Embedded ABI spec states symbols under this namespace as
+@@ -152,6 +152,11 @@ def undefined_symbols(obj):
output = command("mklibs-readelf", "--print-symbols-undefined", obj)
@@ -45,7 +46,7 @@
result = []
for line in output:
name, weak_string, version_string, library_string = line.split()[:4]
-@@ -160,7 +165,7 @@ def undefined_symbols(obj):
+@@ -171,7 +176,7 @@ def undefined_symbols(obj):
if library_string.lower() != 'none':
library = library_string
@@ -54,7 +55,7 @@
return result
-@@ -495,12 +500,13 @@ while 1:
+@@ -498,12 +503,13 @@ while 1:
and re.search("^ps_", str(symbol)))
and not (re.search("ld-linux.so.3$", str(symbol)))
and not (re.search("^__gnu_local_gp", str(symbol)))):
@@ -68,8 +69,8 @@
+ present_symbol_progs = {}
checked_libs = small_libs
checked_libs.extend(available_libs)
- checked_libs.append(ldlib)
-@@ -510,6 +516,12 @@ while 1:
+ checked_libs.append(sysroot + ldlib)
+@@ -513,6 +519,12 @@ while 1:
names = symbol.base_names()
for name in names:
present_symbols[name] = symbol
@@ -82,7 +83,7 @@
# are we finished?
num_unresolved = 0
-@@ -565,6 +577,14 @@ while 1:
+@@ -568,6 +580,14 @@ while 1:
for name in needed_symbols:
if not name in symbol_provider:
if not needed_symbols[name].weak:
@@ -98,5 +99,5 @@
else:
lib = symbol_provider[name]
--
-1.8.5.2.233.g932f7e4
+2.16.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
new file mode 100644
index 0000000..62e25fd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
@@ -0,0 +1,36 @@
+From 175ac0f362bf6121c3537e2f1760ad41c8f81367 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 29 Mar 2018 01:04:57 -0700
+Subject: [PATCH] lsmmc: replace strncpy with memmove on overlapping memory
+ copy
+
+here source and destination addresses are overlapping so using memmove is
+going to be more efficient.
+
+Additionally, the bounded size for copy is overflowing for first copy
+
+In function 'strncpy',
+ inlined from 'read_file' at lsmmc.c:356:3:
+/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/mmc-utils/0.1-r0/recipe-sysroot/usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' accessing 4096 bytes at offsets 0 and 1 overlaps 4095 bytes at offset 1 [-Werror=restrict]
+ return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10314723/]
+ lsmmc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index c4faa00..bcb854d 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -353,7 +353,7 @@ char *read_file(char *name)
+ line[strlen(line) - 1] = '\0';
+
+ while (isspace(line[0]))
+- strncpy(&line[0], &line[1], sizeof(line));
++ memmove(&line[0], &line[1], sizeof(line)-1);
+
+ return strdup(line);
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 50acdb1..37a4755 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -4,12 +4,14 @@
LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
SRCBRANCH ?= "master"
-SRCREV = "37c86e60c0442fef570b75cd81aeb1db4d0cbafd"
+SRCREV = "b4fe0c8c0e57a74c01755fa9362703b60d7ee49d"
PV = "0.1"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH}"
-UPSTREAM_VERSION_UNKNOWN = "1"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \
+ file://0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch \
+ "
+UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
deleted file mode 100644
index bf3f98f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 4dab9bed1033f797ef9b482c77342fe3fe26d0be Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 6 Oct 2015 23:51:34 +0000
-Subject: [PATCH] Fix build with musl
-
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
----
- jffsX-utils/mkfs.jffs2.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c
-index 5446a16..ca5e0d5 100644
---- a/jffsX-utils/mkfs.jffs2.c
-+++ b/jffsX-utils/mkfs.jffs2.c
-@@ -72,6 +72,7 @@
- #include <byteswap.h>
- #include <crc32.h>
- #include <inttypes.h>
-+#include <limits.h>
-
- #include "rbtree.h"
- #include "common.h"
---
-2.6.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
deleted file mode 100644
index 853de6a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 82839c3c0371ca2a1643a99d7d01f5bc1c850b28 Mon Sep 17 00:00:00 2001
-From: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-Date: Thu, 2 Mar 2017 11:40:36 +0100
-Subject: [PATCH] Replace rpmatch() usage with checking first character of line
-
-This is based on the patch from Khem Raj used by openembedded. In
-addition to the original patch, this also removes the fallback
-implementation that was provided for C libraries that don't implement
-rpmatch.
-
-Upstream-Status: Backport
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
----
- include/common.h | 25 ++++++-------------------
- 1 file changed, 6 insertions(+), 19 deletions(-)
-
-diff --git a/include/common.h b/include/common.h
-index d0c706d..d609257 100644
---- a/include/common.h
-+++ b/include/common.h
-@@ -129,21 +129,6 @@ extern "C" {
- fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \
- } while(0)
-
--/* uClibc versions before 0.9.34 and musl don't have rpmatch() */
--#if defined(__UCLIBC__) && \
-- (__UCLIBC_MAJOR__ == 0 && \
-- (__UCLIBC_MINOR__ < 9 || \
-- (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 34))) || \
-- !defined(__GLIBC__)
--#undef rpmatch
--#define rpmatch __rpmatch
--static inline int __rpmatch(const char *resp)
--{
-- return (resp[0] == 'y' || resp[0] == 'Y') ? 1 :
-- (resp[0] == 'n' || resp[0] == 'N') ? 0 : -1;
--}
--#endif
--
- /**
- * prompt the user for confirmation
- */
-@@ -164,10 +149,12 @@ static inline bool prompt(const char *msg, bool def)
- }
-
- if (strcmp("\n", line) != 0) {
-- switch (rpmatch(line)) {
-- case 0: ret = false; break;
-- case 1: ret = true; break;
-- case -1:
-+ switch (line[0]) {
-+ case 'N':
-+ case 'n': ret = false; break;
-+ case 'Y':
-+ case 'y': ret = true; break;
-+ default:
- puts("unknown response; please try again");
- continue;
- }
---
-2.6.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
index 0e3776a..5d874d9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
@@ -1,8 +1,10 @@
Upstream-Status: Pending
---- /tmp/mkfs.jffs2.c 2009-01-11 15:28:41.000000000 +0100
-+++ git/jffsX-utils/mkfs.jffs2.c 2009-01-11 15:59:29.000000000 +0100
-@@ -100,6 +100,11 @@
+Index: git/jffsX-utils/mkfs.jffs2.c
+===================================================================
+--- git.orig/jffsX-utils/mkfs.jffs2.c
++++ git/jffsX-utils/mkfs.jffs2.c
+@@ -100,6 +100,11 @@ struct filesystem_entry {
struct rb_node hardlink_rb;
};
@@ -14,7 +16,7 @@
struct rb_root hardlinks;
static int out_fd = -1;
static int in_fd = -1;
-@@ -408,7 +413,7 @@
+@@ -309,7 +314,7 @@ static struct filesystem_entry *recursiv
char *hpath, *tpath;
struct dirent *dp, **namelist;
struct filesystem_entry *entry;
@@ -22,8 +24,8 @@
+ struct ignorepath_entry* element = ignorepath;
if (lstat(hostpath, &sb)) {
- perror_msg_and_die("%s", hostpath);
-@@ -417,6 +422,15 @@
+ sys_errmsg_die("%s", hostpath);
+@@ -318,6 +323,15 @@ static struct filesystem_entry *recursiv
entry = add_host_filesystem_entry(targetpath, hostpath,
sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
@@ -38,8 +40,8 @@
+
n = scandir(hostpath, &namelist, 0, alphasort);
if (n < 0) {
- perror_msg_and_die("opening directory %s", hostpath);
-@@ -1453,6 +1467,7 @@
+ sys_errmsg_die("opening directory %s", hostpath);
+@@ -1359,6 +1373,7 @@ static struct option long_options[] = {
{"root", 1, NULL, 'r'},
{"pagesize", 1, NULL, 's'},
{"eraseblock", 1, NULL, 'e'},
@@ -47,15 +49,15 @@
{"output", 1, NULL, 'o'},
{"help", 0, NULL, 'h'},
{"verbose", 0, NULL, 'v'},
-@@ -1500,6 +1515,7 @@
- " -L, --list-compressors Show the list of the avaiable compressors\n"
+@@ -1409,6 +1424,7 @@ static const char helptext[] =
+ " -L, --list-compressors Show the list of the available compressors\n"
" -t, --test-compression Call decompress and compare with the original (for test)\n"
" -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
+" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n"
" -o, --output=FILE Output to FILE (default: stdout)\n"
" -l, --little-endian Create a little-endian filesystem\n"
" -b, --big-endian Create a big-endian filesystem\n"
-@@ -1666,6 +1682,7 @@
+@@ -1566,6 +1582,7 @@ int main(int argc, char **argv)
char *compr_name = NULL;
int compr_prior = -1;
int warn_page_size = 0;
@@ -63,7 +65,7 @@
page_size = sysconf(_SC_PAGESIZE);
if (page_size < 0) /* System doesn't know so ... */
-@@ -1676,7 +1693,7 @@
+@@ -1576,7 +1593,7 @@ int main(int argc, char **argv)
jffs2_compressors_init();
while ((opt = getopt_long(argc, argv,
@@ -72,7 +74,7 @@
{
switch (opt) {
case 'D':
-@@ -1700,6 +1717,28 @@
+@@ -1600,6 +1617,28 @@ int main(int argc, char **argv)
warn_page_size = 0; /* set by user, so don't need to warn */
break;
@@ -100,4 +102,4 @@
+
case 'o':
if (out_fd != -1) {
- error_msg_and_die("output filename specified more than once");
+ errmsg_die("output filename specified more than once");
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
deleted file mode 100644
index 6fc594f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 7d026a85946a08b8167dcd792ea6660bf6a49e08 Mon Sep 17 00:00:00 2001
-From: Yuanjie Huang <Yuanjie.Huang@windriver.com>
-Date: Thu, 2 Mar 2017 10:43:56 +0100
-Subject: [PATCH] Fix alignment trap triggered by NEON instructions
-
-NEON instruction VLD1.64 was used to copy 64 bits data after type
-casting, and they will trigger alignment trap.
-This patch uses memcpy to avoid alignment problem.
-
-Upstream-Status: Backport
-
-Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
-Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
----
- ubifs-utils/mkfs.ubifs/key.h | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/ubifs-utils/mkfs.ubifs/key.h b/ubifs-utils/mkfs.ubifs/key.h
-index 39379fd..118858b 100644
---- a/ubifs-utils/mkfs.ubifs/key.h
-+++ b/ubifs-utils/mkfs.ubifs/key.h
-@@ -159,10 +159,12 @@ static inline void data_key_init(union ubifs_key *key, ino_t inum,
- */
- static inline void key_write(const union ubifs_key *from, void *to)
- {
-- union ubifs_key *t = to;
-+ __le32 x[2];
-
-- t->j32[0] = cpu_to_le32(from->u32[0]);
-- t->j32[1] = cpu_to_le32(from->u32[1]);
-+ x[0] = cpu_to_le32(from->u32[0]);
-+ x[1] = cpu_to_le32(from->u32[1]);
-+
-+ memcpy(to, &x, 8);
- memset(to + 8, 0, UBIFS_MAX_KEY_LEN - 8);
- }
-
-@@ -174,10 +176,12 @@ static inline void key_write(const union ubifs_key *from, void *to)
- */
- static inline void key_write_idx(const union ubifs_key *from, void *to)
- {
-- union ubifs_key *t = to;
-+ __le32 x[2];
-+
-+ x[0] = cpu_to_le32(from->u32[0]);
-+ x[1] = cpu_to_le32(from->u32[1]);
-
-- t->j32[0] = cpu_to_le32(from->u32[0]);
-- t->j32[1] = cpu_to_le32(from->u32[1]);
-+ memcpy(to, &x, 8);
- }
-
- /**
---
-2.6.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
deleted file mode 100644
index 0f42e73..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-Upstream-Status: Pending
-From patchwork Mon Aug 8 08:16:43 2011
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command
-Date: Sun, 07 Aug 2011 22:16:43 -0000
-From: b35362@freescale.com
-X-Patchwork-Id: 108873
-Message-Id: <1312791403-13473-1-git-send-email-b35362@freescale.com>
-To: <dwmw2@infradead.org>
-Cc: Liu Shuo <b35362@freescale.com>, Artem.Bityutskiy@nokia.com,
- Li Yang <leoli@freescale.com>, linux-mtd@lists.infradead.org
-
-From: Liu Shuo <b35362@freescale.com>
-
-Flash_erase -j should fill discrete freeoob areas with required bytes
-of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill
-the first freeoob area.
-
-The below is the result without this workaround:
-
-JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00004000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00008000 is not formatted. It will be erased
-JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00010000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00014000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00018000 is not formatted. It will be erased
-JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00020000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00024000 is not formatted. It will be erased
-JFFS2: Erase block at 0x00028000 is not formatted. It will be erased
-...
-
-Signed-off-by: Liu Shuo <b35362@freescale.com>
-Signed-off-by: Li Yang <leoli@freescale.com>
-
-Updated for the new version
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
----
-v2 : get length of availble freeoob bytes from oobinfo information,
- not use the ioctl ECCGETLAYOUT which is being deprecated.
-
- flash_erase.c | 46 +++++++++++++++++++++++++++++++++++++++-------
- 1 files changed, 39 insertions(+), 7 deletions(-)
-
-diff --git a/flash_erase.c b/flash_erase.c
-index 933373a..4b9d84b 100644
---- a/misc-utils/flash_erase.c
-+++ b/misc-utils/flash_erase.c
-@@ -99,6 +99,7 @@ int main(int argc, char *argv[])
- bool isNAND;
- int error = 0;
- off_t offset = 0;
-+ void *oob_data = NULL;
-
- /*
- * Process user arguments
-@@ -201,15 +202,43 @@ int main(int argc, char *argv[])
- if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0)
- return sys_errmsg("%s: unable to get NAND oobinfo", mtd_device);
-
-+ cleanmarker.totlen = cpu_to_je32(8);
- /* Check for autoplacement */
- if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) {
-- /* Get the position of the free bytes */
-- if (!oobinfo.oobfree[0][1])
-+ struct nand_ecclayout_user ecclayout;
-+ int i, oobavail;
-+
-+ for (i = 0, oobavail = 0; oobinfo.oobfree[i][1]; i++)
-+ oobavail += oobinfo.oobfree[i][1];
-+
-+ if (!oobavail)
- return errmsg(" Eeep. Autoplacement selected and no empty space in oob");
-+
-+ /* Get the position of the free bytes */
- clmpos = oobinfo.oobfree[0][0];
-- clmlen = oobinfo.oobfree[0][1];
-- if (clmlen > 8)
-- clmlen = 8;
-+ clmlen = MIN(oobavail, 8);
-+
-+ if (oobinfo.oobfree[0][1] < 8 && oobavail >= 8) {
-+ int left, n, last = 0;
-+ void *cm;
-+
-+ oob_data = malloc(mtd.oob_size);
-+ if (!oob_data)
-+ return -ENOMEM;
-+
-+ memset(oob_data, 0xff, mtd.oob_size);
-+ cm = &cleanmarker;
-+ for (i = 0, left = clmlen; left ; i++) {
-+ n = MIN(left, oobinfo.oobfree[i][1]);
-+ memcpy(oob_data + oobinfo.oobfree[i][0],
-+ cm, n);
-+ left -= n;
-+ cm += n;
-+ last = oobinfo.oobfree[i][0] + n;
-+ }
-+
-+ clmlen = last - clmpos;
-+ }
- } else {
- /* Legacy mode */
- switch (mtd.oob_size) {
-@@ -227,7 +256,6 @@ int main(int argc, char *argv[])
- break;
- }
- }
-- cleanmarker.totlen = cpu_to_je32(8);
- }
- cleanmarker.hdr_crc = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(cleanmarker) - 4));
- }
-@@ -276,7 +304,8 @@ int main(int argc, char *argv[])
-
- /* write cleanmarker */
- if (isNAND) {
-- if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, &cleanmarker) != 0) {
-+ void *data = oob_data ? oob_data + clmpos : &cleanmarker;
-+ if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, data) != 0) {
- sys_errmsg("%s: MTD writeoob failure", mtd_device);
- continue;
- }
-@@ -291,5 +320,8 @@ int main(int argc, char *argv[])
- show_progress(&mtd, offset, eb, eb_start, eb_cnt);
- bareverbose(!quiet, "\n");
-
-+ if (oob_data)
-+ free(oob_data);
-+
- return 0;
- }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 48ba2ee..a0e1cf7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -8,42 +8,61 @@
inherit autotools pkgconfig update-alternatives
DEPENDS = "zlib lzo e2fsprogs util-linux"
+RDEPENDS_mtd-utils-tests += "bash"
-PV = "2.0.0"
+PV = "2.0.1+${SRCPV}"
-SRCREV = "1bfee8660131fca7a18f68e9548a18ca6b3378a0"
+SRCREV = "9c6173559f95e939e66efb2ec3193d6f3618cf69"
SRC_URI = "git://git.infradead.org/mtd-utils.git \
file://add-exclusion-to-mkfs-jffs2-git-2.patch \
- file://fix-armv7-neon-alignment.patch \
- file://mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch \
- file://0001-Fix-build-with-musl.patch \
- file://010-fix-rpmatch.patch \
"
S = "${WORKDIR}/git/"
+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)}"
PACKAGECONFIG[xattr] = ",,acl,"
+CPPFLAGS_append_riscv64 = " -pthread -D_REENTRANT"
+
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
-ALTERNATIVE_${PN} = "flash_eraseall"
+# Use higher priority than corresponding BusyBox-provided applets
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
+ALTERNATIVE_${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
+
ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
-# Use higher priority than busybox's flash_eraseall (created when built with CONFIG_FLASH_ERASEALL)
-ALTERNATIVE_PRIORITY[flash_eraseall] = "100"
+ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
+ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach"
+ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol"
+ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename"
+ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol"
+ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol"
+ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol"
+ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
+ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock"
+ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock"
+ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp"
do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
}
-PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc"
+PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc mtd-utils-tests"
FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
+FILES_mtd-utils-tests = "${libexecdir}/mtd-utils/*"
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
index 2e2873a..8ceb0af 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
@@ -1,8 +1,10 @@
Upstream-Status: Inappropriate [licensing]
---- mtools-3.9.9/configure.in.orig 2006-04-14 16:05:54.337655192 -0600
-+++ mtools-3.9.9/configure.in 2006-04-14 16:12:29.736545424 -0600
-@@ -21,6 +21,33 @@
+Index: mtools-4.0.18/configure.in
+===================================================================
+--- mtools-4.0.18.orig/configure.in
++++ mtools-4.0.18/configure.in
+@@ -35,6 +35,33 @@ AC_CANONICAL_SYSTEM
AC_C_CONST
AC_C_INLINE
@@ -36,9 +38,11 @@
dnl Check for configuration options
dnl Enable OS/2 extended density format disks
---- mtools-3.9.9/Makefile.in.sav 2006-04-14 15:56:19.000000000 -0600
-+++ mtools-3.9.9/Makefile.in 2006-04-14 16:15:29.315245312 -0600
-@@ -11,10 +11,11 @@
+Index: mtools-4.0.18/Makefile.in
+===================================================================
+--- mtools-4.0.18.orig/Makefile.in
++++ mtools-4.0.18/Makefile.in
+@@ -26,10 +26,11 @@ USERCFLAGS =
USERLDFLAGS =
USERLDLIBS =
@@ -54,7 +58,7 @@
# do not edit below this line
-@@ -181,7 +182,7 @@
+@@ -198,7 +199,7 @@ dvi: mtools.dvi
ps: mtools.ps
%.ps: %.dvi
@@ -62,4 +66,4 @@
+ $(DVI2PS) -f < $< > $@
pdf: mtools.pdf
- %.pdf: %.texi
+ %.pdf: %.texi sysconfdir.texi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm/0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm/0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch
new file mode 100644
index 0000000..12ae3a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm/0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch
@@ -0,0 +1,27 @@
+From 77c3a77210d8ca8b94e999c711156e984a8dc737 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 31 Mar 2018 11:05:33 -0700
+Subject: [PATCH] asmlib: Drop pure function attribute from seg_init
+
+seg_init returns void, so it is impure function
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ include/nasmlib.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/nasmlib.h b/include/nasmlib.h
+index 79e866b..b80b7e2 100644
+--- a/include/nasmlib.h
++++ b/include/nasmlib.h
+@@ -191,7 +191,7 @@ int64_t readstrnum(char *str, int length, bool *warn);
+ * seg_init: Initialise the segment-number allocator.
+ * seg_alloc: allocate a hitherto unused segment number.
+ */
+-void pure_func seg_init(void);
++void seg_init(void);
+ int32_t pure_func seg_alloc(void);
+
+ /*
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.03.bb
similarity index 68%
rename from import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.03.bb
index bf18cd6..236d7e5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.03.bb
@@ -3,10 +3,12 @@
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
-SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 "
+SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
+ file://0001-asmlib-Drop-pure-function-attribute-from-seg_init.patch \
+ "
-SRC_URI[md5sum] = "1f7d4662040d24351df7d6719ed4f97a"
-SRC_URI[sha256sum] = "08f97baf0a7f892128c6413cfa93b69dc5825fbbd06c70928aea028835d198fa"
+SRC_URI[md5sum] = "0c581d482f39d5111879ca9601938f74"
+SRC_URI[sha256sum] = "63ec86477ad3f0f6292325fd89e1d93aea2e2fd490070863f17d48f7cd387011"
inherit autotools-brokensep
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.8.2.bb
similarity index 82%
rename from import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.8.2.bb
index 4d3b272..c6fcfef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.8.2.bb
@@ -5,9 +5,9 @@
DEPENDS = "re2c-native ninja-native"
-SRCREV = "717b7b4a31db6027207588c0fb89c3ead384747b"
+SRCREV = "253e94c1fa511704baeb61cf69995bbf09ba435e"
-SRC_URI = "git://github.com/martine/ninja.git;branch=release"
+SRC_URI = "git://github.com/ninja-build/ninja.git;branch=release"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
new file mode 100644
index 0000000..6b7ca7d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
@@ -0,0 +1,51 @@
+From ef5db062b7d25e6070acc6922ea48f50491313b5 Mon Sep 17 00:00:00 2001
+From: Michael Hansen <michael.j.hansen@hp.com>
+Date: Mon, 26 Feb 2018 09:42:56 -0800
+Subject: [PATCH 1/2] Only use --sort=name on versions of tar which support it.
+ This fixes compatibility with bsdtar and old versions of GNU tar (e.g.
+ RHEL6).
+
+Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Upstream-Status: Backport
+
+---
+ opkg-build | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+Index: opkg-utils-0.3.6/opkg-build
+===================================================================
+--- opkg-utils-0.3.6.orig/opkg-build
++++ opkg-utils-0.3.6/opkg-build
+@@ -232,6 +232,11 @@ if [ $compressor = "gzip" ] ; then
+ compressorargs=$zipargs
+ fi
+
++tsortargs=
++if tar --help 2>&1 | grep -- "--sort=" > /dev/null; then
++ tsortargs="--sort=name"
++fi
++
+ shift $(($OPTIND - 1))
+
+ # continue on to process additional arguments
+@@ -280,8 +285,8 @@ mkdir $tmp_dir
+ build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
+
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/tarX
+
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -296,7 +301,7 @@ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+ ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext )
+ else
+- ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
++ ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
+ fi
+
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
new file mode 100644
index 0000000..e338914
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
@@ -0,0 +1,44 @@
+From 5727826b51cf99feaff3483a9df8af2043e7efc1 Mon Sep 17 00:00:00 2001
+From: Michael Hansen <michael.j.hansen@hp.com>
+Date: Mon, 26 Feb 2018 10:17:01 -0800
+Subject: [PATCH 2/2] opkg-build: Use local time for build_date, since opkg
+ extracts files assuming local time rather than UTC. Also increase resolution
+ of build date down to the second, rather than clamping to midnight of the
+ current date.
+
+Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Upstream-Status: Backport
+
+---
+ opkg-build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: opkg-utils-0.3.6/opkg-build
+===================================================================
+--- opkg-utils-0.3.6.orig/opkg-build
++++ opkg-utils-0.3.6/opkg-build
+@@ -282,11 +282,11 @@ fi
+ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ mkdir $tmp_dir
+
+-build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
++build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
+
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/tarX
+
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -301,7 +301,7 @@ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+ ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext )
+ else
+- ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
++ ( cd $tmp_dir && tar -c $tsortargs --mtime="$build_date" $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
+ fi
+
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
index 3824eb3..d8931b2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
@@ -18,26 +18,27 @@
Index: git/opkg-build
+
===================================================================
--- git.orig/opkg-build
+++ git/opkg-build
-@@ -250,8 +250,21 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
- mkdir $tmp_dir
+@@ -285,8 +285,21 @@ mkdir $tmp_dir
+ build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
echo $CONTROL > $tmp_dir/tarX
--( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . )
--( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . )
+-( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+
+
+# Ignore error code 1, caused by modifying the number of hard links while creating the tar file
+rc=0
-+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -cz $tarformat -f $tmp_dir/data.tar.gz . ) || rc=$?
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) || rc=$?
+if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
+ exit $rc
+fi
+
+rc=0
-+( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$?
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) || rc=$?
+if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
+ exit $rc
+fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch
new file mode 100644
index 0000000..13a49f9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch
@@ -0,0 +1,18 @@
+Pass --threads=0 to xz so that it will use as many threads as there are cores to compress the packages. This makes qemu's do_package_ipk run in 34s instead of 275s on my machine.
+
+Upstream-Status: Inappropriate (ugly but works, discussing with upstream now)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/opkg-build b/opkg-build
+index 0050c2b..93a7956 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -230,6 +230,8 @@ if gzip --help 2>&1 | grep -- "-T" > /dev/null; then
+ fi
+ if [ $compressor = "gzip" ] ; then
+ compressorargs=$zipargs
++elif [ $compressor = "xz" ] ; then
++ compressorargs="--threads 0"
+ fi
+
+ tsortargs=
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
similarity index 81%
rename from import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
index 646cc8f..0487c5f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
@@ -9,16 +9,21 @@
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-Only-use-sort-name-on-versions-of-tar-which-support-.patch \
+ file://0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch \
+ file://threaded-xz.patch \
"
SRC_URI_append_class-native = " file://tar_ignore_error.patch"
+UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
-SRC_URI[md5sum] = "a19e09c79bf1152aac62e8a120d679ff"
-SRC_URI[sha256sum] = "7f4b08912e26a3f4f6f423f3b4e7157a73b1f3a7483fc59b216d1a80b50b0c38"
+
+SRC_URI[md5sum] = "391c1c80aca26961375dd22e1d2d0cbf"
+SRC_URI[sha256sum] = "26b3f4dd1c1ef65f519d4cddfb35ebea41ae8af989aea2699a39783598c33769"
TARGET_CC_ARCH += "${LDFLAGS}"
# For native builds we use the host Python
-PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-subprocess python3-pickle python3-compression python3-textutils python3-stringold"
+PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-pickle python3-compression python3-stringold"
PYTHONRDEPS_class-native = ""
PACKAGECONFIG = "python update-alternatives"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb
similarity index 94%
rename from import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb
index 3e511b6..70f20af 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb
@@ -17,8 +17,8 @@
file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
"
-SRC_URI[md5sum] = "d202d09ea0932943071b842626cab13c"
-SRC_URI[sha256sum] = "734bc21dea11262113fa86b928d09812618b3966f352350cf916a6ae0d343f32"
+SRC_URI[md5sum] = "79e04307f6f54db431c251772d7d987c"
+SRC_URI[sha256sum] = "f607f0e61be8cf8a3bbd0d2dccd9ec9e9b6c21dd4307b671c600d6eeaf84d30b"
inherit autotools pkgconfig systemd
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.28.bb
similarity index 84%
rename from import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.28.bb
index 303f991..415de64 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.28.bb
@@ -5,8 +5,8 @@
SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
-SRC_URI[md5sum] = "5837dc20dacb5b668935bbded10cbb61"
-SRC_URI[sha256sum] = "51e53e58fc8158e5986a1f1a49a6d970c5b16493841cf7b9de2c2bde7ce36b93"
+SRC_URI[md5sum] = "6b582ec4b3275c5efd51e3ae6406d445"
+SRC_URI[sha256sum] = "bfcd7c6563b05672386c4eedfc4c0d4a0a12b4b4775b74ec6deb88fc2bcd83ce"
inherit autotools pkgconfig gtk-doc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
new file mode 100644
index 0000000..b0bd6fa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
@@ -0,0 +1,35 @@
+From f290f48a621867084884bfff87f8093c15195e6a Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Mon, 12 Feb 2018 16:48:24 +0100
+Subject: [PATCH] Fix segfault with mangled rename patch
+
+http://savannah.gnu.org/bugs/?53132
+* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
+for renames and copies (fix the existing check).
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f290f48a621867084884bfff87f8093c15195e6a]
+CVE: CVE-2018-6951
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ src/pch.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index ff9ed2c..bc6278c 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
+ if ((pch_rename () || pch_copy ())
+ && ! inname
+ && ! ((i == OLD || i == NEW) &&
+- p_name[! reverse] &&
++ p_name[reverse] && p_name[! reverse] &&
++ name_is_valid (p_name[reverse]) &&
+ name_is_valid (p_name[! reverse])))
+ {
+ say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy");
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
new file mode 100644
index 0000000..2a09d0c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
@@ -0,0 +1,38 @@
+From b5a91a01e5d0897facdd0f49d64b76b0f02b43e1 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 11:34:51 +0200
+Subject: [PATCH] Allow input files to be missing for ed-style patches
+
+* src/pch.c (do_ed_script): Allow input files to be missing so that new
+files will be created as with non-ed-style patches.
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=b5a91a01e5d0897facdd0f49d64b76b0f02b43e1]
+CVE: CVE-2018-1000156
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pch.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/pch.c b/src/pch.c
+index bc6278c..0c5cc26 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname,
+
+ if (! dry_run && ! skip_rest_of_patch) {
+ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+- assert (! inerrno);
+- *outname_needs_removal = true;
+- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ if (inerrno != ENOENT)
++ {
++ *outname_needs_removal = true;
++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ }
+ sprintf (buf, "%s %s%s", editor_program,
+ verbosity == VERBOSE ? "" : "- ",
+ outname);
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
new file mode 100644
index 0000000..d74c2f1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
@@ -0,0 +1,215 @@
+From 123eaff0d5d1aebe128295959435b9ca5909c26d Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@gnu.org>
+Date: Fri, 6 Apr 2018 12:14:49 +0200
+Subject: [PATCH] Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)
+
+* src/pch.c (do_ed_script): Write ed script to a temporary file instead
+of piping it to ed: this will cause ed to abort on invalid commands
+instead of rejecting them and carrying on.
+* tests/ed-style: New test case.
+* tests/Makefile.am (TESTS): Add test case.
+
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=123eaff0d5d1aebe128295959435b9ca5909c26d]
+CVE: CVE-2018-1000156
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/pch.c | 91 ++++++++++++++++++++++++++++++++++++++++---------------
+ tests/Makefile.am | 1 +
+ tests/ed-style | 41 +++++++++++++++++++++++++
+ 3 files changed, 108 insertions(+), 25 deletions(-)
+ create mode 100644 tests/ed-style
+
+diff --git a/src/pch.c b/src/pch.c
+index 0c5cc26..4fd5a05 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -33,6 +33,7 @@
+ # include <io.h>
+ #endif
+ #include <safe.h>
++#include <sys/wait.h>
+
+ #define INITHUNKMAX 125 /* initial dynamic allocation size */
+
+@@ -2389,24 +2390,28 @@ do_ed_script (char const *inname, char const *outname,
+ static char const editor_program[] = EDITOR_PROGRAM;
+
+ file_offset beginning_of_this_line;
+- FILE *pipefp = 0;
+ size_t chars_read;
++ FILE *tmpfp = 0;
++ char const *tmpname;
++ int tmpfd;
++ pid_t pid;
++
++ if (! dry_run && ! skip_rest_of_patch)
++ {
++ /* Write ed script to a temporary file. This causes ed to abort on
++ invalid commands such as when line numbers or ranges exceed the
++ number of available lines. When ed reads from a pipe, it rejects
++ invalid commands and treats the next line as a new command, which
++ can lead to arbitrary command execution. */
++
++ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
++ if (tmpfd == -1)
++ pfatal ("Can't create temporary file %s", quotearg (tmpname));
++ tmpfp = fdopen (tmpfd, "w+b");
++ if (! tmpfp)
++ pfatal ("Can't open stream for file %s", quotearg (tmpname));
++ }
+
+- if (! dry_run && ! skip_rest_of_patch) {
+- int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+- if (inerrno != ENOENT)
+- {
+- *outname_needs_removal = true;
+- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
+- }
+- sprintf (buf, "%s %s%s", editor_program,
+- verbosity == VERBOSE ? "" : "- ",
+- outname);
+- fflush (stdout);
+- pipefp = popen(buf, binary_transput ? "wb" : "w");
+- if (!pipefp)
+- pfatal ("Can't open pipe to %s", quotearg (buf));
+- }
+ for (;;) {
+ char ed_command_letter;
+ beginning_of_this_line = file_tell (pfp);
+@@ -2417,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname,
+ }
+ ed_command_letter = get_ed_command_letter (buf);
+ if (ed_command_letter) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (ed_command_letter != 'd' && ed_command_letter != 's') {
+ p_pass_comments_through = true;
+ while ((chars_read = get_line ()) != 0) {
+- if (pipefp)
+- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
++ if (tmpfp)
++ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
+ write_fatal ();
+ if (chars_read == 2 && strEQ (buf, ".\n"))
+ break;
+@@ -2437,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname,
+ break;
+ }
+ }
+- if (!pipefp)
++ if (!tmpfp)
+ return;
+- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0
+- || fflush (pipefp) != 0)
++ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0
++ || fflush (tmpfp) != 0)
+ write_fatal ();
+- if (pclose (pipefp) != 0)
+- fatal ("%s FAILED", editor_program);
++
++ if (lseek (tmpfd, 0, SEEK_SET) == -1)
++ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
++
++ if (! dry_run && ! skip_rest_of_patch) {
++ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
++ *outname_needs_removal = true;
++ if (inerrno != ENOENT)
++ {
++ *outname_needs_removal = true;
++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ }
++ sprintf (buf, "%s %s%s", editor_program,
++ verbosity == VERBOSE ? "" : "- ",
++ outname);
++ fflush (stdout);
++
++ pid = fork();
++ if (pid == -1)
++ pfatal ("Can't fork");
++ else if (pid == 0)
++ {
++ dup2 (tmpfd, 0);
++ execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
++ _exit (2);
++ }
++ else
++ {
++ int wstatus;
++ if (waitpid (pid, &wstatus, 0) == -1
++ || ! WIFEXITED (wstatus)
++ || WEXITSTATUS (wstatus) != 0)
++ fatal ("%s FAILED", editor_program);
++ }
++ }
++
++ fclose (tmpfp);
++ safe_unlink (tmpname);
+
+ if (ofp)
+ {
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 6b6df63..16f8693 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -32,6 +32,7 @@ TESTS = \
+ crlf-handling \
+ dash-o-append \
+ deep-directories \
++ ed-style \
+ empty-files \
+ false-match \
+ fifo \
+diff --git a/tests/ed-style b/tests/ed-style
+new file mode 100644
+index 0000000..d8c0689
+--- /dev/null
++++ b/tests/ed-style
+@@ -0,0 +1,41 @@
++# Copyright (C) 2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++. $srcdir/test-lib.sh
++
++require cat
++use_local_patch
++use_tmpdir
++
++# ==============================================================
++
++cat > ed1.diff <<EOF
++0a
++foo
++.
++EOF
++
++check 'patch -e foo -i ed1.diff' <<EOF
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
++
++cat > ed2.diff <<EOF
++1337a
++r !echo bar
++,p
++EOF
++
++check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
++?
++Status: 2
++EOF
++
++check 'cat foo' <<EOF
++foo
++EOF
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.5.bb
deleted file mode 100644
index 151f021..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.5.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require patch.inc
-LICENSE = "GPLv3"
-
-SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
-
-SRC_URI[md5sum] = "ed4d5674ef4543b4eb463db168886dc7"
-SRC_URI[sha256sum] = "7436f5a19f93c3ca83153ce9c5cbe4847e97c5d956e57a220121e741f6e7968f"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-acpaths = "-I ${S}/m4 "
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.6.bb
new file mode 100644
index 0000000..823486d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patch/patch_2.7.6.bb
@@ -0,0 +1,19 @@
+require patch.inc
+LICENSE = "GPLv3"
+
+SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://0002-Fix-segfault-with-mangled-rename-patch.patch \
+ file://0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch \
+ file://0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch \
+"
+
+SRC_URI[md5sum] = "4c68cee989d83c87b00a3860bcd05600"
+SRC_URI[sha256sum] = "8cf86e00ad3aaa6d26aca30640e86b0e3e1f395ed99f189b06d4c9f74bc58a4e"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+acpaths = "-I ${S}/m4 "
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17024.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17025.bb
similarity index 72%
rename from import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17024.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17025.bb
index 6ae0e7e..f6dc30d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17024.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/liberror-perl_0.17025.bb
@@ -13,16 +13,21 @@
SRC_URI = "http://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Error-${PV}.tar.gz"
-SRC_URI[md5sum] = "7e3676a7fb14f65f568f12d4b40a2a72"
-SRC_URI[sha256sum] = "074db7c783a67b0667eca64a4f6a0c3de94998afc92c01d6453163eb04b9150d"
+SRC_URI[md5sum] = "1a2ee7f0dc44f9ee76661a16bbbc0c48"
+SRC_URI[sha256sum] = "6c9f474ad3d4fe0cabff6b6be532cb1dd348245986d4a6b600ad921d5cfdefaf"
S = "${WORKDIR}/Error-${PV}"
-inherit cpan
+inherit cpan ptest-perl
do_compile() {
export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
cpan_do_compile
}
+do_install_prepend() {
+ # test requires "-T" (taint) command line option
+ rm -rf ${B}/t/pod-coverage.t
+}
+
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb
new file mode 100644
index 0000000..e5ab7a3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Skip tests when modules not available"
+DESCRIPTION = "Skip test scripts if modules are not available. \
+The requested modules will be loaded, and optionally have their versions \
+checked. If the module is missing, the test script will be skipped. Modules \
+that are found but fail to compile will exit with an error rather than skip."
+
+HOMEPAGE = "https://metacpan.org/release/Test-Needs"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+
+CPAN_NAME = "Test-Needs"
+CPAN_AUTHOR = "HAARG"
+
+LIC_FILES_CHKSUM = "file://README;md5=3f3ccd21a0a48aa313db212cc3b1bc09;beginline=81;endline=82"
+
+DEPENDS += "perl"
+
+SRC_URI = "http://www.cpan.org/authors/id/H/HA/${CPAN_AUTHOR}/${CPAN_NAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "356634a56c99282e8059f290f5d534c8"
+SRC_URI[sha256sum] = "5a4f33983586edacdbe00a3b429a9834190140190dab28d0f873c394eb7df399"
+
+S = "${WORKDIR}/${CPAN_NAME}-${PV}"
+
+inherit cpan ptest-perl
+
+RDEPENDS_${PN}-ptest += "perl-module-test-more"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.73.bb
similarity index 70%
rename from import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.73.bb
index a399c10..49238f3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.73.bb
@@ -13,18 +13,26 @@
SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz"
-SRC_URI[md5sum] = "cd56d81ed429efaa97e7f3ff08851b48"
-SRC_URI[sha256sum] = "35f14431d4b300de4be1163b0b5332de2d7fbda4f05ff1ed198a8e9330d40a32"
+SRC_URI[md5sum] = "37d44a08e599aa945b32a9434ffe00a5"
+SRC_URI[sha256sum] = "cca7ab4a6f63f3ccaacae0f2e1337e8edf84137e73f18548ec7d659f23efe413"
S = "${WORKDIR}/URI-${PV}"
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
-inherit cpan
+inherit cpan ptest-perl
do_compile() {
export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
cpan_do_compile
}
+do_install_prepend() {
+ # these tests require "-T" (taint) command line option
+ rm -rf ${B}/t/cwd.t
+ rm -rf ${B}/t/file.t
+}
+
+RDEPENDS_${PN}-ptest += "libtest-needs-perl"
+
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index cc3a660..c5e0ae6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -14,7 +14,7 @@
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'"
-inherit cpan
+inherit cpan ptest-perl
# fix up sub MakeMaker project as arguments don't get propagated though
# see https://rt.cpan.org/Public/Bug/Display.html?id=28632
@@ -34,4 +34,13 @@
cpan_do_compile
}
+do_install_ptest() {
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
+ sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
+ cp -r ${B}/samples ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}/samples
+}
+
BBCLASSEXTEND="native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
index 0478427..0f60998 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb
@@ -19,7 +19,7 @@
EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
-inherit cpan
+inherit cpan ptest-perl
do_compile() {
export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
index 0cf2eeb..f9d00d2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
@@ -19,6 +19,6 @@
EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
-inherit cpan
+inherit cpan ptest-perl
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb
index 6c56a7d..71f4589 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb
@@ -1,8 +1,7 @@
require perl.inc
# We need gnugrep (for -I)
-DEPENDS = "virtual/db-native grep-native"
-DEPENDS += "gdbm-native zlib-native"
+DEPENDS = "db-native grep-native gdbm-native zlib-native"
EXTRA_OEMAKE = "-e MAKEFLAGS="
@@ -16,6 +15,7 @@
file://dynaloaderhack.patch \
file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
file://0001-Configure-Remove-fstack-protector-strong-for-native-.patch \
+ file://perl-5.26.1-guard_old_libcrypt_fix.patch \
"
SRC_URI[md5sum] = "af6a84c7c3e2b8b269c105a5db2f6d53"
@@ -135,3 +135,5 @@
# Fix the path in sstate
SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
+PACKAGES_DYNAMIC_class-native += "^perl-module-.*native$"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
index 1f549af..6a7a2d7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
@@ -2,31 +2,43 @@
SRC_URI += "file://run-ptest \
"
-
do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/*
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
- tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
+ tar -c --exclude='*.o' --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
+ --exclude=cygwin --exclude=os2 --exclude=djgpp --exclude=qnx --exclude=symbian --exclude=haiku \
+ --exclude=vms --exclude=vos --exclude=NetWare --exclude=amigaos4 --exclude=buildcustomize.pl \
+ --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 )
- sed -i -e "s,${D},,g" \
+ ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
+
+ # Remove build host references from various scattered files...
+ 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' \) \
+ -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,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_LIBDIR},${libdir},g" \
-e "s,${STAGING_BINDIR},${bindir},g" \
-e "s,${STAGING_INCDIR},${includedir},g" \
- -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_BINDIR_NATIVE}/,,g" \
-e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
- ${D}${PTEST_PATH}/lib/Config.pm \
- ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2man \
- ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2text
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ {} +
- ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
- # Remove plan9 related stuff
- rm -rf ${D}${PTEST_PATH}/plan9 ${D}${PTEST_PATH}/README.plan9 ${D}${PTEST_PATH}/pod/perlplan9.pod
+ # Remove a useless timestamp...
+ sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst
}
python populate_packages_prepend() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch
new file mode 100644
index 0000000..0b59fcd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch
@@ -0,0 +1,32 @@
+From 73d7247ecab863ef26b5687a37ccc75d6144ad0f Mon Sep 17 00:00:00 2001
+From: Karl Williamson <khw@cpan.org>
+Date: Tue, 17 Oct 2017 13:49:14 +0800
+Subject: [PATCH] fix CVE-2017-12837
+
+Signed-off-by: Karl Williamson <khw@cpan.org>
+Signed-off-by: Steve Hay <steve.m.hay@googlemail.com>
+
+CVE: CVE-2017-12837
+Upstream-Status: Backport
+https://perl5.git.perl.org/perl.git/commitdiff/96c83ed78aeea1a0496dd2b2d935869a822dc8a5
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ regcomp.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/regcomp.c b/regcomp.c
+index 5498d14..31ec383 100644
+--- a/regcomp.c
++++ b/regcomp.c
+@@ -13021,6 +13021,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
+ goto loopdone;
+ }
+ p = RExC_parse;
++ RExC_parse = parse_start;
+ if (ender > 0xff) {
+ REQUIRE_UTF8(flagp);
+ }
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch
new file mode 100644
index 0000000..5c1805f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch
@@ -0,0 +1,44 @@
+From 40b3cdad3649334585cee8f4630ec9a025e62be6 Mon Sep 17 00:00:00 2001
+From: Karl Williamson <khw@cpan.org>
+Date: Fri, 25 Aug 2017 11:33:58 -0600
+Subject: [PATCH] PATCH: [perl #131598]
+
+The cause of this is that the vFAIL macro uses RExC_parse, and that
+variable has just been changed in preparation for code after the vFAIL.
+The solution is to not change RExC_parse until after the vFAIL.
+
+This is a case where the macro hides stuff that can bite you.
+
+(cherry picked from commit 2be4edede4ae226e2eebd4eff28cedd2041f300f)
+
+Upstream-Status: Backport
+CVE: CVE-2017-12833
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ regcomp.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+Index: perl-5.24.1/regcomp.c
+===================================================================
+--- perl-5.24.1.orig/regcomp.c
++++ perl-5.24.1/regcomp.c
+@@ -11918,14 +11918,16 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pREx
+ }
+ sv_catpv(substitute_parse, ")");
+
+- RExC_parse = RExC_start = RExC_adjusted_start = SvPV(substitute_parse,
+- len);
++ len = SvCUR(substitute_parse);
+
+ /* Don't allow empty number */
+ if (len < (STRLEN) 8) {
+ RExC_parse = endbrace;
+ vFAIL("Invalid hexadecimal number in \\N{U+...}");
+ }
++
++ RExC_parse = RExC_start = RExC_adjusted_start
++ = SvPV_nolen(substitute_parse);
+ RExC_end = RExC_parse + len;
+
+ /* The values are Unicode, and therefore not subject to recoding, but
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
index fd8237f..c1db335 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
@@ -12,10 +12,10 @@
Makefile.SH | 147 ++++++++++++++++++++++++++++--------------------------------
1 file changed, 68 insertions(+), 79 deletions(-)
-diff --git a/Makefile.SH b/Makefile.SH
-index 916b332..b143d46 100755
---- a/Makefile.SH
-+++ b/Makefile.SH
+Index: perl-5.24.1/Makefile.SH
+===================================================================
+--- perl-5.24.1.orig/Makefile.SH
++++ perl-5.24.1/Makefile.SH
@@ -48,10 +48,10 @@ case "$useshrplib" in
true)
# Prefix all runs of 'miniperl' and 'perl' with
@@ -74,6 +74,10 @@
-all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
- @echo " ";
- @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
+-
+-$(MANIFEST_SRT): MANIFEST $(PERL_EXE)
+- @$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
+- $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
+#all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
+# @echo " ";
+# @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
@@ -83,10 +87,7 @@
+more: $(generated_pods) $(private) $(public)
+
+more2: $(dynamic_ext)
-
--$(MANIFEST_SRT): MANIFEST $(PERL_EXE)
-- @$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
-- $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
++
+more3: $(nonxs_ext)
+
+more4: extras.make $(MANIFEST_SRT)
@@ -151,7 +152,7 @@
./$(MINIPERLEXP) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
!NO!SUBS!
-@@ -878,7 +878,7 @@ $(LIBPERL): $& $(perllib_objs) $(DYNALOADER) $(LIBPERLEXPORT)
+@@ -878,7 +878,7 @@ $(LIBPERL): $& $(perllib_objs) $(DYNALOA
true)
$spitshell >>$Makefile <<'!NO!SUBS!'
rm -f $@
@@ -160,7 +161,7 @@
!NO!SUBS!
case "$osname" in
aix)
-@@ -936,15 +936,19 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
+@@ -936,15 +936,19 @@ lib/buildcustomize.pl: $& $(miniperl_obj
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs)
$(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(miniperl_objs) $(libs)
@@ -183,7 +184,7 @@
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
;;
-@@ -966,7 +970,9 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
+@@ -966,7 +970,9 @@ lib/buildcustomize.pl: $& $(miniperl_obj
-@rm -f miniperl.xok
$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
@@ -194,7 +195,7 @@
$(MINIPERL) -f write_buildcustomize.pl
!NO!SUBS!
;;
-@@ -977,7 +983,9 @@ lib/buildcustomize.pl: \$& \$(miniperl_objs) write_buildcustomize.pl
+@@ -977,7 +983,9 @@ lib/buildcustomize.pl: \$& \$(miniperl_o
-@rm -f miniperl.xok
-@rm \$(MINIPERL_EXE)
\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
@@ -205,7 +206,7 @@
\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
!GROK!THIS!
else
-@@ -986,7 +994,9 @@ lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
+@@ -986,7 +994,9 @@ lib/buildcustomize.pl: $& $(miniperl_obj
-@rm -f miniperl.xok
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
@@ -225,7 +226,7 @@
-@for f in Makefile.PL PPPort_pm.PL PPPort_xs.PL ppport_h.PL; do \
(cd ext/Devel-PPPort && `pwd`/run.sh ../../$(MINIPERL_EXE) -I../../lib \$\$f); \
done
-@@ -1046,7 +1056,7 @@ makeppport: \$(MINIPERL_EXE) \$(CONFIGPM)
+@@ -1046,7 +1056,7 @@ makeppport: \$(MINIPERL_EXE) \$(CONFIGPM
*)
$spitshell >>$Makefile <<'!NO!SUBS!'
.PHONY: makeppport
@@ -254,7 +255,7 @@
$(MINIPERL) lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
# Commented out so always runs, mktables looks at far more files than we
# can in this makefile to decide if needs to run or not
-@@ -1074,12 +1084,12 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
+@@ -1074,12 +1084,12 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) li
# $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
# But also this ensures that all extensions are built before we try to scan
# them, which picks up Devel::PPPort's documentation.
@@ -270,9 +271,9 @@
$(MINIPERL) autodoc.pl
pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
-@@ -1089,7 +1099,7 @@ pod/perl5240delta.pod: pod/perldelta.pod
- $(RMS) pod/perl5240delta.pod
- $(LNS) perldelta.pod pod/perl5240delta.pod
+@@ -1089,7 +1099,7 @@ pod/perl5241delta.pod: pod/perldelta.pod
+ $(RMS) pod/perl5241delta.pod
+ $(LNS) perldelta.pod pod/perl5241delta.pod
-extra.pods: $(MINIPERL_EXE)
+extra.pods:
@@ -345,7 +346,7 @@
$(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
n_dummy $(nonxs_ext): $(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE
-@@ -1479,14 +1468,14 @@ test_prep_pre: preplibrary utilities $(nonxs_ext)
+@@ -1479,14 +1468,14 @@ test_prep_pre: preplibrary utilities $(n
case "$targethost" in
'') $spitshell >>$Makefile <<'!NO!SUBS!'
@@ -362,7 +363,7 @@
\$(dynamic_ext) \$(TEST_PERL_DLL) runtests \
\$(generated_pods)
$to libperl.*
-@@ -1539,7 +1528,7 @@ test_prep test-prep: test_prep_pre \$(MINIPERL_EXE) \$(unidatafiles) \$(PERL_EXE
+@@ -1539,7 +1528,7 @@ test_prep test-prep: test_prep_pre \$(MI
esac
$spitshell >>$Makefile <<'!NO!SUBS!'
@@ -380,6 +381,3 @@
- cd t && $(RUN_PERL) TEST $(MINITEST_TESTS) <$(devtty)
minitest-notty minitest_notty: $(MINIPERL_EXE) minitest_prep
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
index 4657673..ac0484c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
@@ -361,7 +361,7 @@
d_ldexpl='define'
d_lgamma='define'
d_lgamma_r='define'
-d_libm_lib_version='define'
+d_libm_lib_version='undef'
d_libname_unique='undef'
d_link='define'
d_llrint='define'
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
index a00ad61..33e2222 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/cross-generate_uudmap.patch
@@ -1,15 +1,15 @@
Upstream-Status:Inappropriate [embedded specific]
-Index: perl-5.14.2/Makefile.SH
+Index: perl-5.24.1/Makefile.SH
===================================================================
---- perl-5.14.2.orig/Makefile.SH
-+++ perl-5.14.2/Makefile.SH
-@@ -622,7 +622,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
- $(RUN) ./generate_uudmap$(HOST_EXE_EXT) uudmap.h bitcount.h
+--- perl-5.24.1.orig/Makefile.SH
++++ perl-5.24.1/Makefile.SH
+@@ -710,7 +710,7 @@ bitcount.h: generate_uudmap\$(HOST_EXE_E
+ $spitshell >>$Makefile <<'!NO!SUBS!'
generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
- $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
+ $(BUILD_CC) -o generate_uudmap$(EXE_EXT) generate_uudmap.c
- miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
- $(CCCMD) $(PLDLFLAGS) $*.c
+ !NO!SUBS!
+ ;;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
index 7650128..49efcbe 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
@@ -10,15 +10,15 @@
It is a fix to MakeMaker within perl, so all such perl recipes will get
fixed with this perl fix.
-Index: perl-5.14.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+Index: perl-5.24.1/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
===================================================================
---- perl-5.14.2.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-+++ perl-5.14.2/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-@@ -55,6 +55,7 @@ sub _unix_os2_ext {
- my($found) = 0;
+--- perl-5.24.1.orig/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
++++ perl-5.24.1/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+@@ -57,6 +57,7 @@ sub _unix_os2_ext {
+ my ( $found ) = 0;
# Debian-specific: don't use LD_RUN_PATH for standard dirs
+ push(@libpath, "SYSROOTLIB");
$ld_run_path_seen{$_}++ for @libpath;
- foreach my $thislib (split ' ', $potential_libs) {
+ foreach my $thislib ( split ' ', $potential_libs ) {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch
index 4560123..7fd1f50 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/installperl.patch
@@ -1,12 +1,12 @@
Upstream-Status:Inappropriate [embedded specific]
-Index: perl-5.12.3/installperl
+Index: perl-5.24.1/installperl
===================================================================
---- perl-5.12.3.orig/installperl
-+++ perl-5.12.3/installperl
-@@ -3,8 +3,8 @@
+--- perl-5.24.1.orig/installperl
++++ perl-5.24.1/installperl
+@@ -2,8 +2,8 @@
+
BEGIN {
- require 5.004;
chdir '..' if !-d 'lib' and -d '../lib';
- @INC = 'lib';
- $ENV{PERL5LIB} = 'lib';
@@ -14,4 +14,4 @@
+# $ENV{PERL5LIB} = 'lib';
# This needs to be at BEGIN time, before any use of Config
- require './install_lib.pl';
+ # install_lib itself loads and imports Config into main::
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
index de6f652..b2c5979 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch
@@ -10,10 +10,10 @@
make_ext.pl | 4 ++++
1 file changed, 4 insertions(+)
-diff --git a/make_ext.pl b/make_ext.pl
-index b433762..9fc1a36 100644
---- a/make_ext.pl
-+++ b/make_ext.pl
+Index: perl-5.24.1/make_ext.pl
+===================================================================
+--- perl-5.24.1.orig/make_ext.pl
++++ perl-5.24.1/make_ext.pl
@@ -335,6 +335,10 @@ sub build_extension {
print "Deleting non-Cross makefile\n";
close $mfh or die "close $makefile: $!";
@@ -24,7 +24,4 @@
+ }
}
}
- }
---
-1.8.1.2
-
+ } else {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch
new file mode 100644
index 0000000..ff3d6dc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-5.26.1-guard_old_libcrypt_fix.patch
@@ -0,0 +1,28 @@
+commit 13e70b397dcb0d1bf4a869b670f041c1d7b730d0
+Author: Bjรถrn Esser <besser82@fedoraproject.org>
+Date: Sat Jan 20 20:22:53 2018 +0100
+
+ pp: Guard fix for really old bug in glibc libcrypt
+
+Upstream-Status: Pending
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+diff --git a/pp.c b/pp.c
+index d50ad7ddbf..6510c7b15c 100644
+--- a/pp.c
++++ b/pp.c
+@@ -3650,8 +3650,12 @@ PP(pp_crypt)
+ #if defined(__GLIBC__) || defined(__EMX__)
+ if (PL_reentrant_buffer->_crypt_struct_buffer) {
+ PL_reentrant_buffer->_crypt_struct_buffer->initialized = 0;
+- /* work around glibc-2.2.5 bug */
++#if (defined(__GLIBC__) && __GLIBC__ == 2) && \
++ (defined(__GLIBC_MINOR__) && __GLIBC_MINOR__ >= 2 && __GLIBC_MINOR__ < 4)
++ /* work around glibc-2.2.5 bug, has been fixed at some
++ * time in glibc-2.3.X */
+ PL_reentrant_buffer->_crypt_struct_buffer->current_saltbits = 0;
++#endif
+ }
+ #endif
+ }
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
index d912d00..37bf523 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-archlib-exp.patch
@@ -25,16 +25,16 @@
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
-Index: perl-5.14.2/config_h.SH
+Index: perl-5.24.1/config_h.SH
===================================================================
---- perl-5.14.2.orig/config_h.SH
-+++ perl-5.14.2/config_h.SH
-@@ -996,7 +996,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#und
+--- perl-5.24.1.orig/config_h.SH
++++ perl-5.24.1/config_h.SH
+@@ -1434,7 +1434,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#und
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
#$d_archlib ARCHLIB "$archlib" /**/
-#$d_archlib ARCHLIB_EXP "$archlibexp" /**/
+#$d_archlib ARCHLIB_EXP "$archlib_exp" /**/
- /* ARCHNAME:
- * This symbol holds a string representing the architecture name.
+ /* BIN:
+ * This symbol holds the path of the bin directory where the package will
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch
index 035beba..2572067 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-dynloader.patch
@@ -7,13 +7,13 @@
Update by Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/21
-Index: perl-5.14.2/dist/XSLoader/XSLoader_pm.PL
+Index: perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
===================================================================
---- perl-5.14.2.orig/dist/XSLoader/XSLoader_pm.PL
-+++ perl-5.14.2/dist/XSLoader/XSLoader_pm.PL
-@@ -28,6 +28,20 @@ sub load {
-
- my ($module, $modlibname) = caller();
+--- perl-5.24.1.orig/dist/XSLoader/XSLoader_pm.PL
++++ perl-5.24.1/dist/XSLoader/XSLoader_pm.PL
+@@ -52,6 +52,20 @@ sub load {
+ my ($caller, $modlibname) = caller();
+ my $module = $caller;
+ # OE: Allow env to form dynamic loader to look in a different place
+ # This is so it finds the host .so files, not the targets
@@ -30,5 +30,5 @@
+ }
+
if (@_) {
- $module = $_[0];
+ $module = $_[0];
} else {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch
deleted file mode 100644
index aa83fca..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-enable-gdbm.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status:Inappropriate [embedded specific]
-
-Index: perl-5.8.8/config_h.SH
-===================================================================
---- perl-5.8.8.orig/config_h.SH 2005-11-01 02:13:05.000000000 +0800
-+++ perl-5.8.8/config_h.SH 2010-11-01 17:06:07.215219738 +0800
-@@ -709,6 +709,12 @@
- */
- #$i_float I_FLOAT /**/
-
-+/* I_GDBM:
-+ * This symbol, if defined, indicates that <gdbm.h> exists and should
-+ * be included.
-+ */
-+#$i_gdbm I_GDBM /**/
-+
- /* I_LIMITS:
- * This symbol, if defined, indicates to the C program that it should
- * include <limits.h> to get definition of symbols like WORD_BIT or
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
index 90e4dcd..1d9a56d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
@@ -32,7 +32,7 @@
ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm 0e1e4c25eddb999fec6c4dc66593f76db34cfd16
-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm bfd2aa00ca4ed251f342e1d1ad704abbaf5a615e
-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 5529ae3064365eafd99536621305d52f4ab31b45
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm d593d8fdc5c0ebcb6d3701c70fc6640c50d93455
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm f1ca5ec247eb69ba13a269f34dc205da37b61244
+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1
ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm bc88b275af73b8faac6abd59a9aad3f625925810
ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod 062e5d14a803fbbec8d61803086a3d7997e8a473
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb
index b55d222..91f310d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb
@@ -1,8 +1,7 @@
require perl.inc
# We need gnugrep (for -I)
-DEPENDS = "virtual/db grep-native"
-DEPENDS += "gdbm zlib"
+DEPENDS = "db grep-native gdbm zlib virtual/crypt"
# Pick up patches from debian
# http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz
@@ -46,7 +45,6 @@
file://letgcc-find-errno.patch \
file://generate-sh.patch \
file://native-perlinc.patch \
- file://perl-enable-gdbm.patch \
file://cross-generate_uudmap.patch \
file://fix_bad_rpath.patch \
file://dynaloaderhack.patch \
@@ -65,6 +63,9 @@
file://perl-errno-generation-gcc5.patch \
file://perl-fix-conflict-between-skip_all-and-END.patch \
file://perl-test-customized.patch \
+ file://perl-5.26.1-guard_old_libcrypt_fix.patch \
+ file://CVE-2017-12883.patch \
+ file://CVE-2017-12837.patch \
"
# Fix test case issues
@@ -189,6 +190,19 @@
oe_runmake perl LD="${CCLD}"
}
+do_compile_append_class-target() {
+ # Remove build host references from numerous comments...
+ find "${S}/cpan/Encode" -type f \
+ \( -name '*.exh' -o -name '*.c' -o -name '*.h' \)\
+ -exec sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' {} +
+ sed -i -e 's:${RECIPE_SYSROOT}::g' ${S}/perl.h ${S}/pp.h
+ sed -i -e 's:${RECIPE_SYSROOT_NATIVE}/usr/bin/perl-native/perl${PV}.real:/usr/bin/perl${PV}:g' \
+ ${S}/cpan/Compress-Raw-Bzip2/constants.h \
+ ${S}/cpan/Compress-Raw-Zlib/constants.h \
+ ${S}/cpan/IPC-SysV/const-c.inc \
+ ${S}/dist/Time-HiRes/const-c.inc
+}
+
do_install() {
#export hostperl="${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
oe_runmake install DESTDIR=${D}
@@ -232,6 +246,7 @@
-e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-e "s,${STAGING_BINDIR_NATIVE}/,,g" \
-e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
+ -e 's:${RECIPE_SYSROOT}::g' \
${PKGD}${bindir}/h2xs \
${PKGD}${bindir}/h2ph \
${PKGD}${bindir}/pod2man \
@@ -267,6 +282,7 @@
FILES_${PN}-lib = "${libdir}/libperl.so* \
${libdir}/perl5 \
${libdir}/perl/config.sh \
+ ${libdir}/perl/${PV}/Config_git.pl \
${libdir}/perl/${PV}/Config_heavy.pl \
${libdir}/perl/${PV}/Config_heavy-target.pl"
FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
@@ -324,7 +340,7 @@
d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
}
-PACKAGES_DYNAMIC += "^perl-module-.*"
+PACKAGES_DYNAMIC += "^perl-module-.*(?<!\-native)$"
PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*"
RPROVIDES_perl-lib = "perl-lib"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch
deleted file mode 100644
index 3805ad3..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-From 4d7b4d7c8e9966c593f472355607204c6c80fecb Mon Sep 17 00:00:00 2001
-From: Dan Kegel <dank@kegel.com>
-Date: Sun, 4 Jun 2017 19:19:55 -0700
-Subject: [PATCH] Minimal tweaks to compile with Visual C 2015
-
-Upstream-Status: Backport
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- getopt_long.c | 2 ++
- libpkgconf/bsdstubs.c | 1 +
- libpkgconf/libpkgconf.h | 2 +-
- libpkgconf/path.c | 10 +++++-----
- libpkgconf/pkg.c | 28 +++++++++++++++++++---------
- libpkgconf/stdinc.h | 9 +++++++--
- 6 files changed, 35 insertions(+), 17 deletions(-)
-
-diff --git a/getopt_long.c b/getopt_long.c
-index afeb68d..5ce9bfd 100644
---- a/getopt_long.c
-+++ b/getopt_long.c
-@@ -62,7 +62,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifndef _WIN32
- #include <unistd.h>
-+#endif
-
- #define PKGCONF_HACK_LOGICAL_OR_ALL_VALUES
-
-diff --git a/libpkgconf/bsdstubs.c b/libpkgconf/bsdstubs.c
-index 8f70ff3..2c000ac 100644
---- a/libpkgconf/bsdstubs.c
-+++ b/libpkgconf/bsdstubs.c
-@@ -17,6 +17,7 @@
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-+#include <stdlib.h>
- #include <sys/types.h>
- #include <string.h>
-
-diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h
-index 404bf0c..551d85d 100644
---- a/libpkgconf/libpkgconf.h
-+++ b/libpkgconf/libpkgconf.h
-@@ -310,7 +310,7 @@ void pkgconf_audit_log_dependency(pkgconf_client_t *client, const pkgconf_pkg_t
- /* path.c */
- void pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter);
- size_t pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter);
--size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter);
-+size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter);
- bool pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist);
- void pkgconf_path_free(pkgconf_list_t *dirlist);
- bool pkgconf_path_relocate(char *buf, size_t buflen);
-diff --git a/libpkgconf/path.c b/libpkgconf/path.c
-index dddb3bf..59e003e 100644
---- a/libpkgconf/path.c
-+++ b/libpkgconf/path.c
-@@ -20,7 +20,7 @@
- # include <sys/cygwin.h>
- #endif
-
--#ifdef HAVE_SYS_STAT_H
-+#if defined(HAVE_SYS_STAT_H) && ! defined(_WIN32)
- # include <sys/stat.h>
- # define PKGCONF_CACHE_INODES
- #endif
-@@ -156,12 +156,12 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter)
- /*
- * !doc
- *
-- * .. c:function:: size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist)
-+ * .. c:function:: size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist)
- *
- * Adds the paths specified in an environment variable to a path list. If the environment variable is not set,
- * an optional default set of paths is added.
- *
-- * :param char* environ: The environment variable to look up.
-+ * :param char* envvarname: The environment variable to look up.
- * :param char* fallback: The fallback paths to use if the environment variable is not set.
- * :param pkgconf_list_t* dirlist: The path list to add the path nodes to.
- * :param bool filter: Whether to perform duplicate filtering.
-@@ -169,11 +169,11 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter)
- * :rtype: size_t
- */
- size_t
--pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter)
-+pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter)
- {
- const char *data;
-
-- data = getenv(environ);
-+ data = getenv(envvarname);
- if (data != NULL)
- return pkgconf_path_split(data, dirlist, filter);
-
-diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c
-index 7aebd61..5dacae3 100644
---- a/libpkgconf/pkg.c
-+++ b/libpkgconf/pkg.c
-@@ -30,6 +30,8 @@
- # define PKG_CONFIG_REG_KEY "Software\\pkgconfig\\PKG_CONFIG_PATH"
- # undef PKG_DEFAULT_PATH
- # define PKG_DEFAULT_PATH "../lib/pkgconfig;../share/pkgconfig"
-+#define strncasecmp _strnicmp
-+#define strcasecmp _stricmp
- #endif
-
- #define PKG_CONFIG_EXT ".pc"
-@@ -134,21 +136,21 @@ static int pkgconf_pkg_parser_keyword_pair_cmp(const void *key, const void *ptr)
- static void
- pkgconf_pkg_parser_tuple_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
- {
-- char **dest = ((void *) pkg + offset);
-+ char **dest = (char **)((char *) pkg + offset);
- *dest = pkgconf_tuple_parse(client, &pkg->vars, value);
- }
-
- static void
- pkgconf_pkg_parser_fragment_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
- {
-- pkgconf_list_t *dest = ((void *) pkg + offset);
-+ pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset);
- pkgconf_fragment_parse(client, dest, &pkg->vars, value);
- }
-
- static void
- pkgconf_pkg_parser_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
- {
-- pkgconf_list_t *dest = ((void *) pkg + offset);
-+ pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset);
- pkgconf_dependency_parse(client, pkg, dest, value);
- }
-
-@@ -238,7 +240,7 @@ pkgconf_pkg_validate(const pkgconf_client_t *client, const pkgconf_pkg_t *pkg)
-
- for (i = 0; i < PKGCONF_ARRAY_SIZE(pkgconf_pkg_validations); i++)
- {
-- char **p = ((void *) pkg + pkgconf_pkg_validations[i].offset);
-+ char **p = (char **)((char *) pkg + pkgconf_pkg_validations[i].offset);
-
- if (*p != NULL)
- continue;
-@@ -587,7 +589,7 @@ pkgconf_scan_all(pkgconf_client_t *client, void *data, pkgconf_pkg_iteration_fun
-
- #ifdef _WIN32
- static pkgconf_pkg_t *
--pkgconf_pkg_find_in_registry_key(const pkgconf_client_t *client, HKEY hkey, const char *name)
-+pkgconf_pkg_find_in_registry_key(pkgconf_client_t *client, HKEY hkey, const char *name)
- {
- pkgconf_pkg_t *pkg = NULL;
-
-@@ -1048,8 +1050,12 @@ typedef struct {
-
- static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_rules[] = {
- [PKGCONF_CMP_ANY] = {
-- .rulecmp = {},
-- .depcmp = {},
-+ .rulecmp = {
-+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
-+ },
-+ .depcmp = {
-+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
-+ },
- },
- [PKGCONF_CMP_LESS_THAN] = {
- .rulecmp = {
-@@ -1121,7 +1127,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_
- [PKGCONF_CMP_EQUAL] = pkgconf_pkg_comparator_eq,
- [PKGCONF_CMP_NOT_EQUAL] = pkgconf_pkg_comparator_ne
- },
-- .depcmp = {},
-+ .depcmp = {
-+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
-+ },
- },
- [PKGCONF_CMP_NOT_EQUAL] = {
- .rulecmp = {
-@@ -1133,7 +1141,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_
- [PKGCONF_CMP_EQUAL] = pkgconf_pkg_comparator_ne,
- [PKGCONF_CMP_NOT_EQUAL] = pkgconf_pkg_comparator_eq
- },
-- .depcmp = {},
-+ .depcmp = {
-+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
-+ },
- },
- };
-
-diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h
-index 58cc6c7..ac7e53c 100644
---- a/libpkgconf/stdinc.h
-+++ b/libpkgconf/stdinc.h
-@@ -24,9 +24,7 @@
- #include <stdbool.h>
- #include <stdarg.h>
- #include <string.h>
--#include <dirent.h>
- #include <sys/types.h>
--#include <unistd.h>
- #include <stdint.h>
-
- #ifdef _WIN32
-@@ -34,8 +32,15 @@
- # include <windows.h>
- # include <malloc.h>
- # define PATH_DEV_NULL "nul"
-+# ifndef ssize_t
-+# include <BaseTsd.h>
-+# define ssize_t SSIZE_T
-+# endif
-+# include "win-dirent.h"
- #else
- # define PATH_DEV_NULL "/dev/null"
-+# include <dirent.h>
-+# include <unistd.h>
- #endif
-
- #endif
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch
deleted file mode 100644
index 49ebe31..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From ea28c5b34457cf7676181b284e22ea5f79a30d85 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Thu, 13 Jul 2017 14:47:31 +0300
-Subject: [PATCH] stdinc.h: fix build with mingw
-
-Fixes this build error with mingw:
-...
-| compilation terminated.
-| In file included from ../pkgconf-1.3.7/libpkgconf/libpkgconf.h:19:0,
-| from ../pkgconf-1.3.7/libpkgconf/audit.c:16:
-| ../pkgconf-1.3.7/libpkgconf/stdinc.h:36:12: fatal error: BaseTsd.h: No
-such file or directory
-| # include <BaseTsd.h>
-
-Upstream-Status: Submitted
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- libpkgconf/stdinc.h | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h
-index ac7e53c..d8efcf5 100644
---- a/libpkgconf/stdinc.h
-+++ b/libpkgconf/stdinc.h
-@@ -33,10 +33,18 @@
- # include <malloc.h>
- # define PATH_DEV_NULL "nul"
- # ifndef ssize_t
-+# ifndef __MINGW32__
- # include <BaseTsd.h>
-+# else
-+# include <basetsd.h>
-+# endif
- # define ssize_t SSIZE_T
- # endif
--# include "win-dirent.h"
-+# ifndef __MINGW32__
-+# include "win-dirent.h"
-+# else
-+# include <dirent.h>
-+# endif
- #else
- # define PATH_DEV_NULL "/dev/null"
- # include <dirent.h>
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb
similarity index 88%
rename from import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb
index 5da0dd1..ea7b666 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.4.2.bb
@@ -13,18 +13,16 @@
# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
# ISC, but has different wording, so needs its own name.
LICENSE = "pkgconf"
-LIC_FILES_CHKSUM = "file://COPYING;md5=548a9d1db10cc0a84810c313a0e9266f"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2214222ec1a820bd6cc75167a56925e0"
SRC_URI = "\
https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
- file://0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch \
- file://0001-stdinc.h-fix-build-with-mingw.patch \
file://pkg-config-wrapper \
file://pkg-config-native.in \
file://pkg-config-esdk.in \
"
-SRC_URI[md5sum] = "ac35c34d84eeb6a03d4d61b8555d6197"
-SRC_URI[sha256sum] = "1be7e40900c7467893c65f810211b1e68da3f8d5e70fddb883fc24839cad0339"
+SRC_URI[md5sum] = "678d242b4eef1754bba6a58642af10bb"
+SRC_URI[sha256sum] = "bab39371d4ab972be1d539a8b10b6cc21f8eafc97f617102e667e82bd32eb234"
inherit autotools update-alternatives
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
deleted file mode 100644
index 938ac8a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Postinstall scriptlets"
-LICENSE = "MIT"
-
-FILES_${PN}_append = " ${datadir}/postinst-intercepts/*"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
- install -d ${D}${datadir}/postinst-intercepts
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/postinst_intercept ${D}${datadir}/postinst-intercepts/
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_font_cache ${D}${datadir}/postinst-intercepts/
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_icon_cache ${D}${datadir}/postinst-intercepts/
- install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_pixbuf_cache ${D}${datadir}/postinst-intercepts/
-}
-
-inherit nativesdk
-INHIBIT_DEFAULT_DEPS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
index 570ef36..0f6d16e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
@@ -9,7 +9,7 @@
runtime and thus programs come up faster."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
-SRCREV = "ef20628dd78b92e1a3123afc67b64cf010bdd9e4"
+SRCREV = "05aeafd053e56356ec8c62f4bb8f7b95bae192f3"
PV = "1.0+git${SRCPV}"
#
@@ -32,8 +32,7 @@
file://prelink.cron.daily \
file://prelink.default \
file://macros.prelink"
-UPSTREAM_CHECK_GITTAGREGEX = "upstream has no usable tags"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
TARGET_OS_ORIG := "${TARGET_OS}"
OVERRIDES_append = ":${TARGET_OS_ORIG}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch
deleted file mode 100644
index 42557b1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-From 9e407e0be01695e7b927f5820ade87ee9602c248 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 15 Sep 2017 17:00:14 +0300
-Subject: [PATCH] Use epoll API on Linux
-
-Also a couple of other modifications due to epoll having
-a different approach to how the working set of fds is defined
-and used:
-1) open_client() returns an index into the array of clients
-2) close_client() has a protection against being called twice
-with the same client (which would mess up the active_clients
-counter)
-
-Upstream-Status: Submitted [Seebs CC'd by email]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- enums/exit_status.in | 3 +
- pseudo_server.c | 189 ++++++++++++++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 190 insertions(+), 2 deletions(-)
-
-diff --git a/enums/exit_status.in b/enums/exit_status.in
-index 6be44d3..88f94cd 100644
---- a/enums/exit_status.in
-+++ b/enums/exit_status.in
-@@ -18,3 +18,6 @@ listen_fd, "server loop had no valid listen fd"
- pseudo_loaded, "server couldn't get out of pseudo environment"
- pseudo_prefix, "couldn't get valid pseudo prefix"
- pseudo_invocation, "invalid server command arguments"
-+epoll_create, "epoll_create() failed"
-+epoll_ctl, "epoll_ctl() failed"
-+
-diff --git a/pseudo_server.c b/pseudo_server.c
-index ff16efd..14d34de 100644
---- a/pseudo_server.c
-+++ b/pseudo_server.c
-@@ -40,6 +40,12 @@
- #include "pseudo_client.h"
- #include "pseudo_db.h"
-
-+// This has to come after pseudo includes, as that's where PSEUDO_PORT defines are
-+#ifdef PSEUDO_PORT_LINUX
-+#include <sys/epoll.h>
-+#endif
-+
-+
- static int listen_fd = -1;
-
- typedef struct {
-@@ -59,6 +65,7 @@ static int active_clients = 0, highest_client = 0, max_clients = 0;
-
- #define LOOP_DELAY 2
- #define DEFAULT_PSEUDO_SERVER_TIMEOUT 30
-+#define EPOLL_MAX_EVENTS 10
- int pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
- static int die_peacefully = 0;
- static int die_forcefully = 0;
-@@ -80,6 +87,9 @@ quit_now(int signal) {
- static int messages = 0, responses = 0;
- static struct timeval message_time = { .tv_sec = 0 };
-
-+#ifdef PSEUDO_PORT_LINUX
-+static void pseudo_server_loop_epoll(void);
-+#endif
- static void pseudo_server_loop(void);
-
- /* helper function to make a directory, just like mkdir -p.
-@@ -369,12 +379,16 @@ pseudo_server_start(int daemonize) {
- kill(ppid, SIGUSR1);
- }
- }
-+#ifdef PSEUDO_PORT_LINUX
-+ pseudo_server_loop_epoll();
-+#else
- pseudo_server_loop();
-+#endif
- return 0;
- }
-
- /* mess with internal tables as needed */
--static void
-+static unsigned int
- open_client(int fd) {
- pseudo_client_t *new_clients;
- int i;
-@@ -390,7 +404,7 @@ open_client(int fd) {
- ++active_clients;
- if (i > highest_client)
- highest_client = i;
-- return;
-+ return i;
- }
- }
-
-@@ -414,9 +428,11 @@ open_client(int fd) {
-
- max_clients += 16;
- ++active_clients;
-+ return max_clients - 16;
- } else {
- pseudo_diag("error allocating new client, fd %d\n", fd);
- close(fd);
-+ return 0;
- }
- }
-
-@@ -433,6 +449,10 @@ close_client(int client) {
- client, highest_client);
- return;
- }
-+ if (clients[client].fd == -1) {
-+ pseudo_debug(PDBGF_SERVER, "client %d already closed\n", client);
-+ return;
-+ }
- close(clients[client].fd);
- clients[client].fd = -1;
- free(clients[client].tag);
-@@ -566,6 +586,171 @@ serve_client(int i) {
- }
- }
-
-+#ifdef PSEUDO_PORT_LINUX
-+static void pseudo_server_loop_epoll(void)
-+{
-+ struct sockaddr_un client;
-+ socklen_t len;
-+ int i;
-+ int rc;
-+ int fd;
-+ int timeout;
-+ struct epoll_event ev, events[EPOLL_MAX_EVENTS];
-+ int loop_timeout = pseudo_server_timeout;
-+
-+ clients = malloc(16 * sizeof(*clients));
-+
-+ clients[0].fd = listen_fd;
-+ clients[0].pid = getpid();
-+
-+ for (i = 1; i < 16; ++i) {
-+ clients[i].fd = -1;
-+ clients[i].pid = 0;
-+ clients[i].tag = NULL;
-+ clients[i].program = NULL;
-+ }
-+
-+ active_clients = 1;
-+ max_clients = 16;
-+ highest_client = 0;
-+
-+ pseudo_debug(PDBGF_SERVER, "server loop started.\n");
-+ if (listen_fd < 0) {
-+ pseudo_diag("got into loop with no valid listen fd.\n");
-+ exit(PSEUDO_EXIT_LISTEN_FD);
-+ }
-+
-+ timeout = LOOP_DELAY * 1000;
-+
-+ int epollfd = epoll_create1(0);
-+ if (epollfd == -1) {
-+ pseudo_diag("epoll_create1() failed.\n");
-+ exit(PSEUDO_EXIT_EPOLL_CREATE);
-+ }
-+ ev.events = EPOLLIN;
-+ ev.data.u64 = 0;
-+ if (epoll_ctl(epollfd, EPOLL_CTL_ADD, clients[0].fd, &ev) == -1) {
-+ pseudo_diag("epoll_ctl() failed with listening socket.\n");
-+ exit(PSEUDO_EXIT_EPOLL_CTL);
-+ }
-+
-+ pdb_log_msg(SEVERITY_INFO, NULL, NULL, NULL, "server started (pid %d)", getpid());
-+
-+ for (;;) {
-+ rc = epoll_wait(epollfd, events, EPOLL_MAX_EVENTS, timeout);
-+ if (rc == 0 || (rc == -1 && errno == EINTR)) {
-+ /* If there's no clients, start timing out. If there
-+ * are active clients, never time out.
-+ */
-+ if (active_clients == 1) {
-+ loop_timeout -= LOOP_DELAY;
-+ /* maybe flush database to disk */
-+ pdb_maybe_backup();
-+ if (loop_timeout <= 0) {
-+ pseudo_debug(PDBGF_SERVER, "no more clients, got bored.\n");
-+ die_peacefully = 1;
-+ } else {
-+ /* display this if not exiting */
-+ pseudo_debug(PDBGF_SERVER | PDBGF_BENCHMARK, "%d messages handled in %.4f seconds, %d responses\n",
-+ messages,
-+ (double) message_time.tv_sec +
-+ (double) message_time.tv_usec / 1000000.0,
-+ responses);
-+ }
-+ }
-+ } else if (rc > 0) {
-+ loop_timeout = pseudo_server_timeout;
-+ for (i = 0; i < rc; ++i) {
-+ if (clients[events[i].data.u64].fd == listen_fd) {
-+ if (!die_forcefully) {
-+ len = sizeof(client);
-+ if ((fd = accept(listen_fd, (struct sockaddr *) &client, &len)) != -1) {
-+ /* Don't allow clients to end up on fd 2, because glibc's
-+ * malloc debug uses that fd unconditionally.
-+ */
-+ if (fd == 2) {
-+ int newfd = fcntl(fd, F_DUPFD, 3);
-+ close(fd);
-+ fd = newfd;
-+ }
-+ pseudo_debug(PDBGF_SERVER, "new client fd %d\n", fd);
-+ /* A new client implicitly cancels any
-+ * previous shutdown request, or a
-+ * shutdown for lack of clients.
-+ */
-+ pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
-+ die_peacefully = 0;
-+
-+ ev.events = EPOLLIN;
-+ ev.data.u64 = open_client(fd);
-+ if (ev.data.u64 != 0 && epoll_ctl(epollfd, EPOLL_CTL_ADD, clients[ev.data.u64].fd, &ev) == -1) {
-+ pseudo_diag("epoll_ctl() failed with accepted socket.\n");
-+ exit(PSEUDO_EXIT_EPOLL_CTL);
-+ }
-+ } else if (errno == EMFILE) {
-+ pseudo_debug(PDBGF_SERVER, "Hit max open files, dropping a client.\n");
-+ /* In theory there is a potential race here where if we close a client,
-+ it may have sent us a fastop message which we don't act upon.
-+ If we don't close a filehandle we'll loop indefinitely thought.
-+ Only close one per loop iteration in the interests of caution */
-+ for (int j = 1; j <= highest_client; ++j) {
-+ if (clients[j].fd != -1) {
-+ close_client(j);
-+ break;
-+ }
-+ }
-+ }
-+ }
-+ } else {
-+ struct timeval tv1, tv2;
-+ int rc;
-+ gettimeofday(&tv1, NULL);
-+ rc = serve_client(events[i].data.u64);
-+ gettimeofday(&tv2, NULL);
-+ ++messages;
-+ if (rc == 0)
-+ ++responses;
-+ message_time.tv_sec += (tv2.tv_sec - tv1.tv_sec);
-+ message_time.tv_usec += (tv2.tv_usec - tv1.tv_usec);
-+ if (message_time.tv_usec < 0) {
-+ message_time.tv_usec += 1000000;
-+ --message_time.tv_sec;
-+ } else while (message_time.tv_usec > 1000000) {
-+ message_time.tv_usec -= 1000000;
-+ ++message_time.tv_sec;
-+ }
-+ }
-+ if (die_forcefully)
-+ break;
-+ }
-+ pseudo_debug(PDBGF_SERVER, "server loop complete [%d clients left]\n", active_clients);
-+ } else {
-+ pseudo_diag("epoll_wait failed: %s\n", strerror(errno));
-+ break;
-+ }
-+ if (die_peacefully || die_forcefully) {
-+ pseudo_debug(PDBGF_SERVER, "quitting.\n");
-+ pseudo_debug(PDBGF_SERVER | PDBGF_BENCHMARK, "server %d exiting: handled %d messages in %.4f seconds\n",
-+ getpid(), messages,
-+ (double) message_time.tv_sec +
-+ (double) message_time.tv_usec / 1000000.0);
-+ pdb_log_msg(SEVERITY_INFO, NULL, NULL, NULL, "server %d exiting: handled %d messages in %.4f seconds",
-+ getpid(), messages,
-+ (double) message_time.tv_sec +
-+ (double) message_time.tv_usec / 1000000.0);
-+ /* and at this point, we'll start refusing connections */
-+ close(clients[0].fd);
-+ /* This is a good place to insert a delay for
-+ * debugging race conditions during startup. */
-+ /* usleep(300000); */
-+ exit(0);
-+ }
-+ }
-+
-+}
-+
-+#endif
-+
- /* get clients, handle messages, shut down.
- * This doesn't actually do any work, it just calls a ton of things which
- * do work.
---
-2.14.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
deleted file mode 100644
index 3045a3b..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From b6b68db896f9963558334aff7fca61adde4ec10f Mon Sep 17 00:00:00 2001
-From: Seebs <seebs@seebs.net>
-Date: Thu, 13 Apr 2017 18:12:01 -0500
-Subject: Prevent bash from segfaulting when unloading pseudo
-
-bash's extremely fancy internal awareness of how the environment looks
-means that, if you directly call the underlying libc "unsetenv" on
-a variable, bash can end up trying to access a null pointer. Fixing
-this generically is actually rather hard; you can't really avoid
-writing to environ on fork() or popen(), even if you change all
-execv*() functions to use the execv*e() variants. So for now, instead
-of unsetting the variable, set it to an empty string.
-
-Thanks to Saur in IRC for spotting this and helping debug it.
-
-Signed-off-by: Seebs <seebs@seebs.net>
-
-Upstream-Status: Backport
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index a2d30e9..8ba1ffa 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,8 @@
-+2017-04-13:
-+ * (seebs) don't unset LD_PRELOAD or the like, because if you
-+ do that, bash can segfault because it "knows" how many
-+ fields are in environ.
-+
- 2017-02-24:
- * (seebs) import posix_acl_default fix from Anton Gerasimov
- <anton@advancedtelematic.com>
-diff --git a/pseudo_util.c b/pseudo_util.c
-index 172990b..6a1fac2 100644
---- a/pseudo_util.c
-+++ b/pseudo_util.c
-@@ -844,7 +844,7 @@ void pseudo_dropenv() {
- if (ld_preload && strlen(ld_preload)) {
- SETENV(PRELINK_LIBRARIES, ld_preload, 1);
- } else {
-- UNSETENV(PRELINK_LIBRARIES);
-+ SETENV(PRELINK_LIBRARIES, "", 1);
- }
- }
- }
---
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/efe0be279901006f939cd357ccee47b651c786da.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/efe0be279901006f939cd357ccee47b651c786da.patch
deleted file mode 100644
index 64fc58c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/efe0be279901006f939cd357ccee47b651c786da.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From efe0be279901006f939cd357ccee47b651c786da Mon Sep 17 00:00:00 2001
-From: Seebs <seebs@seebs.net>
-Date: Fri, 24 Feb 2017 12:47:38 -0600
-Subject: Don't try to record 0-length posix_acl_default xattrs
-
-Based on a submission from Anton Gerasimov <anton@advancedtelematic.com>
-
-On some systems, with some kernel configs, "cp -a" apparently tries to
-set an empty ACL list, with a valid header but no contents, which causes
-strange and mysterious behavior later if we actually create such an entry.
-So filter that out, also sanity-check a couple of other things.
-
-Signed-off-by: Seebs <seebs@seebs.net>
-
-Upstream-Status: Backport
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index ae2a6e9..a2d30e9 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,6 @@
-+2017-02-24:
-+ * (seebs) import posix_acl_default fix from Anton Gerasimov
-+ <anton@advancedtelematic.com>
- 2017-02-01:
- * (seebs) handle xattr deletion slightly more carefully.
- * (seebs) tag this as 1.8.2
-diff --git a/ports/linux/xattr/pseudo_wrappers.c b/ports/linux/xattr/pseudo_wrappers.c
-index 46bc053..d69d53e 100644
---- a/ports/linux/xattr/pseudo_wrappers.c
-+++ b/ports/linux/xattr/pseudo_wrappers.c
-@@ -62,9 +62,9 @@ static int
- posix_permissions(const acl_header *header, int entries, int *extra, int *mode) {
- int acl_seen = 0;
- if (le32(header->version) != 2) {
-- pseudo_diag("Fatal: ACL support no available for header version %d.\n",
-+ pseudo_diag("Fatal: ACL support not available for header version %d.\n",
- le32(header->version));
-- return 1;
-+ return -1;
- }
- *mode = 0;
- *extra = 0;
-@@ -140,12 +140,38 @@ static int shared_setxattr(const char *path, int fd, const char *name, const voi
- pseudo_debug(PDBGF_XATTR, "setxattr(%s [fd %d], %s => '%.*s')\n",
- path ? path : "<no path>", fd, name, (int) size, (char *) value);
-
-+ /* Filter out erroneous sizes for POSIX ACL
-+ * see posix_acl_xattr_count in include/linux/posix_acl_xattr.h of Linux source code */
-+ /* I don't think there's any posix_acl_* values that aren't in this format */
-+ if (!strncmp(name, "system.posix_acl_", 17)) {
-+ // ACL is corrupt, issue an error
-+ if(size < sizeof(acl_header) || (size - sizeof(acl_header)) % sizeof(acl_entry) != 0) {
-+ pseudo_debug(PDBGF_XATTR, "invalid data size for %s: %d\n",
-+ name, (int) size);
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ // ACL is empty, do nothing
-+ if((size - sizeof(acl_header)) / sizeof(acl_entry) == 0) {
-+ /* on some systems, "cp -a" will attempt to clone the
-+ * posix_acl_default entry for a directory (which would specify
-+ * default ACLs for new files in that directory), but if the
-+ * original was empty, we get a header but no entries. With
-+ * real xattr, that ends up being silently discarded, apparently,
-+ * so we discard it too.
-+ */
-+ pseudo_debug(PDBGF_XATTR, "0-length ACL entry %s.\n", name);
-+ return 0;
-+ }
-+ }
- /* this may be a plain chmod */
- if (!strcmp(name, "system.posix_acl_access")) {
- int extra;
- int mode;
- int entries = (size - sizeof(acl_header)) / sizeof(acl_entry);
-- if (!posix_permissions(value, entries, &extra, &mode)) {
-+ int res = posix_permissions(value, entries, &extra, &mode);
-+ if (res == 0) {
- pseudo_debug(PDBGF_XATTR, "posix_acl_access translated to mode %04o. Remaining attribute(s): %d.\n",
- mode, extra);
- buf.st_mode = mode;
-@@ -164,8 +190,12 @@ static int shared_setxattr(const char *path, int fd, const char *name, const voi
- if (!extra) {
- return 0;
- }
-+ } else if (res == -1) {
-+ errno = EOPNOTSUPP;
-+ return -1;
- }
- }
-+
- if (!strcmp(name, "user.pseudo_data")) {
- pseudo_debug(PDBGF_XATTR | PDBGF_XATTRDB, "user.pseudo_data xattribute does not get to go in database.\n");
- return -1;
---
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch
deleted file mode 100644
index 904c2d0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Ensure FASTOP messages get an ACK reply so that the client can be sure the server
-recieved them. This means if connections are terminated, data isn't lost.
-
-RP 2017/9/22
-
-Upstream-Status: Submitted
-
-Index: pseudo-1.8.2/pseudo_client.c
-===================================================================
---- pseudo-1.8.2.orig/pseudo_client.c
-+++ pseudo-1.8.2/pseudo_client.c
-@@ -1331,21 +1331,19 @@ pseudo_client_request(pseudo_msg_t *msg,
- * indicating a successful send.
- */
- pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "sent!\n");
-- if (msg->type != PSEUDO_MSG_FASTOP) {
-- response = pseudo_msg_receive(connect_fd);
-- if (!response) {
-- pseudo_debug(PDBGF_CLIENT, "expected response did not occur; retrying\n");
-+ response = pseudo_msg_receive(connect_fd);
-+ if (!response) {
-+ pseudo_debug(PDBGF_CLIENT, "expected response did not occur; retrying\n");
-+ } else {
-+ if (response->type != PSEUDO_MSG_ACK) {
-+ pseudo_debug(PDBGF_CLIENT, "got non-ack response %d\n", response->type);
-+ return 0;
-+ } else if (msg->type != PSEUDO_MSG_FASTOP) {
-+ pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "got response type %d\n", response->type);
-+ return response;
- } else {
-- if (response->type != PSEUDO_MSG_ACK) {
-- pseudo_debug(PDBGF_CLIENT, "got non-ack response %d\n", response->type);
-- return 0;
-- } else {
-- pseudo_debug(PDBGF_CLIENT | PDBGF_VERBOSE, "got response type %d\n", response->type);
-- return response;
-- }
-+ return 0;
- }
-- } else {
-- return 0;
- }
- }
- pseudo_diag("pseudo: server connection persistently failed, aborting.\n");
-Index: pseudo-1.8.2/pseudo_server.c
-===================================================================
---- pseudo-1.8.2.orig/pseudo_server.c
-+++ pseudo-1.8.2/pseudo_server.c
-@@ -463,6 +463,11 @@ close_client(int client) {
- --highest_client;
- }
-
-+static pseudo_msg_t server_fastop_reply = {
-+ .type = PSEUDO_MSG_ACK,
-+ .op = OP_NONE,
-+};
-+
- /* Actually process a request.
- */
- static int
-@@ -515,8 +520,14 @@ serve_client(int i) {
- * pseudo_server_response.
- */
- if (in->type != PSEUDO_MSG_SHUTDOWN) {
-- if (in->type == PSEUDO_MSG_FASTOP)
-+ if (in->type == PSEUDO_MSG_FASTOP) {
- send_response = 0;
-+ /* For fastops we reply now to say we got the data */
-+ if ((rc = pseudo_msg_send(clients[i].fd, &server_fastop_reply, 0, NULL)) != 0) {
-+ pseudo_debug(PDBGF_SERVER, "failed to send fastop ack to client %d [%d]: %d (%s)\n",
-+ i, (int) clients[i].pid, rc, strerror(errno));
-+ }
-+ }
- /* most messages don't need these, but xattr may */
- response_path = 0;
- response_pathlen = -1;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
index b085a45..bda7e4b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
@@ -1,3 +1,8 @@
+From b0b25fbc041a148d1de09f5a6503cd95973ec77c Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 25 Apr 2017 15:25:54 +0100
+Subject: [PATCH 3/3] pseudo: Handle too many files deadlock
+
Currently if we max out the maximum number of files, pseudo can deadlock, unable to
accept new connections yet unable to move forward and unblock the other processes
waiting either.
@@ -11,19 +16,23 @@
Upstream-Status: Submitted [Peter is aware of the issue]
-Index: pseudo-1.8.2/pseudo_server.c
-===================================================================
---- pseudo-1.8.2.orig/pseudo_server.c
-+++ pseudo-1.8.2/pseudo_server.c
-@@ -581,6 +581,7 @@ pseudo_server_loop(void) {
- int rc;
- int fd;
- int loop_timeout = pseudo_server_timeout;
+---
+ pseudo_server.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/pseudo_server.c b/pseudo_server.c
+index dac3258..15a3e8f 100644
+--- a/pseudo_server.c
++++ b/pseudo_server.c
+@@ -802,6 +802,7 @@ pseudo_server_loop(void) {
+ struct sigaction eat_usr2 = {
+ .sa_handler = set_do_list_clients
+ };
+ int hitmaxfiles;
clients = malloc(16 * sizeof(*clients));
-@@ -597,6 +598,7 @@ pseudo_server_loop(void) {
+@@ -820,6 +821,7 @@ pseudo_server_loop(void) {
active_clients = 1;
max_clients = 16;
highest_client = 0;
@@ -31,9 +40,9 @@
pseudo_debug(PDBGF_SERVER, "server loop started.\n");
if (listen_fd < 0) {
-@@ -663,10 +665,15 @@ pseudo_server_loop(void) {
- message_time.tv_usec -= 1000000;
- ++message_time.tv_sec;
+@@ -878,10 +880,15 @@ pseudo_server_loop(void) {
+ } else {
+ serve_client(i);
}
+ } else if (hitmaxfiles) {
+ /* Only close one per loop iteration in the interests of caution */
@@ -47,13 +56,16 @@
if (!die_forcefully &&
(FD_ISSET(clients[0].fd, &events) ||
FD_ISSET(clients[0].fd, &reads))) {
-@@ -688,6 +698,9 @@ pseudo_server_loop(void) {
- */
- pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
- die_peacefully = 0;
+@@ -903,6 +910,9 @@ pseudo_server_loop(void) {
+ */
+ pseudo_server_timeout = DEFAULT_PSEUDO_SERVER_TIMEOUT;
+ die_peacefully = 0;
+ } else if (errno == EMFILE) {
+ hitmaxfiles = 1;
+ pseudo_debug(PDBGF_SERVER, "Hit max open files, dropping a client.\n");
}
}
pseudo_debug(PDBGF_SERVER, "server loop complete [%d clients left]\n", active_clients);
+--
+2.15.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
index 18ce9f9..cdc2a58 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
@@ -26,7 +26,7 @@
NO32LIBS ??= "1"
NO32LIBS_class-nativesdk = "1"
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
+PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback --enable-epoll --enable-xattr"
# Compile for the local machine arch...
do_compile () {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb
deleted file mode 100644
index 73ef572..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require pseudo.inc
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz2 \
- file://0001-configure-Prune-PIE-flags.patch \
- file://fallback-passwd \
- file://fallback-group \
- file://moreretries.patch \
- file://efe0be279901006f939cd357ccee47b651c786da.patch \
- file://b6b68db896f9963558334aff7fca61adde4ec10f.patch \
- file://fastopreply.patch \
- file://toomanyfiles.patch \
- file://0001-Use-epoll-API-on-Linux.patch \
- "
-
-SRC_URI[md5sum] = "7d41e72188fbea1f696c399c1a435675"
-SRC_URI[sha256sum] = "ceb456bd47770a37ca20784a91d715c5a7601e07e26ab11b0c77e9203ed3d196"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
index 42c7b2e..9103d49 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -1,15 +1,14 @@
require pseudo.inc
-SRCREV = "02168305b0a19f981ffe857f36eb256ba8810b77"
-PV = "1.8.2+git${SRCPV}"
-
-DEFAULT_PREFERENCE = "-1"
-
SRC_URI = "git://git.yoctoproject.org/pseudo \
file://0001-configure-Prune-PIE-flags.patch \
file://fallback-passwd \
file://fallback-group \
- file://moreretries.patch"
+ file://moreretries.patch \
+ file://toomanyfiles.patch \
+ "
+SRCREV = "fddbe854c9db058d5a05830d3bcdd4233d95ee2e"
S = "${WORKDIR}/git"
+PV = "1.9.0+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch
deleted file mode 100644
index b9e5856..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 4170b98e0d5864ef4db1c5704a6e9428c3be9fb8 Mon Sep 17 00:00:00 2001
-From: Iryna Shcherbina <ishcherb@redhat.com>
-Date: Thu, 24 Aug 2017 18:01:43 +0200
-Subject: [PATCH] BUG: fix infinite loop when creating np.pad on an empty array
-
-Upstream-Status: Backport [https://github.com/numpy/numpy/pull/9599/commits/6f9ea0abbd305d53f9017debab3a3a591fe0e249]
-CVE: CVE-2017-12852
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- numpy/lib/arraypad.py | 3 +++
- numpy/lib/tests/test_arraypad.py | 4 ++++
- 2 files changed, 7 insertions(+)
-
-diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py
-index 2dad99c..294a689 100644
---- a/numpy/lib/arraypad.py
-+++ b/numpy/lib/arraypad.py
-@@ -1406,6 +1406,9 @@ def pad(array, pad_width, mode, **kwargs):
- newmat = _append_min(newmat, pad_after, chunk_after, axis)
-
- elif mode == 'reflect':
-+ if narray.size == 0:
-+ raise ValueError("There aren't any elements to reflect in `array`")
-+
- for axis, (pad_before, pad_after) in enumerate(pad_width):
- # Recursive padding along any axis where `pad_amt` is too large
- # for indexing tricks. We can only safely pad the original axis
-diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py
-index 056aa45..0f71d32 100644
---- a/numpy/lib/tests/test_arraypad.py
-+++ b/numpy/lib/tests/test_arraypad.py
-@@ -1014,6 +1014,10 @@ class ValueError1(TestCase):
- assert_raises(ValueError, pad, arr, ((-2, 3), (3, 2)),
- **kwargs)
-
-+ def test_check_empty_array(self):
-+ assert_raises(ValueError, pad, [], 4, mode='reflect')
-+ assert_raises(ValueError, pad, np.ndarray(0), 4, mode='reflect')
-+
-
- class ValueError2(TestCase):
- def test_check_negative_pad_amount(self):
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
index ffd6ced..516ccd7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -1,23 +1,24 @@
-From cc2ce6d8b6a3e6e2c8874896c10897034a80cd4f Mon Sep 17 00:00:00 2001
+From c8c6649b29a08f82e1d6761a6d62ce5f632313c5 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 10 Dec 2015 13:20:30 +0200
-Subject: [PATCH] Don't search /usr and so on for libraries by default to avoid
- host contamination.
+Subject: [PATCH 1/3] Don't search /usr and so on for libraries by default to
+ avoid host contamination.
Upstream-Status: Inappropriate (As the code stands, this is a hack)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
numpy/distutils/system_info.py | 50 +++++-------------------------------------
1 file changed, 6 insertions(+), 44 deletions(-)
-Index: numpy-1.13.1/numpy/distutils/system_info.py
-===================================================================
---- numpy-1.13.1.orig/numpy/distutils/system_info.py
-+++ numpy-1.13.1/numpy/distutils/system_info.py
-@@ -211,51 +211,13 @@ if sys.platform == 'win32':
- default_x11_lib_dirs = []
- default_x11_include_dirs = []
+diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
+index bea120c..544e056 100644
+--- a/numpy/distutils/system_info.py
++++ b/numpy/distutils/system_info.py
+@@ -262,51 +262,13 @@ if sys.platform == 'win32':
+ add_system_root(os.path.join(conda_dir, 'Library'))
+
else:
- default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
- '/opt/local/lib', '/sw/lib'], platform_bits)
@@ -29,10 +30,7 @@
- '/opt/local/include', '/sw/include',
- '/usr/include/suitesparse']
- default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
-+ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
-+ default_include_dirs = ['/deaddir/include']
-+ default_src_dirs = ['.', '/deaddir/src']
-
+-
- default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
- '/usr/lib'], platform_bits)
- default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include',
@@ -67,8 +65,15 @@
- finally:
- if tmp is not None:
- tmp.close()
++ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
++ default_include_dirs = ['/deaddir/include']
++ default_src_dirs = ['.', '/deaddir/src']
++
+ default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
+ default_x11_include_dirs = ['/deaddir/include']
if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
+--
+2.16.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch
new file mode 100644
index 0000000..4f5c4f5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-npy_cpu-Add-riscv-support.patch
@@ -0,0 +1,28 @@
+From 30fb1bf9244bb0789c02ec7c98a923acc7200206 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Mar 2018 19:55:21 -0700
+Subject: [PATCH] npy_cpu: Add riscv support
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/10761]
+
+ numpy/core/include/numpy/npy_cpu.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
+index 84653ea18..9e88db873 100644
+--- a/numpy/core/include/numpy/npy_cpu.h
++++ b/numpy/core/include/numpy/npy_cpu.h
+@@ -78,6 +78,8 @@
+ #define NPY_CPU_AARCH64
+ #elif defined(__mc68000__)
+ #define NPY_CPU_M68K
++#elif defined(__riscv)
++ #define NPY_CPU_RISCV
+ #elif defined(__arc__) && defined(__LITTLE_ENDIAN__)
+ #define NPY_CPU_ARCEL
+ #elif defined(__arc__) && defined(__BIG_ENDIAN__)
+--
+2.16.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
deleted file mode 100644
index eb8a71a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c560abff71f98a39a7401f08c2c13dad9ae7f15f Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 25 Feb 2016 01:23:32 -0500
-Subject: [PATCH] remove build path in comments
-
-It has build path in comments, so remove it.
-
-Upstream-Status: Inappropriate [openembedded specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- numpy/distutils/misc_util.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
-index 345e60f..dafb068 100644
---- a/numpy/distutils/misc_util.py
-+++ b/numpy/distutils/misc_util.py
-@@ -2254,7 +2254,7 @@ def generate_config_py(target):
- from distutils.dir_util import mkpath
- mkpath(os.path.dirname(target))
- f = open(target, 'w')
-- f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0])))
-+ f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0]).replace(os.path.abspath('../'),'')))
- f.write('# It contains system_info results at the time of building this package.\n')
- f.write('__all__ = ["get_info","show"]\n\n')
- for k, i in system_info.saved_results.items():
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h
new file mode 100644
index 0000000..109deb0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h
@@ -0,0 +1,32 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_SIZEOF_OFF_T 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x0000000A
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h
new file mode 100644
index 0000000..c30b868
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h
@@ -0,0 +1,139 @@
+#define HAVE_ENDIAN_H 1
+#define SIZEOF_PY_INTPTR_T 8
+#define SIZEOF_PY_LONG_LONG 8
+#define MATHLIB m
+#define HAVE_SIN 1
+#define HAVE_COS 1
+#define HAVE_TAN 1
+#define HAVE_SINH 1
+#define HAVE_COSH 1
+#define HAVE_TANH 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_CEIL 1
+#define HAVE_SQRT 1
+#define HAVE_LOG10 1
+#define HAVE_LOG 1
+#define HAVE_EXP 1
+#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ATAN 1
+#define HAVE_FMOD 1
+#define HAVE_MODF 1
+#define HAVE_FREXP 1
+#define HAVE_LDEXP 1
+#define HAVE_RINT 1
+#define HAVE_TRUNC 1
+#define HAVE_EXP2 1
+#define HAVE_LOG2 1
+#define HAVE_ATAN2 1
+#define HAVE_POW 1
+#define HAVE_NEXTAFTER 1
+#define HAVE_SINF 1
+#define HAVE_COSF 1
+#define HAVE_TANF 1
+#define HAVE_SINHF 1
+#define HAVE_COSHF 1
+#define HAVE_TANHF 1
+#define HAVE_FABSF 1
+#define HAVE_FLOORF 1
+#define HAVE_CEILF 1
+#define HAVE_RINTF 1
+#define HAVE_TRUNCF 1
+#define HAVE_SQRTF 1
+#define HAVE_LOG10F 1
+#define HAVE_LOGF 1
+#define HAVE_LOG1PF 1
+#define HAVE_EXPF 1
+#define HAVE_EXPM1F 1
+#define HAVE_ASINF 1
+#define HAVE_ACOSF 1
+#define HAVE_ATANF 1
+#define HAVE_ASINHF 1
+#define HAVE_ACOSHF 1
+#define HAVE_ATANHF 1
+#define HAVE_HYPOTF 1
+#define HAVE_ATAN2F 1
+#define HAVE_POWF 1
+#define HAVE_FMODF 1
+#define HAVE_MODFF 1
+#define HAVE_FREXPF 1
+#define HAVE_LDEXPF 1
+#define HAVE_EXP2F 1
+#define HAVE_LOG2F 1
+#define HAVE_COPYSIGNF 1
+#define HAVE_NEXTAFTERF 1
+#define HAVE_SINL 1
+#define HAVE_COSL 1
+#define HAVE_TANL 1
+#define HAVE_SINHL 1
+#define HAVE_COSHL 1
+#define HAVE_TANHL 1
+#define HAVE_FABSL 1
+#define HAVE_FLOORL 1
+#define HAVE_CEILL 1
+#define HAVE_RINTL 1
+#define HAVE_TRUNCL 1
+#define HAVE_SQRTL 1
+#define HAVE_LOG10L 1
+#define HAVE_LOGL 1
+#define HAVE_LOG1PL 1
+#define HAVE_EXPL 1
+#define HAVE_EXPM1L 1
+#define HAVE_ASINL 1
+#define HAVE_ACOSL 1
+#define HAVE_ATANL 1
+#define HAVE_ASINHL 1
+#define HAVE_ACOSHL 1
+#define HAVE_ATANHL 1
+#define HAVE_HYPOTL 1
+#define HAVE_ATAN2L 1
+#define HAVE_POWL 1
+#define HAVE_FMODL 1
+#define HAVE_MODFL 1
+#define HAVE_FREXPL 1
+#define HAVE_LDEXPL 1
+#define HAVE_EXP2L 1
+#define HAVE_LOG2L 1
+#define HAVE_COPYSIGNL 1
+#define HAVE_NEXTAFTERL 1
+#define HAVE_DECL_SIGNBIT
+#define HAVE_COMPLEX_H 1
+#define HAVE_CREAL 1
+#define HAVE_CIMAG 1
+#define HAVE_CABS 1
+#define HAVE_CARG 1
+#define HAVE_CEXP 1
+#define HAVE_CSQRT 1
+#define HAVE_CLOG 1
+#define HAVE_CCOS 1
+#define HAVE_CSIN 1
+#define HAVE_CPOW 1
+#define HAVE_CREALF 1
+#define HAVE_CIMAGF 1
+#define HAVE_CABSF 1
+#define HAVE_CARGF 1
+#define HAVE_CEXPF 1
+#define HAVE_CSQRTF 1
+#define HAVE_CLOGF 1
+#define HAVE_CCOSF 1
+#define HAVE_CSINF 1
+#define HAVE_CPOWF 1
+#define HAVE_CREALL 1
+#define HAVE_CIMAGL 1
+#define HAVE_CABSL 1
+#define HAVE_CARGL 1
+#define HAVE_CEXPL 1
+#define HAVE_CSQRTL 1
+#define HAVE_CLOGL 1
+#define HAVE_CCOSL 1
+#define HAVE_CSINL 1
+#define HAVE_CPOWL 1
+#define HAVE_LDOUBLE_IEEE_QUAD_LE 1
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+#ifndef _NPY_NPY_CONFIG_H_
+#error config.h should never be included directly, include npy_config.h instead
+#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy.inc b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy.inc
new file mode 100644
index 0000000..284f213
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy.inc
@@ -0,0 +1,114 @@
+SUMMARY = "A sophisticated Numeric Processing Package for Python"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=fc53b33304171d132128ebe82ea4a645"
+
+SRCNAME = "numpy"
+
+SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
+ file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
+ file://fix_shebang_f2py.patch \
+ file://0001-npy_cpu-Add-riscv-support.patch \
+ ${CONFIGFILESURI} "
+SRC_URI[md5sum] = "e39878fafb11828983aeec583dda4a06"
+SRC_URI[sha256sum] = "ddbcda194f49e0cf0663fa8131cb9d7a3b876d14dea0047d3c5fdfaf20adbb40"
+
+UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+CONFIGFILESURI ?= ""
+
+CONFIGFILESURI_aarch64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_arm = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_armeb = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_mipsarcho32el = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_x86 = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_x86-64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarcho32eb = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarchn64eb = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarchn64el = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarchn32eb = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mipsarchn32el = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_riscv64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+
+S = "${WORKDIR}/numpy-${PV}"
+
+# Make the build fail and replace *config.h with proper one
+# This is a ugly, ugly hack - Koen
+do_compile_prepend_class-target() {
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
+ true
+ cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
+}
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
+
+# install what is needed for numpy.test()
+RDEPENDS_${PN} = "${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-difflib \
+ ${PYTHON_PN}-pprint \
+ ${PYTHON_PN}-pickle \
+ ${PYTHON_PN}-shell \
+ ${PYTHON_PN}-nose \
+ ${PYTHON_PN}-doctest \
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-distutils \
+ ${PYTHON_PN}-misc \
+ ${PYTHON_PN}-mmap \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-numbers \
+ ${PYTHON_PN}-pydoc \
+ ${PYTHON_PN}-pkgutil \
+ ${PYTHON_PN}-email \
+ ${PYTHON_PN}-compression \
+ ${PYTHON_PN}-ctypes \
+ ${PYTHON_PN}-threading \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
deleted file mode 100644
index 13e8f4f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96"
-
-SRCNAME = "numpy"
-
-SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
- file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
- file://remove-build-path-in-comments.patch \
- file://fix_shebang_f2py.patch \
- file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \
- ${CONFIGFILESURI} "
-
-SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92"
-SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93"
-
-UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
-
-CONFIGFILESURI ?= ""
-
-CONFIGFILESURI_aarch64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_arm = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_armeb = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_mipsarcho32el = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86 = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86-64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarcho32eb = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn64eb = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn64el = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn32eb = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn32el = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit setuptools
-
-# Make the build fail and replace *config.h with proper one
-# This is a ugly, ugly hack - Koen
-do_compile_prepend_class-target() {
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
- true
- cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
-}
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-
-# install what is needed for numpy.test()
-RDEPENDS_${PN} = "python-unittest \
- python-difflib \
- python-pprint \
- python-pickle \
- python-shell \
- python-nose \
- python-doctest \
- python-datetime \
- python-distutils \
- python-misc \
- python-mmap \
- python-netclient \
- python-numbers \
- python-pydoc \
- python-pkgutil \
- python-email \
- python-subprocess \
- python-compression \
- python-ctypes \
- python-threading \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.2.bb
new file mode 100644
index 0000000..5013789
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.14.2.bb
@@ -0,0 +1,6 @@
+inherit setuptools
+require python-numpy.inc
+
+RDEPENDS_${PN}_class-target_append = " \
+ ${PYTHON_PN}-subprocess \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb
deleted file mode 100644
index 29874b8..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb
+++ /dev/null
@@ -1,114 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96"
-
-SRCNAME = "numpy"
-
-SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
- file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
- file://remove-build-path-in-comments.patch \
- file://fix_shebang_f2py.patch \
- file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \
- ${CONFIGFILESURI} "
-SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92"
-SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93"
-
-UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
-
-CONFIGFILESURI ?= ""
-
-CONFIGFILESURI_aarch64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_arm = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_armeb = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_mipsarcho32el = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86 = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86-64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarcho32eb = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn64eb = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn64el = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn32eb = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mipsarchn32el = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit setuptools3
-
-# Make the build fail and replace *config.h with proper one
-# This is a ugly, ugly hack - Koen
-do_compile_prepend_class-target() {
- ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build ${DISTUTILS_BUILD_ARGS} || \
- true
- cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
-}
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-
-# install what is needed for numpy.test()
-RDEPENDS_${PN} = "python3-unittest \
- python3-difflib \
- python3-pprint \
- python3-pickle \
- python3-shell \
- python3-nose \
- python3-doctest \
- python3-datetime \
- python3-distutils \
- python3-misc \
- python3-mmap \
- python3-netclient \
- python3-numbers \
- python3-pydoc \
- python3-pkgutil \
- python3-email \
- python3-subprocess \
- python3-compression \
- python3-ctypes \
- python3-threading \
- python3-textutils \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.2.bb
new file mode 100644
index 0000000..915e6f8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.14.2.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-numpy.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc
deleted file mode 100644
index 57d4834..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ /dev/null
@@ -1,287 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
-
-
-PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
-
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
-
-SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
-RDEPENDS_${PN}-2to3="${PN}-core"
-FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python2.7/lib2to3 "
-
-SUMMARY_${PN}-argparse="Python command line argument parser"
-RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
-FILES_${PN}-argparse="${libdir}/python2.7/argparse.* "
-
-SUMMARY_${PN}-audio="Python Audio Handling"
-RDEPENDS_${PN}-audio="${PN}-core"
-FILES_${PN}-audio="${libdir}/python2.7/wave.* ${libdir}/python2.7/chunk.* ${libdir}/python2.7/sndhdr.* ${libdir}/python2.7/lib-dynload/ossaudiodev.so ${libdir}/python2.7/lib-dynload/audioop.so ${libdir}/python2.7/audiodev.* ${libdir}/python2.7/sunaudio.* ${libdir}/python2.7/sunau.* ${libdir}/python2.7/toaiff.* "
-
-SUMMARY_${PN}-bsddb="Python bindings for the Berkeley Database"
-RDEPENDS_${PN}-bsddb="${PN}-core"
-FILES_${PN}-bsddb="${libdir}/python2.7/bsddb ${libdir}/python2.7/lib-dynload/_bsddb.so "
-
-SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
-RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python2.7/codecs.* ${libdir}/python2.7/encodings ${libdir}/python2.7/gettext.* ${libdir}/python2.7/locale.* ${libdir}/python2.7/lib-dynload/_locale.so ${libdir}/python2.7/lib-dynload/_codecs* ${libdir}/python2.7/lib-dynload/_multibytecodec.so ${libdir}/python2.7/lib-dynload/unicodedata.so ${libdir}/python2.7/stringprep.* ${libdir}/python2.7/xdrlib.* "
-
-SUMMARY_${PN}-compile="Python bytecode compilation support"
-RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python2.7/py_compile.* ${libdir}/python2.7/compileall.* "
-
-SUMMARY_${PN}-compiler="Python compiler support"
-RDEPENDS_${PN}-compiler="${PN}-core"
-FILES_${PN}-compiler="${libdir}/python2.7/compiler "
-
-SUMMARY_${PN}-compression="Python high-level compression support"
-RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib"
-FILES_${PN}-compression="${libdir}/python2.7/gzip.* ${libdir}/python2.7/zipfile.* ${libdir}/python2.7/tarfile.* ${libdir}/python2.7/lib-dynload/bz2.so "
-
-SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts."
-RDEPENDS_${PN}-contextlib="${PN}-core"
-FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.* "
-
-SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
-FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/ast.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/_sysconfigdata.* ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
-
-SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
-RDEPENDS_${PN}-crypt="${PN}-core"
-FILES_${PN}-crypt="${libdir}/python2.7/hashlib.* ${libdir}/python2.7/md5.* ${libdir}/python2.7/sha.* ${libdir}/python2.7/lib-dynload/crypt.so ${libdir}/python2.7/lib-dynload/_hashlib.so ${libdir}/python2.7/lib-dynload/_sha256.so ${libdir}/python2.7/lib-dynload/_sha512.so "
-
-SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core"
-FILES_${PN}-ctypes="${libdir}/python2.7/ctypes ${libdir}/python2.7/lib-dynload/_ctypes.so ${libdir}/python2.7/lib-dynload/_ctypes_test.so "
-
-SUMMARY_${PN}-curses="Python curses support"
-RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python2.7/curses ${libdir}/python2.7/lib-dynload/_curses.so ${libdir}/python2.7/lib-dynload/_curses_panel.so "
-
-SUMMARY_${PN}-datetime="Python calendar and time support"
-RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python2.7/_strptime.* ${libdir}/python2.7/calendar.* ${libdir}/python2.7/lib-dynload/datetime.so "
-
-SUMMARY_${PN}-db="Python file-based database support"
-RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python2.7/anydbm.* ${libdir}/python2.7/dumbdbm.* ${libdir}/python2.7/whichdb.* "
-
-SUMMARY_${PN}-debugger="Python debugger"
-RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint"
-FILES_${PN}-debugger="${libdir}/python2.7/bdb.* ${libdir}/python2.7/pdb.* "
-
-SUMMARY_${PN}-dev="Python development package"
-RDEPENDS_${PN}-dev="${PN}-core"
-FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig ${libdir}/python2.7/config/Makefile "
-
-SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
-RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python2.7/difflib.* "
-
-SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
-FILES_${PN}-distutils="${libdir}/python2.7/config ${libdir}/python2.7/distutils "
-
-SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
-RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python2.7/config/lib*.a "
-
-SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
-RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python2.7/doctest.* "
-
-SUMMARY_${PN}-email="Python email support"
-RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python2.7/imaplib.* ${libdir}/python2.7/email "
-
-SUMMARY_${PN}-fcntl="Python's fcntl interface"
-RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python2.7/lib-dynload/fcntl.so "
-
-SUMMARY_${PN}-gdbm="Python GNU database support"
-RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python2.7/lib-dynload/gdbm.so "
-
-SUMMARY_${PN}-hotshot="Python hotshot performance profiler"
-RDEPENDS_${PN}-hotshot="${PN}-core"
-FILES_${PN}-hotshot="${libdir}/python2.7/hotshot ${libdir}/python2.7/lib-dynload/_hotshot.so "
-
-SUMMARY_${PN}-html="Python HTML processing support"
-RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python2.7/formatter.* ${libdir}/python2.7/htmlentitydefs.* ${libdir}/python2.7/htmllib.* ${libdir}/python2.7/markupbase.* ${libdir}/python2.7/sgmllib.* ${libdir}/python2.7/HTMLParser.* "
-
-SUMMARY_${PN}-idle="Python Integrated Development Environment"
-RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python2.7/idlelib "
-
-SUMMARY_${PN}-image="Python graphical image handling"
-RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python2.7/colorsys.* ${libdir}/python2.7/imghdr.* ${libdir}/python2.7/lib-dynload/imageop.so ${libdir}/python2.7/lib-dynload/rgbimg.so "
-
-SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core"
-FILES_${PN}-importlib="${libdir}/python2.7/importlib "
-
-SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib"
-FILES_${PN}-io="${libdir}/python2.7/lib-dynload/_socket.so ${libdir}/python2.7/lib-dynload/_io.so ${libdir}/python2.7/lib-dynload/_ssl.so ${libdir}/python2.7/lib-dynload/select.so ${libdir}/python2.7/lib-dynload/termios.so ${libdir}/python2.7/lib-dynload/cStringIO.so ${libdir}/python2.7/pipes.* ${libdir}/python2.7/socket.* ${libdir}/python2.7/ssl.* ${libdir}/python2.7/tempfile.* ${libdir}/python2.7/StringIO.* ${libdir}/python2.7/io.* ${libdir}/python2.7/_pyio.* "
-
-SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re ${PN}-codecs"
-FILES_${PN}-json="${libdir}/python2.7/json ${libdir}/python2.7/lib-dynload/_json.so "
-
-SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core"
-FILES_${PN}-lang="${libdir}/python2.7/lib-dynload/_bisect.so ${libdir}/python2.7/lib-dynload/_collections.so ${libdir}/python2.7/lib-dynload/_heapq.so ${libdir}/python2.7/lib-dynload/_weakref.so ${libdir}/python2.7/lib-dynload/_functools.so ${libdir}/python2.7/lib-dynload/array.so ${libdir}/python2.7/lib-dynload/itertools.so ${libdir}/python2.7/lib-dynload/operator.so ${libdir}/python2.7/lib-dynload/parser.so ${libdir}/python2.7/atexit.* ${libdir}/python2.7/bisect.* ${libdir}/python2.7/code.* ${libdir}/python2.7/codeop.* ${libdir}/python2.7/collections.* ${libdir}/python2.7/dis.* ${libdir}/python2.7/functools.* ${libdir}/python2.7/heapq.* ${libdir}/python2.7/inspect.* ${libdir}/python2.7/keyword.* ${libdir}/python2.7/opcode.* ${libdir}/python2.7/symbol.* ${libdir}/python2.7/repr.* ${libdir}/python2.7/token.* ${libdir}/python2.7/tokenize.* ${libdir}/python2.7/traceback.* ${libdir}/python2.7/weakref.* "
-
-SUMMARY_${PN}-logging="Python logging support"
-RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python2.7/logging "
-
-SUMMARY_${PN}-mailbox="Python mailbox format support"
-RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python2.7/mailbox.* "
-
-SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
-FILES_${PN}-math="${libdir}/python2.7/lib-dynload/cmath.so ${libdir}/python2.7/lib-dynload/math.so ${libdir}/python2.7/lib-dynload/_random.so ${libdir}/python2.7/random.* ${libdir}/python2.7/sets.* "
-
-SUMMARY_${PN}-mime="Python MIME handling APIs"
-RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python2.7/mimetools.* ${libdir}/python2.7/uu.* ${libdir}/python2.7/quopri.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/MimeWriter.* "
-
-SUMMARY_${PN}-mmap="Python memory-mapped file support"
-RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python2.7/lib-dynload/mmap.so "
-
-SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
-RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python2.7/lib-dynload/_multiprocessing.so ${libdir}/python2.7/multiprocessing "
-
-SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
-FILES_${PN}-netclient="${libdir}/python2.7/*Cookie*.* ${libdir}/python2.7/base64.* ${libdir}/python2.7/cookielib.* ${libdir}/python2.7/ftplib.* ${libdir}/python2.7/gopherlib.* ${libdir}/python2.7/hmac.* ${libdir}/python2.7/httplib.* ${libdir}/python2.7/mimetypes.* ${libdir}/python2.7/nntplib.* ${libdir}/python2.7/poplib.* ${libdir}/python2.7/smtplib.* ${libdir}/python2.7/telnetlib.* ${libdir}/python2.7/urllib.* ${libdir}/python2.7/urllib2.* ${libdir}/python2.7/urlparse.* ${libdir}/python2.7/uuid.* ${libdir}/python2.7/rfc822.* ${libdir}/python2.7/mimetools.* "
-
-SUMMARY_${PN}-netserver="Python Internet Protocol servers"
-RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python2.7/cgi.* ${libdir}/python2.7/*HTTPServer.* ${libdir}/python2.7/SocketServer.* "
-
-SUMMARY_${PN}-numbers="Python number APIs"
-RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python2.7/decimal.* ${libdir}/python2.7/fractions.* ${libdir}/python2.7/numbers.* "
-
-SUMMARY_${PN}-pickle="Python serialisation/persistence support"
-RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python2.7/pickle.* ${libdir}/python2.7/shelve.* ${libdir}/python2.7/lib-dynload/cPickle.so ${libdir}/python2.7/pickletools.* "
-
-SUMMARY_${PN}-pkgutil="Python package extension utility support"
-RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python2.7/pkgutil.* "
-
-SUMMARY_${PN}-plistlib="Generate and parse Mac OS X .plist files"
-RDEPENDS_${PN}-plistlib="${PN}-core ${PN}-datetime ${PN}-io"
-FILES_${PN}-plistlib="${libdir}/python2.7/plistlib.* "
-
-SUMMARY_${PN}-pprint="Python pretty-print support"
-RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python2.7/pprint.* "
-
-SUMMARY_${PN}-profile="Python basic performance profiling support"
-RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python2.7/profile.* ${libdir}/python2.7/pstats.* ${libdir}/python2.7/cProfile.* ${libdir}/python2.7/lib-dynload/_lsprof.so "
-
-SUMMARY_${PN}-pydoc="Python interactive help support"
-RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python2.7/pydoc.* ${libdir}/python2.7/pydoc_data "
-
-SUMMARY_${PN}-re="Python Regular Expression APIs"
-RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python2.7/re.* ${libdir}/python2.7/sre.* ${libdir}/python2.7/sre_compile.* ${libdir}/python2.7/sre_constants* ${libdir}/python2.7/sre_parse.* "
-
-SUMMARY_${PN}-readline="Python readline support"
-RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python2.7/lib-dynload/readline.so ${libdir}/python2.7/rlcompleter.* "
-
-SUMMARY_${PN}-resource="Python resource control interface"
-RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python2.7/lib-dynload/resource.so "
-
-SUMMARY_${PN}-robotparser="Python robots.txt parser"
-RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient"
-FILES_${PN}-robotparser="${libdir}/python2.7/robotparser.* "
-
-SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re"
-FILES_${PN}-shell="${libdir}/python2.7/cmd.* ${libdir}/python2.7/commands.* ${libdir}/python2.7/dircache.* ${libdir}/python2.7/fnmatch.* ${libdir}/python2.7/glob.* ${libdir}/python2.7/popen2.* ${libdir}/python2.7/shlex.* ${libdir}/python2.7/shutil.* "
-
-SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
-RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python2.7/smtpd.* "
-
-SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
-RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib"
-FILES_${PN}-sqlite3="${libdir}/python2.7/lib-dynload/_sqlite3.so ${libdir}/python2.7/sqlite3/dbapi2.* ${libdir}/python2.7/sqlite3/__init__.* ${libdir}/python2.7/sqlite3/dump.* "
-
-SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
-RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python2.7/sqlite3/test "
-
-SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
-RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python2.7/lib-dynload/strop.so ${libdir}/python2.7/string.* ${libdir}/python2.7/stringold.* "
-
-SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle"
-FILES_${PN}-subprocess="${libdir}/python2.7/subprocess.* "
-
-SUMMARY_${PN}-syslog="Python syslog interface"
-RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python2.7/lib-dynload/syslog.so "
-
-SUMMARY_${PN}-terminal="Python terminal controlling support"
-RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python2.7/pty.* ${libdir}/python2.7/tty.* "
-
-SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core ${PN}-modules"
-FILES_${PN}-tests="${libdir}/python2.7/test "
-
-SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python2.7/lib-dynload/_csv.so ${libdir}/python2.7/csv.* ${libdir}/python2.7/optparse.* ${libdir}/python2.7/textwrap.* "
-
-SUMMARY_${PN}-threading="Python threading & synchronization support"
-RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python2.7/_threading_local.* ${libdir}/python2.7/dummy_thread.* ${libdir}/python2.7/dummy_threading.* ${libdir}/python2.7/mutex.* ${libdir}/python2.7/threading.* ${libdir}/python2.7/Queue.* "
-
-SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
-RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python2.7/lib-dynload/_tkinter.so ${libdir}/python2.7/lib-tk "
-
-SUMMARY_${PN}-unittest="Python unit testing framework"
-RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python2.7/unittest/ "
-
-SUMMARY_${PN}-unixadmin="Python Unix administration support"
-RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python2.7/lib-dynload/nis.so ${libdir}/python2.7/lib-dynload/grp.so ${libdir}/python2.7/lib-dynload/pwd.so ${libdir}/python2.7/getpass.* "
-
-SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
-FILES_${PN}-xml="${libdir}/python2.7/lib-dynload/_elementtree.so ${libdir}/python2.7/lib-dynload/pyexpat.so ${libdir}/python2.7/xml ${libdir}/python2.7/xmllib.* "
-
-SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
-RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
-FILES_${PN}-xmlrpc="${libdir}/python2.7/xmlrpclib.* ${libdir}/python2.7/SimpleXMLRPCServer.* ${libdir}/python2.7/DocXMLRPCServer.* "
-
-SUMMARY_${PN}-zlib="Python zlib compression support"
-RDEPENDS_${PN}-zlib="${PN}-core"
-FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so "
-
-SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
-ALLOW_EMPTY_${PN}-modules = "1"
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
deleted file mode 100644
index 0260e87..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ /dev/null
@@ -1,283 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: 'scripts/contrib/python/generate-manifest-3.5.py' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
-
-
-PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
-
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
-
-SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
-RDEPENDS_${PN}-2to3="${PN}-core"
-FILES_${PN}-2to3="${libdir}/python3.5/lib2to3 ${libdir}/python3.5/lib2to3/__pycache__ "
-
-SUMMARY_${PN}-argparse="Python command line argument parser"
-RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
-FILES_${PN}-argparse="${libdir}/python3.5/argparse.* ${libdir}/python3.5/__pycache__/argparse.* "
-
-SUMMARY_${PN}-asyncio="Python Asynchronous I/O, event loop, coroutines and tasks"
-RDEPENDS_${PN}-asyncio="${PN}-core"
-FILES_${PN}-asyncio="${libdir}/python3.5/asyncio ${libdir}/python3.5/asyncio/__pycache__ "
-
-SUMMARY_${PN}-audio="Python Audio Handling"
-RDEPENDS_${PN}-audio="${PN}-core"
-FILES_${PN}-audio="${libdir}/python3.5/wave.* ${libdir}/python3.5/__pycache__/wave.* ${libdir}/python3.5/chunk.* ${libdir}/python3.5/__pycache__/chunk.* ${libdir}/python3.5/sndhdr.* ${libdir}/python3.5/__pycache__/sndhdr.* ${libdir}/python3.5/lib-dynload/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/__pycache__/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/audioop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/audioop.*.so ${libdir}/python3.5/audiodev.* ${libdir}/python3.5/__pycache__/audiodev.* ${libdir}/python3.5/sunaudio.* ${libdir}/python3.5/__pycache__/sunaudio.* ${libdir}/python3.5/sunau.* ${libdir}/python3.5/__pycache__/sunau.* ${libdir}/python3.5/toaiff.* ${libdir}/python3.5/__pycache__/toaiff.* "
-
-SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
-RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python3.5/codecs.* ${libdir}/python3.5/__pycache__/codecs.* ${libdir}/python3.5/encodings ${libdir}/python3.5/encodings/__pycache__ ${libdir}/python3.5/gettext.* ${libdir}/python3.5/__pycache__/gettext.* ${libdir}/python3.5/locale.* ${libdir}/python3.5/__pycache__/locale.* ${libdir}/python3.5/lib-dynload/_locale.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_locale.*.so ${libdir}/python3.5/lib-dynload/_codecs* ${libdir}/python3.5/lib-dynload/_codecs*/__pycache__ ${libdir}/python3.5/lib-dynload/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/unicodedata.*.so ${libdir}/python3.5/lib-dynload/__pycache__/unicodedata.*.so ${libdir}/python3.5/stringprep.* ${libdir}/python3.5/__pycache__/stringprep.* ${libdir}/python3.5/xdrlib.* ${libdir}/python3.5/__pycache__/xdrlib.* "
-
-SUMMARY_${PN}-compile="Python bytecode compilation support"
-RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/__pycache__/py_compile.* ${libdir}/python3.5/compileall.* ${libdir}/python3.5/__pycache__/compileall.* "
-
-SUMMARY_${PN}-compression="Python high-level compression support"
-RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell"
-FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/__pycache__/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/__pycache__/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/__pycache__/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/__pycache__/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/zlib.*.so ${libdir}/python3.5/bz2.py ${libdir}/python3.5/__pycache__/bz2.py ${libdir}/python3.5/lzma.py ${libdir}/python3.5/__pycache__/lzma.py ${libdir}/python3.5/_compression.py ${libdir}/python3.5/__pycache__/_compression.py "
-
-SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
-FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/__pycache__/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/__pycache__/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/__pycache__/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/__pycache__/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/__pycache__/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/__pycache__/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/__pycache__/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/__pycache__/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/__pycache__/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/__pycache__/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/__pycache__/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/__pycache__/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/__pycache__/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/__pycache__/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/__pycache__/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/__pycache__/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/__pycache__/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/__pycache__/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/__pycache__/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/__pycache__/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/__pycache__/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/__pycache__/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/lib-dynload/__pycache__/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/__pycache__/types.* ${libdir}/python3.5/platform.* ${libdir}/python3.5/__pycache__/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/__pycache__/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/__pycache__/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/__pycache__/_sysconfigdata.* ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
-
-SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
-RDEPENDS_${PN}-crypt="${PN}-core"
-FILES_${PN}-crypt="${libdir}/python3.5/hashlib.* ${libdir}/python3.5/__pycache__/hashlib.* ${libdir}/python3.5/md5.* ${libdir}/python3.5/__pycache__/md5.* ${libdir}/python3.5/sha.* ${libdir}/python3.5/__pycache__/sha.* ${libdir}/python3.5/lib-dynload/crypt.*.so ${libdir}/python3.5/lib-dynload/__pycache__/crypt.*.so ${libdir}/python3.5/lib-dynload/_hashlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_hashlib.*.so ${libdir}/python3.5/lib-dynload/_sha256.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha256.*.so ${libdir}/python3.5/lib-dynload/_sha512.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha512.*.so "
-
-SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core ${PN}-subprocess"
-FILES_${PN}-ctypes="${libdir}/python3.5/ctypes ${libdir}/python3.5/ctypes/__pycache__ ${libdir}/python3.5/lib-dynload/_ctypes.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes.*.so ${libdir}/python3.5/lib-dynload/_ctypes_test.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes_test.*.so "
-
-SUMMARY_${PN}-curses="Python curses support"
-RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python3.5/curses ${libdir}/python3.5/curses/__pycache__ ${libdir}/python3.5/lib-dynload/_curses.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses.*.so ${libdir}/python3.5/lib-dynload/_curses_panel.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses_panel.*.so "
-
-SUMMARY_${PN}-datetime="Python calendar and time support"
-RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/__pycache__/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/__pycache__/calendar.* ${libdir}/python3.5/datetime.* ${libdir}/python3.5/__pycache__/datetime.* ${libdir}/python3.5/lib-dynload/_datetime.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_datetime.*.so "
-
-SUMMARY_${PN}-db="Python file-based database support"
-RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python3.5/anydbm.* ${libdir}/python3.5/__pycache__/anydbm.* ${libdir}/python3.5/dumbdbm.* ${libdir}/python3.5/__pycache__/dumbdbm.* ${libdir}/python3.5/whichdb.* ${libdir}/python3.5/__pycache__/whichdb.* ${libdir}/python3.5/dbm ${libdir}/python3.5/dbm/__pycache__ ${libdir}/python3.5/lib-dynload/_dbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_dbm.*.so "
-
-SUMMARY_${PN}-debugger="Python debugger"
-RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil"
-FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/__pycache__/bdb.* ${libdir}/python3.5/pdb.* ${libdir}/python3.5/__pycache__/pdb.* "
-
-SUMMARY_${PN}-dev="Python development package"
-RDEPENDS_${PN}-dev="${PN}-core"
-FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig ${libdir}/python3.5/config*/Makefile ${libdir}/python3.5/config*/Makefile/__pycache__ "
-
-SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
-RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python3.5/difflib.* ${libdir}/python3.5/__pycache__/difflib.* "
-
-SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
-FILES_${PN}-distutils="${libdir}/python3.5/config ${libdir}/python3.5/config/__pycache__ ${libdir}/python3.5/distutils ${libdir}/python3.5/distutils/__pycache__ "
-
-SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
-RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python3.5/config/lib*.a ${libdir}/python3.5/config/__pycache__/lib*.a "
-
-SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
-RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python3.5/doctest.* ${libdir}/python3.5/__pycache__/doctest.* "
-
-SUMMARY_${PN}-email="Python email support"
-RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python3.5/imaplib.* ${libdir}/python3.5/__pycache__/imaplib.* ${libdir}/python3.5/email ${libdir}/python3.5/email/__pycache__ "
-
-SUMMARY_${PN}-enum="Python support for enumerations"
-RDEPENDS_${PN}-enum="${PN}-core"
-FILES_${PN}-enum="${libdir}/python3.5/enum.* ${libdir}/python3.5/__pycache__/enum.* "
-
-SUMMARY_${PN}-fcntl="Python's fcntl interface"
-RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/fcntl.*.so "
-
-SUMMARY_${PN}-gdbm="Python GNU database support"
-RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_gdbm.*.so "
-
-SUMMARY_${PN}-html="Python HTML processing support"
-RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python3.5/formatter.* ${libdir}/python3.5/__pycache__/formatter.* ${libdir}/python3.5/htmlentitydefs.* ${libdir}/python3.5/__pycache__/htmlentitydefs.* ${libdir}/python3.5/html ${libdir}/python3.5/html/__pycache__ ${libdir}/python3.5/htmllib.* ${libdir}/python3.5/__pycache__/htmllib.* ${libdir}/python3.5/markupbase.* ${libdir}/python3.5/__pycache__/markupbase.* ${libdir}/python3.5/sgmllib.* ${libdir}/python3.5/__pycache__/sgmllib.* ${libdir}/python3.5/HTMLParser.* ${libdir}/python3.5/__pycache__/HTMLParser.* "
-
-SUMMARY_${PN}-idle="Python Integrated Development Environment"
-RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.5/idlelib ${libdir}/python3.5/idlelib/__pycache__ "
-
-SUMMARY_${PN}-image="Python graphical image handling"
-RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/__pycache__/colorsys.* ${libdir}/python3.5/imghdr.* ${libdir}/python3.5/__pycache__/imghdr.* ${libdir}/python3.5/lib-dynload/imageop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/imageop.*.so ${libdir}/python3.5/lib-dynload/rgbimg.*.so ${libdir}/python3.5/lib-dynload/__pycache__/rgbimg.*.so "
-
-SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/importlib/__pycache__ ${libdir}/python3.5/imp.* ${libdir}/python3.5/__pycache__/imp.* "
-
-SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_socket.*.so ${libdir}/python3.5/lib-dynload/_io.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_io.*.so ${libdir}/python3.5/lib-dynload/_ssl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ssl.*.so ${libdir}/python3.5/lib-dynload/select.*.so ${libdir}/python3.5/lib-dynload/__pycache__/select.*.so ${libdir}/python3.5/lib-dynload/termios.*.so ${libdir}/python3.5/lib-dynload/__pycache__/termios.*.so ${libdir}/python3.5/lib-dynload/cStringIO.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cStringIO.*.so ${libdir}/python3.5/ipaddress.* ${libdir}/python3.5/__pycache__/ipaddress.* ${libdir}/python3.5/pipes.* ${libdir}/python3.5/__pycache__/pipes.* ${libdir}/python3.5/socket.* ${libdir}/python3.5/__pycache__/socket.* ${libdir}/python3.5/ssl.* ${libdir}/python3.5/__pycache__/ssl.* ${libdir}/python3.5/tempfile.* ${libdir}/python3.5/__pycache__/tempfile.* ${libdir}/python3.5/StringIO.* ${libdir}/python3.5/__pycache__/StringIO.* ${libdir}/python3.5/io.* ${libdir}/python3.5/__pycache__/io.* ${libdir}/python3.5/_pyio.* ${libdir}/python3.5/__pycache__/_pyio.* "
-
-SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
-FILES_${PN}-json="${libdir}/python3.5/json ${libdir}/python3.5/json/__pycache__ ${libdir}/python3.5/lib-dynload/_json.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_json.*.so "
-
-SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core ${PN}-importlib"
-FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/__pycache__/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/__pycache__/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/lib-dynload/__pycache__/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/__pycache__/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/__pycache__/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/__pycache__/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/__pycache__/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/__pycache__/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/__pycache__/_collections_abc.* ${libdir}/python3.5/contextlib.* ${libdir}/python3.5/__pycache__/contextlib.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/__pycache__/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/__pycache__/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/__pycache__/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/__pycache__/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/__pycache__/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/__pycache__/opcode.* ${libdir}/python3.5/operator.* ${libdir}/python3.5/__pycache__/operator.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/__pycache__/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/__pycache__/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/__pycache__/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/__pycache__/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/__pycache__/traceback.* ${libdir}/python3.5/weakref.* ${libdir}/python3.5/__pycache__/weakref.* "
-
-SUMMARY_${PN}-logging="Python logging support"
-RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python3.5/logging ${libdir}/python3.5/logging/__pycache__ "
-
-SUMMARY_${PN}-mailbox="Python mailbox format support"
-RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python3.5/mailbox.* ${libdir}/python3.5/__pycache__/mailbox.* "
-
-SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
-FILES_${PN}-math="${libdir}/python3.5/lib-dynload/cmath.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cmath.*.so ${libdir}/python3.5/lib-dynload/math.*.so ${libdir}/python3.5/lib-dynload/__pycache__/math.*.so ${libdir}/python3.5/lib-dynload/_random.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_random.*.so ${libdir}/python3.5/random.* ${libdir}/python3.5/__pycache__/random.* ${libdir}/python3.5/sets.* ${libdir}/python3.5/__pycache__/sets.* "
-
-SUMMARY_${PN}-mime="Python MIME handling APIs"
-RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* ${libdir}/python3.5/uu.* ${libdir}/python3.5/__pycache__/uu.* ${libdir}/python3.5/quopri.* ${libdir}/python3.5/__pycache__/quopri.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/MimeWriter.* ${libdir}/python3.5/__pycache__/MimeWriter.* "
-
-SUMMARY_${PN}-mmap="Python memory-mapped file support"
-RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python3.5/lib-dynload/mmap.*.so ${libdir}/python3.5/lib-dynload/__pycache__/mmap.*.so "
-
-SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
-RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python3.5/lib-dynload/_multiprocessing.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multiprocessing.*.so ${libdir}/python3.5/multiprocessing ${libdir}/python3.5/multiprocessing/__pycache__ "
-
-SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime ${PN}-html"
-FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* ${libdir}/python3.5/__pycache__/*Cookie*.* ${libdir}/python3.5/base64.* ${libdir}/python3.5/__pycache__/base64.* ${libdir}/python3.5/cookielib.* ${libdir}/python3.5/__pycache__/cookielib.* ${libdir}/python3.5/ftplib.* ${libdir}/python3.5/__pycache__/ftplib.* ${libdir}/python3.5/gopherlib.* ${libdir}/python3.5/__pycache__/gopherlib.* ${libdir}/python3.5/hmac.* ${libdir}/python3.5/__pycache__/hmac.* ${libdir}/python3.5/http* ${libdir}/python3.5/http*/__pycache__ ${libdir}/python3.5/httplib.* ${libdir}/python3.5/__pycache__/httplib.* ${libdir}/python3.5/mimetypes.* ${libdir}/python3.5/__pycache__/mimetypes.* ${libdir}/python3.5/nntplib.* ${libdir}/python3.5/__pycache__/nntplib.* ${libdir}/python3.5/poplib.* ${libdir}/python3.5/__pycache__/poplib.* ${libdir}/python3.5/smtplib.* ${libdir}/python3.5/__pycache__/smtplib.* ${libdir}/python3.5/telnetlib.* ${libdir}/python3.5/__pycache__/telnetlib.* ${libdir}/python3.5/urllib ${libdir}/python3.5/urllib/__pycache__ ${libdir}/python3.5/uuid.* ${libdir}/python3.5/__pycache__/uuid.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* "
-
-SUMMARY_${PN}-netserver="Python Internet Protocol servers"
-RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python3.5/cgi.* ${libdir}/python3.5/__pycache__/cgi.* ${libdir}/python3.5/socketserver.* ${libdir}/python3.5/__pycache__/socketserver.* ${libdir}/python3.5/*HTTPServer.* ${libdir}/python3.5/__pycache__/*HTTPServer.* ${libdir}/python3.5/SocketServer.* ${libdir}/python3.5/__pycache__/SocketServer.* "
-
-SUMMARY_${PN}-numbers="Python number APIs"
-RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python3.5/decimal.* ${libdir}/python3.5/__pycache__/decimal.* ${libdir}/python3.5/fractions.* ${libdir}/python3.5/__pycache__/fractions.* ${libdir}/python3.5/numbers.* ${libdir}/python3.5/__pycache__/numbers.* "
-
-SUMMARY_${PN}-pickle="Python serialisation/persistence support"
-RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python3.5/_compat_pickle.* ${libdir}/python3.5/__pycache__/_compat_pickle.* ${libdir}/python3.5/pickle.* ${libdir}/python3.5/__pycache__/pickle.* ${libdir}/python3.5/shelve.* ${libdir}/python3.5/__pycache__/shelve.* ${libdir}/python3.5/lib-dynload/cPickle.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cPickle.*.so ${libdir}/python3.5/pickletools.* ${libdir}/python3.5/__pycache__/pickletools.* "
-
-SUMMARY_${PN}-pkgutil="Python package extension utility support"
-RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python3.5/pkgutil.* ${libdir}/python3.5/__pycache__/pkgutil.* "
-
-SUMMARY_${PN}-pprint="Python pretty-print support"
-RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python3.5/pprint.* ${libdir}/python3.5/__pycache__/pprint.* "
-
-SUMMARY_${PN}-profile="Python basic performance profiling support"
-RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python3.5/profile.* ${libdir}/python3.5/__pycache__/profile.* ${libdir}/python3.5/pstats.* ${libdir}/python3.5/__pycache__/pstats.* ${libdir}/python3.5/cProfile.* ${libdir}/python3.5/__pycache__/cProfile.* ${libdir}/python3.5/lib-dynload/_lsprof.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_lsprof.*.so "
-
-SUMMARY_${PN}-pydoc="Python interactive help support"
-RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.5/pydoc.* ${libdir}/python3.5/__pycache__/pydoc.* ${libdir}/python3.5/pydoc_data ${libdir}/python3.5/pydoc_data/__pycache__ "
-
-SUMMARY_${PN}-re="Python Regular Expression APIs"
-RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python3.5/re.* ${libdir}/python3.5/__pycache__/re.* ${libdir}/python3.5/sre.* ${libdir}/python3.5/__pycache__/sre.* ${libdir}/python3.5/sre_compile.* ${libdir}/python3.5/__pycache__/sre_compile.* ${libdir}/python3.5/sre_constants* ${libdir}/python3.5/sre_constants*/__pycache__ ${libdir}/python3.5/sre_parse.* ${libdir}/python3.5/__pycache__/sre_parse.* "
-
-SUMMARY_${PN}-readline="Python readline support"
-RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python3.5/lib-dynload/readline.*.so ${libdir}/python3.5/lib-dynload/__pycache__/readline.*.so ${libdir}/python3.5/rlcompleter.* ${libdir}/python3.5/__pycache__/rlcompleter.* "
-
-SUMMARY_${PN}-reprlib="Python alternate repr() implementation"
-RDEPENDS_${PN}-reprlib="${PN}-core"
-FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py ${libdir}/python3.5/__pycache__/reprlib.py "
-
-SUMMARY_${PN}-resource="Python resource control interface"
-RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so ${libdir}/python3.5/lib-dynload/__pycache__/resource.*.so "
-
-SUMMARY_${PN}-selectors="Python High-level I/O multiplexing"
-RDEPENDS_${PN}-selectors="${PN}-core"
-FILES_${PN}-selectors="${libdir}/python3.5/selectors.* ${libdir}/python3.5/__pycache__/selectors.* "
-
-SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re ${PN}-compression"
-FILES_${PN}-shell="${libdir}/python3.5/cmd.* ${libdir}/python3.5/__pycache__/cmd.* ${libdir}/python3.5/commands.* ${libdir}/python3.5/__pycache__/commands.* ${libdir}/python3.5/dircache.* ${libdir}/python3.5/__pycache__/dircache.* ${libdir}/python3.5/fnmatch.* ${libdir}/python3.5/__pycache__/fnmatch.* ${libdir}/python3.5/glob.* ${libdir}/python3.5/__pycache__/glob.* ${libdir}/python3.5/popen2.* ${libdir}/python3.5/__pycache__/popen2.* ${libdir}/python3.5/shlex.* ${libdir}/python3.5/__pycache__/shlex.* ${libdir}/python3.5/shutil.* ${libdir}/python3.5/__pycache__/shutil.* "
-
-SUMMARY_${PN}-signal="Python set handlers for asynchronous events support"
-RDEPENDS_${PN}-signal="${PN}-core ${PN}-enum"
-FILES_${PN}-signal="${libdir}/python3.5/signal.* ${libdir}/python3.5/__pycache__/signal.* "
-
-SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
-RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.5/smtpd.* ${libdir}/python3.5/__pycache__/smtpd.* "
-
-SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
-RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading"
-FILES_${PN}-sqlite3="${libdir}/python3.5/lib-dynload/_sqlite3.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sqlite3.*.so ${libdir}/python3.5/sqlite3/dbapi2.* ${libdir}/python3.5/sqlite3/__pycache__/dbapi2.* ${libdir}/python3.5/sqlite3/__init__.* ${libdir}/python3.5/sqlite3/__pycache__/__init__.* ${libdir}/python3.5/sqlite3/dump.* ${libdir}/python3.5/sqlite3/__pycache__/dump.* "
-
-SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
-RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python3.5/sqlite3/test ${libdir}/python3.5/sqlite3/test/__pycache__ "
-
-SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
-RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python3.5/lib-dynload/strop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/strop.*.so ${libdir}/python3.5/string.* ${libdir}/python3.5/__pycache__/string.* ${libdir}/python3.5/stringold.* ${libdir}/python3.5/__pycache__/stringold.* "
-
-SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors"
-FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* ${libdir}/python3.5/__pycache__/subprocess.* ${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_posixsubprocess.*.so "
-
-SUMMARY_${PN}-syslog="Python syslog interface"
-RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python3.5/lib-dynload/syslog.*.so ${libdir}/python3.5/lib-dynload/__pycache__/syslog.*.so "
-
-SUMMARY_${PN}-terminal="Python terminal controlling support"
-RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python3.5/pty.* ${libdir}/python3.5/__pycache__/pty.* ${libdir}/python3.5/tty.* ${libdir}/python3.5/__pycache__/tty.* "
-
-SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core ${PN}-compression"
-FILES_${PN}-tests="${libdir}/python3.5/test ${libdir}/python3.5/test/__pycache__ "
-
-SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python3.5/lib-dynload/_csv.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_csv.*.so ${libdir}/python3.5/csv.* ${libdir}/python3.5/__pycache__/csv.* ${libdir}/python3.5/optparse.* ${libdir}/python3.5/__pycache__/optparse.* ${libdir}/python3.5/textwrap.* ${libdir}/python3.5/__pycache__/textwrap.* "
-
-SUMMARY_${PN}-threading="Python threading & synchronization support"
-RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/__pycache__/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/__pycache__/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/__pycache__/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/__pycache__/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/__pycache__/threading.* ${libdir}/python3.5/queue.* ${libdir}/python3.5/__pycache__/queue.* "
-
-SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
-RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python3.5/lib-dynload/_tkinter.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_tkinter.*.so ${libdir}/python3.5/lib-tk ${libdir}/python3.5/lib-tk/__pycache__ ${libdir}/python3.5/tkinter ${libdir}/python3.5/tkinter/__pycache__ "
-
-SUMMARY_${PN}-typing="Python typing support"
-RDEPENDS_${PN}-typing="${PN}-core"
-FILES_${PN}-typing="${libdir}/python3.5/typing.* ${libdir}/python3.5/__pycache__/typing.* "
-
-SUMMARY_${PN}-unittest="Python unit testing framework"
-RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python3.5/unittest/ ${libdir}/python3.5/unittest/__pycache__ "
-
-SUMMARY_${PN}-unixadmin="Python Unix administration support"
-RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python3.5/lib-dynload/nis.*.so ${libdir}/python3.5/lib-dynload/__pycache__/nis.*.so ${libdir}/python3.5/lib-dynload/grp.*.so ${libdir}/python3.5/lib-dynload/__pycache__/grp.*.so ${libdir}/python3.5/lib-dynload/pwd.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pwd.*.so ${libdir}/python3.5/getpass.* ${libdir}/python3.5/__pycache__/getpass.* "
-
-SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
-FILES_${PN}-xml="${libdir}/python3.5/lib-dynload/_elementtree.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_elementtree.*.so ${libdir}/python3.5/lib-dynload/pyexpat.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pyexpat.*.so ${libdir}/python3.5/xml ${libdir}/python3.5/xml/__pycache__ ${libdir}/python3.5/xmllib.* ${libdir}/python3.5/__pycache__/xmllib.* "
-
-SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
-RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang ${PN}-pydoc"
-FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/__pycache__/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/__pycache__/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/__pycache__/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc ${libdir}/python3.5/xmlrpc/__pycache__ "
-
-SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
-ALLOW_EMPTY_${PN}-modules = "1"
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
index 2c5cb4d..6664ab0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
@@ -4,12 +4,11 @@
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
-SRC_URI = "https://files.pythonhosted.org/packages/source/a/async/async-${PV}.tar.gz"
+inherit pypi
+
SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/async/"
-
-S = "${WORKDIR}/async-${PV}"
+RDEPENDS_${PN} += "${PYTHON_PN}-threading"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
index 777608c..8d37693 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
@@ -8,14 +8,25 @@
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
-SRC_URI = "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
+PYPI_PACKAGE = "GitPython"
-SRC_URI[md5sum] = "df94212b19d270a625b67b4c84ac9a41"
-SRC_URI[sha256sum] = "5c00cbd256e2b1d039381d4f7d71fcb7ee5cc196ca10c101ff7191bd82ab5d9c"
+inherit pypi
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/"
-UPSTREAM_CHECK_REGEX = "/GitPython/(?P<pver>(\d+[\.\-_]*)+)"
+SRC_URI[md5sum] = "7a94ee1b923fb772a2a0c6649430a17c"
+SRC_URI[sha256sum] = "ad61bc25deadb535b047684d06f3654c001d9415e1971e51c9c20f5b510076e9"
-S = "${WORKDIR}/GitPython-${PV}"
+DEPENDS = "${PYTHON_PN}-gitdb"
+RDEPENDS_${PN} += " \
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-gitdb \
+ ${PYTHON_PN}-io \
+ ${PYTHON_PN}-logging \
+ ${PYTHON_PN}-math \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-stringold \
+ ${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-unixadmin \
+ git \
+"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
index 08193fb..2d5292e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
@@ -4,13 +4,21 @@
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
-SRC_URI = "https://files.pythonhosted.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz"
+inherit pypi
-SRC_URI[md5sum] = "44e4366b8bdfd306b075c3a52c96ae1a"
-SRC_URI[sha256sum] = "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
+PYPI_PACKAGE = "gitdb2"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/gitdb/"
+SRC_URI[md5sum] = "d5217eb94ebd36fcec62b929d1f72b00"
+SRC_URI[sha256sum] = "b60e29d4533e5e25bb50b7678bbc187c8f6bcff1344b4f293b2ba55c85795f09"
-S = "${WORKDIR}/gitdb-${PV}"
+DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap"
+RDEPENDS_${PN} += "${PYTHON_PN}-async \
+ ${PYTHON_PN}-compression \
+ ${PYTHON_PN}-crypt \
+ ${PYTHON_PN}-io \
+ ${PYTHON_PN}-mmap \
+ ${PYTHON_PN}-shell \
+ ${PYTHON_PN}-smmap \
+"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
index 1c83af6..e265bde 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
@@ -4,13 +4,18 @@
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863"
-SRC_URI = "https://files.pythonhosted.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
+PYPI_PACKAGE = "Mako"
+
+inherit pypi
SRC_URI[md5sum] = "5836cc997b1b773ef389bf6629c30e65"
SRC_URI[sha256sum] = "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/"
-UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)"
+RDEPENDS_${PN} = "${PYTHON_PN}-html \
+ ${PYTHON_PN}-netclient \
+ ${PYTHON_PN}-threading \
+"
-S = "${WORKDIR}/Mako-${PV}"
+RDEPENDS_${PN}_class-native = ""
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc
deleted file mode 100644
index b05aae0..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../scripts/contrib/python/generate-manifest-2.7.py --native' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
-
-
-RPROVIDES += "python-modules-native python-2to3-native python-argparse-native python-audio-native python-bsddb-native python-codecs-native python-compile-native python-compiler-native python-compression-native python-contextlib-native python-core-native python-crypt-native python-ctypes-native python-curses-native python-datetime-native python-db-native python-debugger-native python-dev-native python-difflib-native python-distutils-native python-distutils-staticdev-native python-doctest-native python-email-native python-fcntl-native python-gdbm-native python-hotshot-native python-html-native python-idle-native python-image-native python-importlib-native python-io-native python-json-native python-lang-native python-logging-native python-mailbox-native python-math-native python-mime-native python-mmap-native python-multiprocessing-native python-netclient-native python-netserver-native python-numbers-native python-pickle-native python-pkgutil-native python-plistlib-native python-pprint-native python-profile-native python-pydoc-native python-re-native python-readline-native python-resource-native python-robotparser-native python-shell-native python-smtpd-native python-sqlite3-native python-sqlite3-tests-native python-stringold-native python-subprocess-native python-syslog-native python-terminal-native python-tests-native python-textutils-native python-threading-native python-tkinter-native python-unittest-native python-unixadmin-native python-xml-native python-xmlrpc-native python-zlib-native"
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc
deleted file mode 100644
index f1f732e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../scripts/contrib/python/generate-manifest-3.5.py --native' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-
-
-
-RPROVIDES += "python3-modules-native python3-2to3-native python3-argparse-native python3-asyncio-native python3-audio-native python3-codecs-native python3-compile-native python3-compression-native python3-core-native python3-crypt-native python3-ctypes-native python3-curses-native python3-datetime-native python3-db-native python3-debugger-native python3-dev-native python3-difflib-native python3-distutils-native python3-distutils-staticdev-native python3-doctest-native python3-email-native python3-enum-native python3-fcntl-native python3-gdbm-native python3-html-native python3-idle-native python3-image-native python3-importlib-native python3-io-native python3-json-native python3-lang-native python3-logging-native python3-mailbox-native python3-math-native python3-mime-native python3-mmap-native python3-multiprocessing-native python3-netclient-native python3-netserver-native python3-numbers-native python3-pickle-native python3-pkgutil-native python3-pprint-native python3-profile-native python3-pydoc-native python3-re-native python3-readline-native python3-reprlib-native python3-resource-native python3-selectors-native python3-shell-native python3-signal-native python3-smtpd-native python3-sqlite3-native python3-sqlite3-tests-native python3-stringold-native python3-subprocess-native python3-syslog-native python3-terminal-native python3-tests-native python3-textutils-native python3-threading-native python3-tkinter-native python3-typing-native python3-unittest-native python3-unixadmin-native python3-xml-native python3-xmlrpc-native"
-
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
index ad46085..af0f173 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
@@ -12,10 +12,10 @@
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Index: Python-2.7.13/Include/pythonrun.h
+Index: Python-2.7.14/Include/pythonrun.h
===================================================================
---- Python-2.7.13.orig/Include/pythonrun.h
-+++ Python-2.7.13/Include/pythonrun.h
+--- Python-2.7.14.orig/Include/pythonrun.h
++++ Python-2.7.14/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -24,10 +24,10 @@
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.13/Lib/distutils/command/install.py
+Index: Python-2.7.14/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.13.orig/Lib/distutils/command/install.py
-+++ Python-2.7.13/Lib/distutils/command/install.py
+--- Python-2.7.14.orig/Lib/distutils/command/install.py
++++ Python-2.7.14/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -46,10 +46,10 @@
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.13/Lib/pydoc.py
+Index: Python-2.7.14/Lib/pydoc.py
===================================================================
---- Python-2.7.13.orig/Lib/pydoc.py
-+++ Python-2.7.13/Lib/pydoc.py
+--- Python-2.7.14.orig/Lib/pydoc.py
++++ Python-2.7.14/Lib/pydoc.py
@@ -375,7 +375,7 @@ class Doc:
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
@@ -59,10 +59,10 @@
"python"+sys.version[0:3])):
"""Return the location of module docs or None"""
-Index: Python-2.7.13/Lib/site.py
+Index: Python-2.7.14/Lib/site.py
===================================================================
---- Python-2.7.13.orig/Lib/site.py
-+++ Python-2.7.13/Lib/site.py
+--- Python-2.7.14.orig/Lib/site.py
++++ Python-2.7.14/Lib/site.py
@@ -288,13 +288,19 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -86,10 +86,10 @@
return sitepackages
def addsitepackages(known_paths):
-Index: Python-2.7.13/Lib/test/test_dl.py
+Index: Python-2.7.14/Lib/test/test_dl.py
===================================================================
---- Python-2.7.13.orig/Lib/test/test_dl.py
-+++ Python-2.7.13/Lib/test/test_dl.py
+--- Python-2.7.14.orig/Lib/test/test_dl.py
++++ Python-2.7.14/Lib/test/test_dl.py
@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
@@ -104,10 +104,10 @@
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.13/Lib/trace.py
+Index: Python-2.7.14/Lib/trace.py
===================================================================
---- Python-2.7.13.orig/Lib/trace.py
-+++ Python-2.7.13/Lib/trace.py
+--- Python-2.7.14.orig/Lib/trace.py
++++ Python-2.7.14/Lib/trace.py
@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -121,11 +121,11 @@
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.13/Makefile.pre.in
+Index: Python-2.7.14/Makefile.pre.in
===================================================================
---- Python-2.7.13.orig/Makefile.pre.in
-+++ Python-2.7.13/Makefile.pre.in
-@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -133,7 +133,7 @@
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -111,7 +112,7 @@ LIBDIR= @libdir@
+@@ -110,7 +111,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -142,7 +142,7 @@
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -668,6 +669,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -644,6 +645,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -150,8 +150,8 @@
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -708,7 +710,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -692,7 +694,7 @@ regen-ast:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -159,10 +159,10 @@
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.13/Modules/getpath.c
+Index: Python-2.7.14/Modules/getpath.c
===================================================================
---- Python-2.7.13.orig/Modules/getpath.c
-+++ Python-2.7.13/Modules/getpath.c
+--- Python-2.7.14.orig/Modules/getpath.c
++++ Python-2.7.14/Modules/getpath.c
@@ -100,6 +100,13 @@
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
@@ -186,10 +186,10 @@
static void
reduce(char *dir)
-Index: Python-2.7.13/Python/getplatform.c
+Index: Python-2.7.14/Python/getplatform.c
===================================================================
---- Python-2.7.13.orig/Python/getplatform.c
-+++ Python-2.7.13/Python/getplatform.c
+--- Python-2.7.14.orig/Python/getplatform.c
++++ Python-2.7.14/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -204,10 +204,10 @@
+{
+ return LIB;
+}
-Index: Python-2.7.13/Python/sysmodule.c
+Index: Python-2.7.14/Python/sysmodule.c
===================================================================
---- Python-2.7.13.orig/Python/sysmodule.c
-+++ Python-2.7.13/Python/sysmodule.c
+--- Python-2.7.14.orig/Python/sysmodule.c
++++ Python-2.7.14/Python/sysmodule.c
@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
@@ -217,11 +217,11 @@
SET_SYS_FROM_STRING("executable",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
-Index: Python-2.7.13/configure.ac
+Index: Python-2.7.14/configure.ac
===================================================================
---- Python-2.7.13.orig/configure.ac
-+++ Python-2.7.13/configure.ac
-@@ -759,6 +759,11 @@ SunOS*)
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -758,6 +758,11 @@ SunOS*)
;;
esac
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.14.bb
similarity index 71%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.13.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.14.bb
index 7edf153..7c491fa 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.13.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.14.bb
@@ -1,7 +1,6 @@
require python.inc
-
EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native"
PR = "${INC_PR}.1"
SRC_URI += "\
@@ -25,8 +24,6 @@
inherit native
-require python-native-${PYTHON_MAJMIN}-manifest.inc
-
EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
EXTRA_OEMAKE = '\
@@ -39,6 +36,12 @@
autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
}
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phase
+do_compile_prepend() {
+ oe_runmake regen-all
+}
+
do_install() {
oe_runmake 'DESTDIR=${D}' install
install -d ${D}${bindir}/${PN}
@@ -59,3 +62,24 @@
# installed in the native sysroot, so disable user site support.
sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
}
+
+python(){
+
+ # Read JSON manifest
+ import json
+ pythondir = d.getVar('THISDIR',True)
+ with open(pythondir+'/python/python2-manifest.json') as manifest_file:
+ python_manifest=json.load(manifest_file)
+
+ rprovides = d.getVar('RPROVIDES').split()
+
+ # Hardcoded since it cant be python-native-foo, should be python-foo-native
+ pn = 'python'
+
+ for key in python_manifest:
+ pypackage = pn + '-' + key + '-native'
+ if pypackage not in rprovides:
+ rprovides.append(pypackage)
+
+ d.setVar('RPROVIDES', ' '.join(rprovides))
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose.inc
new file mode 100644
index 0000000..ccec68a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose.inc
@@ -0,0 +1,18 @@
+SUMMARY = "Extends Python unittest to make testing easier"
+HOMEPAGE = "http://readthedocs.org/docs/nose/"
+DESCRIPTION = "nose extends the test loading and running features of unittest, \
+making it easier to write, find and run tests."
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
+SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
+
+inherit pypi
+
+RDEPENDS_${PN} = "\
+ ${PYTHON_PN}-unittest \
+ "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
index 9b3509c..6d69d2d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
@@ -1,25 +1,2 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-HOMEPAGE = "http://readthedocs.org/docs/nose/"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-unittest \
- "
-
-BBCLASSEXTEND = "native nativesdk"
+require python-nose.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.5.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.1.bb
deleted file mode 100644
index 3f43856..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3a885dff6d14e4cd876d9008a09a42de"
-SRCNAME = "scons"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "3eac81e5e8206304a9b4683c57665aa4"
-SRC_URI[sha256sum] = "c8de85fc02ed1a687b1f2ac791eaa0c1707b4382a204f17d782b5b111b9fdf07"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/SCons/"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-fcntl \
- python-io \
- python-json \
- python-subprocess \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_3.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_3.0.1.bb
new file mode 100644
index 0000000..d5084b2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_3.0.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=46ddf66004e5be5566367cb525a66fc6"
+
+SRC_URI[md5sum] = "b6a292e251b34b82c203b56cfa3968b3"
+SRC_URI[sha256sum] = "24475e38d39c19683bc88054524df018fe6949d70fbd4c69e298d39a0269f173"
+
+UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} = "\
+ python-fcntl \
+ python-io \
+ python-json \
+ python-subprocess \
+ python-shell \
+ python-pprint \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
index ca521a9..74706bf 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
@@ -5,17 +5,44 @@
LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158"
-SRCNAME = "setuptools"
+PYPI_PACKAGE_EXT = "zip"
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.zip"
+inherit pypi
-SRC_URI[md5sum] = "b9e6c049617bac0f9e908a41ab4a29ac"
-SRC_URI[sha256sum] = "b0fe5d432d922df595e918577c51458d63f245115d141b309ac32ecfca329df5"
+SRC_URI[md5sum] = "379642a4f17214071fdc1894255d8d11"
+SRC_URI[sha256sum] = "94dc566247f35009ed42c0f4422f2b4f0a032fab1372c8308b864c8f26d93388"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools"
+DEPENDS += "${PYTHON_PN}"
+DEPENDS_class-native += "${PYTHON_PN}-native"
+DEPENDS_class-nativesdk += "nativesdk-${PYTHON_PN}"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR} \
+ --script-dir=${bindir}"
+
+RDEPENDS_${PN}_class-native = "\
+ ${PYTHON_PN}-distutils \
+ ${PYTHON_PN}-compression \
+"
+RDEPENDS_${PN} = "\
+ ${PYTHON_PN}-compile \
+ ${PYTHON_PN}-compression \
+ ${PYTHON_PN}-ctypes \
+ ${PYTHON_PN}-distutils \
+ ${PYTHON_PN}-email \
+ ${PYTHON_PN}-html \
+ ${PYTHON_PN}-netserver \
+ ${PYTHON_PN}-numbers \
+ ${PYTHON_PN}-pkgutil \
+ ${PYTHON_PN}-plistlib \
+ ${PYTHON_PN}-shell \
+ ${PYTHON_PN}-stringold \
+ ${PYTHON_PN}-threading \
+ ${PYTHON_PN}-unittest \
+ ${PYTHON_PN}-xml \
+"
do_install_prepend() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb
deleted file mode 100644
index 0efacc1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require python-setuptools.inc
-
-PROVIDES = "python-distribute"
-
-DEPENDS += "python"
-DEPENDS_class-native += "python-native"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-stringold \
- python-email \
- python-shell \
- python-distutils \
- python-compression \
- python-pkgutil \
- python-plistlib \
- python-numbers \
- python-html \
- python-netserver \
- python-ctypes \
- python-subprocess \
- python-unittest \
- python-compile \
-"
-
-RDEPENDS_${PN}_class-native = "\
- python-distutils \
- python-compression \
-"
-
-RREPLACES_${PN} = "python-distribute"
-RPROVIDES_${PN} = "python-distribute"
-RCONFLICTS_${PN} = "python-distribute"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_39.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_39.0.0.bb
new file mode 100644
index 0000000..cf94404
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_39.0.0.bb
@@ -0,0 +1,9 @@
+require python-setuptools.inc
+
+PROVIDES = "python-distribute"
+
+inherit setuptools
+
+RREPLACES_${PN} = "python-distribute"
+RPROVIDES_${PN} = "python-distribute"
+RCONFLICTS_${PN} = "python-distribute"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
index bd12fa9..c774984 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
@@ -2,15 +2,13 @@
HOMEPAGE = "https://pypi.python.org/pypi/six/"
SECTION = "devel/python"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6f00d4a50713fa859858dd9abaa35b21"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=35cec5bf04dd0820d0a18533ea7c774a"
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/six/six-${PV}.tar.gz"
-SRC_URI[md5sum] = "34eed507548117b2ab523ab14b2f8b55"
-SRC_URI[sha256sum] = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
+SRC_URI[md5sum] = "d12789f9baf7e9fb2524c0c64f1773f8"
+SRC_URI[sha256sum] = "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/six/"
-UPSTREAM_CHECK_REGEX = "/six/(?P<pver>(\d+[\.\-_]*)+)"
+inherit pypi
+
+RDEPENDS_${PN} = "${PYTHON_PN}-io"
BBCLASSEXTEND = "native nativesdk"
-
-S = "${WORKDIR}/six-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
index d67e6b5..55aa516 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
@@ -7,13 +7,12 @@
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665b9a75d6afb7709"
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/smmap/smmap-${PV}.tar.gz"
+inherit pypi
+
SRC_URI[md5sum] = "d7932d5ace206bf4ae15198cf36fb6ab"
SRC_URI[sha256sum] = "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/smmap/"
-UPSTREAM_CHECK_REGEX = "/smmap/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/smmap-${PV}"
-
+RDEPENDS_${PN} += "${PYTHON_PN}-codecs \
+ ${PYTHON_PN}-mmap \
+"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
index b40f551..979b601 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
@@ -5,12 +5,12 @@
# bump this on every change in contrib/python/generate-manifest-2.7.py
INC_PR = "r1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f741e51de91d4eeea5930b9c3c7fa69d"
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
-SRC_URI[md5sum] = "53b43534153bb2a0363f08bae8b9d990"
-SRC_URI[sha256sum] = "35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731"
+SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b"
+SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66"
# python recipe is actually python 2.x
# also, exclude pre-releases for both python 2.x and 3.x
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
index 366ce3e..e795a74 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
@@ -9,6 +9,9 @@
Rebased for python-2.7.9
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Rebased for python-2.7.14
+Signed-off-by: Derek Straka <derek@asterius.io>
+
Index: Python-2.7.13/Makefile.pre.in
===================================================================
--- Python-2.7.13.orig/Makefile.pre.in
@@ -30,14 +33,14 @@
# Create build directory and generate the sysconfig build-time data there.
# pybuilddir.txt contains the name of the build dir and is used for
-@@ -681,7 +682,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p
-
- $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
+@@ -663,7 +663,7 @@
+ # Regenerate Include/graminit.h and Python/graminit.c
+ # from Grammar/Grammar using pgen
@$(MKDIR_P) Include
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H)
- touch $(GRAMMAR_C)
+- $(PGEN) $(srcdir)/Grammar/Grammar \
++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \
+ $(srcdir)/Include/graminit.h \
+ $(srcdir)/Python/graminit.c
@@ -1121,27 +1122,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
deleted file mode 100644
index 38e5377..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/Don-t-use-getentropy-on-Linux.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-
-From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001
-From: Victor Stinner <victor.stinner@gmail.com>
-Date: Mon, 9 Jan 2017 11:10:41 +0100
-Subject: [PATCH] Don't use getentropy() on Linux
-
-Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but
-read from /dev/urandom to get random bytes, for example in os.urandom(). On
-Linux, getentropy() is implemented which getrandom() is blocking mode, whereas
-os.urandom() should not block.
-
-(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227)
----
- Python/random.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/Python/random.c b/Python/random.c
-index b4bc1f3..f3f5d14 100644
---- a/Python/random.c
-+++ b/Python/random.c
-@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
- }
-
- /* Issue #25003: Don't use getentropy() on Solaris (available since
-- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
--#elif defined(HAVE_GETENTROPY) && !defined(sun)
-+ Solaris 11.3), it is blocking whereas os.urandom() should not block.
-+
-+ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24
-+ implements it with the getrandom() syscall which can fail with ENOSYS,
-+ and this error is not supported in py_getentropy() and getrandom() is called
-+ with flags=0 which blocks until system urandom is initialized, which is not
-+ the desired behaviour to seed the Python hash secret nor for os.urandom():
-+ see the PEP 524 which was only implemented in Python 3.6. */
-+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux)
- #define PY_GETENTROPY 1
-
- /* Fill buffer with size pseudo-random bytes generated by getentropy().
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index a97ff6b..3297340 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -13,11 +13,11 @@
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: Python-2.7.11/configure.ac
+Index: Python-2.7.14/configure.ac
===================================================================
---- Python-2.7.11.orig/configure.ac
-+++ Python-2.7.11/configure.ac
-@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -36,7 +36,7 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
index 3347321..287095f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
@@ -7,13 +7,16 @@
Also simply disable the tk module since its not in DEPENDS.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.13/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300
-@@ -1634,8 +1634,10 @@
+--- Python-2.7.13.orig/setup.py
++++ Python-2.7.13/setup.py
+@@ -1783,10 +1783,12 @@ class PyBuildExt(build_ext):
+ self.extensions.extend(exts)
+
# Call the method for detecting whether _tkinter can be compiled
- self.detect_tkinter(inc_dirs, lib_dirs)
+- self.detect_tkinter(inc_dirs, lib_dirs)
++ # self.detect_tkinter(inc_dirs, lib_dirs)
- if '_tkinter' not in [e.name for e in self.extensions]:
- missing.append('_tkinter')
@@ -22,18 +25,5 @@
+ #if '_tkinter' not in [e.name for e in self.extensions]:
+ # missing.append('_tkinter')
- return missing
-
-diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
-index b4633b9..d7588c0 100644
---- Python-3.5.1.orig/setup.py
-+++ Python-3.5.1/setup.py
-@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
- self.extensions.extend(exts)
-
- # Call the method for detecting whether _tkinter can be compiled
-- self.detect_tkinter(inc_dirs, lib_dirs)
-+ # self.detect_tkinter(inc_dirs, lib_dirs)
-
- # tkinter module will not be avalaible as yocto
- # doesn't have tk integrated (yet)
+ ## # Uncomment these lines if you want to play with xxmodule.c
+ ## ext = Extension('xx', ['xxmodule.c'])
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
index 337e0e3..8ba5823 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
@@ -5,12 +5,12 @@
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.13/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-05 22:29:18.049196608 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 22:29:57.505195453 +0300
-@@ -1522,8 +1522,9 @@
- if platform == 'sunos5':
+--- Python-2.7.13.orig/setup.py
++++ Python-2.7.13/setup.py
+@@ -1671,8 +1671,9 @@ class PyBuildExt(build_ext):
+ if host_platform == 'sunos5':
# SunOS specific modules
exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
- else:
@@ -19,5 +19,5 @@
+ #else:
+ # missing.append('sunaudiodev')
- if platform == 'darwin':
+ if host_platform == 'darwin':
# _scproxy
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/create_manifest2.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python/create_manifest2.py
new file mode 100644
index 0000000..e745045
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/create_manifest2.py
@@ -0,0 +1,277 @@
+# This script is used as a bitbake task to create a new python manifest
+# $ bitbake python -c create_manifest
+#
+# Our goal is to keep python-core as small as posible and add other python
+# packages only when the user needs them, hence why we split upstream python
+# into several packages.
+#
+# In a very simplistic way what this does is:
+# Launch python and see specifically what is required for it to run at a minimum
+#
+# Go through the python-manifest file and launch a separate task for every single
+# one of the files on each package, this task will check what was required for that
+# specific module to run, these modules will be called dependencies.
+# The output of such task will be a list of the modules or dependencies that were
+# found for that file.
+#
+# Such output will be parsed by this script, we will look for each dependency on the
+# manifest and if we find that another package already includes it, then we will add
+# that package as an RDEPENDS to the package we are currently checking; in case we dont
+# find the current dependency on any other package we will add it to the current package
+# as part of FILES.
+#
+#
+# This way we will create a new manifest from the data structure that was built during
+# this process, ont this new manifest each package will contain specifically only
+# what it needs to run.
+#
+# There are some caveats which we try to deal with, such as repeated files on different
+# packages, packages that include folders, wildcards, and special packages.
+# Its also important to note that this method only works for python files, and shared
+# libraries. Static libraries, header files and binaries need to be dealt with manually.
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+import sys
+import subprocess
+import json
+import os
+
+# Hack to get native python search path (for folders), not fond of it but it works for now
+pivot='recipe-sysroot-native'
+for p in sys.path:
+ if pivot in p:
+ nativelibfolder=p[:p.find(pivot)+len(pivot)]
+
+# Empty dict to hold the whole manifest
+new_manifest = {}
+
+# Check for repeated files, folders and wildcards
+allfiles=[]
+repeated=[]
+wildcards=[]
+
+hasfolders=[]
+allfolders=[]
+
+def isFolder(value):
+ if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+ return True
+ else:
+ return False
+
+# Read existing JSON manifest
+with open('python2-manifest.json') as manifest:
+ old_manifest=json.load(manifest)
+
+
+# First pass to get core-package functionality, because we base everything on the fact that core is actually working
+# Not exactly the same so it should not be a function
+print ("Getting dependencies for core package:")
+
+# Special call to check for core package
+output = subprocess.check_output([sys.executable, 'get_module_deps2.py', 'python-core-package'])
+for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if item not in old_manifest['core']['files']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['files'].append(item)
+
+for value in old_manifest['core']['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass it directly
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ # Ignore binaries, since we don't import those, assume it was added correctly (manually)
+ if '${bindir}' in value:
+ # Pass it directly
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Get module name , shouldnt be affected by libdir/bindir
+ value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('Getting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
+ for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if item not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(item)
+
+# We check which packages include folders
+for key in old_manifest:
+ for value in old_manifest[key]['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ print ('%s is a folder' % value)
+ if key not in hasfolders:
+ hasfolders.append(key)
+ if value not in allfolders:
+ allfolders.append(value)
+
+for key in old_manifest:
+ # Use an empty dict as data structure to hold data for each package and fill it up
+ new_manifest[key]={}
+ new_manifest[key]['files']=[]
+ new_manifest[key]['rdepends']=[]
+ # All packages should depend on core
+ if key != 'core':
+ new_manifest[key]['rdepends'].append('core')
+ new_manifest[key]['summary']=old_manifest[key]['summary']
+
+ # Handle special cases, we assume that when they were manually added
+ # to the manifest we knew what we were doing.
+ print ('Handling package %s' % key)
+ special_packages=['misc', 'modules', 'dev']
+ if key in special_packages or 'staticdev' in key:
+ print('Passing %s package directly' % key)
+ new_manifest[key]=old_manifest[key]
+ continue
+
+ for value in old_manifest[key]['files']:
+ # We already handled core on the first pass
+ if key == 'core':
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass folders directly
+ new_manifest[key]['files'].append(value)
+ # Ignore binaries, since we don't import those
+ if '${bindir}' in value:
+ # Pass it directly to the new manifest data structure
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+ # Get module name , shouldnt be affected by libdir/bindir
+ value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('Getting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
+
+ # We can print dependencies for debugging purposes
+ #print (output)
+ # Output will have all dependencies
+ for item in output.split():
+
+ # Warning: This first part is ugly
+ # One of the dependencies that was found, could be inside of one of the folders included by another package
+ # We need to check if this happens so we can add the package containing the folder as an RDEPENDS
+ # e.g. Folder encodings contained in codecs
+ # This would be solved if no packages included any folders
+
+ # This can be done in two ways:
+ # 1 - We assume that if we take out the filename from the path we would get
+ # the folder string, then we would check if folder string is in the list of folders
+ # This would not work if a package contains a folder which contains another folder
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # folder_string would not match any value contained in the list of folders
+ #
+ # 2 - We do it the other way around, checking if the folder is contained in the path
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # is folder_string inside path/folder1/folder2/filename?,
+ # Yes, it works, but we waste a couple of milliseconds.
+
+ inFolders=False
+ for folder in allfolders:
+ if folder in item:
+ inFolders = True # Did we find a folder?
+ folderFound = False # Second flag to break inner for
+ # Loop only through packages which contain folders
+ for keyfolder in hasfolders:
+ if (folderFound == False):
+ #print("Checking folder %s on package %s" % (item,keyfolder))
+ for file_folder in old_manifest[keyfolder]['files']:
+ if file_folder==folder:
+ print ('%s found in %s' % (folder, keyfolder))
+ folderFound = True
+ if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
+ new_manifest[key]['rdepends'].append(keyfolder)
+ else:
+ break
+
+ # A folder was found so we're done with this item, we can go on
+ if inFolders:
+ continue
+
+ # We might already have it on the dictionary since it could depend on a (previously checked) module
+ if item not in new_manifest[key]['files']:
+ # Handle core as a special package, we already did it so we pass it to NEW data structure directly
+ if key=='core':
+ print('Adding %s to %s FILES' % (item, key))
+ if item.endswith('*'):
+ wildcards.append(item)
+ new_manifest[key]['files'].append(item)
+
+ # Check for repeated files
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+ else:
+
+ # Check if this dependency is already contained on another package, so we add it
+ # as an RDEPENDS, or if its not, it means it should be contained on the current
+ # package, so we should add it to FILES
+ for newkey in old_manifest:
+ # Debug
+ #print("Checking %s " % item + " in %s" % newkey)
+ if item in old_manifest[newkey]['files']:
+ # Since were nesting, we need to check its not the same key
+ if(newkey!=key):
+ if newkey not in new_manifest[key]['rdepends']:
+ # Add it to the new manifest data struct
+ # Debug
+ print('Adding %s to %s RDEPENDS, because it contains %s' % (newkey, key, item))
+ new_manifest[key]['rdepends'].append(newkey)
+ break
+ else:
+ # Debug
+ print('Adding %s to %s FILES' % (item, key))
+ # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
+ new_manifest[key]['files'].append(item)
+ if item.endswith('*'):
+ wildcards.append(item)
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+print ('The following files are repeated (contained in more than one package), please check which package should get it:')
+print (repeated)
+print('The following files contain wildcards, please check they are necessary')
+print(wildcards)
+print('The following files contain folders, please check they are necessary')
+print(hasfolders)
+
+# Sort it just so it looks nice
+for key in new_manifest:
+ new_manifest[key]['files'].sort()
+ new_manifest[key]['rdepends'].sort()
+
+# Create the manifest from the data structure that was built
+with open('python2-manifest.json.new','w') as outfile:
+ json.dump(new_manifest,outfile,sort_keys=True, indent=4, separators=(',', ': '))
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
index 669112d..60d782c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
@@ -4,18 +4,19 @@
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Pending
---
-diff -ruN a/Makefile.pre.in b/Makefile.pre.in
---- a/Makefile.pre.in 2013-06-27 10:44:11.033840532 +0200
-+++ b/Makefile.pre.in 2013-06-27 10:44:39.572635273 +0200
-@@ -709,14 +709,19 @@
- # generated bytecode. This is sometimes a very shy bug needing a lot of
- # sample data.
+Index: Python-2.7.14/Makefile.pre.in
+===================================================================
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -846,14 +846,19 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
+
+ .PHONY: test testall testuniversal buildbottest pythoninfo
-TESTOPTS= -l $(EXTRATESTOPTS)
+TESTOPTS= -l -v $(EXTRATESTOPTS)
TESTPROG= $(srcdir)/Lib/test/regrtest.py
-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
--test: all platform
+-test: @DEF_MAKE_RULE@ platform
- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
+test: build-test
@@ -26,8 +27,8 @@
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-+build-test: all platform
++build-test: @DEF_MAKE_RULE@ platform
+
- testall: all platform
+ testall: @DEF_MAKE_RULE@ platform
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
$(TESTPYTHON) $(srcdir)/Lib/compileall.py
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/get_module_deps2.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python/get_module_deps2.py
new file mode 100644
index 0000000..73e7c6f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/get_module_deps2.py
@@ -0,0 +1,112 @@
+# This script is launched on separate task for each python module
+# It checks for dependencies for that specific module and prints
+# them out, the output of this execution will have all dependencies
+# for a specific module, which will be parsed an dealt on create_manifest.py
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+# We can get a log per module, for all the dependencies that were found, but its messy.
+debug=False
+
+import sys
+
+# We can get a list of the modules which are currently required to run python
+# so we run python-core and get its modules, we then import what we need
+# and check what modules are currently running, if we substract them from the
+# modules we had initially, we get the dependencies for the module we imported.
+
+# We use importlib to achieve this, so we also need to know what modules importlib needs
+import importlib
+
+core_deps=set(sys.modules)
+
+def fix_path(dep_path):
+ import os
+ # We DONT want the path on our HOST system
+ pivot='recipe-sysroot-native'
+ dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
+
+ if '/usr/bin' in dep_path:
+ dep_path = dep_path.replace('/usr/bin''${bindir}')
+
+ # Handle multilib, is there a better way?
+ if '/usr/lib32' in dep_path:
+ dep_path = dep_path.replace('/usr/lib32','${libdir}')
+ if '/usr/lib64' in dep_path:
+ dep_path = dep_path.replace('/usr/lib64','${libdir}')
+ if '/usr/lib' in dep_path:
+ dep_path = dep_path.replace('/usr/lib','${libdir}')
+ if '/usr/include' in dep_path:
+ dep_path = dep_path.replace('/usr/include','${includedir}')
+ if '__init__.' in dep_path:
+ dep_path = os.path.split(dep_path)[0]
+
+ # If a *.pyc file was imported, we replace it with *.py (since we deal with PYCs on create_manifest)
+ if '.pyc' in dep_path:
+ dep_path = dep_path.replace('.pyc','.py')
+
+ return dep_path
+
+# Module to import was passed as an argument
+current_module = str(sys.argv[1]).rstrip()
+if(debug==True):
+ log = open('log_%s' % current_module,'w')
+ log.write('Module %s generated the following dependencies:\n' % current_module)
+try:
+ importlib.import_module('%s' % current_module)
+except ImportError as e:
+ if (debug==True):
+ log.write('Module was not found')
+ pass
+
+
+# Get current module dependencies, dif will contain a list of specific deps for this module
+module_deps=set(sys.modules)
+
+# We handle the core package (1st pass on create_manifest.py) as a special case
+if current_module == 'python-core-package':
+ dif = core_deps
+else:
+ dif = module_deps-core_deps
+
+
+# Check where each dependency came from
+for item in dif:
+ dep_path=''
+ try:
+ if (debug==True):
+ log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
+ dep_path = sys.modules['%s' % item].__file__
+ except AttributeError as e:
+ # Deals with thread (builtin module) not having __file__ attribute
+ if debug==True:
+ log.write(item + ' ')
+ log.write(str(e))
+ log.write('\n')
+ pass
+ except NameError as e:
+ # Deals with NameError: name 'dep_path' is not defined
+ # because module is not found (wasn't compiled?), e.g. bddsm
+ if (debug==True):
+ log.write(item+' ')
+ log.write(str(e))
+ pass
+
+ # Site-customize is a special case since we (OpenEmbedded) put it there manually
+ if 'sitecustomize' in dep_path:
+ dep_path = '${libdir}/python2.7/sitecustomize.py'
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+ continue
+
+ dep_path = fix_path(dep_path)
+
+ if (debug==True):
+ log.write(dep_path+'\n')
+
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+
+if debug==True:
+ log.close()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
index f5568d2..1116dd5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
@@ -1,11 +1,11 @@
Rebased for python-2.7.9
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Upstream-Status: Pending
-Index: Python-2.7.13/configure.ac
+Index: Python-2.7.14/configure.ac
===================================================================
---- Python-2.7.13.orig/configure.ac
-+++ Python-2.7.13/configure.ac
-@@ -759,6 +759,10 @@ SunOS*)
+--- Python-2.7.14.orig/configure.ac
++++ Python-2.7.14/configure.ac
+@@ -758,6 +758,10 @@ SunOS*)
;;
esac
@@ -16,10 +16,10 @@
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
-Index: Python-2.7.13/Include/pythonrun.h
+Index: Python-2.7.14/Include/pythonrun.h
===================================================================
---- Python-2.7.13.orig/Include/pythonrun.h
-+++ Python-2.7.13/Include/pythonrun.h
+--- Python-2.7.14.orig/Include/pythonrun.h
++++ Python-2.7.14/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -28,10 +28,10 @@
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.13/Lib/distutils/command/install.py
+Index: Python-2.7.14/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.13.orig/Lib/distutils/command/install.py
-+++ Python-2.7.13/Lib/distutils/command/install.py
+--- Python-2.7.14.orig/Lib/distutils/command/install.py
++++ Python-2.7.14/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -41,19 +41,21 @@
if sys.version < "2.2":
WINDOWS_SCHEME = {
'purelib': '$base',
-@@ -42,7 +44,7 @@ else:
+@@ -41,8 +43,8 @@ else:
+
INSTALL_SCHEMES = {
'unix_prefix': {
- 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages',
+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.13/Lib/distutils/sysconfig.py
+Index: Python-2.7.14/Lib/distutils/sysconfig.py
===================================================================
---- Python-2.7.13.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.13/Lib/distutils/sysconfig.py
+--- Python-2.7.14.orig/Lib/distutils/sysconfig.py
++++ Python-2.7.14/Lib/distutils/sysconfig.py
@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
@@ -68,10 +70,10 @@
if standard_lib:
return libpython
else:
-Index: Python-2.7.13/Lib/pydoc.py
+Index: Python-2.7.14/Lib/pydoc.py
===================================================================
---- Python-2.7.13.orig/Lib/pydoc.py
-+++ Python-2.7.13/Lib/pydoc.py
+--- Python-2.7.14.orig/Lib/pydoc.py
++++ Python-2.7.14/Lib/pydoc.py
@@ -375,7 +375,7 @@ class Doc:
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
@@ -81,10 +83,10 @@
"python"+sys.version[0:3])):
"""Return the location of module docs or None"""
-Index: Python-2.7.13/Lib/site.py
+Index: Python-2.7.14/Lib/site.py
===================================================================
---- Python-2.7.13.orig/Lib/site.py
-+++ Python-2.7.13/Lib/site.py
+--- Python-2.7.14.orig/Lib/site.py
++++ Python-2.7.14/Lib/site.py
@@ -288,13 +288,18 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -107,10 +109,10 @@
return sitepackages
def addsitepackages(known_paths):
-Index: Python-2.7.13/Lib/sysconfig.py
+Index: Python-2.7.14/Lib/sysconfig.py
===================================================================
---- Python-2.7.13.orig/Lib/sysconfig.py
-+++ Python-2.7.13/Lib/sysconfig.py
+--- Python-2.7.14.orig/Lib/sysconfig.py
++++ Python-2.7.14/Lib/sysconfig.py
@@ -7,10 +7,10 @@ from os.path import pardir, realpath
_INSTALL_SCHEMES = {
@@ -139,10 +141,10 @@
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
-Index: Python-2.7.13/Lib/test/test_dl.py
+Index: Python-2.7.14/Lib/test/test_dl.py
===================================================================
---- Python-2.7.13.orig/Lib/test/test_dl.py
-+++ Python-2.7.13/Lib/test/test_dl.py
+--- Python-2.7.14.orig/Lib/test/test_dl.py
++++ Python-2.7.14/Lib/test/test_dl.py
@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
@@ -157,11 +159,11 @@
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.13/Lib/test/test_site.py
+Index: Python-2.7.14/Lib/test/test_site.py
===================================================================
---- Python-2.7.13.orig/Lib/test/test_site.py
-+++ Python-2.7.13/Lib/test/test_site.py
-@@ -235,12 +235,16 @@ class HelperFunctionsTests(unittest.Test
+--- Python-2.7.14.orig/Lib/test/test_site.py
++++ Python-2.7.14/Lib/test/test_site.py
+@@ -252,12 +252,16 @@ class HelperFunctionsTests(unittest.Test
self.assertEqual(dirs[0], wanted)
elif os.sep == '/':
# OS X, Linux, FreeBSD, etc
@@ -181,10 +183,10 @@
else:
# other platforms
self.assertEqual(len(dirs), 2)
-Index: Python-2.7.13/Lib/trace.py
+Index: Python-2.7.14/Lib/trace.py
===================================================================
---- Python-2.7.13.orig/Lib/trace.py
-+++ Python-2.7.13/Lib/trace.py
+--- Python-2.7.14.orig/Lib/trace.py
++++ Python-2.7.14/Lib/trace.py
@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -198,11 +200,11 @@
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.13/Makefile.pre.in
+Index: Python-2.7.14/Makefile.pre.in
===================================================================
---- Python-2.7.13.orig/Makefile.pre.in
-+++ Python-2.7.13/Makefile.pre.in
-@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.14.orig/Makefile.pre.in
++++ Python-2.7.14/Makefile.pre.in
+@@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -210,7 +212,7 @@
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -111,7 +112,7 @@ LIBDIR= @libdir@
+@@ -110,7 +111,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -219,7 +221,7 @@
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -669,6 +670,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -645,6 +646,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -227,8 +229,8 @@
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -709,7 +711,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -693,7 +695,7 @@ regen-ast:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -236,10 +238,10 @@
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.13/Modules/getpath.c
+Index: Python-2.7.14/Modules/getpath.c
===================================================================
---- Python-2.7.13.orig/Modules/getpath.c
-+++ Python-2.7.13/Modules/getpath.c
+--- Python-2.7.14.orig/Modules/getpath.c
++++ Python-2.7.14/Modules/getpath.c
@@ -100,6 +100,13 @@
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
@@ -263,10 +265,10 @@
static void
reduce(char *dir)
-Index: Python-2.7.13/Python/getplatform.c
+Index: Python-2.7.14/Python/getplatform.c
===================================================================
---- Python-2.7.13.orig/Python/getplatform.c
-+++ Python-2.7.13/Python/getplatform.c
+--- Python-2.7.14.orig/Python/getplatform.c
++++ Python-2.7.14/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -281,10 +283,10 @@
+{
+ return LIB;
+}
-Index: Python-2.7.13/Python/sysmodule.c
+Index: Python-2.7.14/Python/sysmodule.c
===================================================================
---- Python-2.7.13.orig/Python/sysmodule.c
-+++ Python-2.7.13/Python/sysmodule.c
+--- Python-2.7.14.orig/Python/sysmodule.c
++++ Python-2.7.14/Python/sysmodule.c
@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
index 951cb46..abab41e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
@@ -8,12 +8,12 @@
--- Python-2.7.3.orig/Makefile.pre.in
+++ Python-2.7.3/Makefile.pre.in
-@@ -1008,7 +1008,7 @@ LIBPL= $(LIBP)/config
+@@ -1187,7 +1187,7 @@
LIBPC= $(LIBDIR)/pkgconfig
-
- libainstall: all python-config
+
+ libainstall: @DEF_MAKE_RULE@ python-config
- @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
+ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \
- do \
- if test ! -d $(DESTDIR)$$i; then \
- echo "Creating directory $$i"; \
+ do \
+ if test ! -d $(DESTDIR)$$i; then \
+ echo "Creating directory $$i"; \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/python2-manifest.json b/import-layers/yocto-poky/meta/recipes-devtools/python/python/python2-manifest.json
new file mode 100644
index 0000000..723e513
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/python2-manifest.json
@@ -0,0 +1,1047 @@
+{
+ "2to3": {
+ "files": [
+ "${bindir}/2to3",
+ "${libdir}/python2.7/lib2to3"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python automated Python 2 to 3 code translator"
+ },
+ "argparse": {
+ "files": [
+ "${libdir}/python2.7/argparse.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "textutils"
+ ],
+ "summary": "Python command line argument parser"
+ },
+ "audio": {
+ "files": [
+ "${libdir}/python2.7/audiodev.py",
+ "${libdir}/python2.7/chunk.py",
+ "${libdir}/python2.7/lib-dynload/audioop.so",
+ "${libdir}/python2.7/lib-dynload/ossaudiodev.so",
+ "${libdir}/python2.7/sndhdr.py",
+ "${libdir}/python2.7/sunau.py",
+ "${libdir}/python2.7/sunaudio.py",
+ "${libdir}/python2.7/toaiff.py",
+ "${libdir}/python2.7/wave.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "math"
+ ],
+ "summary": "Python Audio Handling"
+ },
+ "bsddb": {
+ "files": [
+ "${libdir}/python2.7/bsddb",
+ "${libdir}/python2.7/lib-dynload/_bsddb.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python bindings for the Berkeley Database"
+ },
+ "codecs": {
+ "files": [
+ "${libdir}/python2.7/gettext.py",
+ "${libdir}/python2.7/lib-dynload/_codecs_cn.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_hk.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_iso2022.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_jp.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_kr.so",
+ "${libdir}/python2.7/lib-dynload/_codecs_tw.so",
+ "${libdir}/python2.7/lib-dynload/_multibytecodec.so",
+ "${libdir}/python2.7/lib-dynload/unicodedata.so",
+ "${libdir}/python2.7/locale.py",
+ "${libdir}/python2.7/stringprep.py",
+ "${libdir}/python2.7/xdrlib.py"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "lang"
+ ],
+ "summary": "Python codec"
+ },
+ "compile": {
+ "files": [
+ "${libdir}/python2.7/compileall.py",
+ "${libdir}/python2.7/py_compile.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python bytecode compilation support"
+ },
+ "compiler": {
+ "files": [
+ "${libdir}/python2.7/compiler"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "lang"
+ ],
+ "summary": "Python compiler support"
+ },
+ "compression": {
+ "files": [
+ "${libdir}/python2.7/gzip.py",
+ "${libdir}/python2.7/lib-dynload/bz2.so",
+ "${libdir}/python2.7/tarfile.py",
+ "${libdir}/python2.7/zipfile.py"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "shell",
+ "unixadmin",
+ "zlib"
+ ],
+ "summary": "Python high-level compression support"
+ },
+ "contextlib": {
+ "files": [
+ "${libdir}/python2.7/contextlib.py"
+ ],
+ "rdepends": [
+ "core",
+ "lang"
+ ],
+ "summary": "Python utilities for with-statementcontexts."
+ },
+ "core": {
+ "files": [
+ "${bindir}/python*",
+ "${includedir}/python2.7/pyconfig*.h",
+ "${libdir}/python2.7/ConfigParser.py",
+ "${libdir}/python2.7/UserDict.py",
+ "${libdir}/python2.7/UserList.py",
+ "${libdir}/python2.7/UserString.py",
+ "${libdir}/python2.7/__future__.py",
+ "${libdir}/python2.7/_abcoll.py",
+ "${libdir}/python2.7/_sysconfigdata.py",
+ "${libdir}/python2.7/_weakrefset.py",
+ "${libdir}/python2.7/abc.py",
+ "${libdir}/python2.7/ast.py",
+ "${libdir}/python2.7/atexit.py",
+ "${libdir}/python2.7/codecs.py",
+ "${libdir}/python2.7/collections.py",
+ "${libdir}/python2.7/copy.py",
+ "${libdir}/python2.7/copy_reg.py",
+ "${libdir}/python2.7/encodings",
+ "${libdir}/python2.7/encodings/aliases.py",
+ "${libdir}/python2.7/encodings/utf_8.py",
+ "${libdir}/python2.7/genericpath.py",
+ "${libdir}/python2.7/getopt.py",
+ "${libdir}/python2.7/heapq.py",
+ "${libdir}/python2.7/importlib",
+ "${libdir}/python2.7/keyword.py",
+ "${libdir}/python2.7/lib-dynload/_collections.so",
+ "${libdir}/python2.7/lib-dynload/_heapq.so",
+ "${libdir}/python2.7/lib-dynload/_locale.so",
+ "${libdir}/python2.7/lib-dynload/_struct.so",
+ "${libdir}/python2.7/lib-dynload/binascii.so",
+ "${libdir}/python2.7/lib-dynload/itertools.so",
+ "${libdir}/python2.7/lib-dynload/operator.so",
+ "${libdir}/python2.7/lib-dynload/readline.so",
+ "${libdir}/python2.7/lib-dynload/strop.so",
+ "${libdir}/python2.7/lib-dynload/time.so",
+ "${libdir}/python2.7/lib-dynload/xreadlines.so",
+ "${libdir}/python2.7/linecache.py",
+ "${libdir}/python2.7/new.py",
+ "${libdir}/python2.7/os.py",
+ "${libdir}/python2.7/platform.py",
+ "${libdir}/python2.7/posixpath.py",
+ "${libdir}/python2.7/re.py",
+ "${libdir}/python2.7/rlcompleter.py",
+ "${libdir}/python2.7/site.py",
+ "${libdir}/python2.7/sitecustomize.py",
+ "${libdir}/python2.7/sre_compile.py",
+ "${libdir}/python2.7/sre_constants.py",
+ "${libdir}/python2.7/sre_parse.py",
+ "${libdir}/python2.7/stat.py",
+ "${libdir}/python2.7/string.py",
+ "${libdir}/python2.7/struct.py",
+ "${libdir}/python2.7/sysconfig.py",
+ "${libdir}/python2.7/traceback.py",
+ "${libdir}/python2.7/types.py",
+ "${libdir}/python2.7/warnings.py",
+ "${libdir}/python2.7/weakref.py"
+ ],
+ "rdepends": [],
+ "summary": "Python interpreter and core modules"
+ },
+ "crypt": {
+ "files": [
+ "${libdir}/python2.7/hashlib.py",
+ "${libdir}/python2.7/lib-dynload/_hashlib.so",
+ "${libdir}/python2.7/lib-dynload/crypt.so",
+ "${libdir}/python2.7/md5.py",
+ "${libdir}/python2.7/sha.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python basic cryptographic and hashing support"
+ },
+ "ctypes": {
+ "files": [
+ "${libdir}/python2.7/ctypes",
+ "${libdir}/python2.7/lib-dynload/_ctypes.so",
+ "${libdir}/python2.7/lib-dynload/_ctypes_test.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python C types support"
+ },
+ "curses": {
+ "files": [
+ "${libdir}/python2.7/curses",
+ "${libdir}/python2.7/lib-dynload/_curses.so",
+ "${libdir}/python2.7/lib-dynload/_curses_panel.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python curses support"
+ },
+ "datetime": {
+ "files": [
+ "${libdir}/python2.7/_strptime.py",
+ "${libdir}/python2.7/calendar.py",
+ "${libdir}/python2.7/lib-dynload/datetime.so"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang"
+ ],
+ "summary": "Python calendar and time support"
+ },
+ "db": {
+ "files": [
+ "${libdir}/python2.7/anydbm.py",
+ "${libdir}/python2.7/dbhash.py",
+ "${libdir}/python2.7/dumbdbm.py",
+ "${libdir}/python2.7/lib-dynload/dbm.so",
+ "${libdir}/python2.7/whichdb.py"
+ ],
+ "rdepends": [
+ "bsddb",
+ "core",
+ "gdbm"
+ ],
+ "summary": "Python file-based database support"
+ },
+ "debugger": {
+ "files": [
+ "${libdir}/python2.7/bdb.py",
+ "${libdir}/python2.7/pdb.py"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "lang",
+ "pprint",
+ "shell"
+ ],
+ "summary": "Python debugger"
+ },
+ "dev": {
+ "files": [
+ "${base_libdir}/*.a",
+ "${base_libdir}/*.o",
+ "${datadir}/aclocal",
+ "${datadir}/pkgconfig",
+ "${includedir}",
+ "${libdir}/*.a",
+ "${libdir}/*.la",
+ "${libdir}/*.o",
+ "${libdir}/lib*${SOLIBSDEV}",
+ "${libdir}/pkgconfig",
+ "${libdir}/python2.7/config/Makefile"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python development package"
+ },
+ "difflib": {
+ "files": [
+ "${libdir}/python2.7/difflib.py"
+ ],
+ "rdepends": [
+ "core",
+ "lang"
+ ],
+ "summary": "Python helpers for computing deltas between objects"
+ },
+ "distutils": {
+ "files": [
+ "${libdir}/python2.7/config",
+ "${libdir}/python2.7/distutils"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Distribution Utilities"
+ },
+ "distutils-staticdev": {
+ "files": [
+ "${libdir}/python2.7/config/lib*.a"
+ ],
+ "rdepends": [
+ "distutils"
+ ],
+ "summary": "Python distribution utilities (static libraries)"
+ },
+ "doctest": {
+ "files": [
+ "${libdir}/python2.7/doctest.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "debugger",
+ "difflib",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "pprint",
+ "shell",
+ "unittest"
+ ],
+ "summary": "Python framework for running examples in docstrings"
+ },
+ "email": {
+ "files": [
+ "${libdir}/python2.7/email",
+ "${libdir}/python2.7/imaplib.py"
+ ],
+ "rdepends": [
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "netclient",
+ "pickle",
+ "subprocess",
+ "textutils"
+ ],
+ "summary": "Python email support"
+ },
+ "fcntl": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/fcntl.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python's fcntl interface"
+ },
+ "gdbm": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/gdbm.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python GNU database support"
+ },
+ "hotshot": {
+ "files": [
+ "${libdir}/python2.7/hotshot",
+ "${libdir}/python2.7/lib-dynload/_hotshot.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python hotshot performance profiler"
+ },
+ "html": {
+ "files": [
+ "${libdir}/python2.7/HTMLParser.py",
+ "${libdir}/python2.7/formatter.py",
+ "${libdir}/python2.7/htmlentitydefs.py",
+ "${libdir}/python2.7/htmllib.py",
+ "${libdir}/python2.7/markupbase.py",
+ "${libdir}/python2.7/sgmllib.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python HTML processing support"
+ },
+ "idle": {
+ "files": [
+ "${bindir}/idle",
+ "${libdir}/python2.7/idlelib"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Integrated Development Environment"
+ },
+ "image": {
+ "files": [
+ "${libdir}/python2.7/colorsys.py",
+ "${libdir}/python2.7/imghdr.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python graphical image handling"
+ },
+ "io": {
+ "files": [
+ "${libdir}/python2.7/StringIO.py",
+ "${libdir}/python2.7/_pyio.py",
+ "${libdir}/python2.7/io.py",
+ "${libdir}/python2.7/lib-dynload/_io.so",
+ "${libdir}/python2.7/lib-dynload/_socket.so",
+ "${libdir}/python2.7/lib-dynload/_ssl.so",
+ "${libdir}/python2.7/lib-dynload/cStringIO.so",
+ "${libdir}/python2.7/lib-dynload/select.so",
+ "${libdir}/python2.7/lib-dynload/termios.so",
+ "${libdir}/python2.7/pipes.py",
+ "${libdir}/python2.7/socket.py",
+ "${libdir}/python2.7/ssl.py",
+ "${libdir}/python2.7/tempfile.py"
+ ],
+ "rdepends": [
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "lang",
+ "math",
+ "netclient",
+ "textutils"
+ ],
+ "summary": "Python low-level I/O"
+ },
+ "json": {
+ "files": [
+ "${libdir}/python2.7/json",
+ "${libdir}/python2.7/lib-dynload/_json.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python JSON support"
+ },
+ "lang": {
+ "files": [
+ "${libdir}/python2.7/bisect.py",
+ "${libdir}/python2.7/code.py",
+ "${libdir}/python2.7/codeop.py",
+ "${libdir}/python2.7/dis.py",
+ "${libdir}/python2.7/functools.py",
+ "${libdir}/python2.7/inspect.py",
+ "${libdir}/python2.7/lib-dynload/_bisect.so",
+ "${libdir}/python2.7/lib-dynload/_functools.so",
+ "${libdir}/python2.7/lib-dynload/array.so",
+ "${libdir}/python2.7/lib-dynload/parser.so",
+ "${libdir}/python2.7/opcode.py",
+ "${libdir}/python2.7/repr.py",
+ "${libdir}/python2.7/symbol.py",
+ "${libdir}/python2.7/token.py",
+ "${libdir}/python2.7/tokenize.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python low-level language support"
+ },
+ "logging": {
+ "files": [
+ "${libdir}/python2.7/logging"
+ ],
+ "rdepends": [
+ "core",
+ "io",
+ "threading"
+ ],
+ "summary": "Python logging support"
+ },
+ "mailbox": {
+ "files": [
+ "${libdir}/python2.7/mailbox.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "contextlib",
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "netclient",
+ "textutils"
+ ],
+ "summary": "Python mailbox format support"
+ },
+ "math": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_random.so",
+ "${libdir}/python2.7/lib-dynload/cmath.so",
+ "${libdir}/python2.7/lib-dynload/math.so",
+ "${libdir}/python2.7/random.py",
+ "${libdir}/python2.7/sets.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt"
+ ],
+ "summary": "Python math support"
+ },
+ "mime": {
+ "files": [
+ "${libdir}/python2.7/MimeWriter.py",
+ "${libdir}/python2.7/mimetools.py",
+ "${libdir}/python2.7/mimetypes.py",
+ "${libdir}/python2.7/quopri.py",
+ "${libdir}/python2.7/rfc822.py",
+ "${libdir}/python2.7/uu.py"
+ ],
+ "rdepends": [
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "netclient",
+ "textutils"
+ ],
+ "summary": "Python MIME handling APIs"
+ },
+ "mmap": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/mmap.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python memory-mapped file support"
+ },
+ "modules": {
+ "files": [],
+ "rdepends": [
+ "2to3",
+ "argparse",
+ "audio",
+ "bsddb",
+ "codecs",
+ "compile",
+ "compiler",
+ "compression",
+ "contextlib",
+ "core",
+ "crypt",
+ "ctypes",
+ "curses",
+ "datetime",
+ "db",
+ "debugger",
+ "difflib",
+ "distutils",
+ "doctest",
+ "email",
+ "fcntl",
+ "gdbm",
+ "hotshot",
+ "html",
+ "idle",
+ "image",
+ "io",
+ "json",
+ "lang",
+ "logging",
+ "mailbox",
+ "math",
+ "mime",
+ "mmap",
+ "multiprocessing",
+ "netclient",
+ "netserver",
+ "numbers",
+ "pickle",
+ "pkgutil",
+ "plistlib",
+ "pprint",
+ "profile",
+ "pydoc",
+ "re",
+ "resource",
+ "robotparser",
+ "runpy",
+ "shell",
+ "smtpd",
+ "sqlite3",
+ "sqlite3",
+ "stringold",
+ "subprocess",
+ "syslog",
+ "terminal",
+ "textutils",
+ "threading",
+ "tkinter",
+ "unittest",
+ "unixadmin",
+ "xml",
+ "xmlrpc",
+ "zlib"
+ ],
+ "summary": "All Python modules"
+ },
+ "multiprocessing": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_multiprocessing.so",
+ "${libdir}/python2.7/multiprocessing"
+ ],
+ "rdepends": [
+ "core",
+ "fcntl",
+ "io",
+ "pickle",
+ "subprocess",
+ "threading"
+ ],
+ "summary": "Python multiprocessing support"
+ },
+ "netclient": {
+ "files": [
+ "${libdir}/python2.7/Cookie.py",
+ "${libdir}/python2.7/_LWPCookieJar.py",
+ "${libdir}/python2.7/_MozillaCookieJar.py",
+ "${libdir}/python2.7/base64.py",
+ "${libdir}/python2.7/cookielib.py",
+ "${libdir}/python2.7/ftplib.py",
+ "${libdir}/python2.7/hmac.py",
+ "${libdir}/python2.7/httplib.py",
+ "${libdir}/python2.7/nntplib.py",
+ "${libdir}/python2.7/poplib.py",
+ "${libdir}/python2.7/smtplib.py",
+ "${libdir}/python2.7/telnetlib.py",
+ "${libdir}/python2.7/urllib.py",
+ "${libdir}/python2.7/urllib2.py",
+ "${libdir}/python2.7/urlparse.py",
+ "${libdir}/python2.7/uuid.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "contextlib",
+ "core",
+ "crypt",
+ "ctypes",
+ "datetime",
+ "email",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "pickle",
+ "subprocess",
+ "textutils",
+ "threading"
+ ],
+ "summary": "Python Internet Protocol clients"
+ },
+ "netserver": {
+ "files": [
+ "${libdir}/python2.7/BaseHTTPServer.py",
+ "${libdir}/python2.7/CGIHTTPServer.py",
+ "${libdir}/python2.7/SimpleHTTPServer.py",
+ "${libdir}/python2.7/SocketServer.py",
+ "${libdir}/python2.7/cgi.py"
+ ],
+ "rdepends": [
+ "compression",
+ "contextlib",
+ "core",
+ "crypt",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "netclient",
+ "shell",
+ "textutils",
+ "threading",
+ "unixadmin",
+ "zlib"
+ ],
+ "summary": "Python Internet Protocol servers"
+ },
+ "numbers": {
+ "files": [
+ "${libdir}/python2.7/decimal.py",
+ "${libdir}/python2.7/fractions.py",
+ "${libdir}/python2.7/numbers.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "math",
+ "threading"
+ ],
+ "summary": "Python number APIs"
+ },
+ "pickle": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/cPickle.so",
+ "${libdir}/python2.7/pickle.py",
+ "${libdir}/python2.7/pickletools.py",
+ "${libdir}/python2.7/shelve.py"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python serialisation/persistence support"
+ },
+ "pkgutil": {
+ "files": [
+ "${libdir}/python2.7/pkgutil.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python package extension utility support"
+ },
+ "plistlib": {
+ "files": [
+ "${libdir}/python2.7/plistlib.py"
+ ],
+ "rdepends": [
+ "core",
+ "datetime",
+ "io"
+ ],
+ "summary": "Generate and parse Mac OS X .plist files"
+ },
+ "pprint": {
+ "files": [
+ "${libdir}/python2.7/pprint.py"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python pretty-print support"
+ },
+ "profile": {
+ "files": [
+ "${libdir}/python2.7/cProfile.py",
+ "${libdir}/python2.7/lib-dynload/_lsprof.so",
+ "${libdir}/python2.7/profile.py",
+ "${libdir}/python2.7/pstats.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "resource",
+ "textutils"
+ ],
+ "summary": "Python basic performance profiling support"
+ },
+ "pydoc": {
+ "files": [
+ "${bindir}/pydoc",
+ "${libdir}/python2.7/pydoc.py",
+ "${libdir}/python2.7/pydoc_data"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "lang",
+ "pkgutil"
+ ],
+ "summary": "Python interactive help support"
+ },
+ "re": {
+ "files": [
+ "${libdir}/python2.7/sre.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Regular Expression APIs"
+ },
+ "resource": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/resource.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python resource control interface"
+ },
+ "robotparser": {
+ "files": [
+ "${libdir}/python2.7/robotparser.py"
+ ],
+ "rdepends": [
+ "contextlib",
+ "core",
+ "io",
+ "lang",
+ "netclient",
+ "textutils"
+ ],
+ "summary": "Python robots.txt parser"
+ },
+ "runpy": {
+ "files": [
+ "${libdir}/python2.7/runpy.py"
+ ],
+ "rdepends": [
+ "core",
+ "pkgutil"
+ ],
+ "summary": "Python helper for locating/executing scripts in module namespace"
+ },
+ "shell": {
+ "files": [
+ "${libdir}/python2.7/cmd.py",
+ "${libdir}/python2.7/commands.py",
+ "${libdir}/python2.7/dircache.py",
+ "${libdir}/python2.7/fnmatch.py",
+ "${libdir}/python2.7/glob.py",
+ "${libdir}/python2.7/popen2.py",
+ "${libdir}/python2.7/shlex.py",
+ "${libdir}/python2.7/shutil.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "io",
+ "unixadmin",
+ "zlib"
+ ],
+ "summary": "Python shell-like functionality"
+ },
+ "smtpd": {
+ "files": [
+ "${bindir}/smtpd.py",
+ "${libdir}/python2.7/asynchat.py",
+ "${libdir}/python2.7/asyncore.py",
+ "${libdir}/python2.7/smtpd.py"
+ ],
+ "rdepends": [
+ "core",
+ "fcntl",
+ "io",
+ "lang"
+ ],
+ "summary": "Python Simple Mail Transport Daemon"
+ },
+ "sqlite3": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_sqlite3.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Sqlite3 database support"
+ },
+ "sqlite3-tests": {
+ "files": [
+ "${libdir}/python2.7/sqlite3/test"
+ ],
+ "rdepends": [
+ "core",
+ "tests"
+ ],
+ "summary": "Python Sqlite3 database support tests"
+ },
+ "stringold": {
+ "files": [
+ "${libdir}/python2.7/stringold.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python string APIs [deprecated]"
+ },
+ "subprocess": {
+ "files": [
+ "${libdir}/python2.7/subprocess.py"
+ ],
+ "rdepends": [
+ "core",
+ "fcntl",
+ "io",
+ "pickle"
+ ],
+ "summary": "Python subprocess support"
+ },
+ "syslog": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/syslog.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python syslog interface"
+ },
+ "terminal": {
+ "files": [
+ "${libdir}/python2.7/pty.py",
+ "${libdir}/python2.7/tty.py"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python terminal controlling support"
+ },
+ "tests": {
+ "files": [
+ "${libdir}/python2.7/test"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python tests"
+ },
+ "textutils": {
+ "files": [
+ "${libdir}/python2.7/csv.py",
+ "${libdir}/python2.7/lib-dynload/_csv.so",
+ "${libdir}/python2.7/optparse.py",
+ "${libdir}/python2.7/textwrap.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "core",
+ "io",
+ "lang"
+ ],
+ "summary": "Python option parsin"
+ },
+ "threading": {
+ "files": [
+ "${libdir}/python2.7/Queue.py",
+ "${libdir}/python2.7/_threading_local.py",
+ "${libdir}/python2.7/dummy_thread.py",
+ "${libdir}/python2.7/dummy_threading.py",
+ "${libdir}/python2.7/mutex.py",
+ "${libdir}/python2.7/threading.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python threading & synchronization support"
+ },
+ "tkinter": {
+ "files": [
+ "${libdir}/python2.7/lib-tk"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Tcl/Tk bindings"
+ },
+ "unittest": {
+ "files": [
+ "${libdir}/python2.7/unittest"
+ ],
+ "rdepends": [
+ "core",
+ "difflib",
+ "io",
+ "lang",
+ "pprint",
+ "shell"
+ ],
+ "summary": "Python unit testing framework"
+ },
+ "unixadmin": {
+ "files": [
+ "${libdir}/python2.7/getpass.py",
+ "${libdir}/python2.7/lib-dynload/grp.so",
+ "${libdir}/python2.7/lib-dynload/nis.so"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python Unix administration support"
+ },
+ "xml": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/_elementtree.so",
+ "${libdir}/python2.7/lib-dynload/pyexpat.so",
+ "${libdir}/python2.7/xml"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python basic XML support"
+ },
+ "xmlrpc": {
+ "files": [
+ "${libdir}/python2.7/DocXMLRPCServer.py",
+ "${libdir}/python2.7/SimpleXMLRPCServer.py"
+ ],
+ "rdepends": [
+ "codecs",
+ "compression",
+ "contextlib",
+ "core",
+ "crypt",
+ "datetime",
+ "fcntl",
+ "io",
+ "lang",
+ "math",
+ "mime",
+ "netclient",
+ "netserver",
+ "pkgutil",
+ "pydoc",
+ "textutils",
+ "threading",
+ "xml",
+ "zlib"
+ ],
+ "summary": "Python XML-RPC support"
+ },
+ "zlib": {
+ "files": [
+ "${libdir}/python2.7/lib-dynload/zlib.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python zlib compression support"
+ }
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py
index 2739018..4c8b5e2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/sitecustomize.py
@@ -27,19 +27,11 @@
except IOError:
pass
-def __enableDefaultEncoding():
- import sys
- try:
- sys.setdefaultencoding( "utf8" )
- except LookupError:
- pass
-
import sys
try:
import rlcompleter, readline
except ImportError:
pass
else:
- __enableDefaultEncoding()
__registerExitHandler()
__enableReadlineSupport()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
index 54a30f5..0da5fde 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
@@ -1,6 +1,2 @@
-require python-async.inc
-
inherit setuptools3
-
-RDEPENDS_${PN} += "python3-threading python3-lang"
-
+require python-async.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.6.bb
similarity index 77%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.6.bb
index de5a01c..19cbae9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.6.bb
@@ -2,14 +2,14 @@
SECTION = "devel/python"
HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0b83047ce9e948b67c0facc5f233476a"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b03240518994df6d8c974675675e5ca4"
DEPENDS = "expat dbus dbus-glib virtual/libintl"
SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
"
-SRC_URI[md5sum] = "7372a588c83a7232b4e08159bfd48fe5"
-SRC_URI[sha256sum] = "e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc"
+RSRC_URI[md5sum] = "1ce1ddf2582060f8f971652ea54cc17e"
+SRC_URI[sha256sum] = "32f29c17172cdb9cb61c68b1f1a71dfe7351506fc830869029c47449bd04faeb"
S = "${WORKDIR}/dbus-python-${PV}"
inherit distutils3-base autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb
deleted file mode 100644
index 4ac2a0e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-git.inc
-
-DEPENDS = "python3-gitdb"
-
-inherit setuptools3
-
-RDEPENDS_${PN} += "python3-gitdb python3-lang python3-io python3-shell python3-math python3-re python3-subprocess python3-stringold python3-unixadmin python3-enum python3-logging python3-datetime python3-netclient python3-unittest python3-argparse git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.8.bb
new file mode 100644
index 0000000..ac320fa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.8.bb
@@ -0,0 +1,2 @@
+require python-git.inc
+inherit setuptools3
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
deleted file mode 100644
index 80d9d46..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-gitdb.inc
-
-DEPENDS = "python3-async python3-smmap"
-
-inherit distutils3
-
-RDEPENDS_${PN} += "python3-smmap python3-async python3-mmap python3-lang python3-io python3-shell python3-crypt python3-compression"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_2.0.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_2.0.3.bb
new file mode 100644
index 0000000..fe15832
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_2.0.3.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-gitdb.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
index f51ce64..4eba9ec 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb
@@ -4,17 +4,14 @@
LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \
file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54"
-SRC_URI = "https://files.pythonhosted.org/packages/source/i/iniparse/iniparse-${PV}.tar.gz \
- file://0001-Add-python-3-compatibility.patch "
+SRC_URI = "file://0001-Add-python-3-compatibility.patch "
+
SRC_URI[md5sum] = "5e573e9e9733d97623881ce9bbe5eca6"
SRC_URI[sha256sum] = "abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054"
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/iniparse/"
-inherit distutils3
+inherit pypi distutils3
RDEPENDS_${PN} += "python3-core python3-six"
DEPENDS += "python3-six"
BBCLASSEXTEND = "native nativesdk"
-
-S = "${WORKDIR}/iniparse-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
index 2b50ffd..22ceeeb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
@@ -1,11 +1,2 @@
-require python-mako.inc
-
inherit setuptools3
-
-RDEPENDS_${PN} = "python3-threading \
- python3-netclient \
- python3-html \
-"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
+require python-mako.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.5.bb
similarity index 61%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.5.bb
index 8cd9c88..3098027 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.5.bb
@@ -25,12 +25,13 @@
file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
+file://regen-all.patch \
"
-SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
-SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"
+SRC_URI[md5sum] = "f3763edf9824d5d3a15f5f646083b6e0"
+SRC_URI[sha256sum] = "063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
# exclude pre-releases for both python 2.x and 3.x
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
@@ -38,14 +39,11 @@
S = "${WORKDIR}/Python-${PV}"
EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native"
inherit native
-require python-native-${PYTHON_MAJMIN}-manifest.inc
-
-# uninative may be used on pre glibc 2.25 systems which don't have getentropy
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip ac_cv_func_getentropy=no"
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
EXTRA_OEMAKE = '\
LIBC="" \
@@ -63,6 +61,14 @@
sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
}
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phase
+#
+do_compile_prepend() {
+ # Assuming https://bugs.python.org/issue33080 has been addressed in Makefile.
+ oe_runmake regen-all
+}
+
do_install() {
install -d ${D}${libdir}/pkgconfig
oe_runmake 'DESTDIR=${D}' install
@@ -77,8 +83,30 @@
sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
done
- # Tests are large and we don't need them in the native sysroot
- rm ${D}${libdir}/python${PYTHON_MAJMIN}/test -rf
+ # Add a symlink to the native Python so that scripts can just invoke
+ # "nativepython" and get the right one without needing absolute paths
+ # (these often end up too long for the #! parser in the kernel as the
+ # buffer is 128 bytes long).
+ ln -s python3-native/python3 ${D}${bindir}/nativepython3
}
-RPROVIDES += "python3-misc-native"
+python(){
+
+ # Read JSON manifest
+ import json
+ pythondir = d.getVar('THISDIR',True)
+ with open(pythondir+'/python3/python3-manifest.json') as manifest_file:
+ python_manifest=json.load(manifest_file)
+
+ rprovides = d.getVar('RPROVIDES').split()
+
+ # Hardcoded since it cant be python3-native-foo, should be python3-foo-native
+ pn = 'python3'
+
+ for key in python_manifest:
+ pypackage = pn + '-' + key + '-native'
+ if pypackage not in rprovides:
+ rprovides.append(pypackage)
+
+ d.setVar('RPROVIDES', ' '.join(rprovides))
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
index 1e2ff74..8bc1f49 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
@@ -1,28 +1,6 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
inherit setuptools3
+require python-nose.inc
do_install_append() {
mv ${D}${bindir}/nosetests ${D}${bindir}/nosetests3
}
-
-RDEPENDS_${PN}_class-target = "\
- python3-unittest \
- "
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.2.bb
similarity index 67%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.2.bb
index 9b907a2..53fd6dc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.2.bb
@@ -1,22 +1,15 @@
SUMMARY = "The PyPA recommended tool for installing Python packages"
-sHOMEPAGEsss = "https://pypi.python.org/pypi/pip"
+HOMEPAGE = "https://pypi.python.org/pypi/pip"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
-SRCNAME = "pip"
DEPENDS += "python3 python3-setuptools-native"
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+SRC_URI[md5sum] = "2fddd680422326b9d1fbf56112cf341d"
+SRC_URI[sha256sum] = "88110a224e9d30e5d76592a0b2130ef10e7e67a6426e8617bb918fffbfe91fe5"
-SRC_URI[md5sum] = "35f01da33009719497f01a4ba69d63c9"
-SRC_URI[sha256sum] = "09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils3
+inherit pypi distutils3
DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
@@ -33,7 +26,7 @@
rm ${D}/${bindir}/pip
# Installed eggs need to be passed directly to the interpreter via a pth file
- echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth
+ echo "./${PYPI_PACKAGE}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${PYPI_PACKAGE}-${PV}.pth
# Make sure we use /usr/bin/env python3
for PYTHSCRIPT in `grep -rIl ${bindir} ${D}${bindir}/pip3*`; do
@@ -44,7 +37,6 @@
RDEPENDS_${PN} = "\
python3-compile \
python3-io \
- python3-enum \
python3-html \
python3-json \
python3-netserver \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
deleted file mode 100644
index 9258ba1..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Python bindings for the Cairo canvas library"
-HOMEPAGE = "http://cairographics.org/pycairo"
-BUGTRACKER = "http://bugs.freedesktop.org"
-SECTION = "python-devel"
-LICENSE = "LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-# cairo >= 1.8.8
-DEPENDS = "cairo"
-PR = "r2"
-
-SRC_URI = "http://cairographics.org/releases/pycairo-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "e6fd3f2f1e6a72e0db0868c4985669c5"
-SRC_URI[sha256sum] = "9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be"
-
-S = "${WORKDIR}/pycairo-${PV}"
-
-inherit distutils3 pkgconfig
-
-CFLAGS += "-fPIC"
-
-BBCLASSEXTEND = "native"
-
-do_configure() {
- PYTHON=${PYTHON} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
-}
-
-do_compile() {
- ./waf build ${PARALLEL_MAKE}
-}
-
-do_install() {
- ./waf install
- sed \
- -e 's:@prefix@:${prefix}:' \
- -e 's:@VERSION@:${PV}:' \
- -e 's:@includedir@:${includedir}:' \
- py3cairo.pc.in > py3cairo.pc
- install -m 0644 py3cairo.pc ${D}${libdir}/pkgconfig/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb
new file mode 100644
index 0000000..5c3e1e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.15.6.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Python bindings for the Cairo canvas library"
+HOMEPAGE = "http://cairographics.org/pycairo"
+BUGTRACKER = "http://bugs.freedesktop.org"
+SECTION = "python-devel"
+LICENSE = "LGPLv2.1 & MPLv1.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421 \
+ file://COPYING-LGPL-2.1;md5=fad9b3332be894bab9bc501572864b29 \
+ file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325"
+
+# cairo >= 1.14
+DEPENDS = "cairo"
+
+SRC_URI = "https://github.com/pygobject/pycairo/releases/download/v${PV}/pycairo-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "https://github.com/pygobject/pycairo/releases/"
+
+SRC_URI[md5sum] = "3ff210c34e7b052590e15fd0fb147766"
+SRC_URI[sha256sum] = "ad150ea637860836b66705e0513b8e59494538f0b80497ad3462051368755016"
+
+S = "${WORKDIR}/pycairo-${PV}"
+
+inherit setuptools3 pkgconfig
+
+CFLAGS += "-fPIC"
+
+BBCLASSEXTEND = "native"
+
+do_install_append() {
+ install -d ${D}${includedir}/pycairo/
+ install -m 0644 ${D}${datadir}/include/pycairo/py3cairo.h ${D}${includedir}/pycairo/
+}
+FILES_${PN} += "${datadir}/include/pycairo/py3cairo.h"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch
deleted file mode 100644
index aaedb58..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 206360744cedff20eae3c8fcfde9938fdae99592 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 6 Jul 2017 11:47:21 +0300
-Subject: [PATCH] configure.ac: Don't use gnome-common macros
-
-remove GNOME_COMPILE_WARNINGS() call: it's from gnome-common which
-is deprecated.
-
-This patch can be removed when upgrading to 3.25.1: at that point
-pygobject needs autoconf-archive instead.
-
-Upstream-Status: Inappropriate [Already handled upstream]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1f15b3c..5cb170f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -221,8 +221,6 @@ AC_ARG_WITH(common,
- with_common=yes)
- AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes")
-
--# compiler warnings, errors, required cflags, and code coverage support
--GNOME_COMPILE_WARNINGS([maximum], [-Wno-error=missing-prototypes])
- AC_MSG_CHECKING(for Gnome code coverage support)
- m4_ifdef([GNOME_CODE_COVERAGE],
- [AC_MSG_RESULT(yes)
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
deleted file mode 100644
index a391f7e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5e5350d730f85957a42c6d846d347d080e7dd996 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 23 Oct 2015 12:40:34 +0300
-Subject: [PATCH] configure.ac: add sysroot path to GI_DATADIR; don't set
- introspection scanner and compiler paths
-
-Upstream-Status: Pending [review on oe-core maillist]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 8 +-------
- 1 file changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2c0cfbd..cfcb3bf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -194,7 +194,7 @@ PKG_CHECK_MODULES(GI,
- gobject-introspection-1.0 >= introspection_required_version
- )
-
--GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
-+GI_DATADIR=$PKG_CONFIG_SYSROOT_DIR$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
- AC_SUBST(GI_DATADIR)
-
- if test "$enable_cairo" != no; then
-@@ -219,12 +219,6 @@ AC_ARG_WITH(common,
- with_common=yes)
- AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes")
-
--INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
--INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
--
--AC_SUBST(INTROSPECTION_SCANNER)
--AC_SUBST(INTROSPECTION_COMPILER)
--
- # compiler warnings, errors, required cflags, and code coverage support
- GNOME_COMPILE_WARNINGS([maximum])
- AC_MSG_CHECKING(for Gnome code coverage support)
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.28.1.bb
similarity index 62%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.28.1.bb
index 9d10af2..97286f4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.28.1.bb
@@ -3,30 +3,27 @@
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection upstream-version-is-even
+inherit gnomebase distutils3-base gobject-introspection upstream-version-is-even
DEPENDS += "python3 glib-2.0"
SRCNAME="pygobject"
SRC_URI = " \
http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
- file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \
- file://0001-configure.ac-Don-t-use-gnome-common-macros.patch \
"
-SRC_URI[md5sum] = "69a843311d0f0385dff376e11a2d83d2"
-SRC_URI[sha256sum] = "a628a95aa0909e13fb08230b1b98fc48adef10b220932f76d62f6821b3fdbffd"
+SRC_URI[md5sum] = "612e9e2863d117d810e78672f7bc3ad6"
+SRC_URI[sha256sum] = "42312b4a5015571fa0a4f2d201005da46b71c251ea2625bc95702d071c4ff895"
S = "${WORKDIR}/${SRCNAME}-${PV}"
-
PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
# python3-pycairo is checked on configuration -> DEPENDS
# we don't link against python3-pycairo -> RDEPENDS
PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo python3-pycairo, python3-pycairo"
-RDEPENDS_${PN} += "python3-setuptools python3-importlib"
+RDEPENDS_${PN} += "python3-setuptools"
BBCLASSEXTEND = "native"
PACKAGECONFIG_class-native = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
deleted file mode 100644
index a7bca97..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-require python-setuptools.inc
-
-DEPENDS += "python3"
-DEPENDS_class-native += "python3-native"
-DEPENDS_class-nativesdk += "nativesdk-python3"
-
-inherit setuptools3
-
-do_install_append() {
- mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
-}
-
-RDEPENDS_${PN}_class-native = "\
- python3-distutils \
- python3-compression \
-"
-RDEPENDS_${PN} = "\
- python3-ctypes \
- python3-distutils \
- python3-email \
- python3-importlib \
- python3-numbers \
- python3-compression \
- python3-shell \
- python3-subprocess \
- python3-textutils \
- python3-pkgutil \
- python3-threading \
- python3-misc \
- python3-unittest \
- python3-xml \
-"
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_39.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_39.0.0.bb
new file mode 100644
index 0000000..0dc1ed8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_39.0.0.bb
@@ -0,0 +1,6 @@
+require python-setuptools.inc
+inherit setuptools3
+
+do_install_append() {
+ mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb
deleted file mode 100644
index 38a47b7..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit setuptools3
-require python-six.inc
-
-RDEPENDS_${PN} += "python3-io"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.11.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.11.0.bb
new file mode 100644
index 0000000..8795313
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.11.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-six.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
index 9f8a26d..e87b8df8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
@@ -1,5 +1,2 @@
-require python-smmap.inc
-
inherit setuptools3
-
-RDEPENDS_${PN} += "python3-codecs python3-mmap python3-lang"
+require python-smmap.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
index 118d75d..7cd7e3b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
@@ -1,4 +1,4 @@
-From 624c029abcc73c724020ccea9a2b4b5b5c00f2a6 Mon Sep 17 00:00:00 2001
+From ecde3ea170999a9ef734e8af4d7c25be5ba81697 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 31 Mar 2017 15:42:46 +0300
Subject: [PATCH] cross-compile support
@@ -8,60 +8,63 @@
-Khem
+Rebased on 3.5.4
+
Upstream-Status: Inappropriate[Configuration Specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Derek Straka <derek@asterius.io>
---
Makefile.pre.in | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
-index a88b7d5..7cb8bb3 100644
+index 144c1f8629..f252ac2417 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -221,6 +221,7 @@ LIBOBJS= @LIBOBJS@
-
+@@ -223,6 +223,7 @@ LIBOBJS= @LIBOBJS@
+
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
+HOSTPYTHON= $(BUILDPYTHON)
-
- PYTHON_FOR_GEN=@PYTHON_FOR_GEN@
+
+ PYTHON_FOR_REGEN=@PYTHON_FOR_REGEN@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
-@@ -280,6 +281,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
+@@ -277,6 +278,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
+HOSTPGEN= $(PGEN)$(EXE)
-
+
PSRCS= \
Parser/acceler.c \
-@@ -510,7 +512,7 @@ build_all_generate_profile:
-
+@@ -478,7 +480,7 @@ build_all_generate_profile:
+
run_profile_task:
: # FIXME: can't run for a cross build
- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
+ $(LLVM_PROF_FILE) $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) || true
-
+
build_all_merge_profile:
$(LLVM_PROF_MERGER)
-@@ -787,7 +789,7 @@ $(IO_OBJS): $(IO_H)
-
- $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
+@@ -772,7 +774,7 @@ regen-grammar: $(PGEN)
+ # Regenerate Include/graminit.h and Python/graminit.c
+ # from Grammar/Grammar using pgen
@$(MKDIR_P) Include
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H)
- touch $(GRAMMAR_C)
-
-@@ -976,7 +978,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
+- $(PGEN) $(srcdir)/Grammar/Grammar \
++ $(HOSTPGEN) $(srcdir)/Grammar/Grammar \
+ $(srcdir)/Include/graminit.h \
+ $(srcdir)/Python/graminit.c
+
+@@ -978,7 +980,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
######################################################################
-
+
TESTOPTS= $(EXTRATESTOPTS)
-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
+TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) $(TESTPYTHONOPTS)
TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
TESTTIMEOUT= 3600
-
-@@ -1468,7 +1470,7 @@ frameworkinstallstructure: $(LDLIBRARY)
+
+@@ -1470,7 +1472,7 @@ frameworkinstallstructure: $(LDLIBRARY)
fi; \
done
$(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
@@ -70,24 +73,24 @@
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1534,7 +1536,7 @@ config.status: $(srcdir)/configure
-
+@@ -1543,7 +1545,7 @@ Python/dtoa.o: Python/dtoa.c
+
# Run reindent on the library
reindent:
- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
-
+
# Rerun configure with the same options as it was run last time,
# provided the config.status script exists
-@@ -1674,7 +1676,7 @@ funny:
-
+@@ -1678,7 +1680,7 @@ funny:
+
# Perform some verification checks on any modified files.
- patchcheck: all
+ patchcheck: @DEF_MAKE_RULE@
- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-+ $(RUNSHARED) ./$(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-
++ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
+
# Dependencies
-
---
+
+--
2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
index 789929b..f9971c6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/070-dont-clean-ipkg-install.patch
@@ -8,9 +8,11 @@
Makefile.pre.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1306,8 +1306,8 @@ touch:
+Index: Python-3.5.3/Makefile.pre.in
+===================================================================
+--- Python-3.5.3.orig/Makefile.pre.in
++++ Python-3.5.3/Makefile.pre.in
+@@ -1574,8 +1574,8 @@ touch:
# Sanitation targets -- clean leaves libraries, executables and tags
# files, which clobber removes as well
pycremoval:
@@ -21,7 +23,7 @@
rmtestturds:
-rm -f *BAD *GOOD *SKIPPED
-@@ -1321,9 +1321,9 @@ docclean:
+@@ -1589,9 +1589,9 @@ docclean:
-rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
clean: pycremoval
@@ -32,5 +34,5 @@
+ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';'
+ find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
find build -name 'fficonfig.h' -exec rm -f {} ';' || true
- find build -name 'fficonfig.py' -exec rm -f {} ';' || true
- -rm -f Lib/lib2to3/*Grammar*.pickle
+ find build -name '*.py' -exec rm -f {} ';' || true
+ find build -name '*.py[co]' -exec rm -f {} ';' || true
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch
deleted file mode 100644
index 7217c6e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 62dcf34987b680e95873eb947b3f4d802199c667 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C5=81ukasz=20Langa?= <lukasz@langa.pl>
-Date: Fri, 10 Feb 2017 00:14:55 -0800
-Subject: [PATCH] Fix #29519: weakref spewing exceptions during interp
- finalization
-
-commit 9cd7e17640a49635d1c1f8c2989578a8fc2c1de6
-from https://github.com/python/cpython
-
-Upstream-Status: Backport
-
-Signed-off-by: Lukasz Langa <lukasz@langa.pl>
----
- Lib/weakref.py | 4 ++--
- Misc/NEWS | 3 +++
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/Lib/weakref.py b/Lib/weakref.py
-index aaebd0c..787e33a 100644
---- a/Lib/weakref.py
-+++ b/Lib/weakref.py
-@@ -106,7 +106,7 @@ class WeakValueDictionary(collections.MutableMapping):
- self, *args = args
- if len(args) > 1:
- raise TypeError('expected at most 1 arguments, got %d' % len(args))
-- def remove(wr, selfref=ref(self)):
-+ def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
- self = selfref()
- if self is not None:
- if self._iterating:
-@@ -114,7 +114,7 @@ class WeakValueDictionary(collections.MutableMapping):
- else:
- # Atomic removal is necessary since this function
- # can be called asynchronously by the GC
-- _remove_dead_weakref(d, wr.key)
-+ _atomic_removal(d, wr.key)
- self._remove = remove
- # A list of keys to be removed
- self._pending_removals = []
-diff --git a/Misc/NEWS b/Misc/NEWS
-index 41cfdba..6d89f52 100644
---- a/Misc/NEWS
-+++ b/Misc/NEWS
-@@ -5719,6 +5719,9 @@ Core and Builtins
- Library
- -------
-
-+- Issue #29519: Fix weakref spewing exceptions during interpreter shutdown
-+ when used with a rare combination of multiprocessing and custom codecs.
-+
- - Issue #20154: Deadlock in asyncio.StreamReader.readexactly().
-
- - Issue #16113: Remove sha3 module again.
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
index 3347321..a3cc48c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
@@ -7,13 +7,16 @@
Also simply disable the tk module since its not in DEPENDS.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
+Index: Python-3.5.3/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300
-@@ -1634,8 +1634,10 @@
+--- Python-3.5.3.orig/setup.py
++++ Python-3.5.3/setup.py
+@@ -1558,10 +1558,12 @@ class PyBuildExt(build_ext):
+ self.extensions.extend(exts)
+
# Call the method for detecting whether _tkinter can be compiled
- self.detect_tkinter(inc_dirs, lib_dirs)
+- self.detect_tkinter(inc_dirs, lib_dirs)
++ # self.detect_tkinter(inc_dirs, lib_dirs)
- if '_tkinter' not in [e.name for e in self.extensions]:
- missing.append('_tkinter')
@@ -22,18 +25,5 @@
+ #if '_tkinter' not in [e.name for e in self.extensions]:
+ # missing.append('_tkinter')
- return missing
-
-diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
-index b4633b9..d7588c0 100644
---- Python-3.5.1.orig/setup.py
-+++ Python-3.5.1/setup.py
-@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
- self.extensions.extend(exts)
-
- # Call the method for detecting whether _tkinter can be compiled
-- self.detect_tkinter(inc_dirs, lib_dirs)
-+ # self.detect_tkinter(inc_dirs, lib_dirs)
-
- # tkinter module will not be avalaible as yocto
- # doesn't have tk integrated (yet)
+ ## # Uncomment these lines if you want to play with xxmodule.c
+ ## ext = Extension('xx', ['xxmodule.c'])
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/create_manifest3.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/create_manifest3.py
new file mode 100644
index 0000000..2f944f9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -0,0 +1,354 @@
+# This script is used as a bitbake task to create a new python manifest
+# $ bitbake python -c create_manifest
+#
+# Our goal is to keep python-core as small as posible and add other python
+# packages only when the user needs them, hence why we split upstream python
+# into several packages.
+#
+# In a very simplistic way what this does is:
+# Launch python and see specifically what is required for it to run at a minimum
+#
+# Go through the python-manifest file and launch a separate task for every single
+# one of the files on each package, this task will check what was required for that
+# specific module to run, these modules will be called dependencies.
+# The output of such task will be a list of the modules or dependencies that were
+# found for that file.
+#
+# Such output will be parsed by this script, we will look for each dependency on the
+# manifest and if we find that another package already includes it, then we will add
+# that package as an RDEPENDS to the package we are currently checking; in case we dont
+# find the current dependency on any other package we will add it to the current package
+# as part of FILES.
+#
+#
+# This way we will create a new manifest from the data structure that was built during
+# this process, ont this new manifest each package will contain specifically only
+# what it needs to run.
+#
+# There are some caveats which we try to deal with, such as repeated files on different
+# packages, packages that include folders, wildcards, and special packages.
+# Its also important to note that this method only works for python files, and shared
+# libraries. Static libraries, header files and binaries need to be dealt with manually.
+#
+# This script differs from its python2 version mostly on how shared libraries are handled
+# The manifest file for python3 has an extra field which contains the cached files for
+# each package.
+# Tha method to handle cached files does not work when a module includes a folder which
+# itself contains the pycache folder, gladly this is almost never the case.
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+
+import sys
+import subprocess
+import json
+import os
+
+# Hack to get native python search path (for folders), not fond of it but it works for now
+pivot='recipe-sysroot-native'
+for p in sys.path:
+ if pivot in p:
+ nativelibfolder=p[:p.find(pivot)+len(pivot)]
+
+# Empty dict to hold the whole manifest
+new_manifest = {}
+
+# Check for repeated files, folders and wildcards
+allfiles=[]
+repeated=[]
+wildcards=[]
+
+hasfolders=[]
+allfolders=[]
+
+def isFolder(value):
+ if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+ return True
+ else:
+ return False
+
+def isCached(item):
+ if '__pycache__' in item:
+ return True
+ else:
+ return False
+
+# Read existing JSON manifest
+with open('python3-manifest.json') as manifest:
+ old_manifest=json.load(manifest)
+
+
+# First pass to get core-package functionality, because we base everything on the fact that core is actually working
+# Not exactly the same so it should not be a function
+print ('Getting dependencies for package: core')
+
+# Special call to check for core package
+output = subprocess.check_output([sys.executable, 'get_module_deps3.py', 'python-core-package']).decode('utf8')
+for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if isCached(item):
+ if item not in old_manifest['core']['cached']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['cached'].append(item)
+ else:
+ if item not in old_manifest['core']['files']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['files'].append(item)
+
+for value in old_manifest['core']['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass it directly
+ if isCached(value):
+ if value not in old_manifest['core']['cached']:
+ old_manifest['core']['cached'].append(value)
+ else:
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Ignore binaries, since we don't import those, assume it was added correctly (manually)
+ if '${bindir}' in value:
+ # Pass it directly
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in old_manifest['core']['files']:
+ old_manifest['core']['files'].append(value)
+ continue
+ # Get module name , shouldnt be affected by libdir/bindir
+ value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('Getting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % value]).decode('utf8')
+ print ('The following dependencies were found for module %s:\n' % value)
+ print (output)
+ for item in output.split():
+ # We append it so it doesnt hurt what we currently have:
+ if isCached(item):
+ if item not in old_manifest['core']['cached']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['cached'].append(item)
+ else:
+ if item not in old_manifest['core']['files']:
+ # We use the same data structure since its the one which will be used to check
+ # dependencies for other packages
+ old_manifest['core']['files'].append(item)
+
+
+# We check which packages include folders
+for key in old_manifest:
+ for value in old_manifest[key]['files']:
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ print ('%s is a folder' % value)
+ if key not in hasfolders:
+ hasfolders.append(key)
+ if value not in allfolders:
+ allfolders.append(value)
+
+for key in old_manifest:
+ # Use an empty dict as data structure to hold data for each package and fill it up
+ new_manifest[key]={}
+ new_manifest[key]['files']=[]
+
+ new_manifest[key]['rdepends']=[]
+ # All packages should depend on core
+ if key != 'core':
+ new_manifest[key]['rdepends'].append('core')
+ new_manifest[key]['cached']=[]
+ else:
+ new_manifest[key]['cached']=old_manifest[key]['cached']
+ new_manifest[key]['summary']=old_manifest[key]['summary']
+
+ # Handle special cases, we assume that when they were manually added
+ # to the manifest we knew what we were doing.
+ print('\n')
+ print('--------------------------')
+ print ('Handling package %s' % key)
+ print('--------------------------')
+ special_packages=['misc', 'modules', 'dev']
+ if key in special_packages or 'staticdev' in key:
+ print('Passing %s package directly' % key)
+ new_manifest[key]=old_manifest[key]
+ continue
+
+ for value in old_manifest[key]['files']:
+ # We already handled core on the first pass
+ if key == 'core':
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore folders, since we don't import those, difficult to handle multilib
+ if isFolder(value):
+ # Pass folders directly
+ new_manifest[key]['files'].append(value)
+ # Ignore binaries, since we don't import those
+ if '${bindir}' in value:
+ # Pass it directly to the new manifest data structure
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+ # Ignore empty values
+ if value == '':
+ continue
+ if '${includedir}' in value:
+ if value not in new_manifest[key]['files']:
+ new_manifest[key]['files'].append(value)
+ continue
+
+ # Get module name , shouldnt be affected by libdir/bindir
+ # We need to check if the imported module comes from another (e.g. sqlite3.dump)
+ path,value = os.path.split(value)
+ path = os.path.basename(path)
+ value = os.path.splitext(os.path.basename(value))[0]
+
+ # If this condition is met, it means we need to import it from another module
+ # or its the folder itself (e.g. unittest)
+ if path == key:
+ if value:
+ value = path + '.' + value
+ else:
+ value = path
+
+ # Launch separate task for each module for deterministic behavior
+ # Each module will only import what is necessary for it to work in specific
+ print ('\nGetting dependencies for module: %s' % value)
+ output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % value]).decode('utf8')
+ # We can print dependencies for debugging purposes
+ print ('The following dependencies were found for module %s:\n' % value)
+ print (output)
+ # Output will have all dependencies
+
+ reportFILES = []
+ reportRDEPS = []
+
+ for item in output.split():
+
+ # Warning: This first part is ugly
+ # One of the dependencies that was found, could be inside of one of the folders included by another package
+ # We need to check if this happens so we can add the package containing the folder as an rdependency
+ # e.g. Folder encodings contained in codecs
+ # This would be solved if no packages included any folders
+
+ # This can be done in two ways:
+ # 1 - We assume that if we take out the filename from the path we would get
+ # the folder string, then we would check if folder string is in the list of folders
+ # This would not work if a package contains a folder which contains another folder
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # folder_string would not match any value contained in the list of folders
+ #
+ # 2 - We do it the other way around, checking if the folder is contained in the path
+ # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
+ # is folder_string inside path/folder1/folder2/filename?,
+ # Yes, it works, but we waste a couple of milliseconds.
+
+ inFolders=False
+ for folder in allfolders:
+ if folder in item:
+ inFolders = True # Did we find a folder?
+ folderFound = False # Second flag to break inner for
+ # Loop only through packages which contain folders
+ for keyfolder in hasfolders:
+ if (folderFound == False):
+ #print('Checking folder %s on package %s' % (item,keyfolder))
+ for file_folder in old_manifest[keyfolder]['files'] or file_folder in old_manifest[keyfolder]['cached']:
+ if file_folder==folder:
+ print ('%s folder found in %s' % (folder, keyfolder))
+ folderFound = True
+ if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
+ new_manifest[key]['rdepends'].append(keyfolder)
+
+ else:
+ break
+
+ # A folder was found so we're done with this item, we can go on
+ if inFolders:
+ continue
+
+
+ # We might already have it on the dictionary since it could depend on a (previously checked) module
+ if item not in new_manifest[key]['files'] and item not in new_manifest[key]['cached']:
+ # Handle core as a special package, we already did it so we pass it to NEW data structure directly
+ if key=='core':
+ print('Adding %s to %s FILES' % (item, key))
+ if item.endswith('*'):
+ wildcards.append(item)
+ if isCached(item):
+ new_manifest[key]['cached'].append(item)
+ else:
+ new_manifest[key]['files'].append(item)
+
+ # Check for repeated files
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+ else:
+
+
+ # Check if this dependency is already contained on another package, so we add it
+ # as an RDEPENDS, or if its not, it means it should be contained on the current
+ # package, so we should add it to FILES
+ for newkey in old_manifest:
+ # Debug
+ #print('Checking %s ' % item + ' in %s' % newkey)
+ if item in old_manifest[newkey]['files'] or item in old_manifest[newkey]['cached']:
+ # Since were nesting, we need to check its not the same key
+ if(newkey!=key):
+ if newkey not in new_manifest[key]['rdepends']:
+ # Add it to the new manifest data struct
+ reportRDEPS.append('Adding %s to %s RDEPENDS, because it contains %s\n' % (newkey, key, item))
+ new_manifest[key]['rdepends'].append(newkey)
+ break
+ else:
+ # A module shouldn't contain itself (${libdir}/python3/sqlite3 shouldnt be on sqlite3 files)
+ if os.path.basename(item) != key:
+ reportFILES.append(('Adding %s to %s FILES\n' % (item, key)))
+ # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
+ if isCached(item):
+ new_manifest[key]['cached'].append(item)
+ else:
+ new_manifest[key]['files'].append(item)
+
+ if item.endswith('*'):
+ wildcards.append(item)
+ if item not in allfiles:
+ allfiles.append(item)
+ else:
+ repeated.append(item)
+
+ print('\n')
+ print('#################################')
+ print('Summary for module %s' % value)
+ print('FILES found for module %s:' % value)
+ print(''.join(reportFILES))
+ print('RDEPENDS found for module %s:' % value)
+ print(''.join(reportRDEPS))
+ print('#################################')
+
+print ('The following files are repeated (contained in more than one package), please check which package should get it:')
+print (repeated)
+print('The following files contain wildcards, please check they are necessary')
+print(wildcards)
+print('The following files contain folders, please check they are necessary')
+print(hasfolders)
+
+# Sort it just so it looks nicer
+for key in new_manifest:
+ new_manifest[key]['files'].sort()
+ new_manifest[key]['cached'].sort()
+ new_manifest[key]['rdepends'].sort()
+
+# Create the manifest from the data structure that was built
+with open('python3-manifest.json.new','w') as outfile:
+ json.dump(new_manifest,outfile,sort_keys=True, indent=4)
+ outfile.write('\n')
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/get_module_deps3.py b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/get_module_deps3.py
new file mode 100644
index 0000000..fd12baa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -0,0 +1,146 @@
+# This script is launched on separate task for each python module
+# It checks for dependencies for that specific module and prints
+# them out, the output of this execution will have all dependencies
+# for a specific module, which will be parsed an dealt on create_manifest.py
+#
+# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+
+# We can get a log per module, for all the dependencies that were found, but its messy.
+debug=False
+
+import sys
+
+# We can get a list of the modules which are currently required to run python
+# so we run python-core and get its modules, we then import what we need
+# and check what modules are currently running, if we substract them from the
+# modules we had initially, we get the dependencies for the module we imported.
+
+# We use importlib to achieve this, so we also need to know what modules importlib needs
+import importlib
+
+core_deps=set(sys.modules)
+
+def fix_path(dep_path):
+ import os
+ # We DONT want the path on our HOST system
+ pivot='recipe-sysroot-native'
+ dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
+
+ if '/usr/bin' in dep_path:
+ dep_path = dep_path.replace('/usr/bin''${bindir}')
+
+ # Handle multilib, is there a better way?
+ if '/usr/lib32' in dep_path:
+ dep_path = dep_path.replace('/usr/lib32','${libdir}')
+ if '/usr/lib64' in dep_path:
+ dep_path = dep_path.replace('/usr/lib64','${libdir}')
+ if '/usr/lib' in dep_path:
+ dep_path = dep_path.replace('/usr/lib','${libdir}')
+ if '/usr/include' in dep_path:
+ dep_path = dep_path.replace('/usr/include','${includedir}')
+ if '__init__.' in dep_path:
+ dep_path = os.path.split(dep_path)[0]
+ return dep_path
+
+
+# Module to import was passed as an argument
+current_module = str(sys.argv[1]).rstrip()
+if(debug==True):
+ log = open('log_%s' % current_module,'w')
+ log.write('Module %s generated the following dependencies:\n' % current_module)
+try:
+ importlib.import_module('%s' % current_module)
+except ImportError as e:
+ if (debug==True):
+ log.write('Module was not found')
+ pass
+
+
+# Get current module dependencies, dif will contain a list of specific deps for this module
+module_deps=set(sys.modules)
+
+# We handle the core package (1st pass on create_manifest.py) as a special case
+if current_module == 'python-core-package':
+ dif = core_deps
+else:
+ # We know this is not the core package, so there must be a difference.
+ dif = module_deps-core_deps
+
+
+# Check where each dependency came from
+for item in dif:
+ dep_path=''
+ try:
+ if (debug==True):
+ log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
+ dep_path = sys.modules['%s' % item].__file__
+ except AttributeError as e:
+ # Deals with thread (builtin module) not having __file__ attribute
+ if debug==True:
+ log.write(item + ' ')
+ log.write(str(e))
+ log.write('\n')
+ pass
+ except NameError as e:
+ # Deals with NameError: name 'dep_path' is not defined
+ # because module is not found (wasn't compiled?), e.g. bddsm
+ if (debug==True):
+ log.write(item+' ')
+ log.write(str(e))
+ pass
+
+ # Site-customize is a special case since we (OpenEmbedded) put it there manually
+ if 'sitecustomize' in dep_path:
+ dep_path = '${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py'
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+ continue
+
+ dep_path = fix_path(dep_path)
+
+ import sysconfig
+ soabi=sysconfig.get_config_var('SOABI')
+ # Check if its a shared library and deconstruct it
+ if soabi in dep_path:
+ if (debug==True):
+ log.write('Shared library found in %s' % dep_path)
+ dep_path = dep_path.replace(soabi,'*')
+ print (dep_path)
+ continue
+
+ if (debug==True):
+ log.write(dep_path+'\n')
+ # Prints out result, which is what will be used by create_manifest
+ print (dep_path)
+
+
+ import imp
+ cpython_tag = imp.get_tag()
+ cached=''
+ # Theres no naive way to find *.pyc files on python3
+ try:
+ if (debug==True):
+ log.write('Calling: sys.modules[' + '%s' % item + '].__cached__\n')
+ cached = sys.modules['%s' % item].__cached__
+ except AttributeError as e:
+ # Deals with thread (builtin module) not having __cached__ attribute
+ if debug==True:
+ log.write(item + ' ')
+ log.write(str(e))
+ log.write('\n')
+ pass
+ except NameError as e:
+ # Deals with NameError: name 'cached' is not defined
+ if (debug==True):
+ log.write(item+' ')
+ log.write(str(e))
+ pass
+ if cached is not None:
+ if (debug==True):
+ log.write(cached)
+ cached = fix_path(cached)
+ cached = cached.replace(cpython_tag,'*')
+ print (cached)
+
+if debug==True:
+ log.close()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index 08c4403..cc35dc1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -25,10 +25,10 @@
setup.py | 9 ++++-----
12 files changed, 97 insertions(+), 23 deletions(-)
-diff --git a/Include/pythonrun.h b/Include/pythonrun.h
-index 9c2e813..2f79cb6 100644
---- a/Include/pythonrun.h
-+++ b/Include/pythonrun.h
+Index: Python-3.5.4/Include/pythonrun.h
+===================================================================
+--- Python-3.5.4.orig/Include/pythonrun.h
++++ Python-3.5.4/Include/pythonrun.h
@@ -23,6 +23,9 @@ typedef struct {
} PyCompilerFlags;
#endif
@@ -39,10 +39,10 @@
#ifndef Py_LIMITED_API
PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
-diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
-index 67db007..b46b45b 100644
---- a/Lib/distutils/command/install.py
-+++ b/Lib/distutils/command/install.py
+Index: Python-3.5.4/Lib/distutils/command/install.py
+===================================================================
+--- Python-3.5.4.orig/Lib/distutils/command/install.py
++++ Python-3.5.4/Lib/distutils/command/install.py
@@ -19,6 +19,8 @@ from site import USER_BASE
from site import USER_SITE
HAS_USER_SITE = True
@@ -52,20 +52,22 @@
WINDOWS_SCHEME = {
'purelib': '$base/Lib/site-packages',
'platlib': '$base/Lib/site-packages',
-@@ -30,7 +32,7 @@ WINDOWS_SCHEME = {
+@@ -29,8 +31,8 @@ WINDOWS_SCHEME = {
+
INSTALL_SCHEMES = {
'unix_prefix': {
- 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages',
+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-diff --git a/Lib/pydoc.py b/Lib/pydoc.py
-index 3ca08c9..6528730 100755
---- a/Lib/pydoc.py
-+++ b/Lib/pydoc.py
-@@ -384,7 +384,7 @@ class Doc:
+Index: Python-3.5.4/Lib/pydoc.py
+===================================================================
+--- Python-3.5.4.orig/Lib/pydoc.py
++++ Python-3.5.4/Lib/pydoc.py
+@@ -389,7 +389,7 @@ class Doc:
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
def getdocloc(self, object,
@@ -74,10 +76,10 @@
"python%d.%d" % sys.version_info[:2])):
"""Return the location of module docs or None"""
-diff --git a/Lib/site.py b/Lib/site.py
-index 3f78ef5..511931e 100644
---- a/Lib/site.py
-+++ b/Lib/site.py
+Index: Python-3.5.4/Lib/site.py
+===================================================================
+--- Python-3.5.4.orig/Lib/site.py
++++ Python-3.5.4/Lib/site.py
@@ -303,12 +303,12 @@ def getsitepackages(prefixes=None):
seen.add(prefix)
@@ -93,20 +95,21 @@
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 9c34be0..3d1181a 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
+Index: Python-3.5.4/Lib/sysconfig.py
+===================================================================
+--- Python-3.5.4.orig/Lib/sysconfig.py
++++ Python-3.5.4/Lib/sysconfig.py
@@ -20,10 +20,10 @@ __all__ = [
_INSTALL_SCHEMES = {
'posix_prefix': {
- 'stdlib': '{installed_base}/lib/python{py_version_short}',
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
+ 'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
++ 'purelib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include':
'{installed_base}/include/python{py_version_short}{abiflags}',
@@ -117,10 +120,11 @@
'posix_home': {
- 'stdlib': '{installed_base}/lib/python',
- 'platstdlib': '{base}/lib/python',
+- 'purelib': '{base}/lib/python',
+- 'platlib': '{base}/lib/python',
+ 'stdlib': '{installed_base}/'+sys.lib+'/python',
+ 'platstdlib': '{base}/'+sys.lib+'/python',
- 'purelib': '{base}/lib/python',
-- 'platlib': '{base}/lib/python',
++ 'purelib': '{base}/'+sys.lib+'/python',
+ 'platlib': '{base}/'+sys.lib+'/python',
'include': '{installed_base}/include/python',
'platinclude': '{installed_base}/include/python',
@@ -131,18 +135,19 @@
'posix_user': {
- 'stdlib': '{userbase}/lib/python{py_version_short}',
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
++ 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data': '{userbase}',
-diff --git a/Lib/trace.py b/Lib/trace.py
-index f108266..7fd83f2 100755
---- a/Lib/trace.py
-+++ b/Lib/trace.py
+Index: Python-3.5.4/Lib/trace.py
+===================================================================
+--- Python-3.5.4.orig/Lib/trace.py
++++ Python-3.5.4/Lib/trace.py
@@ -749,10 +749,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -156,11 +161,11 @@
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 109f402..61a41e2 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -106,6 +106,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARE
+Index: Python-3.5.4/Makefile.pre.in
+===================================================================
+--- Python-3.5.4.orig/Makefile.pre.in
++++ Python-3.5.4/Makefile.pre.in
+@@ -109,6 +109,8 @@ CFLAGS_ALIASING=@CFLAGS_ALIASING@
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -169,7 +174,7 @@
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -125,7 +127,7 @@ LIBDIR= @libdir@
+@@ -128,7 +130,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -178,7 +183,7 @@
ABIFLAGS= @ABIFLAGS@
# Detailed destination directories
-@@ -755,6 +757,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
+@@ -731,6 +733,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -186,8 +191,8 @@
-o $@ $(srcdir)/Modules/getpath.c
Programs/python.o: $(srcdir)/Programs/python.c
-@@ -835,7 +838,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT)
- Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+@@ -813,7 +816,7 @@ regen-opcode:
+ Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -195,10 +200,10 @@
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-diff --git a/Modules/getpath.c b/Modules/getpath.c
-index 18deb60..a01c3f8 100644
---- a/Modules/getpath.c
-+++ b/Modules/getpath.c
+Index: Python-3.5.4/Modules/getpath.c
+===================================================================
+--- Python-3.5.4.orig/Modules/getpath.c
++++ Python-3.5.4/Modules/getpath.c
@@ -105,6 +105,13 @@
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
@@ -230,10 +235,10 @@
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
Py_FatalError(
-diff --git a/Python/getplatform.c b/Python/getplatform.c
-index 6899140..66a49c6 100644
---- a/Python/getplatform.c
-+++ b/Python/getplatform.c
+Index: Python-3.5.4/Python/getplatform.c
+===================================================================
+--- Python-3.5.4.orig/Python/getplatform.c
++++ Python-3.5.4/Python/getplatform.c
@@ -10,3 +10,23 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -258,11 +263,11 @@
+{
+ return LIB;
+}
-diff --git a/Python/sysmodule.c b/Python/sysmodule.c
-index 8d7e05a..d9dee0f 100644
---- a/Python/sysmodule.c
-+++ b/Python/sysmodule.c
-@@ -1790,6 +1790,10 @@ _PySys_Init(void)
+Index: Python-3.5.4/Python/sysmodule.c
+===================================================================
+--- Python-3.5.4.orig/Python/sysmodule.c
++++ Python-3.5.4/Python/sysmodule.c
+@@ -1827,6 +1827,10 @@ _PySys_Init(void)
PyUnicode_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyUnicode_FromString(Py_GetPlatform()));
@@ -273,11 +278,11 @@
SET_SYS_FROM_STRING("executable",
PyUnicode_FromWideChar(
Py_GetProgramFullPath(), -1));
-diff --git a/configure.ac b/configure.ac
-index 707324d..e8d59a3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -883,6 +883,41 @@ PLATDIR=plat-$MACHDEP
+Index: Python-3.5.4/configure.ac
+===================================================================
+--- Python-3.5.4.orig/configure.ac
++++ Python-3.5.4/configure.ac
+@@ -885,6 +885,41 @@ PLATDIR=plat-$MACHDEP
AC_SUBST(PLATDIR)
AC_SUBST(PLATFORM_TRIPLET)
@@ -319,11 +324,11 @@
AC_MSG_CHECKING([for -Wl,--no-as-needed])
save_LDFLAGS="$LDFLAGS"
-diff --git a/setup.py b/setup.py
-index 6d26deb..7b14215 100644
---- a/setup.py
-+++ b/setup.py
-@@ -495,7 +495,7 @@ class PyBuildExt(build_ext):
+Index: Python-3.5.4/setup.py
+===================================================================
+--- Python-3.5.4.orig/setup.py
++++ Python-3.5.4/setup.py
+@@ -494,7 +494,7 @@ class PyBuildExt(build_ext):
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
if not cross_compiling:
@@ -332,7 +337,7 @@
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia
if cross_compiling:
-@@ -553,8 +553,7 @@ class PyBuildExt(build_ext):
+@@ -552,8 +552,7 @@ class PyBuildExt(build_ext):
# be assumed that no additional -I,-L directives are needed.
if not cross_compiling:
lib_dirs = self.compiler.library_dirs + [
@@ -342,7 +347,7 @@
]
inc_dirs = self.compiler.include_dirs + ['/usr/include']
else:
-@@ -746,11 +745,11 @@ class PyBuildExt(build_ext):
+@@ -745,11 +744,11 @@ class PyBuildExt(build_ext):
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
@@ -356,6 +361,3 @@
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-manifest.json b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-manifest.json
new file mode 100644
index 0000000..2491f36
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -0,0 +1,1149 @@
+{
+ "2to3": {
+ "cached": [],
+ "files": [
+ "${bindir}/2to3-*",
+ "${libdir}/python3.5/lib2to3"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python automated Python 2 to 3 code translator"
+ },
+ "asyncio": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/asyncio",
+ "${libdir}/python3.5/concurrent",
+ "${libdir}/python3.5/concurrent/futures"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "io",
+ "logging",
+ "math",
+ "multiprocessing",
+ "netclient",
+ "pickle",
+ "shell",
+ "stringold",
+ "threading",
+ "unixadmin"
+ ],
+ "summary": "Python Asynchronous I/"
+ },
+ "audio": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/chunk.*.pyc",
+ "${libdir}/python3.5/__pycache__/sndhdr.*.pyc",
+ "${libdir}/python3.5/__pycache__/sunau.*.pyc",
+ "${libdir}/python3.5/__pycache__/wave.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/chunk.py",
+ "${libdir}/python3.5/lib-dynload/audioop.*.so",
+ "${libdir}/python3.5/lib-dynload/ossaudiodev.*.so",
+ "${libdir}/python3.5/sndhdr.py",
+ "${libdir}/python3.5/sunau.py",
+ "${libdir}/python3.5/wave.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Audio Handling"
+ },
+ "codecs": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/xdrlib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_multibytecodec.*.so",
+ "${libdir}/python3.5/xdrlib.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python codec"
+ },
+ "compile": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/compileall.*.pyc",
+ "${libdir}/python3.5/__pycache__/py_compile.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/compileall.py",
+ "${libdir}/python3.5/py_compile.py"
+ ],
+ "rdepends": [
+ "asyncio",
+ "compression",
+ "core",
+ "crypt",
+ "io",
+ "logging",
+ "math",
+ "multiprocessing",
+ "pickle",
+ "shell",
+ "stringold",
+ "threading",
+ "unixadmin"
+ ],
+ "summary": "Python bytecode compilation support"
+ },
+ "compression": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_compression.*.pyc",
+ "${libdir}/python3.5/__pycache__/bz2.*.pyc",
+ "${libdir}/python3.5/__pycache__/gzip.*.pyc",
+ "${libdir}/python3.5/__pycache__/lzma.*.pyc",
+ "${libdir}/python3.5/__pycache__/tarfile.*.pyc",
+ "${libdir}/python3.5/__pycache__/zipfile.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_compression.py",
+ "${libdir}/python3.5/bz2.py",
+ "${libdir}/python3.5/gzip.py",
+ "${libdir}/python3.5/lib-dynload/_bz2.*.so",
+ "${libdir}/python3.5/lib-dynload/_lzma.*.so",
+ "${libdir}/python3.5/lib-dynload/zlib.*.so",
+ "${libdir}/python3.5/lzma.py",
+ "${libdir}/python3.5/tarfile.py",
+ "${libdir}/python3.5/zipfile.py"
+ ],
+ "rdepends": [
+ "core",
+ "shell",
+ "unixadmin"
+ ],
+ "summary": "Python high-level compression support"
+ },
+ "core": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/__future__.*.pyc",
+ "${libdir}/python3.5/__pycache__/_bootlocale.*.pyc",
+ "${libdir}/python3.5/__pycache__/_collections_abc.*.pyc",
+ "${libdir}/python3.5/__pycache__/_markupbase.*.pyc",
+ "${libdir}/python3.5/__pycache__/_sitebuiltins.*.pyc",
+ "${libdir}/python3.5/__pycache__/_sysconfigdata.*.pyc",
+ "${libdir}/python3.5/__pycache__/_weakrefset.*.pyc",
+ "${libdir}/python3.5/__pycache__/abc.*.pyc",
+ "${libdir}/python3.5/__pycache__/argparse.*.pyc",
+ "${libdir}/python3.5/__pycache__/ast.*.pyc",
+ "${libdir}/python3.5/__pycache__/bisect.*.pyc",
+ "${libdir}/python3.5/__pycache__/code.*.pyc",
+ "${libdir}/python3.5/__pycache__/codecs.*.pyc",
+ "${libdir}/python3.5/__pycache__/codeop.*.pyc",
+ "${libdir}/python3.5/__pycache__/configparser.*.pyc",
+ "${libdir}/python3.5/__pycache__/contextlib.*.pyc",
+ "${libdir}/python3.5/__pycache__/copy.*.pyc",
+ "${libdir}/python3.5/__pycache__/copyreg.*.pyc",
+ "${libdir}/python3.5/__pycache__/csv.*.pyc",
+ "${libdir}/python3.5/__pycache__/dis.*.pyc",
+ "${libdir}/python3.5/__pycache__/enum.*.pyc",
+ "${libdir}/python3.5/__pycache__/functools.*.pyc",
+ "${libdir}/python3.5/__pycache__/genericpath.*.pyc",
+ "${libdir}/python3.5/__pycache__/getopt.*.pyc",
+ "${libdir}/python3.5/__pycache__/gettext.*.pyc",
+ "${libdir}/python3.5/__pycache__/heapq.*.pyc",
+ "${libdir}/python3.5/__pycache__/imp.*.pyc",
+ "${libdir}/python3.5/__pycache__/inspect.*.pyc",
+ "${libdir}/python3.5/__pycache__/io.*.pyc",
+ "${libdir}/python3.5/__pycache__/keyword.*.pyc",
+ "${libdir}/python3.5/__pycache__/linecache.*.pyc",
+ "${libdir}/python3.5/__pycache__/locale.*.pyc",
+ "${libdir}/python3.5/__pycache__/opcode.*.pyc",
+ "${libdir}/python3.5/__pycache__/operator.*.pyc",
+ "${libdir}/python3.5/__pycache__/optparse.*.pyc",
+ "${libdir}/python3.5/__pycache__/os.*.pyc",
+ "${libdir}/python3.5/__pycache__/platform.*.pyc",
+ "${libdir}/python3.5/__pycache__/posixpath.*.pyc",
+ "${libdir}/python3.5/__pycache__/re.*.pyc",
+ "${libdir}/python3.5/__pycache__/reprlib.*.pyc",
+ "${libdir}/python3.5/__pycache__/rlcompleter.*.pyc",
+ "${libdir}/python3.5/__pycache__/selectors.*.pyc",
+ "${libdir}/python3.5/__pycache__/signal.*.pyc",
+ "${libdir}/python3.5/__pycache__/site.*.pyc",
+ "${libdir}/python3.5/__pycache__/sre_compile.*.pyc",
+ "${libdir}/python3.5/__pycache__/sre_constants.*.pyc",
+ "${libdir}/python3.5/__pycache__/sre_parse.*.pyc",
+ "${libdir}/python3.5/__pycache__/stat.*.pyc",
+ "${libdir}/python3.5/__pycache__/stringprep.*.pyc",
+ "${libdir}/python3.5/__pycache__/struct.*.pyc",
+ "${libdir}/python3.5/__pycache__/subprocess.*.pyc",
+ "${libdir}/python3.5/__pycache__/symbol.*.pyc",
+ "${libdir}/python3.5/__pycache__/sysconfig.*.pyc",
+ "${libdir}/python3.5/__pycache__/textwrap.*.pyc",
+ "${libdir}/python3.5/__pycache__/threading.*.pyc",
+ "${libdir}/python3.5/__pycache__/token.*.pyc",
+ "${libdir}/python3.5/__pycache__/tokenize.*.pyc",
+ "${libdir}/python3.5/__pycache__/traceback.*.pyc",
+ "${libdir}/python3.5/__pycache__/types.*.pyc",
+ "${libdir}/python3.5/__pycache__/warnings.*.pyc",
+ "${libdir}/python3.5/__pycache__/weakref.*.pyc",
+ "${libdir}/python3.5/collections/__pycache__",
+ "${libdir}/python3.5/collections/__pycache__/abc.*.pyc",
+ "${libdir}/python3.5/encodings/__pycache__",
+ "${libdir}/python3.5/encodings/__pycache__/aliases.*.pyc",
+ "${libdir}/python3.5/encodings/__pycache__/latin_1.*.pyc",
+ "${libdir}/python3.5/encodings/__pycache__/utf_8.*.pyc",
+ "${libdir}/python3.5/importlib/__pycache__",
+ "${libdir}/python3.5/importlib/__pycache__/abc.*.pyc",
+ "${libdir}/python3.5/importlib/__pycache__/machinery.*.pyc",
+ "${libdir}/python3.5/importlib/__pycache__/util.*.pyc"
+ ],
+ "files": [
+ "${bindir}/python*[!-config]",
+ "${includedir}/python${PYTHON_BINABI}/pyconfig*.h",
+ "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.py",
+ "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.py",
+ "${libdir}/python${PYTHON_MAJMIN}/collections",
+ "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py",
+ "${libdir}/python3.5/UserDict.py",
+ "${libdir}/python3.5/UserList.py",
+ "${libdir}/python3.5/UserString.py",
+ "${libdir}/python3.5/__future__.py",
+ "${libdir}/python3.5/_abcoll.py",
+ "${libdir}/python3.5/_bootlocale.py",
+ "${libdir}/python3.5/_collections_abc.py",
+ "${libdir}/python3.5/_markupbase.py",
+ "${libdir}/python3.5/_sitebuiltins.py",
+ "${libdir}/python3.5/_sysconfigdata.py",
+ "${libdir}/python3.5/_weakrefset.py",
+ "${libdir}/python3.5/abc.py",
+ "${libdir}/python3.5/argparse.py",
+ "${libdir}/python3.5/ast.py",
+ "${libdir}/python3.5/bisect.py",
+ "${libdir}/python3.5/code.py",
+ "${libdir}/python3.5/codecs.py",
+ "${libdir}/python3.5/codeop.py",
+ "${libdir}/python3.5/collections",
+ "${libdir}/python3.5/collections/abc.py",
+ "${libdir}/python3.5/configparser.py",
+ "${libdir}/python3.5/contextlib.py",
+ "${libdir}/python3.5/copy.py",
+ "${libdir}/python3.5/copyreg.py",
+ "${libdir}/python3.5/csv.py",
+ "${libdir}/python3.5/dis.py",
+ "${libdir}/python3.5/encodings",
+ "${libdir}/python3.5/encodings/aliases.py",
+ "${libdir}/python3.5/encodings/latin_1.py",
+ "${libdir}/python3.5/encodings/utf_8.py",
+ "${libdir}/python3.5/enum.py",
+ "${libdir}/python3.5/functools.py",
+ "${libdir}/python3.5/genericpath.py",
+ "${libdir}/python3.5/getopt.py",
+ "${libdir}/python3.5/gettext.py",
+ "${libdir}/python3.5/heapq.py",
+ "${libdir}/python3.5/imp.py",
+ "${libdir}/python3.5/importlib",
+ "${libdir}/python3.5/importlib/_bootstrap.py",
+ "${libdir}/python3.5/importlib/_bootstrap_external.py",
+ "${libdir}/python3.5/importlib/abc.py",
+ "${libdir}/python3.5/importlib/machinery.py",
+ "${libdir}/python3.5/importlib/util.py",
+ "${libdir}/python3.5/inspect.py",
+ "${libdir}/python3.5/io.py",
+ "${libdir}/python3.5/keyword.py",
+ "${libdir}/python3.5/lib-dynload/__pycache__/_struct.*.so",
+ "${libdir}/python3.5/lib-dynload/__pycache__/binascii.*.so",
+ "${libdir}/python3.5/lib-dynload/__pycache__/time.*.so",
+ "${libdir}/python3.5/lib-dynload/__pycache__/xreadlines.*.so",
+ "${libdir}/python3.5/lib-dynload/_bisect.*.so",
+ "${libdir}/python3.5/lib-dynload/_csv.*.so",
+ "${libdir}/python3.5/lib-dynload/_heapq.*.so",
+ "${libdir}/python3.5/lib-dynload/_opcode.*.so",
+ "${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so",
+ "${libdir}/python3.5/lib-dynload/_struct.*.so",
+ "${libdir}/python3.5/lib-dynload/array.*.so",
+ "${libdir}/python3.5/lib-dynload/binascii.*.so",
+ "${libdir}/python3.5/lib-dynload/math.*.so",
+ "${libdir}/python3.5/lib-dynload/parser.*.so",
+ "${libdir}/python3.5/lib-dynload/readline.*.so",
+ "${libdir}/python3.5/lib-dynload/select.*.so",
+ "${libdir}/python3.5/lib-dynload/time.*.so",
+ "${libdir}/python3.5/lib-dynload/unicodedata.*.so",
+ "${libdir}/python3.5/lib-dynload/xreadlines.*.so",
+ "${libdir}/python3.5/linecache.py",
+ "${libdir}/python3.5/locale.py",
+ "${libdir}/python3.5/new.py",
+ "${libdir}/python3.5/opcode.py",
+ "${libdir}/python3.5/operator.py",
+ "${libdir}/python3.5/optparse.py",
+ "${libdir}/python3.5/os.py",
+ "${libdir}/python3.5/platform.py",
+ "${libdir}/python3.5/posixpath.py",
+ "${libdir}/python3.5/re.py",
+ "${libdir}/python3.5/reprlib.py",
+ "${libdir}/python3.5/rlcompleter.py",
+ "${libdir}/python3.5/selectors.py",
+ "${libdir}/python3.5/signal.py",
+ "${libdir}/python3.5/site.py",
+ "${libdir}/python3.5/sre_compile.py",
+ "${libdir}/python3.5/sre_constants.py",
+ "${libdir}/python3.5/sre_parse.py",
+ "${libdir}/python3.5/stat.py",
+ "${libdir}/python3.5/stringprep.py",
+ "${libdir}/python3.5/struct.py",
+ "${libdir}/python3.5/subprocess.py",
+ "${libdir}/python3.5/symbol.py",
+ "${libdir}/python3.5/sysconfig.py",
+ "${libdir}/python3.5/textwrap.py",
+ "${libdir}/python3.5/threading.py",
+ "${libdir}/python3.5/token.py",
+ "${libdir}/python3.5/tokenize.py",
+ "${libdir}/python3.5/traceback.py",
+ "${libdir}/python3.5/types.py",
+ "${libdir}/python3.5/warnings.py",
+ "${libdir}/python3.5/weakref.py"
+ ],
+ "rdepends": [],
+ "summary": "Python interpreter and core modules"
+ },
+ "crypt": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/crypt.*.pyc",
+ "${libdir}/python3.5/__pycache__/hashlib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/crypt.py",
+ "${libdir}/python3.5/hashlib.py",
+ "${libdir}/python3.5/lib-dynload/_crypt.*.so",
+ "${libdir}/python3.5/lib-dynload/_hashlib.*.so",
+ "${libdir}/python3.5/lib-dynload/_sha256.*.so",
+ "${libdir}/python3.5/lib-dynload/_sha512.*.so"
+ ],
+ "rdepends": [
+ "core",
+ "math",
+ "stringold"
+ ],
+ "summary": "Python basic cryptographic and hashing support"
+ },
+ "ctypes": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/ctypes",
+ "${libdir}/python3.5/lib-dynload/_ctypes.*.so",
+ "${libdir}/python3.5/lib-dynload/_ctypes_test.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python C types support"
+ },
+ "curses": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/curses",
+ "${libdir}/python3.5/lib-dynload/_curses.*.so",
+ "${libdir}/python3.5/lib-dynload/_curses_panel.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python curses support"
+ },
+ "datetime": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_strptime.*.pyc",
+ "${libdir}/python3.5/__pycache__/calendar.*.pyc",
+ "${libdir}/python3.5/__pycache__/datetime.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_strptime.py",
+ "${libdir}/python3.5/calendar.py",
+ "${libdir}/python3.5/datetime.py",
+ "${libdir}/python3.5/lib-dynload/_datetime.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python calendar and time support"
+ },
+ "db": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/dbm",
+ "${libdir}/python3.5/lib-dynload/_dbm.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python file-based database support"
+ },
+ "debugger": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/bdb.*.pyc",
+ "${libdir}/python3.5/__pycache__/pdb.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/bdb.py",
+ "${libdir}/python3.5/pdb.py"
+ ],
+ "rdepends": [
+ "core",
+ "pprint",
+ "shell",
+ "stringold"
+ ],
+ "summary": "Python debugger"
+ },
+ "dev": {
+ "cached": [],
+ "files": [
+ "${base_libdir}/*.a",
+ "${base_libdir}/*.o",
+ "${bindir}/python*-config",
+ "${datadir}/aclocal",
+ "${datadir}/pkgconfig",
+ "${includedir}",
+ "${libdir}/*.a",
+ "${libdir}/*.la",
+ "${libdir}/*.o",
+ "${libdir}/lib*${SOLIBSDEV}",
+ "${libdir}/pkgconfig",
+ "${libdir}/python3.5/config*/Makefile",
+ "${libdir}/python3.5/config*/Makefile/__pycache__"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python development package"
+ },
+ "difflib": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/difflib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/difflib.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python helpers for computing deltas between objects"
+ },
+ "distutils": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/distutils"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Distribution Utilities"
+ },
+ "distutils-staticdev": {
+ "cached": [
+ "${libdir}/python3.5/config/__pycache__/lib*.a"
+ ],
+ "files": [
+ "${libdir}/python3.5/config/lib*.a"
+ ],
+ "rdepends": [
+ "distutils"
+ ],
+ "summary": "Python distribution utilities (static libraries)"
+ },
+ "doctest": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/doctest.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/doctest.py"
+ ],
+ "rdepends": [
+ "core",
+ "debugger",
+ "difflib",
+ "logging",
+ "pprint",
+ "shell",
+ "stringold",
+ "unittest"
+ ],
+ "summary": "Python framework for running examples in docstrings"
+ },
+ "email": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/imaplib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/email",
+ "${libdir}/python3.5/imaplib.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "io",
+ "math",
+ "netclient"
+ ],
+ "summary": "Python email support"
+ },
+ "fcntl": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/fcntl.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python's fcntl interface"
+ },
+ "gdbm": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_gdbm.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python GNU database support"
+ },
+ "html": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/formatter.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/formatter.py",
+ "${libdir}/python3.5/html"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python HTML processing support"
+ },
+ "idle": {
+ "cached": [],
+ "files": [
+ "${bindir}/idle*",
+ "${libdir}/python3.5/idlelib"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Integrated Development Environment"
+ },
+ "image": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/colorsys.*.pyc",
+ "${libdir}/python3.5/__pycache__/imghdr.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/colorsys.py",
+ "${libdir}/python3.5/imghdr.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python graphical image handling"
+ },
+ "io": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_pyio.*.pyc",
+ "${libdir}/python3.5/__pycache__/ipaddress.*.pyc",
+ "${libdir}/python3.5/__pycache__/pipes.*.pyc",
+ "${libdir}/python3.5/__pycache__/socket.*.pyc",
+ "${libdir}/python3.5/__pycache__/ssl.*.pyc",
+ "${libdir}/python3.5/__pycache__/tempfile.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_pyio.py",
+ "${libdir}/python3.5/ipaddress.py",
+ "${libdir}/python3.5/lib-dynload/_socket.*.so",
+ "${libdir}/python3.5/lib-dynload/_ssl.*.so",
+ "${libdir}/python3.5/lib-dynload/termios.*.so",
+ "${libdir}/python3.5/pipes.py",
+ "${libdir}/python3.5/socket.py",
+ "${libdir}/python3.5/ssl.py",
+ "${libdir}/python3.5/tempfile.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "math",
+ "netclient",
+ "shell",
+ "unixadmin"
+ ],
+ "summary": "Python low-level I/O"
+ },
+ "json": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/json",
+ "${libdir}/python3.5/lib-dynload/_json.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python JSON support"
+ },
+ "logging": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/logging"
+ ],
+ "rdepends": [
+ "core",
+ "stringold"
+ ],
+ "summary": "Python logging support"
+ },
+ "mailbox": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/mailbox.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/mailbox.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "fcntl",
+ "io",
+ "math",
+ "mime",
+ "netclient",
+ "stringold"
+ ],
+ "summary": "Python mailbox format support"
+ },
+ "math": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/random.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_random.*.so",
+ "${libdir}/python3.5/lib-dynload/cmath.*.so",
+ "${libdir}/python3.5/random.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt"
+ ],
+ "summary": "Python math support"
+ },
+ "mime": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/quopri.*.pyc",
+ "${libdir}/python3.5/__pycache__/uu.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/quopri.py",
+ "${libdir}/python3.5/uu.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python MIME handling APIs"
+ },
+ "mmap": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/mmap.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python memory-mapped file support"
+ },
+ "modules": {
+ "cached": [],
+ "files": [],
+ "rdepends": [
+ "2to3",
+ "asyncio",
+ "audio",
+ "codecs",
+ "compile",
+ "compression",
+ "core",
+ "crypt",
+ "ctypes",
+ "curses",
+ "datetime",
+ "db",
+ "debugger",
+ "difflib",
+ "distutils",
+ "doctest",
+ "email",
+ "fcntl",
+ "html",
+ "idle",
+ "image",
+ "io",
+ "json",
+ "logging",
+ "mailbox",
+ "math",
+ "mime",
+ "mmap",
+ "multiprocessing",
+ "netclient",
+ "netserver",
+ "numbers",
+ "pickle",
+ "pkgutil",
+ "plistlib",
+ "pprint",
+ "profile",
+ "pydoc",
+ "resource",
+ "runpy",
+ "shell",
+ "smtpd",
+ "sqlite3",
+ "stringold",
+ "syslog",
+ "terminal",
+ "threading",
+ "tkinter",
+ "typing",
+ "unittest",
+ "unixadmin",
+ "xml",
+ "xmlrpc"
+ ],
+ "summary": "All Python modules"
+ },
+ "multiprocessing": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_multiprocessing.*.so",
+ "${libdir}/python3.5/multiprocessing"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python multiprocessing support"
+ },
+ "netclient": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/base64.*.pyc",
+ "${libdir}/python3.5/__pycache__/ftplib.*.pyc",
+ "${libdir}/python3.5/__pycache__/hmac.*.pyc",
+ "${libdir}/python3.5/__pycache__/mimetypes.*.pyc",
+ "${libdir}/python3.5/__pycache__/nntplib.*.pyc",
+ "${libdir}/python3.5/__pycache__/poplib.*.pyc",
+ "${libdir}/python3.5/__pycache__/smtplib.*.pyc",
+ "${libdir}/python3.5/__pycache__/telnetlib.*.pyc",
+ "${libdir}/python3.5/__pycache__/uuid.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/base64.py",
+ "${libdir}/python3.5/ftplib.py",
+ "${libdir}/python3.5/hmac.py",
+ "${libdir}/python3.5/http",
+ "${libdir}/python3.5/http/__pycache__",
+ "${libdir}/python3.5/mimetypes.py",
+ "${libdir}/python3.5/nntplib.py",
+ "${libdir}/python3.5/poplib.py",
+ "${libdir}/python3.5/smtplib.py",
+ "${libdir}/python3.5/telnetlib.py",
+ "${libdir}/python3.5/urllib",
+ "${libdir}/python3.5/urllib/__pycache__",
+ "${libdir}/python3.5/uuid.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "ctypes",
+ "datetime",
+ "email",
+ "io",
+ "math",
+ "mime",
+ "shell",
+ "stringold",
+ "unixadmin"
+ ],
+ "summary": "Python Internet Protocol clients"
+ },
+ "netserver": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/cgi.*.pyc",
+ "${libdir}/python3.5/__pycache__/socketserver.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/cgi.py",
+ "${libdir}/python3.5/socketserver.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "html",
+ "io",
+ "math",
+ "mime",
+ "netclient",
+ "shell",
+ "stringold",
+ "unixadmin"
+ ],
+ "summary": "Python Internet Protocol servers"
+ },
+ "numbers": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_pydecimal.*.pyc",
+ "${libdir}/python3.5/__pycache__/decimal.*.pyc",
+ "${libdir}/python3.5/__pycache__/fractions.*.pyc",
+ "${libdir}/python3.5/__pycache__/numbers.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_pydecimal.py",
+ "${libdir}/python3.5/decimal.py",
+ "${libdir}/python3.5/fractions.py",
+ "${libdir}/python3.5/lib-dynload/_decimal.*.so",
+ "${libdir}/python3.5/numbers.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python number APIs"
+ },
+ "pickle": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_compat_pickle.*.pyc",
+ "${libdir}/python3.5/__pycache__/pickle.*.pyc",
+ "${libdir}/python3.5/__pycache__/pickletools.*.pyc",
+ "${libdir}/python3.5/__pycache__/shelve.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_compat_pickle.py",
+ "${libdir}/python3.5/lib-dynload/_pickle.*.so",
+ "${libdir}/python3.5/pickle.py",
+ "${libdir}/python3.5/pickletools.py",
+ "${libdir}/python3.5/shelve.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python serialisation/persistence support"
+ },
+ "pkgutil": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/pkgutil.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/pkgutil.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python package extension utility support"
+ },
+ "plistlib": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/plistlib.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/plistlib.py"
+ ],
+ "rdepends": [
+ "core",
+ "datetime",
+ "xml"
+ ],
+ "summary": "Generate and parse Mac OS X .plist files"
+ },
+ "pprint": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/pprint.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/pprint.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python pretty-print support"
+ },
+ "profile": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/cProfile.*.pyc",
+ "${libdir}/python3.5/__pycache__/profile.*.pyc",
+ "${libdir}/python3.5/__pycache__/pstats.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/cProfile.py",
+ "${libdir}/python3.5/lib-dynload/_lsprof.*.so",
+ "${libdir}/python3.5/profile.py",
+ "${libdir}/python3.5/pstats.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python basic performance profiling support"
+ },
+ "pydoc": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/pydoc.*.pyc"
+ ],
+ "files": [
+ "${bindir}/pydoc*",
+ "${libdir}/python3.5/pydoc.py",
+ "${libdir}/python3.5/pydoc_data"
+ ],
+ "rdepends": [
+ "core",
+ "netclient",
+ "pkgutil"
+ ],
+ "summary": "Python interactive help support"
+ },
+ "resource": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/resource.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python resource control interface"
+ },
+ "runpy": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/runpy.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/runpy.py"
+ ],
+ "rdepends": [
+ "core",
+ "pkgutil"
+ ],
+ "summary": "Python helper for locating/executing scripts in module namespace"
+ },
+ "shell": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/cmd.*.pyc",
+ "${libdir}/python3.5/__pycache__/fnmatch.*.pyc",
+ "${libdir}/python3.5/__pycache__/glob.*.pyc",
+ "${libdir}/python3.5/__pycache__/shlex.*.pyc",
+ "${libdir}/python3.5/__pycache__/shutil.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/cmd.py",
+ "${libdir}/python3.5/fnmatch.py",
+ "${libdir}/python3.5/glob.py",
+ "${libdir}/python3.5/shlex.py",
+ "${libdir}/python3.5/shutil.py"
+ ],
+ "rdepends": [
+ "compression",
+ "core",
+ "stringold",
+ "unixadmin"
+ ],
+ "summary": "Python shell-like functionality"
+ },
+ "smtpd": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/asynchat.*.pyc",
+ "${libdir}/python3.5/__pycache__/asyncore.*.pyc",
+ "${libdir}/python3.5/__pycache__/smtpd.*.pyc"
+ ],
+ "files": [
+ "${bindir}/smtpd.py",
+ "${libdir}/python3.5/asynchat.py",
+ "${libdir}/python3.5/asyncore.py",
+ "${libdir}/python3.5/smtpd.py"
+ ],
+ "rdepends": [
+ "core",
+ "crypt",
+ "datetime",
+ "email",
+ "io",
+ "math",
+ "mime",
+ "netclient",
+ "stringold"
+ ],
+ "summary": "Python Simple Mail Transport Daemon"
+ },
+ "sqlite3": {
+ "cached": [
+ "${libdir}/python3.5/sqlite3/__pycache__",
+ "${libdir}/python3.5/sqlite3/__pycache__/dbapi2.*.pyc",
+ "${libdir}/python3.5/sqlite3/__pycache__/dump.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_sqlite3.*.so",
+ "${libdir}/python3.5/sqlite3/dbapi2.py",
+ "${libdir}/python3.5/sqlite3/dump.py"
+ ],
+ "rdepends": [
+ "core",
+ "datetime"
+ ],
+ "summary": "Python Sqlite3 database support"
+ },
+ "sqlite3-tests": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/sqlite3/test"
+ ],
+ "rdepends": [
+ "core",
+ "tests"
+ ],
+ "summary": "Python Sqlite3 database support tests"
+ },
+ "stringold": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/string.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/string.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python string APIs [deprecated]"
+ },
+ "syslog": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/syslog.*.so"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python syslog interface"
+ },
+ "terminal": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/pty.*.pyc",
+ "${libdir}/python3.5/__pycache__/tty.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/pty.py",
+ "${libdir}/python3.5/tty.py"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python terminal controlling support"
+ },
+ "tests": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/test"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python tests"
+ },
+ "threading": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/_dummy_thread.*.pyc",
+ "${libdir}/python3.5/__pycache__/_threading_local.*.pyc",
+ "${libdir}/python3.5/__pycache__/dummy_threading.*.pyc",
+ "${libdir}/python3.5/__pycache__/queue.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/_dummy_thread.py",
+ "${libdir}/python3.5/_threading_local.py",
+ "${libdir}/python3.5/dummy_threading.py",
+ "${libdir}/python3.5/queue.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python threading & synchronization support"
+ },
+ "tkinter": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/tkinter"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python Tcl/Tk bindings"
+ },
+ "typing": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/typing.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/typing.py"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python typing support"
+ },
+ "unittest": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/unittest",
+ "${libdir}/python3.5/unittest/",
+ "${libdir}/python3.5/unittest/__pycache__"
+ ],
+ "rdepends": [
+ "core",
+ "difflib",
+ "logging",
+ "pprint",
+ "shell",
+ "stringold"
+ ],
+ "summary": "Python unit testing framework"
+ },
+ "unixadmin": {
+ "cached": [
+ "${libdir}/python3.5/__pycache__/getpass.*.pyc"
+ ],
+ "files": [
+ "${libdir}/python3.5/getpass.py",
+ "${libdir}/python3.5/lib-dynload/grp.*.so",
+ "${libdir}/python3.5/lib-dynload/nis.*.so"
+ ],
+ "rdepends": [
+ "core",
+ "io"
+ ],
+ "summary": "Python Unix administration support"
+ },
+ "xml": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/lib-dynload/_elementtree.*.so",
+ "${libdir}/python3.5/lib-dynload/pyexpat.*.so",
+ "${libdir}/python3.5/xml"
+ ],
+ "rdepends": [
+ "core"
+ ],
+ "summary": "Python basic XML support"
+ },
+ "xmlrpc": {
+ "cached": [],
+ "files": [
+ "${libdir}/python3.5/xmlrpc",
+ "${libdir}/python3.5/xmlrpc/__pycache__"
+ ],
+ "rdepends": [
+ "core",
+ "xml"
+ ],
+ "summary": "Python XML-RPC support"
+ }
+}
\ No newline at end of file
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
deleted file mode 100644
index 2bc8b8c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 43238e1ac13e32984d015c92a5841f3de1fe1d15 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Tue, 18 Nov 2014 00:07:07 -0500
-Subject: [PATCH] setup.py: no host headers libs
-
-When we are cross-compiling, setup.py should never look in /usr
-or /usr/local to find headers or libraries.
-
-Upstream-Status: Inappropriate [Cross compile specific]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- setup.py | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index f020b28..e8339cd 100644
---- a/setup.py
-+++ b/setup.py
-@@ -444,10 +444,7 @@ class PyBuildExt(build_ext):
- if not cross_compiling:
- add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib))
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-- # only change this for cross builds for 3.3, issues on Mageia
-- if cross_compiling:
- self.add_gcc_paths()
-- if not cross_compiling:
- self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
---
-2.0.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index 74490d9..a4f8bd4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -10,11 +10,11 @@
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/configure.ac b/configure.ac
-index 989baf9..2890c96 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -67,7 +67,7 @@ if test "$cross_compiling" = yes; then
+Index: Python-3.5.4/configure.ac
+===================================================================
+--- Python-3.5.4.orig/configure.ac
++++ Python-3.5.4/configure.ac
+@@ -73,7 +73,7 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
@@ -23,6 +23,3 @@
fi
elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
---
-2.0.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/regen-all.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/regen-all.patch
new file mode 100644
index 0000000..36b9d9d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/regen-all.patch
@@ -0,0 +1,25 @@
+python3-native: run regen-importlib target correctly
+
+regen-importlib depends on other regen- targets, so we must be sure to
+run it after (most of) the others. In reality, we do not need to run it
+at all since "make" will invoke it, if necessary. We do not want to
+rely on that, though.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -709,7 +709,8 @@ regen-importlib: Programs/_freeze_import
+ ############################################################################
+ # Regenerate all generated files
+
+-regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast regen-importlib
++regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast
++ $(MAKE) regen-importlib
+
+ ############################################################################
+ # Special rules for object files
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
deleted file mode 100644
index f26bd38..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Patch setup.py so that the detect_modules() function looks for required
-libraries and headers in STAGING_LIBDIR / STAGING_INCDIR.
-
-Without this patch, several extension modules are not built, even though
-their dependencies are present in the compiler's search paths.
-The result is the following warning, and ultimately incomplete packages:
-
-| The necessary bits to build these optional modules were not found:
-| _bz2 _curses_panel _dbm
-| _gdbm _lzma _sqlite3
-| nis readline zlib
-| To find the necessary bits, look in setup.py in detect_modules() for the module's name.
-
-Upstream-Status: Inappropriate [Cross compile specific]
-
-Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
-
-Index: Python-3.4.3/setup.py
-===================================================================
---- Python-3.4.3.orig/setup.py
-+++ Python-3.4.3/setup.py
-@@ -521,6 +521,8 @@ class PyBuildExt(build_ext):
- else:
- lib_dirs = self.compiler.library_dirs[:]
- inc_dirs = self.compiler.include_dirs[:]
-+ lib_dirs.append(os.environ.get('STAGING_LIBDIR'))
-+ inc_dirs.append(os.environ.get('STAGING_INCDIR'))
- exts = []
- missing = []
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
index de07643..c89d9a3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
@@ -17,12 +17,12 @@
Lib/sysconfig.py | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index a545ab9..74317d1 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -554,7 +554,10 @@ def get_config_vars(*args):
- _config_vars['exec_prefix'] = EXEC_PREFIX
+Index: Python-3.5.3/Lib/distutils/sysconfig.py
+===================================================================
+--- Python-3.5.3.orig/Lib/distutils/sysconfig.py
++++ Python-3.5.3/Lib/distutils/sysconfig.py
+@@ -498,7 +498,10 @@ def get_config_vars(*args):
+ _config_vars['SO'] = SO
# Always convert srcdir to an absolute path
- srcdir = _config_vars.get('srcdir', project_base)
@@ -33,11 +33,11 @@
if os.name == 'posix':
if python_build:
# If srcdir is a relative path (typically '.' or '..')
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 7287f11..cc92998 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
-@@ -562,7 +562,10 @@ def get_config_vars(*args):
+Index: Python-3.5.3/Lib/sysconfig.py
+===================================================================
+--- Python-3.5.3.orig/Lib/sysconfig.py
++++ Python-3.5.3/Lib/sysconfig.py
+@@ -544,7 +544,10 @@ def get_config_vars(*args):
_CONFIG_VARS['userbase'] = _getuserbase()
# Always convert srcdir to an absolute path
@@ -49,6 +49,3 @@
if os.name == 'posix':
if _PYTHON_BUILD:
# If srcdir is a relative path (typically '.' or '..')
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch
deleted file mode 100644
index 9b40e8a..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch
+++ /dev/null
@@ -1,703 +0,0 @@
-From 035ba5da3e53e45c712b39fe1f6fb743e697c032 Mon Sep 17 00:00:00 2001
-From: Victor Stinner <victor.stinner@gmail.com>
-Date: Mon, 9 Jan 2017 11:18:53 +0100
-Subject: [PATCH] Issue #29157: Prefer getrandom() over getentropy()
-
-Copy and then adapt Python/random.c from default branch. Difference between 3.5
-and default branches:
-
-* Python 3.5 only uses getrandom() in non-blocking mode: flags=GRND_NONBLOCK
-* If getrandom() fails with EAGAIN: py_getrandom() immediately fails and
- remembers that getrandom() doesn't work.
-* Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom()
- works in non-blocking mode on Python 3.5
-
-Upstream-Status: Backport [https://github.com/python/cpython/commit/035ba5da3e53e45c712b39fe1f6fb743e697c032]
-Signed-off-by: Alexander Kanavin <alexander.kanavin@intel.com>
-
----
- Python/random.c | 494 +++++++++++++++++++++++++++++++++-----------------------
- 1 file changed, 294 insertions(+), 200 deletions(-)
-
-diff --git a/Python/random.c b/Python/random.c
-index d203939..31f61d0 100644
---- a/Python/random.c
-+++ b/Python/random.c
-@@ -1,6 +1,9 @@
- #include "Python.h"
- #ifdef MS_WINDOWS
- # include <windows.h>
-+/* All sample MSDN wincrypt programs include the header below. It is at least
-+ * required with Min GW. */
-+# include <wincrypt.h>
- #else
- # include <fcntl.h>
- # ifdef HAVE_SYS_STAT_H
-@@ -37,10 +40,9 @@ win32_urandom_init(int raise)
- return 0;
-
- error:
-- if (raise)
-+ if (raise) {
- PyErr_SetFromWindowsErr(0);
-- else
-- Py_FatalError("Failed to initialize Windows random API (CryptoGen)");
-+ }
- return -1;
- }
-
-@@ -53,8 +55,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
-
- if (hCryptProv == 0)
- {
-- if (win32_urandom_init(raise) == -1)
-+ if (win32_urandom_init(raise) == -1) {
- return -1;
-+ }
- }
-
- while (size > 0)
-@@ -63,11 +66,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
- if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer))
- {
- /* CryptGenRandom() failed */
-- if (raise)
-+ if (raise) {
- PyErr_SetFromWindowsErr(0);
-- else
-- Py_FatalError("Failed to initialized the randomized hash "
-- "secret using CryptoGen)");
-+ }
- return -1;
- }
- buffer += chunk;
-@@ -76,58 +77,23 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
- return 0;
- }
-
--/* Issue #25003: Don't use getentropy() on Solaris (available since
-- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
--#elif defined(HAVE_GETENTROPY) && !defined(sun)
--#define PY_GETENTROPY 1
--
--/* Fill buffer with size pseudo-random bytes generated by getentropy().
-- Return 0 on success, or raise an exception and return -1 on error.
--
-- If fatal is nonzero, call Py_FatalError() instead of raising an exception
-- on error. */
--static int
--py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal)
--{
-- while (size > 0) {
-- Py_ssize_t len = Py_MIN(size, 256);
-- int res;
--
-- if (!fatal) {
-- Py_BEGIN_ALLOW_THREADS
-- res = getentropy(buffer, len);
-- Py_END_ALLOW_THREADS
--
-- if (res < 0) {
-- PyErr_SetFromErrno(PyExc_OSError);
-- return -1;
-- }
-- }
-- else {
-- res = getentropy(buffer, len);
-- if (res < 0)
-- Py_FatalError("getentropy() failed");
-- }
--
-- buffer += len;
-- size -= len;
-- }
-- return 0;
--}
--
--#else
-+#else /* !MS_WINDOWS */
-
- #if defined(HAVE_GETRANDOM) || defined(HAVE_GETRANDOM_SYSCALL)
- #define PY_GETRANDOM 1
-
--/* Call getrandom()
-+/* Call getrandom() to get random bytes:
-+
- - Return 1 on success
-- - Return 0 if getrandom() syscall is not available (failed with ENOSYS or
-- EPERM) or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom
-- not initialized yet) and raise=0.
-+ - Return 0 if getrandom() is not available (failed with ENOSYS or EPERM),
-+ or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom not
-+ initialized yet).
- - Raise an exception (if raise is non-zero) and return -1 on error:
-- getrandom() failed with EINTR and the Python signal handler raised an
-- exception, or getrandom() failed with a different error. */
-+ if getrandom() failed with EINTR, raise is non-zero and the Python signal
-+ handler raised an exception, or if getrandom() failed with a different
-+ error.
-+
-+ getrandom() is retried if it failed with EINTR: interrupted by a signal. */
- static int
- py_getrandom(void *buffer, Py_ssize_t size, int raise)
- {
-@@ -142,16 +108,19 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
- * see https://bugs.python.org/issue26839. To avoid this, use the
- * GRND_NONBLOCK flag. */
- const int flags = GRND_NONBLOCK;
-+ char *dest;
- long n;
-
- if (!getrandom_works) {
- return 0;
- }
-
-+ dest = buffer;
- while (0 < size) {
- #ifdef sun
- /* Issue #26735: On Solaris, getrandom() is limited to returning up
-- to 1024 bytes */
-+ to 1024 bytes. Call it multiple times if more bytes are
-+ requested. */
- n = Py_MIN(size, 1024);
- #else
- n = Py_MIN(size, LONG_MAX);
-@@ -161,34 +130,35 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
- #ifdef HAVE_GETRANDOM
- if (raise) {
- Py_BEGIN_ALLOW_THREADS
-- n = getrandom(buffer, n, flags);
-+ n = getrandom(dest, n, flags);
- Py_END_ALLOW_THREADS
- }
- else {
-- n = getrandom(buffer, n, flags);
-+ n = getrandom(dest, n, flags);
- }
- #else
- /* On Linux, use the syscall() function because the GNU libc doesn't
-- * expose the Linux getrandom() syscall yet. See:
-- * https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */
-+ expose the Linux getrandom() syscall yet. See:
-+ https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */
- if (raise) {
- Py_BEGIN_ALLOW_THREADS
-- n = syscall(SYS_getrandom, buffer, n, flags);
-+ n = syscall(SYS_getrandom, dest, n, flags);
- Py_END_ALLOW_THREADS
- }
- else {
-- n = syscall(SYS_getrandom, buffer, n, flags);
-+ n = syscall(SYS_getrandom, dest, n, flags);
- }
- #endif
-
- if (n < 0) {
-- /* ENOSYS: getrandom() syscall not supported by the kernel (but
-- * maybe supported by the host which built Python). EPERM:
-- * getrandom() syscall blocked by SECCOMP or something else. */
-+ /* ENOSYS: the syscall is not supported by the kernel.
-+ EPERM: the syscall is blocked by a security policy (ex: SECCOMP)
-+ or something else. */
- if (errno == ENOSYS || errno == EPERM) {
- getrandom_works = 0;
- return 0;
- }
-+
- if (errno == EAGAIN) {
- /* getrandom(GRND_NONBLOCK) fails with EAGAIN if the system
- urandom is not initialiazed yet. In this case, fall back on
-@@ -202,169 +172,225 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
- }
-
- if (errno == EINTR) {
-- if (PyErr_CheckSignals()) {
-- if (!raise) {
-- Py_FatalError("getrandom() interrupted by a signal");
-+ if (raise) {
-+ if (PyErr_CheckSignals()) {
-+ return -1;
- }
-- return -1;
- }
-
-- /* retry getrandom() */
-+ /* retry getrandom() if it was interrupted by a signal */
- continue;
- }
-
- if (raise) {
- PyErr_SetFromErrno(PyExc_OSError);
- }
-- else {
-- Py_FatalError("getrandom() failed");
-- }
- return -1;
- }
-
-- buffer += n;
-+ dest += n;
- size -= n;
- }
- return 1;
- }
--#endif
-
--static struct {
-- int fd;
-- dev_t st_dev;
-- ino_t st_ino;
--} urandom_cache = { -1 };
-+#elif defined(HAVE_GETENTROPY)
-+#define PY_GETENTROPY 1
-
-+/* Fill buffer with size pseudo-random bytes generated by getentropy():
-
--/* Read 'size' random bytes from py_getrandom(). Fall back on reading from
-- /dev/urandom if getrandom() is not available.
-+ - Return 1 on success
-+ - Return 0 if getentropy() syscall is not available (failed with ENOSYS or
-+ EPERM).
-+ - Raise an exception (if raise is non-zero) and return -1 on error:
-+ if getentropy() failed with EINTR, raise is non-zero and the Python signal
-+ handler raised an exception, or if getentropy() failed with a different
-+ error.
-
-- Call Py_FatalError() on error. */
--static void
--dev_urandom_noraise(unsigned char *buffer, Py_ssize_t size)
-+ getentropy() is retried if it failed with EINTR: interrupted by a signal. */
-+static int
-+py_getentropy(char *buffer, Py_ssize_t size, int raise)
- {
-- int fd;
-- Py_ssize_t n;
-+ /* Is getentropy() supported by the running kernel? Set to 0 if
-+ getentropy() failed with ENOSYS or EPERM. */
-+ static int getentropy_works = 1;
-
-- assert (0 < size);
--
--#ifdef PY_GETRANDOM
-- if (py_getrandom(buffer, size, 0) == 1) {
-- return;
-+ if (!getentropy_works) {
-+ return 0;
- }
-- /* getrandom() failed with ENOSYS or EPERM,
-- fall back on reading /dev/urandom */
--#endif
-
-- fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
-- if (fd < 0) {
-- Py_FatalError("Failed to open /dev/urandom");
-- }
-+ while (size > 0) {
-+ /* getentropy() is limited to returning up to 256 bytes. Call it
-+ multiple times if more bytes are requested. */
-+ Py_ssize_t len = Py_MIN(size, 256);
-+ int res;
-
-- while (0 < size)
-- {
-- do {
-- n = read(fd, buffer, (size_t)size);
-- } while (n < 0 && errno == EINTR);
-+ if (raise) {
-+ Py_BEGIN_ALLOW_THREADS
-+ res = getentropy(buffer, len);
-+ Py_END_ALLOW_THREADS
-+ }
-+ else {
-+ res = getentropy(buffer, len);
-+ }
-
-- if (n <= 0) {
-- /* read() failed or returned 0 bytes */
-- Py_FatalError("Failed to read bytes from /dev/urandom");
-- break;
-+ if (res < 0) {
-+ /* ENOSYS: the syscall is not supported by the running kernel.
-+ EPERM: the syscall is blocked by a security policy (ex: SECCOMP)
-+ or something else. */
-+ if (errno == ENOSYS || errno == EPERM) {
-+ getentropy_works = 0;
-+ return 0;
-+ }
-+
-+ if (errno == EINTR) {
-+ if (raise) {
-+ if (PyErr_CheckSignals()) {
-+ return -1;
-+ }
-+ }
-+
-+ /* retry getentropy() if it was interrupted by a signal */
-+ continue;
-+ }
-+
-+ if (raise) {
-+ PyErr_SetFromErrno(PyExc_OSError);
-+ }
-+ return -1;
- }
-- buffer += n;
-- size -= n;
-+
-+ buffer += len;
-+ size -= len;
- }
-- close(fd);
-+ return 1;
- }
-+#endif /* defined(HAVE_GETENTROPY) && !defined(sun) */
-
--/* Read 'size' random bytes from py_getrandom(). Fall back on reading from
-- /dev/urandom if getrandom() is not available.
-
-- Return 0 on success. Raise an exception and return -1 on error. */
-+static struct {
-+ int fd;
-+ dev_t st_dev;
-+ ino_t st_ino;
-+} urandom_cache = { -1 };
-+
-+/* Read random bytes from the /dev/urandom device:
-+
-+ - Return 0 on success
-+ - Raise an exception (if raise is non-zero) and return -1 on error
-+
-+ Possible causes of errors:
-+
-+ - open() failed with ENOENT, ENXIO, ENODEV, EACCES: the /dev/urandom device
-+ was not found. For example, it was removed manually or not exposed in a
-+ chroot or container.
-+ - open() failed with a different error
-+ - fstat() failed
-+ - read() failed or returned 0
-+
-+ read() is retried if it failed with EINTR: interrupted by a signal.
-+
-+ The file descriptor of the device is kept open between calls to avoid using
-+ many file descriptors when run in parallel from multiple threads:
-+ see the issue #18756.
-+
-+ st_dev and st_ino fields of the file descriptor (from fstat()) are cached to
-+ check if the file descriptor was replaced by a different file (which is
-+ likely a bug in the application): see the issue #21207.
-+
-+ If the file descriptor was closed or replaced, open a new file descriptor
-+ but don't close the old file descriptor: it probably points to something
-+ important for some third-party code. */
- static int
--dev_urandom_python(char *buffer, Py_ssize_t size)
-+dev_urandom(char *buffer, Py_ssize_t size, int raise)
- {
- int fd;
- Py_ssize_t n;
-- struct _Py_stat_struct st;
--#ifdef PY_GETRANDOM
-- int res;
--#endif
--
-- if (size <= 0)
-- return 0;
-
--#ifdef PY_GETRANDOM
-- res = py_getrandom(buffer, size, 1);
-- if (res < 0) {
-- return -1;
-- }
-- if (res == 1) {
-- return 0;
-- }
-- /* getrandom() failed with ENOSYS or EPERM,
-- fall back on reading /dev/urandom */
--#endif
-+ if (raise) {
-+ struct _Py_stat_struct st;
-
-- if (urandom_cache.fd >= 0) {
-- /* Does the fd point to the same thing as before? (issue #21207) */
-- if (_Py_fstat_noraise(urandom_cache.fd, &st)
-- || st.st_dev != urandom_cache.st_dev
-- || st.st_ino != urandom_cache.st_ino) {
-- /* Something changed: forget the cached fd (but don't close it,
-- since it probably points to something important for some
-- third-party code). */
-- urandom_cache.fd = -1;
-- }
-- }
-- if (urandom_cache.fd >= 0)
-- fd = urandom_cache.fd;
-- else {
-- fd = _Py_open("/dev/urandom", O_RDONLY);
-- if (fd < 0) {
-- if (errno == ENOENT || errno == ENXIO ||
-- errno == ENODEV || errno == EACCES)
-- PyErr_SetString(PyExc_NotImplementedError,
-- "/dev/urandom (or equivalent) not found");
-- /* otherwise, keep the OSError exception raised by _Py_open() */
-- return -1;
-- }
- if (urandom_cache.fd >= 0) {
-- /* urandom_fd was initialized by another thread while we were
-- not holding the GIL, keep it. */
-- close(fd);
-- fd = urandom_cache.fd;
-+ /* Does the fd point to the same thing as before? (issue #21207) */
-+ if (_Py_fstat_noraise(urandom_cache.fd, &st)
-+ || st.st_dev != urandom_cache.st_dev
-+ || st.st_ino != urandom_cache.st_ino) {
-+ /* Something changed: forget the cached fd (but don't close it,
-+ since it probably points to something important for some
-+ third-party code). */
-+ urandom_cache.fd = -1;
-+ }
- }
-+ if (urandom_cache.fd >= 0)
-+ fd = urandom_cache.fd;
- else {
-- if (_Py_fstat(fd, &st)) {
-- close(fd);
-+ fd = _Py_open("/dev/urandom", O_RDONLY);
-+ if (fd < 0) {
-+ if (errno == ENOENT || errno == ENXIO ||
-+ errno == ENODEV || errno == EACCES) {
-+ PyErr_SetString(PyExc_NotImplementedError,
-+ "/dev/urandom (or equivalent) not found");
-+ }
-+ /* otherwise, keep the OSError exception raised by _Py_open() */
- return -1;
- }
-+ if (urandom_cache.fd >= 0) {
-+ /* urandom_fd was initialized by another thread while we were
-+ not holding the GIL, keep it. */
-+ close(fd);
-+ fd = urandom_cache.fd;
-+ }
- else {
-- urandom_cache.fd = fd;
-- urandom_cache.st_dev = st.st_dev;
-- urandom_cache.st_ino = st.st_ino;
-+ if (_Py_fstat(fd, &st)) {
-+ close(fd);
-+ return -1;
-+ }
-+ else {
-+ urandom_cache.fd = fd;
-+ urandom_cache.st_dev = st.st_dev;
-+ urandom_cache.st_ino = st.st_ino;
-+ }
- }
- }
-- }
-
-- do {
-- n = _Py_read(fd, buffer, (size_t)size);
-- if (n == -1) {
-- return -1;
-- }
-- if (n == 0) {
-- PyErr_Format(PyExc_RuntimeError,
-- "Failed to read %zi bytes from /dev/urandom",
-- size);
-+ do {
-+ n = _Py_read(fd, buffer, (size_t)size);
-+ if (n == -1)
-+ return -1;
-+ if (n == 0) {
-+ PyErr_Format(PyExc_RuntimeError,
-+ "Failed to read %zi bytes from /dev/urandom",
-+ size);
-+ return -1;
-+ }
-+
-+ buffer += n;
-+ size -= n;
-+ } while (0 < size);
-+ }
-+ else {
-+ fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
-+ if (fd < 0) {
- return -1;
- }
-
-- buffer += n;
-- size -= n;
-- } while (0 < size);
-+ while (0 < size)
-+ {
-+ do {
-+ n = read(fd, buffer, (size_t)size);
-+ } while (n < 0 && errno == EINTR);
-
-+ if (n <= 0) {
-+ /* stop on error or if read(size) returned 0 */
-+ close(fd);
-+ return -1;
-+ }
-+
-+ buffer += n;
-+ size -= n;
-+ }
-+ close(fd);
-+ }
- return 0;
- }
-
-@@ -376,8 +402,8 @@ dev_urandom_close(void)
- urandom_cache.fd = -1;
- }
- }
-+#endif /* !MS_WINDOWS */
-
--#endif
-
- /* Fill buffer with pseudo-random bytes generated by a linear congruent
- generator (LCG):
-@@ -400,31 +426,100 @@ lcg_urandom(unsigned int x0, unsigned char *buffer, size_t size)
- }
- }
-
--/* Fill buffer with size pseudo-random bytes from the operating system random
-- number generator (RNG). It is suitable for most cryptographic purposes
-- except long living private keys for asymmetric encryption.
-+/* Read random bytes:
-
-- Return 0 on success, raise an exception and return -1 on error. */
--int
--_PyOS_URandom(void *buffer, Py_ssize_t size)
-+ - Return 0 on success
-+ - Raise an exception (if raise is non-zero) and return -1 on error
-+
-+ Used sources of entropy ordered by preference, preferred source first:
-+
-+ - CryptGenRandom() on Windows
-+ - getrandom() function (ex: Linux and Solaris): call py_getrandom()
-+ - getentropy() function (ex: OpenBSD): call py_getentropy()
-+ - /dev/urandom device
-+
-+ Read from the /dev/urandom device if getrandom() or getentropy() function
-+ is not available or does not work.
-+
-+ Prefer getrandom() over getentropy() because getrandom() supports blocking
-+ and non-blocking mode and Python requires non-blocking RNG at startup to
-+ initialize its hash secret: see the PEP 524.
-+
-+ Prefer getrandom() and getentropy() over reading directly /dev/urandom
-+ because these functions don't need file descriptors and so avoid ENFILE or
-+ EMFILE errors (too many open files): see the issue #18756.
-+
-+ Only use RNG running in the kernel. They are more secure because it is
-+ harder to get the internal state of a RNG running in the kernel land than a
-+ RNG running in the user land. The kernel has a direct access to the hardware
-+ and has access to hardware RNG, they are used as entropy sources.
-+
-+ Note: the OpenSSL RAND_pseudo_bytes() function does not automatically reseed
-+ its RNG on fork(), two child processes (with the same pid) generate the same
-+ random numbers: see issue #18747. Kernel RNGs don't have this issue,
-+ they have access to good quality entropy sources.
-+
-+ If raise is zero:
-+
-+ - Don't raise an exception on error
-+ - Don't call the Python signal handler (don't call PyErr_CheckSignals()) if
-+ a function fails with EINTR: retry directly the interrupted function
-+ - Don't release the GIL to call functions.
-+*/
-+static int
-+pyurandom(void *buffer, Py_ssize_t size, int raise)
- {
-+#if defined(PY_GETRANDOM) || defined(PY_GETENTROPY)
-+ int res;
-+#endif
-+
- if (size < 0) {
-- PyErr_Format(PyExc_ValueError,
-- "negative argument not allowed");
-+ if (raise) {
-+ PyErr_Format(PyExc_ValueError,
-+ "negative argument not allowed");
-+ }
- return -1;
- }
-- if (size == 0)
-+
-+ if (size == 0) {
- return 0;
-+ }
-
- #ifdef MS_WINDOWS
-- return win32_urandom((unsigned char *)buffer, size, 1);
--#elif defined(PY_GETENTROPY)
-- return py_getentropy(buffer, size, 0);
-+ return win32_urandom((unsigned char *)buffer, size, raise);
-+#else
-+
-+#if defined(PY_GETRANDOM) || defined(PY_GETENTROPY)
-+#ifdef PY_GETRANDOM
-+ res = py_getrandom(buffer, size, raise);
- #else
-- return dev_urandom_python((char*)buffer, size);
-+ res = py_getentropy(buffer, size, raise);
-+#endif
-+ if (res < 0) {
-+ return -1;
-+ }
-+ if (res == 1) {
-+ return 0;
-+ }
-+ /* getrandom() or getentropy() function is not available: failed with
-+ ENOSYS, EPERM or EAGAIN. Fall back on reading from /dev/urandom. */
-+#endif
-+
-+ return dev_urandom(buffer, size, raise);
- #endif
- }
-
-+/* Fill buffer with size pseudo-random bytes from the operating system random
-+ number generator (RNG). It is suitable for most cryptographic purposes
-+ except long living private keys for asymmetric encryption.
-+
-+ Return 0 on success. Raise an exception and return -1 on error. */
-+int
-+_PyOS_URandom(void *buffer, Py_ssize_t size)
-+{
-+ return pyurandom(buffer, size, 1);
-+}
-+
- void
- _PyRandom_Init(void)
- {
-@@ -463,13 +558,14 @@ _PyRandom_Init(void)
- }
- }
- else {
--#ifdef MS_WINDOWS
-- (void)win32_urandom(secret, secret_size, 0);
--#elif defined(PY_GETENTROPY)
-- (void)py_getentropy(secret, secret_size, 1);
--#else
-- dev_urandom_noraise(secret, secret_size);
--#endif
-+ int res;
-+
-+ /* _PyRandom_Init() is called very early in the Python initialization
-+ and so exceptions cannot be used (use raise=0). */
-+ res = pyurandom(secret, secret_size, 0);
-+ if (res < 0) {
-+ Py_FatalError("failed to get random numbers to initialize Python");
-+ }
- }
- }
-
-@@ -481,8 +577,6 @@ _PyRandom_Fini(void)
- CryptReleaseContext(hCryptProv, 0);
- hCryptProv = 0;
- }
--#elif defined(PY_GETENTROPY)
-- /* nothing to clean */
- #else
- dev_urandom_close();
- #endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.5.bb
similarity index 65%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.5.bb
index 13df12f..f893b84 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.5.bb
@@ -1,6 +1,7 @@
require recipes-devtools/python/python.inc
-DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
+DEPENDS = "python3-native libffi bzip2 gdbm openssl sqlite3 zlib virtual/libintl xz"
+
PR = "${INC_PR}.0"
PYTHON_MAJMIN = "3.5"
PYTHON_BINABI= "${PYTHON_MAJMIN}m"
@@ -31,20 +32,16 @@
file://unixccompiler.patch \
file://avoid-ncursesw-include-path.patch \
file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
- file://python3-setup.py-no-host-headers-libs.patch \
file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
- file://setup.py-find-libraries-in-staging-dirs.patch \
file://configure.ac-fix-LIBPL.patch \
- file://upstream-random-fixes.patch \
file://0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch \
- file://Fix-29519-weakref-spewing-exceptions-during-interp-f.patch \
file://pass-missing-libraries-to-Extension-for-mul.patch \
"
-SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
-SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"
+SRC_URI[md5sum] = "f3763edf9824d5d3a15f5f646083b6e0"
+SRC_URI[sha256sum] = "063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
# exclude pre-releases for both python 2.x and 3.x
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
@@ -79,6 +76,9 @@
# No ctypes option for python 3
PYTHONLSBOPTS = ""
+PACKAGECONFIG ??= "readline"
+PACKAGECONFIG[readline] = ",,readline"
+
do_configure_append() {
rm -f ${S}/Makefile.orig
autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
@@ -188,16 +188,30 @@
install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
# Remove references to buildmachine paths in target Makefile and _sysconfigdata
sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py \
+ ${PKGD}/${bindir}/python${PYTHON_BINABI}-config
-require python-${PYTHON_MAJMIN}-manifest.inc
+ # Recompile _sysconfigdata after modifying it
+ cd ${PKGD}
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py')"
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=1)"
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=2)"
+ cd -
+}
# manual dependency additions
RPROVIDES_${PN}-modules = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules"
RRECOMMENDS_${PN}-crypt = "openssl"
RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
@@ -216,7 +230,7 @@
# catch all the rest (unsorted)
PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs ${PN}-textutils ${PN}-argparse"
+RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs"
RDEPENDS_${PN}-modules += "${PN}-misc"
FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
@@ -225,3 +239,85 @@
FILES_${PN}-man = "${datadir}/man"
BBCLASSEXTEND = "nativesdk"
+
+RPROVIDES_${PN} += "${PN}-modules"
+
+# We want bytecode precompiled .py files (.pyc's) by default
+# but the user may set it on their own conf
+INCLUDE_PYCS ?= "1"
+
+python(){
+ import json
+
+ filename = os.path.join(d.getVar('THISDIR'), 'python3', 'python3-manifest.json')
+ # This python changes the datastore based on the contents of a file, so mark
+ # that dependency.
+ bb.parse.mark_dependency(d, filename)
+
+ with open(filename) as manifest_file:
+ python_manifest=json.load(manifest_file)
+
+ include_pycs = d.getVar('INCLUDE_PYCS')
+
+ packages = d.getVar('PACKAGES').split()
+ pn = d.getVar('PN')
+
+ newpackages=[]
+ for key in python_manifest:
+ pypackage= pn + '-' + key
+
+ if pypackage not in packages:
+ # We need to prepend, otherwise python-misc gets everything
+ # so we use a new variable
+ newpackages.append(pypackage)
+
+ # "Build" python's manifest FILES, RDEPENDS and SUMMARY
+ d.setVar('FILES_' + pypackage, '')
+ for value in python_manifest[key]['files']:
+ d.appendVar('FILES_' + pypackage, ' ' + value)
+
+ # Add cached files
+ if include_pycs == '1':
+ for value in python_manifest[key]['cached']:
+ d.appendVar('FILES_' + pypackage, ' ' + value)
+
+ d.setVar('RDEPENDS_' + pypackage, '')
+ for value in python_manifest[key]['rdepends']:
+ # Make it work with or without $PN
+ if '${PN}' in value:
+ value=value.split('-')[1]
+ d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
+ d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
+
+ # We need to ensure staticdev packages match for files first so we sort in reverse
+ newpackages.sort(reverse=True)
+ # Prepending so to avoid python-misc getting everything
+ packages = newpackages + packages
+ d.setVar('PACKAGES', ' '.join(packages))
+ d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
+}
+
+# Files needed to create a new manifest
+SRC_URI += "file://create_manifest3.py file://get_module_deps3.py file://python3-manifest.json"
+
+do_create_manifest() {
+ # This task should be run with every new release of Python.
+ # We must ensure that PACKAGECONFIG enables everything when creating
+ # a new manifest, this is to base our new manifest on a complete
+ # native python build, containing all dependencies, otherwise the task
+ # wont be able to find the required files.
+ # e.g. BerkeleyDB is an optional build dependency so it may or may not
+ # be present, we must ensure it is.
+
+ cd ${WORKDIR}
+ # This needs to be executed by python-native and NOT by HOST's python
+ nativepython3 create_manifest3.py
+ cp python3-manifest.json.new ${THISDIR}/python3/python3-manifest.json
+}
+
+# bitbake python -c create_manifest
+addtask do_create_manifest
+
+# Make sure we have native python ready when we create a new manifest
+do_create_manifest[depends] += "python3:do_prepare_recipe_sysroot"
+do_create_manifest[depends] += "python3:do_patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.14.bb
similarity index 68%
rename from import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.14.bb
index 754c029..0a09926 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.14.bb
@@ -1,5 +1,7 @@
require python.inc
+
DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib"
+
PR = "${INC_PR}"
DISTRO_SRC_URI ?= "file://sitecustomize.py"
@@ -26,7 +28,6 @@
file://parallel-makeinst-create-bindir.patch \
file://use_sysroot_ncurses_instead_of_host.patch \
file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
- file://Don-t-use-getentropy-on-Linux.patch \
file://pass-missing-libraries-to-Extension-for-mul.patch \
file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
"
@@ -140,16 +141,19 @@
# Remove references to buildmachine paths in target Makefile and _sysconfigdata
sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
- python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+ (cd ${PKGD}; python -m py_compile ./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py)
}
-require python-${PYTHON_MAJMIN}-manifest.inc
# manual dependency additions
RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
RRECOMMENDS_${PN}-crypt = "openssl"
@@ -193,3 +197,85 @@
RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
BBCLASSEXTEND = "nativesdk"
+
+RPROVIDES_${PN} += "${PN}-modules"
+
+# We want bytecode precompiled .py files (.pyc's) by default
+# but the user may set it on their own conf
+
+INCLUDE_PYCS ?= "1"
+
+python(){
+ import json
+
+ filename = os.path.join(d.getVar('THISDIR'), 'python', 'python2-manifest.json')
+ # This python changes the datastore based on the contents of a file, so mark
+ # that dependency.
+ bb.parse.mark_dependency(d, filename)
+
+ with open(filename) as manifest_file:
+ python_manifest=json.load(manifest_file)
+
+ include_pycs = d.getVar('INCLUDE_PYCS')
+
+ packages = d.getVar('PACKAGES').split()
+ pn = d.getVar('PN')
+
+ newpackages=[]
+
+ for key in python_manifest:
+ pypackage= pn + '-' + key
+
+ if pypackage not in packages:
+ # We need to prepend, otherwise python-misc gets everything
+ # so we use a new variable
+ newpackages.append(pypackage)
+
+ # "Build" python's manifest FILES, RDEPENDS and SUMMARY
+ d.setVar('FILES_' + pypackage, '')
+ for value in python_manifest[key]['files']:
+ d.appendVar('FILES_' + pypackage, ' ' + value)
+ if include_pycs == '1':
+ if value.endswith('.py'):
+ d.appendVar('FILES_' + pypackage, ' ' + value + 'c')
+
+ d.setVar('RDEPENDS_' + pypackage, '')
+ for value in python_manifest[key]['rdepends']:
+ # Make it work with or without $PN
+ if '${PN}' in value:
+ value=value.split('-')[1]
+ d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
+ d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
+
+ # We need to ensure staticdev packages match for files first so we sort in reverse
+ newpackages.sort(reverse=True)
+ # Prepending so to avoid python-misc getting everything
+ packages = newpackages + packages
+ d.setVar('PACKAGES', ' '.join(packages))
+ d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
+}
+
+# Files needed to create a new manifest
+SRC_URI += "file://create_manifest2.py file://get_module_deps2.py file://python2-manifest.json"
+
+do_create_manifest() {
+ # This task should be run with every new release of Python.
+ # We must ensure that PACKAGECONFIG enables everything when creating
+ # a new manifest, this is to base our new manifest on a complete
+ # native python build, containing all dependencies, otherwise the task
+ # wont be able to find the required files.
+ # e.g. BerkeleyDB is an optional build dependency so it may or may not
+ # be present, we must ensure it is.
+
+ cd ${WORKDIR}
+ # This needs to be executed by python-native and NOT by HOST's python
+ nativepython create_manifest2.py
+ cp python2-manifest.json.new ${THISDIR}/python/python2-manifest.json
+}
+
+# bitbake python -c create_manifest
+addtask do_create_manifest
+
+# Make sure we have native python ready when we create a new manifest
+do_create_manifest[depends] += "python:do_prepare_recipe_sysroot"
+do_create_manifest[depends] += "python:do_patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
index 943ca5f..cdc2f51 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "Qemu helper scripts"
LICENSE = "GPLv2"
-RDEPENDS_${PN} = "nativesdk-qemu nativesdk-python3-subprocess \
- nativesdk-python3-shell nativesdk-python3-fcntl \
+RDEPENDS_${PN} = "nativesdk-qemu \
+ nativesdk-python3-shell nativesdk-python3-fcntl nativesdk-python3-logging \
"
PR = "r9"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
index 2a1d14b..dc73df8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
@@ -28,7 +28,7 @@
--target-list=${@get_qemu_target_list(d)} \
--extra-cflags='${CFLAGS}' \
"
-EXTRA_OECONF_append_class-native = " --python=${USRBINPATH}/python2.7"
+EXTRA_OECONF_append_class-native = " --python=python2.7"
EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-Provide-support-for-the-CUSE-TPM.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-Provide-support-for-the-CUSE-TPM.patch
deleted file mode 100644
index 74dc6f5..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-Provide-support-for-the-CUSE-TPM.patch
+++ /dev/null
@@ -1,870 +0,0 @@
-From 8737eef18f39ed087fd911d0a0886e8174d0468c Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 1/4] Provide support for the CUSE TPM
-
-Rather than integrating TPM functionality into QEMU directly
-using the TPM emulation of libtpms, we now integrate an external
-emulated TPM device. This device is expected to implement a Linux
-CUSE interface (CUSE = character device in userspace).
-
-QEMU talks to the CUSE TPM using much functionality of the
-passthrough driver. For example, the TPM commands and responses
-are sent to the CUSE TPM using the read()/write() interface.
-However, some out-of-band control needs to be done using the CUSE
-TPM's ioctls. The CUSE TPM currently defines and implements 15
-different ioctls for controlling certain life-cycle aspects of
-the emulated TPM. The ioctls can be regarded as a replacement for
-direct function calls to a TPM emulator if the TPM were to be
-directly integrated into QEMU.
-
-One of the ioctls allows to get a bitmask of supported capabilities.
-Each returned bit indicates which capabilities have been implemented.
-An include file defining the various ioctls is added to QEMU.
-
-The CUSE TPM and associated tools can be found here:
-
-https://github.com/stefanberger/swtpm
-
-(please use the latest version)
-
-To use the external CUSE TPM, the CUSE TPM should be started as follows:
-
-/usr/bin/swtpm_ioctl -s /dev/vtpm-test
-
-/usr/bin/swtpm_cuse -n vtpm-test
-
-QEMU can then be started using the following parameters:
-
-qemu-system-x86_64 \
- [...] \
- -tpmdev cuse-tpm,id=tpm0,cancel-path=/dev/null,path=/dev/vtpm-test \
- -device tpm-tis,id=tpm0,tpmdev=tpm0 \
- [...]
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Cc: Eric Blake <eblake@redhat.com>
-
-Conflicts:
- docs/qmp-commands.txt
-
-Patch cherry-picked from https://github.com/stefanberger/qemu-tpm, branch v2.8.0+tpm,
-commit 27d6cd856d5a14061955df7a93ee490697a7a174. Applied cleanly except for
-docs/qmp-commands.txt which did not exist yet in qemu 2.7.
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hmp.c | 6 ++
- hw/tpm/tpm_int.h | 1 +
- hw/tpm/tpm_ioctl.h | 215 +++++++++++++++++++++++++++++++++++++
- hw/tpm/tpm_passthrough.c | 274 +++++++++++++++++++++++++++++++++++++++++++++--
- qapi-schema.json | 18 +++-
- qemu-options.hx | 21 +++-
- tpm.c | 11 +-
- 7 files changed, 529 insertions(+), 17 deletions(-)
- create mode 100644 hw/tpm/tpm_ioctl.h
-
-diff --git a/hmp.c b/hmp.c
-index cc2056e9e2..277b45ef5a 100644
---- a/hmp.c
-+++ b/hmp.c
-@@ -883,6 +883,12 @@ void hmp_info_tpm(Monitor *mon, const QDict *qdict)
- tpo->has_cancel_path ? ",cancel-path=" : "",
- tpo->has_cancel_path ? tpo->cancel_path : "");
- break;
-+ case TPM_TYPE_OPTIONS_KIND_CUSE_TPM:
-+ tpo = ti->options->u.passthrough.data;
-+ monitor_printf(mon, "%s%s",
-+ tpo->has_path ? ",path=" : "",
-+ tpo->has_path ? tpo->path : "");
-+ break;
- case TPM_TYPE_OPTIONS_KIND__MAX:
- break;
- }
-diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
-index f2f285b3cc..6b2c9c953a 100644
---- a/hw/tpm/tpm_int.h
-+++ b/hw/tpm/tpm_int.h
-@@ -61,6 +61,7 @@ struct tpm_resp_hdr {
- #define TPM_TAG_RSP_AUTH1_COMMAND 0xc5
- #define TPM_TAG_RSP_AUTH2_COMMAND 0xc6
-
-+#define TPM_SUCCESS 0
- #define TPM_FAIL 9
-
- #define TPM_ORD_ContinueSelfTest 0x53
-diff --git a/hw/tpm/tpm_ioctl.h b/hw/tpm/tpm_ioctl.h
-new file mode 100644
-index 0000000000..a341e15741
---- /dev/null
-+++ b/hw/tpm/tpm_ioctl.h
-@@ -0,0 +1,215 @@
-+/*
-+ * tpm_ioctl.h
-+ *
-+ * (c) Copyright IBM Corporation 2014, 2015.
-+ *
-+ * This file is licensed under the terms of the 3-clause BSD license
-+ */
-+#ifndef _TPM_IOCTL_H_
-+#define _TPM_IOCTL_H_
-+
-+#include <stdint.h>
-+#include <sys/uio.h>
-+#include <sys/types.h>
-+#include <sys/ioctl.h>
-+
-+/*
-+ * Every response from a command involving a TPM command execution must hold
-+ * the ptm_res as the first element.
-+ * ptm_res corresponds to the error code of a command executed by the TPM.
-+ */
-+
-+typedef uint32_t ptm_res;
-+
-+/* PTM_GET_TPMESTABLISHED: get the establishment bit */
-+struct ptm_est {
-+ union {
-+ struct {
-+ ptm_res tpm_result;
-+ unsigned char bit; /* TPM established bit */
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* PTM_RESET_TPMESTABLISHED: reset establishment bit */
-+struct ptm_reset_est {
-+ union {
-+ struct {
-+ uint8_t loc; /* locality to use */
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* PTM_INIT */
-+struct ptm_init {
-+ union {
-+ struct {
-+ uint32_t init_flags; /* see definitions below */
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* above init_flags */
-+#define PTM_INIT_FLAG_DELETE_VOLATILE (1 << 0)
-+ /* delete volatile state file after reading it */
-+
-+/* PTM_SET_LOCALITY */
-+struct ptm_loc {
-+ union {
-+ struct {
-+ uint8_t loc; /* locality to set */
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* PTM_HASH_DATA: hash given data */
-+struct ptm_hdata {
-+ union {
-+ struct {
-+ uint32_t length;
-+ uint8_t data[4096];
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/*
-+ * size of the TPM state blob to transfer; x86_64 can handle 8k,
-+ * ppc64le only ~7k; keep the response below a 4k page size
-+ */
-+#define PTM_STATE_BLOB_SIZE (3 * 1024)
-+
-+/*
-+ * The following is the data structure to get state blobs from the TPM.
-+ * If the size of the state blob exceeds the PTM_STATE_BLOB_SIZE, multiple reads
-+ * with this ioctl and with adjusted offset are necessary. All bytes
-+ * must be transferred and the transfer is done once the last byte has been
-+ * returned.
-+ * It is possible to use the read() interface for reading the data; however,
-+ * the first bytes of the state blob will be part of the response to the ioctl();
-+ * a subsequent read() is only necessary if the total length (totlength) exceeds
-+ * the number of received bytes. seek() is not supported.
-+ */
-+struct ptm_getstate {
-+ union {
-+ struct {
-+ uint32_t state_flags; /* may be: PTM_STATE_FLAG_DECRYPTED */
-+ uint32_t type; /* which blob to pull */
-+ uint32_t offset; /* offset from where to read */
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ uint32_t state_flags; /* may be: PTM_STATE_FLAG_ENCRYPTED */
-+ uint32_t totlength; /* total length that will be transferred */
-+ uint32_t length; /* number of bytes in following buffer */
-+ uint8_t data[PTM_STATE_BLOB_SIZE];
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/* TPM state blob types */
-+#define PTM_BLOB_TYPE_PERMANENT 1
-+#define PTM_BLOB_TYPE_VOLATILE 2
-+#define PTM_BLOB_TYPE_SAVESTATE 3
-+
-+/* state_flags above : */
-+#define PTM_STATE_FLAG_DECRYPTED 1 /* on input: get decrypted state */
-+#define PTM_STATE_FLAG_ENCRYPTED 2 /* on output: state is encrypted */
-+
-+/*
-+ * The following is the data structure to set state blobs in the TPM.
-+ * If the size of the state blob exceeds the PTM_STATE_BLOB_SIZE, multiple
-+ * 'writes' using this ioctl are necessary. The last packet is indicated
-+ * by the length being smaller than the PTM_STATE_BLOB_SIZE.
-+ * The very first packet may have a length indicator of '0' enabling
-+ * a write() with all the bytes from a buffer. If the write() interface
-+ * is used, a final ioctl with a non-full buffer must be made to indicate
-+ * that all data were transferred (a write with 0 bytes would not work).
-+ */
-+struct ptm_setstate {
-+ union {
-+ struct {
-+ uint32_t state_flags; /* may be PTM_STATE_FLAG_ENCRYPTED */
-+ uint32_t type; /* which blob to set */
-+ uint32_t length; /* length of the data;
-+ use 0 on the first packet to
-+ transfer using write() */
-+ uint8_t data[PTM_STATE_BLOB_SIZE];
-+ } req; /* request */
-+ struct {
-+ ptm_res tpm_result;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+/*
-+ * PTM_GET_CONFIG: Data structure to get runtime configuration information
-+ * such as which keys are applied.
-+ */
-+struct ptm_getconfig {
-+ union {
-+ struct {
-+ ptm_res tpm_result;
-+ uint32_t flags;
-+ } resp; /* response */
-+ } u;
-+};
-+
-+#define PTM_CONFIG_FLAG_FILE_KEY 0x1
-+#define PTM_CONFIG_FLAG_MIGRATION_KEY 0x2
-+
-+
-+typedef uint64_t ptm_cap;
-+typedef struct ptm_est ptm_est;
-+typedef struct ptm_reset_est ptm_reset_est;
-+typedef struct ptm_loc ptm_loc;
-+typedef struct ptm_hdata ptm_hdata;
-+typedef struct ptm_init ptm_init;
-+typedef struct ptm_getstate ptm_getstate;
-+typedef struct ptm_setstate ptm_setstate;
-+typedef struct ptm_getconfig ptm_getconfig;
-+
-+/* capability flags returned by PTM_GET_CAPABILITY */
-+#define PTM_CAP_INIT (1)
-+#define PTM_CAP_SHUTDOWN (1<<1)
-+#define PTM_CAP_GET_TPMESTABLISHED (1<<2)
-+#define PTM_CAP_SET_LOCALITY (1<<3)
-+#define PTM_CAP_HASHING (1<<4)
-+#define PTM_CAP_CANCEL_TPM_CMD (1<<5)
-+#define PTM_CAP_STORE_VOLATILE (1<<6)
-+#define PTM_CAP_RESET_TPMESTABLISHED (1<<7)
-+#define PTM_CAP_GET_STATEBLOB (1<<8)
-+#define PTM_CAP_SET_STATEBLOB (1<<9)
-+#define PTM_CAP_STOP (1<<10)
-+#define PTM_CAP_GET_CONFIG (1<<11)
-+
-+enum {
-+ PTM_GET_CAPABILITY = _IOR('P', 0, ptm_cap),
-+ PTM_INIT = _IOWR('P', 1, ptm_init),
-+ PTM_SHUTDOWN = _IOR('P', 2, ptm_res),
-+ PTM_GET_TPMESTABLISHED = _IOR('P', 3, ptm_est),
-+ PTM_SET_LOCALITY = _IOWR('P', 4, ptm_loc),
-+ PTM_HASH_START = _IOR('P', 5, ptm_res),
-+ PTM_HASH_DATA = _IOWR('P', 6, ptm_hdata),
-+ PTM_HASH_END = _IOR('P', 7, ptm_res),
-+ PTM_CANCEL_TPM_CMD = _IOR('P', 8, ptm_res),
-+ PTM_STORE_VOLATILE = _IOR('P', 9, ptm_res),
-+ PTM_RESET_TPMESTABLISHED = _IOWR('P', 10, ptm_reset_est),
-+ PTM_GET_STATEBLOB = _IOWR('P', 11, ptm_getstate),
-+ PTM_SET_STATEBLOB = _IOWR('P', 12, ptm_setstate),
-+ PTM_STOP = _IOR('P', 13, ptm_res),
-+ PTM_GET_CONFIG = _IOR('P', 14, ptm_getconfig),
-+};
-+
-+#endif /* _TPM_IOCTL_H */
-diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
-index e88c0d20bc..050f2ba850 100644
---- a/hw/tpm/tpm_passthrough.c
-+++ b/hw/tpm/tpm_passthrough.c
-@@ -33,6 +33,7 @@
- #include "sysemu/tpm_backend_int.h"
- #include "tpm_tis.h"
- #include "tpm_util.h"
-+#include "tpm_ioctl.h"
-
- #define DEBUG_TPM 0
-
-@@ -45,6 +46,7 @@
- #define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
- #define TPM_PASSTHROUGH(obj) \
- OBJECT_CHECK(TPMPassthruState, (obj), TYPE_TPM_PASSTHROUGH)
-+#define TYPE_TPM_CUSE "tpm-cuse"
-
- static const TPMDriverOps tpm_passthrough_driver;
-
-@@ -71,12 +73,18 @@ struct TPMPassthruState {
- bool had_startup_error;
-
- TPMVersion tpm_version;
-+ ptm_cap cuse_cap; /* capabilities of the CUSE TPM */
-+ uint8_t cur_locty_number; /* last set locality */
- };
-
- typedef struct TPMPassthruState TPMPassthruState;
-
- #define TPM_PASSTHROUGH_DEFAULT_DEVICE "/dev/tpm0"
-
-+#define TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt) (tpm_pt->cuse_cap != 0)
-+
-+#define TPM_CUSE_IMPLEMENTS_ALL(S, cap) (((S)->cuse_cap & (cap)) == (cap))
-+
- /* functions */
-
- static void tpm_passthrough_cancel_cmd(TPMBackend *tb);
-@@ -148,7 +156,28 @@ static bool tpm_passthrough_is_selftest(const uint8_t *in, uint32_t in_len)
- return false;
- }
-
-+static int tpm_passthrough_set_locality(TPMPassthruState *tpm_pt,
-+ uint8_t locty_number)
-+{
-+ ptm_loc loc;
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (tpm_pt->cur_locty_number != locty_number) {
-+ loc.u.req.loc = locty_number;
-+ if (ioctl(tpm_pt->tpm_fd, PTM_SET_LOCALITY, &loc) < 0) {
-+ error_report("tpm_cuse: could not set locality on "
-+ "CUSE TPM: %s",
-+ strerror(errno));
-+ return -1;
-+ }
-+ tpm_pt->cur_locty_number = locty_number;
-+ }
-+ }
-+ return 0;
-+}
-+
- static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
-+ uint8_t locality_number,
- const uint8_t *in, uint32_t in_len,
- uint8_t *out, uint32_t out_len,
- bool *selftest_done)
-@@ -157,6 +186,11 @@ static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
- bool is_selftest;
- const struct tpm_resp_hdr *hdr;
-
-+ ret = tpm_passthrough_set_locality(tpm_pt, locality_number);
-+ if (ret < 0) {
-+ goto err_exit;
-+ }
-+
- tpm_pt->tpm_op_canceled = false;
- tpm_pt->tpm_executing = true;
- *selftest_done = false;
-@@ -207,10 +241,12 @@ err_exit:
- }
-
- static int tpm_passthrough_unix_transfer(TPMPassthruState *tpm_pt,
-+ uint8_t locality_number,
- const TPMLocality *locty_data,
- bool *selftest_done)
- {
- return tpm_passthrough_unix_tx_bufs(tpm_pt,
-+ locality_number,
- locty_data->w_buffer.buffer,
- locty_data->w_offset,
- locty_data->r_buffer.buffer,
-@@ -231,6 +267,7 @@ static void tpm_passthrough_worker_thread(gpointer data,
- switch (cmd) {
- case TPM_BACKEND_CMD_PROCESS_CMD:
- tpm_passthrough_unix_transfer(tpm_pt,
-+ thr_parms->tpm_state->locty_number,
- thr_parms->tpm_state->locty_data,
- &selftest_done);
-
-@@ -247,6 +284,93 @@ static void tpm_passthrough_worker_thread(gpointer data,
- }
-
- /*
-+ * Gracefully shut down the external CUSE TPM
-+ */
-+static void tpm_passthrough_shutdown(TPMPassthruState *tpm_pt)
-+{
-+ ptm_res res;
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (ioctl(tpm_pt->tpm_fd, PTM_SHUTDOWN, &res) < 0) {
-+ error_report("tpm_cuse: Could not cleanly shut down "
-+ "the CUSE TPM: %s",
-+ strerror(errno));
-+ }
-+ }
-+}
-+
-+/*
-+ * Probe for the CUSE TPM by sending an ioctl() requesting its
-+ * capability flags.
-+ */
-+static int tpm_passthrough_cuse_probe(TPMPassthruState *tpm_pt)
-+{
-+ int rc = 0;
-+
-+ if (ioctl(tpm_pt->tpm_fd, PTM_GET_CAPABILITY, &tpm_pt->cuse_cap) < 0) {
-+ error_report("Error: CUSE TPM was requested, but probing failed");
-+ rc = -1;
-+ }
-+
-+ return rc;
-+}
-+
-+static int tpm_passthrough_cuse_check_caps(TPMPassthruState *tpm_pt)
-+{
-+ int rc = 0;
-+ ptm_cap caps = 0;
-+ const char *tpm = NULL;
-+
-+ /* check for min. required capabilities */
-+ switch (tpm_pt->tpm_version) {
-+ case TPM_VERSION_1_2:
-+ caps = PTM_CAP_INIT | PTM_CAP_SHUTDOWN | PTM_CAP_GET_TPMESTABLISHED |
-+ PTM_CAP_SET_LOCALITY;
-+ tpm = "1.2";
-+ break;
-+ case TPM_VERSION_2_0:
-+ caps = PTM_CAP_INIT | PTM_CAP_SHUTDOWN | PTM_CAP_GET_TPMESTABLISHED |
-+ PTM_CAP_SET_LOCALITY | PTM_CAP_RESET_TPMESTABLISHED;
-+ tpm = "2";
-+ break;
-+ case TPM_VERSION_UNSPEC:
-+ error_report("tpm_cuse: %s: TPM version has not been set",
-+ __func__);
-+ return -1;
-+ }
-+
-+ if (!TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, caps)) {
-+ error_report("tpm_cuse: TPM does not implement minimum set of required "
-+ "capabilities for TPM %s (0x%x)", tpm, (int)caps);
-+ rc = -1;
-+ }
-+
-+ return rc;
-+}
-+
-+/*
-+ * Initialize the external CUSE TPM
-+ */
-+static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt)
-+{
-+ int rc = 0;
-+ ptm_init init = {
-+ .u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE,
-+ };
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (ioctl(tpm_pt->tpm_fd, PTM_INIT, &init) < 0) {
-+ error_report("tpm_cuse: Detected CUSE TPM but could not "
-+ "send INIT: %s",
-+ strerror(errno));
-+ rc = -1;
-+ }
-+ }
-+
-+ return rc;
-+}
-+
-+/*
- * Start the TPM (thread). If it had been started before, then terminate
- * and start it again.
- */
-@@ -261,6 +385,8 @@ static int tpm_passthrough_startup_tpm(TPMBackend *tb)
- tpm_passthrough_worker_thread,
- &tpm_pt->tpm_thread_params);
-
-+ tpm_passthrough_cuse_init(tpm_pt);
-+
- return 0;
- }
-
-@@ -291,14 +417,43 @@ static int tpm_passthrough_init(TPMBackend *tb, TPMState *s,
-
- static bool tpm_passthrough_get_tpm_established_flag(TPMBackend *tb)
- {
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+ ptm_est est;
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (ioctl(tpm_pt->tpm_fd, PTM_GET_TPMESTABLISHED, &est) < 0) {
-+ error_report("tpm_cuse: Could not get the TPM established "
-+ "flag from the CUSE TPM: %s",
-+ strerror(errno));
-+ return false;
-+ }
-+ return (est.u.resp.bit != 0);
-+ }
- return false;
- }
-
- static int tpm_passthrough_reset_tpm_established_flag(TPMBackend *tb,
- uint8_t locty)
- {
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+ int rc = 0;
-+ ptm_reset_est ptmreset_est;
-+
- /* only a TPM 2.0 will support this */
-- return 0;
-+ if (tpm_pt->tpm_version == TPM_VERSION_2_0) {
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ ptmreset_est.u.req.loc = tpm_pt->cur_locty_number;
-+
-+ if (ioctl(tpm_pt->tpm_fd, PTM_RESET_TPMESTABLISHED,
-+ &ptmreset_est) < 0) {
-+ error_report("tpm_cuse: Could not reset the establishment bit "
-+ "failed: %s",
-+ strerror(errno));
-+ rc = -1;
-+ }
-+ }
-+ }
-+ return rc;
- }
-
- static bool tpm_passthrough_get_startup_error(TPMBackend *tb)
-@@ -329,7 +484,8 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb)
- static void tpm_passthrough_cancel_cmd(TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-- int n;
-+ ptm_res res;
-+ static bool error_printed;
-
- /*
- * As of Linux 3.7 the tpm_tis driver does not properly cancel
-@@ -338,17 +494,34 @@ static void tpm_passthrough_cancel_cmd(TPMBackend *tb)
- * command, e.g., a command executed on the host.
- */
- if (tpm_pt->tpm_executing) {
-- if (tpm_pt->cancel_fd >= 0) {
-- n = write(tpm_pt->cancel_fd, "-", 1);
-- if (n != 1) {
-- error_report("Canceling TPM command failed: %s",
-- strerror(errno));
-- } else {
-- tpm_pt->tpm_op_canceled = true;
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ if (TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, PTM_CAP_CANCEL_TPM_CMD)) {
-+ if (ioctl(tpm_pt->tpm_fd, PTM_CANCEL_TPM_CMD, &res) < 0) {
-+ error_report("tpm_cuse: Could not cancel command on "
-+ "CUSE TPM: %s",
-+ strerror(errno));
-+ } else if (res != TPM_SUCCESS) {
-+ if (!error_printed) {
-+ error_report("TPM error code from command "
-+ "cancellation of CUSE TPM: 0x%x", res);
-+ error_printed = true;
-+ }
-+ } else {
-+ tpm_pt->tpm_op_canceled = true;
-+ }
- }
- } else {
-- error_report("Cannot cancel TPM command due to missing "
-- "TPM sysfs cancel entry");
-+ if (tpm_pt->cancel_fd >= 0) {
-+ if (write(tpm_pt->cancel_fd, "-", 1) != 1) {
-+ error_report("Canceling TPM command failed: %s",
-+ strerror(errno));
-+ } else {
-+ tpm_pt->tpm_op_canceled = true;
-+ }
-+ } else {
-+ error_report("Cannot cancel TPM command due to missing "
-+ "TPM sysfs cancel entry");
-+ }
- }
- }
- }
-@@ -378,6 +551,11 @@ static int tpm_passthrough_open_sysfs_cancel(TPMBackend *tb)
- char *dev;
- char path[PATH_MAX];
-
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ /* not needed, but so we have a fd */
-+ return qemu_open("/dev/null", O_WRONLY);
-+ }
-+
- if (tb->cancel_path) {
- fd = qemu_open(tb->cancel_path, O_WRONLY);
- if (fd < 0) {
-@@ -412,12 +590,22 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
- const char *value;
-+ bool have_cuse = false;
-+
-+ value = qemu_opt_get(opts, "type");
-+ if (value != NULL && !strcmp("cuse-tpm", value)) {
-+ have_cuse = true;
-+ }
-
- value = qemu_opt_get(opts, "cancel-path");
- tb->cancel_path = g_strdup(value);
-
- value = qemu_opt_get(opts, "path");
- if (!value) {
-+ if (have_cuse) {
-+ error_report("Missing path to access CUSE TPM");
-+ goto err_free_parameters;
-+ }
- value = TPM_PASSTHROUGH_DEFAULT_DEVICE;
- }
-
-@@ -432,15 +620,36 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- goto err_free_parameters;
- }
-
-+ tpm_pt->cur_locty_number = ~0;
-+
-+ if (have_cuse) {
-+ if (tpm_passthrough_cuse_probe(tpm_pt)) {
-+ goto err_close_tpmdev;
-+ }
-+ /* init TPM for probing */
-+ if (tpm_passthrough_cuse_init(tpm_pt)) {
-+ goto err_close_tpmdev;
-+ }
-+ }
-+
- if (tpm_util_test_tpmdev(tpm_pt->tpm_fd, &tpm_pt->tpm_version)) {
- error_report("'%s' is not a TPM device.",
- tpm_pt->tpm_dev);
- goto err_close_tpmdev;
- }
-
-+ if (have_cuse) {
-+ if (tpm_passthrough_cuse_check_caps(tpm_pt)) {
-+ goto err_close_tpmdev;
-+ }
-+ }
-+
-+
- return 0;
-
- err_close_tpmdev:
-+ tpm_passthrough_shutdown(tpm_pt);
-+
- qemu_close(tpm_pt->tpm_fd);
- tpm_pt->tpm_fd = -1;
-
-@@ -491,6 +700,8 @@ static void tpm_passthrough_destroy(TPMBackend *tb)
-
- tpm_backend_thread_end(&tpm_pt->tbt);
-
-+ tpm_passthrough_shutdown(tpm_pt);
-+
- qemu_close(tpm_pt->tpm_fd);
- qemu_close(tpm_pt->cancel_fd);
-
-@@ -564,3 +775,44 @@ static void tpm_passthrough_register(void)
- }
-
- type_init(tpm_passthrough_register)
-+
-+/* CUSE TPM */
-+static const char *tpm_passthrough_cuse_create_desc(void)
-+{
-+ return "CUSE TPM backend driver";
-+}
-+
-+static const TPMDriverOps tpm_cuse_driver = {
-+ .type = TPM_TYPE_CUSE_TPM,
-+ .opts = tpm_passthrough_cmdline_opts,
-+ .desc = tpm_passthrough_cuse_create_desc,
-+ .create = tpm_passthrough_create,
-+ .destroy = tpm_passthrough_destroy,
-+ .init = tpm_passthrough_init,
-+ .startup_tpm = tpm_passthrough_startup_tpm,
-+ .realloc_buffer = tpm_passthrough_realloc_buffer,
-+ .reset = tpm_passthrough_reset,
-+ .had_startup_error = tpm_passthrough_get_startup_error,
-+ .deliver_request = tpm_passthrough_deliver_request,
-+ .cancel_cmd = tpm_passthrough_cancel_cmd,
-+ .get_tpm_established_flag = tpm_passthrough_get_tpm_established_flag,
-+ .reset_tpm_established_flag = tpm_passthrough_reset_tpm_established_flag,
-+ .get_tpm_version = tpm_passthrough_get_tpm_version,
-+};
-+
-+static const TypeInfo tpm_cuse_info = {
-+ .name = TYPE_TPM_CUSE,
-+ .parent = TYPE_TPM_BACKEND,
-+ .instance_size = sizeof(TPMPassthruState),
-+ .class_init = tpm_passthrough_class_init,
-+ .instance_init = tpm_passthrough_inst_init,
-+ .instance_finalize = tpm_passthrough_inst_finalize,
-+};
-+
-+static void tpm_cuse_register(void)
-+{
-+ type_register_static(&tpm_cuse_info);
-+ tpm_register_driver(&tpm_cuse_driver);
-+}
-+
-+type_init(tpm_cuse_register)
-diff --git a/qapi-schema.json b/qapi-schema.json
-index 5658723b37..53120d0f63 100644
---- a/qapi-schema.json
-+++ b/qapi-schema.json
-@@ -3522,10 +3522,12 @@
- # An enumeration of TPM types
- #
- # @passthrough: TPM passthrough type
-+# @cuse-tpm: CUSE TPM type
-+# Since: 2.6
- #
- # Since: 1.5
- ##
--{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
-+{ 'enum': 'TpmType', 'data': [ 'passthrough', 'cuse-tpm' ] }
-
- ##
- # @query-tpm-types:
-@@ -3554,6 +3556,17 @@
- '*cancel-path' : 'str'} }
-
- ##
-+# @TPMCuseOptions:
-+#
-+# Information about the CUSE TPM type
-+#
-+# @path: string describing the path used for accessing the TPM device
-+#
-+# Since: 2.6
-+##
-+{ 'struct': 'TPMCuseOptions', 'data': { 'path' : 'str'}}
-+
-+##
- # @TpmTypeOptions:
- #
- # A union referencing different TPM backend types' configuration options
-@@ -3563,7 +3576,8 @@
- # Since: 1.5
- ##
- { 'union': 'TpmTypeOptions',
-- 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
-+ 'data': { 'passthrough' : 'TPMPassthroughOptions',
-+ 'cuse-tpm' : 'TPMCuseOptions' } }
-
- ##
- # @TpmInfo:
-diff --git a/qemu-options.hx b/qemu-options.hx
-index a71aaf8ea8..e0f1d8e676 100644
---- a/qemu-options.hx
-+++ b/qemu-options.hx
-@@ -2763,7 +2763,10 @@ DEF("tpmdev", HAS_ARG, QEMU_OPTION_tpmdev, \
- "-tpmdev passthrough,id=id[,path=path][,cancel-path=path]\n"
- " use path to provide path to a character device; default is /dev/tpm0\n"
- " use cancel-path to provide path to TPM's cancel sysfs entry; if\n"
-- " not provided it will be searched for in /sys/class/misc/tpm?/device\n",
-+ " not provided it will be searched for in /sys/class/misc/tpm?/device\n"
-+ "-tpmdev cuse-tpm,id=id,path=path\n"
-+ " use path to provide path to a character device to talk to the\n"
-+ " TPM emulator providing a CUSE interface\n",
- QEMU_ARCH_ALL)
- STEXI
-
-@@ -2772,8 +2775,8 @@ The general form of a TPM device option is:
-
- @item -tpmdev @var{backend} ,id=@var{id} [,@var{options}]
- @findex -tpmdev
--Backend type must be:
--@option{passthrough}.
-+Backend type must be either one of the following:
-+@option{passthrough}, @option{cuse-tpm}.
-
- The specific backend type will determine the applicable options.
- The @code{-tpmdev} option creates the TPM backend and requires a
-@@ -2823,6 +2826,18 @@ To create a passthrough TPM use the following two options:
- Note that the @code{-tpmdev} id is @code{tpm0} and is referenced by
- @code{tpmdev=tpm0} in the device option.
-
-+@item -tpmdev cuse-tpm, id=@var{id}, path=@var{path}
-+
-+(Linux-host only) Enable access to a TPM emulator with a CUSE interface.
-+
-+@option{path} specifies the path to the CUSE TPM character device.
-+
-+To create a backend device accessing the CUSE TPM emulator using /dev/vtpm
-+use the following two options:
-+@example
-+-tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm -device tpm-tis,tpmdev=tpm0
-+@end example
-+
- @end table
-
- ETEXI
-diff --git a/tpm.c b/tpm.c
-index 9a7c7114d3..5ec2373286 100644
---- a/tpm.c
-+++ b/tpm.c
-@@ -25,7 +25,7 @@ static QLIST_HEAD(, TPMBackend) tpm_backends =
-
-
- #define TPM_MAX_MODELS 1
--#define TPM_MAX_DRIVERS 1
-+#define TPM_MAX_DRIVERS 2
-
- static TPMDriverOps const *be_drivers[TPM_MAX_DRIVERS] = {
- NULL,
-@@ -272,6 +272,15 @@ static TPMInfo *qmp_query_tpm_inst(TPMBackend *drv)
- tpo->has_cancel_path = true;
- }
- break;
-+ case TPM_TYPE_CUSE_TPM:
-+ res->options->type = TPM_TYPE_OPTIONS_KIND_CUSE_TPM;
-+ tpo = g_new0(TPMPassthroughOptions, 1);
-+ res->options->u.passthrough.data = tpo;
-+ if (drv->path) {
-+ tpo->path = g_strdup(drv->path);
-+ tpo->has_path = true;
-+ }
-+ break;
- case TPM_TYPE__MAX:
- break;
- }
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
new file mode 100644
index 0000000..f90cae6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
@@ -0,0 +1,67 @@
+From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Fri, 23 Mar 2018 18:26:45 +0000
+Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
+ DISAS_EXIT
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In OE project 4.15 linux kernel boot hang was observed under
+single cpu aarch64 qemu. Kernel code was in a loop waiting for
+vtimer arrival, spinning in TC generated blocks, while interrupt
+was pending unprocessed. This happened because when qemu tried to
+handle vtimer interrupt target had interrupts disabled, as
+result flag indicating TCG exit, cpu->icount_decr.u16.high,
+was cleared but arm_cpu_exec_interrupt function did not call
+arm_cpu_do_interrupt to process interrupt. Later when target
+reenabled interrupts, it happened without exit into main loop, so
+following code that waited for result of interrupt execution
+run in infinite loop.
+
+To solve the problem instructions that operate on CPU sys state
+(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
+should be considered as DISAS_EXIT variant, and should be
+forced to exit back to main loop so qemu will have a chance
+processing pending CPU state updates, including pending
+interrupts.
+
+This change brings consistency with how DISAS_UPDATE is treated
+in aarch32 case.
+
+CC: Peter Maydell <peter.maydell@linaro.org>
+CC: Alex Bennée <alex.bennee@linaro.org>
+CC: qemu-stable@nongnu.org
+Suggested-by: Peter Maydell <peter.maydell@linaro.org>
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
+Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
+Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
+Upstream-Status: Backport
+---
+ target/arm/translate-a64.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
+index 31ff047..327513e 100644
+--- a/target/arm/translate-a64.c
++++ b/target/arm/translate-a64.c
+@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
+ case DISAS_UPDATE:
+ gen_a64_set_pc_im(dc->pc);
+ /* fall through */
+- case DISAS_JUMP:
+- tcg_gen_lookup_and_goto_ptr();
+- break;
+ case DISAS_EXIT:
+ tcg_gen_exit_tb(0);
+ break;
++ case DISAS_JUMP:
++ tcg_gen_lookup_and_goto_ptr();
++ break;
+ case DISAS_NORETURN:
+ case DISAS_SWI:
+ break;
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0002-Introduce-condition-to-notify-waiters-of-completed-c.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0002-Introduce-condition-to-notify-waiters-of-completed-c.patch
deleted file mode 100644
index c88c98e..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0002-Introduce-condition-to-notify-waiters-of-completed-c.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From b5ffd3aa4e9bd4edb09cc84c46f78da72697a946 Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 2/4] Introduce condition to notify waiters of completed
- command
-
-Introduce a lock and a condition to notify anyone waiting for the completion
-of the execution of a TPM command by the backend (thread). The backend
-uses the condition to signal anyone waiting for command completion.
-We need to place the condition in two locations: one is invoked by the
-backend thread, the other by the bottom half thread.
-We will use the signalling to wait for command completion before VM
-suspend.
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hw/tpm/tpm_int.h | 3 +++
- hw/tpm/tpm_tis.c | 14 ++++++++++++++
- 2 files changed, 17 insertions(+)
-
-diff --git a/hw/tpm/tpm_int.h b/hw/tpm/tpm_int.h
-index 6b2c9c953a..70be1ad8d9 100644
---- a/hw/tpm/tpm_int.h
-+++ b/hw/tpm/tpm_int.h
-@@ -30,6 +30,9 @@ struct TPMState {
- char *backend;
- TPMBackend *be_driver;
- TPMVersion be_tpm_version;
-+
-+ QemuMutex state_lock;
-+ QemuCond cmd_complete;
- };
-
- #define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS)
-diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
-index 381e7266ea..14d9e83ea2 100644
---- a/hw/tpm/tpm_tis.c
-+++ b/hw/tpm/tpm_tis.c
-@@ -368,6 +368,8 @@ static void tpm_tis_receive_bh(void *opaque)
- TPMTISEmuState *tis = &s->s.tis;
- uint8_t locty = s->locty_number;
-
-+ qemu_mutex_lock(&s->state_lock);
-+
- tpm_tis_sts_set(&tis->loc[locty],
- TPM_TIS_STS_VALID | TPM_TIS_STS_DATA_AVAILABLE);
- tis->loc[locty].state = TPM_TIS_STATE_COMPLETION;
-@@ -384,6 +386,10 @@ static void tpm_tis_receive_bh(void *opaque)
- tpm_tis_raise_irq(s, locty,
- TPM_TIS_INT_DATA_AVAILABLE | TPM_TIS_INT_STS_VALID);
- #endif
-+
-+ /* notify of completed command */
-+ qemu_cond_signal(&s->cmd_complete);
-+ qemu_mutex_unlock(&s->state_lock);
- }
-
- /*
-@@ -403,6 +409,11 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty,
- }
- }
-
-+ qemu_mutex_lock(&s->state_lock);
-+ /* notify of completed command */
-+ qemu_cond_signal(&s->cmd_complete);
-+ qemu_mutex_unlock(&s->state_lock);
-+
- qemu_bh_schedule(tis->bh);
- }
-
-@@ -1072,6 +1083,9 @@ static void tpm_tis_initfn(Object *obj)
- memory_region_init_io(&s->mmio, OBJECT(s), &tpm_tis_memory_ops,
- s, "tpm-tis-mmio",
- TPM_TIS_NUM_LOCALITIES << TPM_TIS_LOCALITY_SHIFT);
-+
-+ qemu_mutex_init(&s->state_lock);
-+ qemu_cond_init(&s->cmd_complete);
- }
-
- static void tpm_tis_class_init(ObjectClass *klass, void *data)
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0003-Introduce-condition-in-TPM-backend-for-notification.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0003-Introduce-condition-in-TPM-backend-for-notification.patch
deleted file mode 100644
index e58f019..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0003-Introduce-condition-in-TPM-backend-for-notification.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 732a8e046948fd62b32cd1dd76a6798eb1caf4d6 Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 3/4] Introduce condition in TPM backend for notification
-
-TPM backends will suspend independently of the frontends. Also
-here we need to be able to wait for the TPM command to have been
-completely processed.
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hw/tpm/tpm_passthrough.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
-index 050f2ba850..44739ebad2 100644
---- a/hw/tpm/tpm_passthrough.c
-+++ b/hw/tpm/tpm_passthrough.c
-@@ -75,6 +75,10 @@ struct TPMPassthruState {
- TPMVersion tpm_version;
- ptm_cap cuse_cap; /* capabilities of the CUSE TPM */
- uint8_t cur_locty_number; /* last set locality */
-+
-+ QemuMutex state_lock;
-+ QemuCond cmd_complete; /* singnaled once tpm_busy is false */
-+ bool tpm_busy;
- };
-
- typedef struct TPMPassthruState TPMPassthruState;
-@@ -274,6 +278,11 @@ static void tpm_passthrough_worker_thread(gpointer data,
- thr_parms->recv_data_callback(thr_parms->tpm_state,
- thr_parms->tpm_state->locty_number,
- selftest_done);
-+ /* result delivered */
-+ qemu_mutex_lock(&tpm_pt->state_lock);
-+ tpm_pt->tpm_busy = false;
-+ qemu_cond_signal(&tpm_pt->cmd_complete);
-+ qemu_mutex_unlock(&tpm_pt->state_lock);
- break;
- case TPM_BACKEND_CMD_INIT:
- case TPM_BACKEND_CMD_END:
-@@ -401,6 +410,7 @@ static void tpm_passthrough_reset(TPMBackend *tb)
- tpm_backend_thread_end(&tpm_pt->tbt);
-
- tpm_pt->had_startup_error = false;
-+ tpm_pt->tpm_busy = false;
- }
-
- static int tpm_passthrough_init(TPMBackend *tb, TPMState *s,
-@@ -478,6 +488,11 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-
-+ /* TPM considered busy once TPM Request scheduled for processing */
-+ qemu_mutex_lock(&tpm_pt->state_lock);
-+ tpm_pt->tpm_busy = true;
-+ qemu_mutex_unlock(&tpm_pt->state_lock);
-+
- tpm_backend_thread_deliver_request(&tpm_pt->tbt);
- }
-
-@@ -746,6 +761,11 @@ static const TPMDriverOps tpm_passthrough_driver = {
-
- static void tpm_passthrough_inst_init(Object *obj)
- {
-+ TPMBackend *tb = TPM_BACKEND(obj);
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+
-+ qemu_mutex_init(&tpm_pt->state_lock);
-+ qemu_cond_init(&tpm_pt->cmd_complete);
- }
-
- static void tpm_passthrough_inst_finalize(Object *obj)
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch
deleted file mode 100644
index f1dbaff..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch
+++ /dev/null
@@ -1,719 +0,0 @@
-From 5e9dd9063f514447ea4f54046793f4f01c297ed4 Mon Sep 17 00:00:00 2001
-From: Stefan Berger <stefanb@linux.vnet.ibm.com>
-Date: Sat, 31 Dec 2016 11:23:32 -0500
-Subject: [PATCH 4/4] Add support for VM suspend/resume for TPM TIS
-
-Extend the TPM TIS code to support suspend/resume. In case a command
-is being processed by the external TPM when suspending, wait for the command
-to complete to catch the result. In case the bottom half did not run,
-run the one function the bottom half is supposed to run. This then
-makes the resume operation work.
-
-The passthrough backend does not support suspend/resume operation
-and is therefore blocked from suspend/resume and migration.
-
-The CUSE TPM's supported capabilities are tested and if sufficient
-capabilities are implemented, suspend/resume, snapshotting and
-migration are supported by the CUSE TPM.
-
-Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
-
-Upstream-Status: Pending [https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg00252.html]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- hw/tpm/tpm_passthrough.c | 130 +++++++++++++++++++++++--
- hw/tpm/tpm_tis.c | 137 +++++++++++++++++++++++++-
- hw/tpm/tpm_tis.h | 2 +
- hw/tpm/tpm_util.c | 223 +++++++++++++++++++++++++++++++++++++++++++
- hw/tpm/tpm_util.h | 7 ++
- include/sysemu/tpm_backend.h | 12 +++
- 6 files changed, 503 insertions(+), 8 deletions(-)
-
-diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
-index 44739ebad2..bc8072d0bc 100644
---- a/hw/tpm/tpm_passthrough.c
-+++ b/hw/tpm/tpm_passthrough.c
-@@ -34,6 +34,8 @@
- #include "tpm_tis.h"
- #include "tpm_util.h"
- #include "tpm_ioctl.h"
-+#include "migration/migration.h"
-+#include "qapi/error.h"
-
- #define DEBUG_TPM 0
-
-@@ -49,6 +51,7 @@
- #define TYPE_TPM_CUSE "tpm-cuse"
-
- static const TPMDriverOps tpm_passthrough_driver;
-+static const VMStateDescription vmstate_tpm_cuse;
-
- /* data structures */
- typedef struct TPMPassthruThreadParams {
-@@ -79,6 +82,10 @@ struct TPMPassthruState {
- QemuMutex state_lock;
- QemuCond cmd_complete; /* singnaled once tpm_busy is false */
- bool tpm_busy;
-+
-+ Error *migration_blocker;
-+
-+ TPMBlobBuffers tpm_blobs;
- };
-
- typedef struct TPMPassthruState TPMPassthruState;
-@@ -306,6 +313,10 @@ static void tpm_passthrough_shutdown(TPMPassthruState *tpm_pt)
- strerror(errno));
- }
- }
-+ if (tpm_pt->migration_blocker) {
-+ migrate_del_blocker(tpm_pt->migration_blocker);
-+ error_free(tpm_pt->migration_blocker);
-+ }
- }
-
- /*
-@@ -360,12 +371,14 @@ static int tpm_passthrough_cuse_check_caps(TPMPassthruState *tpm_pt)
- /*
- * Initialize the external CUSE TPM
- */
--static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt)
-+static int tpm_passthrough_cuse_init(TPMPassthruState *tpm_pt,
-+ bool is_resume)
- {
- int rc = 0;
-- ptm_init init = {
-- .u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE,
-- };
-+ ptm_init init;
-+ if (is_resume) {
-+ init.u.req.init_flags = PTM_INIT_FLAG_DELETE_VOLATILE;
-+ }
-
- if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
- if (ioctl(tpm_pt->tpm_fd, PTM_INIT, &init) < 0) {
-@@ -394,7 +407,7 @@ static int tpm_passthrough_startup_tpm(TPMBackend *tb)
- tpm_passthrough_worker_thread,
- &tpm_pt->tpm_thread_params);
-
-- tpm_passthrough_cuse_init(tpm_pt);
-+ tpm_passthrough_cuse_init(tpm_pt, false);
-
- return 0;
- }
-@@ -466,6 +479,32 @@ static int tpm_passthrough_reset_tpm_established_flag(TPMBackend *tb,
- return rc;
- }
-
-+static int tpm_cuse_get_state_blobs(TPMBackend *tb,
-+ bool decrypted_blobs,
-+ TPMBlobBuffers *tpm_blobs)
-+{
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+
-+ assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt));
-+
-+ return tpm_util_cuse_get_state_blobs(tpm_pt->tpm_fd, decrypted_blobs,
-+ tpm_blobs);
-+}
-+
-+static int tpm_cuse_set_state_blobs(TPMBackend *tb,
-+ TPMBlobBuffers *tpm_blobs)
-+{
-+ TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-+
-+ assert(TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt));
-+
-+ if (tpm_util_cuse_set_state_blobs(tpm_pt->tpm_fd, tpm_blobs)) {
-+ return 1;
-+ }
-+
-+ return tpm_passthrough_cuse_init(tpm_pt, true);
-+}
-+
- static bool tpm_passthrough_get_startup_error(TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-@@ -488,7 +527,7 @@ static void tpm_passthrough_deliver_request(TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-
-- /* TPM considered busy once TPM Request scheduled for processing */
-+ /* TPM considered busy once TPM request scheduled for processing */
- qemu_mutex_lock(&tpm_pt->state_lock);
- tpm_pt->tpm_busy = true;
- qemu_mutex_unlock(&tpm_pt->state_lock);
-@@ -601,6 +640,25 @@ static int tpm_passthrough_open_sysfs_cancel(TPMBackend *tb)
- return fd;
- }
-
-+static void tpm_passthrough_block_migration(TPMPassthruState *tpm_pt)
-+{
-+ ptm_cap caps;
-+
-+ if (TPM_PASSTHROUGH_USES_CUSE_TPM(tpm_pt)) {
-+ caps = PTM_CAP_GET_STATEBLOB | PTM_CAP_SET_STATEBLOB |
-+ PTM_CAP_STOP;
-+ if (!TPM_CUSE_IMPLEMENTS_ALL(tpm_pt, caps)) {
-+ error_setg(&tpm_pt->migration_blocker,
-+ "Migration disabled: CUSE TPM lacks necessary capabilities");
-+ migrate_add_blocker(tpm_pt->migration_blocker);
-+ }
-+ } else {
-+ error_setg(&tpm_pt->migration_blocker,
-+ "Migration disabled: Passthrough TPM does not support migration");
-+ migrate_add_blocker(tpm_pt->migration_blocker);
-+ }
-+}
-+
- static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- {
- TPMPassthruState *tpm_pt = TPM_PASSTHROUGH(tb);
-@@ -642,7 +700,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- goto err_close_tpmdev;
- }
- /* init TPM for probing */
-- if (tpm_passthrough_cuse_init(tpm_pt)) {
-+ if (tpm_passthrough_cuse_init(tpm_pt, false)) {
- goto err_close_tpmdev;
- }
- }
-@@ -659,6 +717,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
- }
- }
-
-+ tpm_passthrough_block_migration(tpm_pt);
-
- return 0;
-
-@@ -766,10 +825,13 @@ static void tpm_passthrough_inst_init(Object *obj)
-
- qemu_mutex_init(&tpm_pt->state_lock);
- qemu_cond_init(&tpm_pt->cmd_complete);
-+
-+ vmstate_register(NULL, -1, &vmstate_tpm_cuse, obj);
- }
-
- static void tpm_passthrough_inst_finalize(Object *obj)
- {
-+ vmstate_unregister(NULL, &vmstate_tpm_cuse, obj);
- }
-
- static void tpm_passthrough_class_init(ObjectClass *klass, void *data)
-@@ -802,6 +864,60 @@ static const char *tpm_passthrough_cuse_create_desc(void)
- return "CUSE TPM backend driver";
- }
-
-+static void tpm_cuse_pre_save(void *opaque)
-+{
-+ TPMPassthruState *tpm_pt = opaque;
-+ TPMBackend *tb = &tpm_pt->parent;
-+
-+ qemu_mutex_lock(&tpm_pt->state_lock);
-+ /* wait for TPM to finish processing */
-+ if (tpm_pt->tpm_busy) {
-+ qemu_cond_wait(&tpm_pt->cmd_complete, &tpm_pt->state_lock);
-+ }
-+ qemu_mutex_unlock(&tpm_pt->state_lock);
-+
-+ /* get the decrypted state blobs from the TPM */
-+ tpm_cuse_get_state_blobs(tb, TRUE, &tpm_pt->tpm_blobs);
-+}
-+
-+static int tpm_cuse_post_load(void *opaque,
-+ int version_id __attribute__((unused)))
-+{
-+ TPMPassthruState *tpm_pt = opaque;
-+ TPMBackend *tb = &tpm_pt->parent;
-+
-+ return tpm_cuse_set_state_blobs(tb, &tpm_pt->tpm_blobs);
-+}
-+
-+static const VMStateDescription vmstate_tpm_cuse = {
-+ .name = "cuse-tpm",
-+ .version_id = 1,
-+ .minimum_version_id = 0,
-+ .minimum_version_id_old = 0,
-+ .pre_save = tpm_cuse_pre_save,
-+ .post_load = tpm_cuse_post_load,
-+ .fields = (VMStateField[]) {
-+ VMSTATE_UINT32(tpm_blobs.permanent_flags, TPMPassthruState),
-+ VMSTATE_UINT32(tpm_blobs.permanent.size, TPMPassthruState),
-+ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.permanent.buffer,
-+ TPMPassthruState, 1, NULL,
-+ tpm_blobs.permanent.size),
-+
-+ VMSTATE_UINT32(tpm_blobs.volatil_flags, TPMPassthruState),
-+ VMSTATE_UINT32(tpm_blobs.volatil.size, TPMPassthruState),
-+ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.volatil.buffer,
-+ TPMPassthruState, 1, NULL,
-+ tpm_blobs.volatil.size),
-+
-+ VMSTATE_UINT32(tpm_blobs.savestate_flags, TPMPassthruState),
-+ VMSTATE_UINT32(tpm_blobs.savestate.size, TPMPassthruState),
-+ VMSTATE_VBUFFER_ALLOC_UINT32(tpm_blobs.savestate.buffer,
-+ TPMPassthruState, 1, NULL,
-+ tpm_blobs.savestate.size),
-+ VMSTATE_END_OF_LIST()
-+ }
-+};
-+
- static const TPMDriverOps tpm_cuse_driver = {
- .type = TPM_TYPE_CUSE_TPM,
- .opts = tpm_passthrough_cmdline_opts,
-diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
-index 14d9e83ea2..9b660cf737 100644
---- a/hw/tpm/tpm_tis.c
-+++ b/hw/tpm/tpm_tis.c
-@@ -368,6 +368,8 @@ static void tpm_tis_receive_bh(void *opaque)
- TPMTISEmuState *tis = &s->s.tis;
- uint8_t locty = s->locty_number;
-
-+ tis->bh_scheduled = false;
-+
- qemu_mutex_lock(&s->state_lock);
-
- tpm_tis_sts_set(&tis->loc[locty],
-@@ -415,6 +417,8 @@ static void tpm_tis_receive_cb(TPMState *s, uint8_t locty,
- qemu_mutex_unlock(&s->state_lock);
-
- qemu_bh_schedule(tis->bh);
-+
-+ tis->bh_scheduled = true;
- }
-
- /*
-@@ -1030,9 +1034,140 @@ static void tpm_tis_reset(DeviceState *dev)
- tpm_tis_do_startup_tpm(s);
- }
-
-+
-+/* persistent state handling */
-+
-+static void tpm_tis_pre_save(void *opaque)
-+{
-+ TPMState *s = opaque;
-+ TPMTISEmuState *tis = &s->s.tis;
-+ uint8_t locty = tis->active_locty;
-+
-+ DPRINTF("tpm_tis: suspend: locty = %d : r_offset = %d, w_offset = %d\n",
-+ locty, tis->loc[0].r_offset, tis->loc[0].w_offset);
-+#ifdef DEBUG_TIS
-+ tpm_tis_dump_state(opaque, 0);
-+#endif
-+
-+ qemu_mutex_lock(&s->state_lock);
-+
-+ /* wait for outstanding request to complete */
-+ if (TPM_TIS_IS_VALID_LOCTY(locty) &&
-+ tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) {
-+ /*
-+ * If we get here when the bh is scheduled but did not run,
-+ * we won't get notified...
-+ */
-+ if (!tis->bh_scheduled) {
-+ /* backend thread to notify us */
-+ qemu_cond_wait(&s->cmd_complete, &s->state_lock);
-+ }
-+ if (tis->loc[locty].state == TPM_TIS_STATE_EXECUTION) {
-+ /* bottom half did not run - run its function */
-+ qemu_mutex_unlock(&s->state_lock);
-+ tpm_tis_receive_bh(opaque);
-+ qemu_mutex_lock(&s->state_lock);
-+ }
-+ }
-+
-+ qemu_mutex_unlock(&s->state_lock);
-+
-+ /* copy current active read or write buffer into the buffer
-+ written to disk */
-+ if (TPM_TIS_IS_VALID_LOCTY(locty)) {
-+ switch (tis->loc[locty].state) {
-+ case TPM_TIS_STATE_RECEPTION:
-+ memcpy(tis->buf,
-+ tis->loc[locty].w_buffer.buffer,
-+ MIN(sizeof(tis->buf),
-+ tis->loc[locty].w_buffer.size));
-+ tis->offset = tis->loc[locty].w_offset;
-+ break;
-+ case TPM_TIS_STATE_COMPLETION:
-+ memcpy(tis->buf,
-+ tis->loc[locty].r_buffer.buffer,
-+ MIN(sizeof(tis->buf),
-+ tis->loc[locty].r_buffer.size));
-+ tis->offset = tis->loc[locty].r_offset;
-+ break;
-+ default:
-+ /* leak nothing */
-+ memset(tis->buf, 0x0, sizeof(tis->buf));
-+ break;
-+ }
-+ }
-+}
-+
-+static int tpm_tis_post_load(void *opaque,
-+ int version_id __attribute__((unused)))
-+{
-+ TPMState *s = opaque;
-+ TPMTISEmuState *tis = &s->s.tis;
-+
-+ uint8_t locty = tis->active_locty;
-+
-+ if (TPM_TIS_IS_VALID_LOCTY(locty)) {
-+ switch (tis->loc[locty].state) {
-+ case TPM_TIS_STATE_RECEPTION:
-+ memcpy(tis->loc[locty].w_buffer.buffer,
-+ tis->buf,
-+ MIN(sizeof(tis->buf),
-+ tis->loc[locty].w_buffer.size));
-+ tis->loc[locty].w_offset = tis->offset;
-+ break;
-+ case TPM_TIS_STATE_COMPLETION:
-+ memcpy(tis->loc[locty].r_buffer.buffer,
-+ tis->buf,
-+ MIN(sizeof(tis->buf),
-+ tis->loc[locty].r_buffer.size));
-+ tis->loc[locty].r_offset = tis->offset;
-+ break;
-+ default:
-+ break;
-+ }
-+ }
-+
-+ DPRINTF("tpm_tis: resume : locty = %d : r_offset = %d, w_offset = %d\n",
-+ locty, tis->loc[0].r_offset, tis->loc[0].w_offset);
-+
-+ return 0;
-+}
-+
-+static const VMStateDescription vmstate_locty = {
-+ .name = "loc",
-+ .version_id = 1,
-+ .minimum_version_id = 0,
-+ .minimum_version_id_old = 0,
-+ .fields = (VMStateField[]) {
-+ VMSTATE_UINT32(state, TPMLocality),
-+ VMSTATE_UINT32(inte, TPMLocality),
-+ VMSTATE_UINT32(ints, TPMLocality),
-+ VMSTATE_UINT8(access, TPMLocality),
-+ VMSTATE_UINT32(sts, TPMLocality),
-+ VMSTATE_UINT32(iface_id, TPMLocality),
-+ VMSTATE_END_OF_LIST(),
-+ }
-+};
-+
- static const VMStateDescription vmstate_tpm_tis = {
- .name = "tpm",
-- .unmigratable = 1,
-+ .version_id = 1,
-+ .minimum_version_id = 0,
-+ .minimum_version_id_old = 0,
-+ .pre_save = tpm_tis_pre_save,
-+ .post_load = tpm_tis_post_load,
-+ .fields = (VMStateField[]) {
-+ VMSTATE_UINT32(s.tis.offset, TPMState),
-+ VMSTATE_BUFFER(s.tis.buf, TPMState),
-+ VMSTATE_UINT8(s.tis.active_locty, TPMState),
-+ VMSTATE_UINT8(s.tis.aborting_locty, TPMState),
-+ VMSTATE_UINT8(s.tis.next_locty, TPMState),
-+
-+ VMSTATE_STRUCT_ARRAY(s.tis.loc, TPMState, TPM_TIS_NUM_LOCALITIES, 1,
-+ vmstate_locty, TPMLocality),
-+
-+ VMSTATE_END_OF_LIST()
-+ }
- };
-
- static Property tpm_tis_properties[] = {
-diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h
-index a1df41fa21..b7fc0ea1a9 100644
---- a/hw/tpm/tpm_tis.h
-+++ b/hw/tpm/tpm_tis.h
-@@ -54,6 +54,8 @@ typedef struct TPMLocality {
-
- typedef struct TPMTISEmuState {
- QEMUBH *bh;
-+ bool bh_scheduled; /* bh scheduled but did not run yet */
-+
- uint32_t offset;
- uint8_t buf[TPM_TIS_BUFFER_MAX];
-
-diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c
-index 7b35429725..b6ff74d946 100644
---- a/hw/tpm/tpm_util.c
-+++ b/hw/tpm/tpm_util.c
-@@ -22,6 +22,17 @@
- #include "qemu/osdep.h"
- #include "tpm_util.h"
- #include "tpm_int.h"
-+#include "tpm_ioctl.h"
-+#include "qemu/error-report.h"
-+
-+#define DEBUG_TPM 0
-+
-+#define DPRINTF(fmt, ...) do { \
-+ if (DEBUG_TPM) { \
-+ fprintf(stderr, fmt, ## __VA_ARGS__); \
-+ } \
-+} while (0)
-+
-
- /*
- * A basic test of a TPM device. We expect a well formatted response header
-@@ -125,3 +136,215 @@ int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version)
-
- return 1;
- }
-+
-+static void tpm_sized_buffer_reset(TPMSizedBuffer *tsb)
-+{
-+ g_free(tsb->buffer);
-+ tsb->buffer = NULL;
-+ tsb->size = 0;
-+}
-+
-+/*
-+ * Transfer a TPM state blob from the TPM into a provided buffer.
-+ *
-+ * @fd: file descriptor to talk to the CUSE TPM
-+ * @type: the type of blob to transfer
-+ * @decrypted_blob: whether we request to receive decrypted blobs
-+ * @tsb: the TPMSizeBuffer to fill with the blob
-+ * @flags: the flags to return to the caller
-+ */
-+static int tpm_util_cuse_get_state_blob(int fd,
-+ uint8_t type,
-+ bool decrypted_blob,
-+ TPMSizedBuffer *tsb,
-+ uint32_t *flags)
-+{
-+ ptm_getstate pgs;
-+ uint16_t offset = 0;
-+ ptm_res res;
-+ ssize_t n;
-+ size_t to_read;
-+
-+ tpm_sized_buffer_reset(tsb);
-+
-+ pgs.u.req.state_flags = (decrypted_blob) ? PTM_STATE_FLAG_DECRYPTED : 0;
-+ pgs.u.req.type = type;
-+ pgs.u.req.offset = offset;
-+
-+ if (ioctl(fd, PTM_GET_STATEBLOB, &pgs) < 0) {
-+ error_report("CUSE TPM PTM_GET_STATEBLOB ioctl failed: %s",
-+ strerror(errno));
-+ goto err_exit;
-+ }
-+ res = pgs.u.resp.tpm_result;
-+ if (res != 0 && (res & 0x800) == 0) {
-+ error_report("Getting the stateblob (type %d) failed with a TPM "
-+ "error 0x%x", type, res);
-+ goto err_exit;
-+ }
-+
-+ *flags = pgs.u.resp.state_flags;
-+
-+ tsb->buffer = g_malloc(pgs.u.resp.totlength);
-+ memcpy(tsb->buffer, pgs.u.resp.data, pgs.u.resp.length);
-+ tsb->size = pgs.u.resp.length;
-+
-+ /* if there are bytes left to get use read() interface */
-+ while (tsb->size < pgs.u.resp.totlength) {
-+ to_read = pgs.u.resp.totlength - tsb->size;
-+ if (unlikely(to_read > SSIZE_MAX)) {
-+ to_read = SSIZE_MAX;
-+ }
-+
-+ n = read(fd, &tsb->buffer[tsb->size], to_read);
-+ if (n != to_read) {
-+ error_report("Could not read stateblob (type %d) : %s",
-+ type, strerror(errno));
-+ goto err_exit;
-+ }
-+ tsb->size += to_read;
-+ }
-+
-+ DPRINTF("tpm_util: got state blob type %d, %d bytes, flags 0x%08x, "
-+ "decrypted=%d\n", type, tsb->size, *flags, decrypted_blob);
-+
-+ return 0;
-+
-+err_exit:
-+ return 1;
-+}
-+
-+int tpm_util_cuse_get_state_blobs(int tpm_fd,
-+ bool decrypted_blobs,
-+ TPMBlobBuffers *tpm_blobs)
-+{
-+ if (tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT,
-+ decrypted_blobs,
-+ &tpm_blobs->permanent,
-+ &tpm_blobs->permanent_flags) ||
-+ tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE,
-+ decrypted_blobs,
-+ &tpm_blobs->volatil,
-+ &tpm_blobs->volatil_flags) ||
-+ tpm_util_cuse_get_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE,
-+ decrypted_blobs,
-+ &tpm_blobs->savestate,
-+ &tpm_blobs->savestate_flags)) {
-+ goto err_exit;
-+ }
-+
-+ return 0;
-+
-+ err_exit:
-+ tpm_sized_buffer_reset(&tpm_blobs->volatil);
-+ tpm_sized_buffer_reset(&tpm_blobs->permanent);
-+ tpm_sized_buffer_reset(&tpm_blobs->savestate);
-+
-+ return 1;
-+}
-+
-+static int tpm_util_cuse_do_set_stateblob_ioctl(int fd,
-+ uint32_t flags,
-+ uint32_t type,
-+ uint32_t length)
-+{
-+ ptm_setstate pss;
-+
-+ pss.u.req.state_flags = flags;
-+ pss.u.req.type = type;
-+ pss.u.req.length = length;
-+
-+ if (ioctl(fd, PTM_SET_STATEBLOB, &pss) < 0) {
-+ error_report("CUSE TPM PTM_SET_STATEBLOB ioctl failed: %s",
-+ strerror(errno));
-+ return 1;
-+ }
-+
-+ if (pss.u.resp.tpm_result != 0) {
-+ error_report("Setting the stateblob (type %d) failed with a TPM "
-+ "error 0x%x", type, pss.u.resp.tpm_result);
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+
-+/*
-+ * Transfer a TPM state blob to the CUSE TPM.
-+ *
-+ * @fd: file descriptor to talk to the CUSE TPM
-+ * @type: the type of TPM state blob to transfer
-+ * @tsb: TPMSizeBuffer containing the TPM state blob
-+ * @flags: Flags describing the (encryption) state of the TPM state blob
-+ */
-+static int tpm_util_cuse_set_state_blob(int fd,
-+ uint32_t type,
-+ TPMSizedBuffer *tsb,
-+ uint32_t flags)
-+{
-+ uint32_t offset = 0;
-+ ssize_t n;
-+ size_t to_write;
-+
-+ /* initiate the transfer to the CUSE TPM */
-+ if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) {
-+ return 1;
-+ }
-+
-+ /* use the write() interface for transferring the state blob */
-+ while (offset < tsb->size) {
-+ to_write = tsb->size - offset;
-+ if (unlikely(to_write > SSIZE_MAX)) {
-+ to_write = SSIZE_MAX;
-+ }
-+
-+ n = write(fd, &tsb->buffer[offset], to_write);
-+ if (n != to_write) {
-+ error_report("Writing the stateblob (type %d) failed: %s",
-+ type, strerror(errno));
-+ goto err_exit;
-+ }
-+ offset += to_write;
-+ }
-+
-+ /* inidicate that the transfer is finished */
-+ if (tpm_util_cuse_do_set_stateblob_ioctl(fd, flags, type, 0)) {
-+ goto err_exit;
-+ }
-+
-+ DPRINTF("tpm_util: set the state blob type %d, %d bytes, flags 0x%08x\n",
-+ type, tsb->size, flags);
-+
-+ return 0;
-+
-+err_exit:
-+ return 1;
-+}
-+
-+int tpm_util_cuse_set_state_blobs(int tpm_fd,
-+ TPMBlobBuffers *tpm_blobs)
-+{
-+ ptm_res res;
-+
-+ if (ioctl(tpm_fd, PTM_STOP, &res) < 0) {
-+ error_report("tpm_passthrough: Could not stop "
-+ "the CUSE TPM: %s (%i)",
-+ strerror(errno), errno);
-+ return 1;
-+ }
-+
-+ if (tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_PERMANENT,
-+ &tpm_blobs->permanent,
-+ tpm_blobs->permanent_flags) ||
-+ tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_VOLATILE,
-+ &tpm_blobs->volatil,
-+ tpm_blobs->volatil_flags) ||
-+ tpm_util_cuse_set_state_blob(tpm_fd, PTM_BLOB_TYPE_SAVESTATE,
-+ &tpm_blobs->savestate,
-+ tpm_blobs->savestate_flags)) {
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h
-index df76245e6e..c24071d812 100644
---- a/hw/tpm/tpm_util.h
-+++ b/hw/tpm/tpm_util.h
-@@ -26,4 +26,11 @@
-
- int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version);
-
-+int tpm_util_cuse_get_state_blobs(int tpm_fd,
-+ bool decrypted_blobs,
-+ TPMBlobBuffers *tpm_blobs);
-+
-+int tpm_util_cuse_set_state_blobs(int tpm_fd,
-+ TPMBlobBuffers *tpm_blobs);
-+
- #endif /* TPM_TPM_UTIL_H */
-diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
-index b58f52d39f..3403821b9d 100644
---- a/include/sysemu/tpm_backend.h
-+++ b/include/sysemu/tpm_backend.h
-@@ -62,6 +62,18 @@ typedef struct TPMSizedBuffer {
- uint8_t *buffer;
- } TPMSizedBuffer;
-
-+/* blobs from the TPM; part of VM state when migrating */
-+typedef struct TPMBlobBuffers {
-+ uint32_t permanent_flags;
-+ TPMSizedBuffer permanent;
-+
-+ uint32_t volatil_flags;
-+ TPMSizedBuffer volatil;
-+
-+ uint32_t savestate_flags;
-+ TPMSizedBuffer savestate;
-+} TPMBlobBuffers;
-+
- struct TPMDriverOps {
- enum TpmType type;
- const QemuOptDesc *opts;
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch
deleted file mode 100644
index ce0b1ee..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch
+++ /dev/null
@@ -1,504 +0,0 @@
-From 3d90c6254863693a6b13d918d2b8682e08bbc681 Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Mon, 28 Aug 2017 14:29:06 +0200
-Subject: [PATCH] vga: stop passing pointers to vga_draw_line* functions
-
-Instead pass around the address (aka offset into vga memory).
-Add vga_read_* helper functions which apply vbe_size_mask to
-the address, to make sure the address stays within the valid
-range, similar to the cirrus blitter fixes (commits ffaf857778
-and 026aeffcb4).
-
-Impact: DoS for privileged guest users. qemu crashes with
-a segfault, when hitting the guard page after vga memory
-allocation, while reading vga memory for display updates.
-
-Fixes: CVE-2017-13672
-Cc: P J P <ppandit@redhat.com>
-Reported-by: David Buchanan <d@vidbuchanan.co.uk>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Message-id: 20170828122906.18993-1-kraxel@redhat.com
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=3d90c6254863693a6b13d918d2b8682e08bbc681]
-
-CVE: CVE-2017-13672
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- hw/display/vga-helpers.h | 202 ++++++++++++++++++++++++++---------------------
- hw/display/vga.c | 5 +-
- hw/display/vga_int.h | 1 +
- 3 files changed, 114 insertions(+), 94 deletions(-)
-
-diff --git a/hw/display/vga-helpers.h b/hw/display/vga-helpers.h
-index 94f6de2..5a752b3 100644
---- a/hw/display/vga-helpers.h
-+++ b/hw/display/vga-helpers.h
-@@ -95,20 +95,46 @@ static void vga_draw_glyph9(uint8_t *d, int linesize,
- } while (--h);
- }
-
-+static inline uint8_t vga_read_byte(VGACommonState *vga, uint32_t addr)
-+{
-+ return vga->vram_ptr[addr & vga->vbe_size_mask];
-+}
-+
-+static inline uint16_t vga_read_word_le(VGACommonState *vga, uint32_t addr)
-+{
-+ uint32_t offset = addr & vga->vbe_size_mask & ~1;
-+ uint16_t *ptr = (uint16_t *)(vga->vram_ptr + offset);
-+ return lduw_le_p(ptr);
-+}
-+
-+static inline uint16_t vga_read_word_be(VGACommonState *vga, uint32_t addr)
-+{
-+ uint32_t offset = addr & vga->vbe_size_mask & ~1;
-+ uint16_t *ptr = (uint16_t *)(vga->vram_ptr + offset);
-+ return lduw_be_p(ptr);
-+}
-+
-+static inline uint32_t vga_read_dword_le(VGACommonState *vga, uint32_t addr)
-+{
-+ uint32_t offset = addr & vga->vbe_size_mask & ~3;
-+ uint32_t *ptr = (uint32_t *)(vga->vram_ptr + offset);
-+ return ldl_le_p(ptr);
-+}
-+
- /*
- * 4 color mode
- */
--static void vga_draw_line2(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line2(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t plane_mask, *palette, data, v;
- int x;
-
-- palette = s1->last_palette;
-- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+ palette = vga->last_palette;
-+ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
- width >>= 3;
- for(x = 0; x < width; x++) {
-- data = ((uint32_t *)s)[0];
-+ data = vga_read_dword_le(vga, addr);
- data &= plane_mask;
- v = expand2[GET_PLANE(data, 0)];
- v |= expand2[GET_PLANE(data, 2)] << 2;
-@@ -124,7 +150,7 @@ static void vga_draw_line2(VGACommonState *s1, uint8_t *d,
- ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf];
- ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf];
- d += 32;
-- s += 4;
-+ addr += 4;
- }
- }
-
-@@ -134,17 +160,17 @@ static void vga_draw_line2(VGACommonState *s1, uint8_t *d,
- /*
- * 4 color mode, dup2 horizontal
- */
--static void vga_draw_line2d2(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line2d2(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t plane_mask, *palette, data, v;
- int x;
-
-- palette = s1->last_palette;
-- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+ palette = vga->last_palette;
-+ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
- width >>= 3;
- for(x = 0; x < width; x++) {
-- data = ((uint32_t *)s)[0];
-+ data = vga_read_dword_le(vga, addr);
- data &= plane_mask;
- v = expand2[GET_PLANE(data, 0)];
- v |= expand2[GET_PLANE(data, 2)] << 2;
-@@ -160,24 +186,24 @@ static void vga_draw_line2d2(VGACommonState *s1, uint8_t *d,
- PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]);
- PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]);
- d += 64;
-- s += 4;
-+ addr += 4;
- }
- }
-
- /*
- * 16 color mode
- */
--static void vga_draw_line4(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line4(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t plane_mask, data, v, *palette;
- int x;
-
-- palette = s1->last_palette;
-- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+ palette = vga->last_palette;
-+ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
- width >>= 3;
- for(x = 0; x < width; x++) {
-- data = ((uint32_t *)s)[0];
-+ data = vga_read_dword_le(vga, addr);
- data &= plane_mask;
- v = expand4[GET_PLANE(data, 0)];
- v |= expand4[GET_PLANE(data, 1)] << 1;
-@@ -192,24 +218,24 @@ static void vga_draw_line4(VGACommonState *s1, uint8_t *d,
- ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf];
- ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf];
- d += 32;
-- s += 4;
-+ addr += 4;
- }
- }
-
- /*
- * 16 color mode, dup2 horizontal
- */
--static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line4d2(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t plane_mask, data, v, *palette;
- int x;
-
-- palette = s1->last_palette;
-- plane_mask = mask16[s1->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
-+ palette = vga->last_palette;
-+ plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf];
- width >>= 3;
- for(x = 0; x < width; x++) {
-- data = ((uint32_t *)s)[0];
-+ data = vga_read_dword_le(vga, addr);
- data &= plane_mask;
- v = expand4[GET_PLANE(data, 0)];
- v |= expand4[GET_PLANE(data, 1)] << 1;
-@@ -224,7 +250,7 @@ static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d,
- PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]);
- PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]);
- d += 64;
-- s += 4;
-+ addr += 4;
- }
- }
-
-@@ -233,21 +259,21 @@ static void vga_draw_line4d2(VGACommonState *s1, uint8_t *d,
- *
- * XXX: add plane_mask support (never used in standard VGA modes)
- */
--static void vga_draw_line8d2(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line8d2(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t *palette;
- int x;
-
-- palette = s1->last_palette;
-+ palette = vga->last_palette;
- width >>= 3;
- for(x = 0; x < width; x++) {
-- PUT_PIXEL2(d, 0, palette[s[0]]);
-- PUT_PIXEL2(d, 1, palette[s[1]]);
-- PUT_PIXEL2(d, 2, palette[s[2]]);
-- PUT_PIXEL2(d, 3, palette[s[3]]);
-+ PUT_PIXEL2(d, 0, palette[vga_read_byte(vga, addr + 0)]);
-+ PUT_PIXEL2(d, 1, palette[vga_read_byte(vga, addr + 1)]);
-+ PUT_PIXEL2(d, 2, palette[vga_read_byte(vga, addr + 2)]);
-+ PUT_PIXEL2(d, 3, palette[vga_read_byte(vga, addr + 3)]);
- d += 32;
-- s += 4;
-+ addr += 4;
- }
- }
-
-@@ -256,63 +282,63 @@ static void vga_draw_line8d2(VGACommonState *s1, uint8_t *d,
- *
- * XXX: add plane_mask support (never used in standard VGA modes)
- */
--static void vga_draw_line8(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line8(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- uint32_t *palette;
- int x;
-
-- palette = s1->last_palette;
-+ palette = vga->last_palette;
- width >>= 3;
- for(x = 0; x < width; x++) {
-- ((uint32_t *)d)[0] = palette[s[0]];
-- ((uint32_t *)d)[1] = palette[s[1]];
-- ((uint32_t *)d)[2] = palette[s[2]];
-- ((uint32_t *)d)[3] = palette[s[3]];
-- ((uint32_t *)d)[4] = palette[s[4]];
-- ((uint32_t *)d)[5] = palette[s[5]];
-- ((uint32_t *)d)[6] = palette[s[6]];
-- ((uint32_t *)d)[7] = palette[s[7]];
-+ ((uint32_t *)d)[0] = palette[vga_read_byte(vga, addr + 0)];
-+ ((uint32_t *)d)[1] = palette[vga_read_byte(vga, addr + 1)];
-+ ((uint32_t *)d)[2] = palette[vga_read_byte(vga, addr + 2)];
-+ ((uint32_t *)d)[3] = palette[vga_read_byte(vga, addr + 3)];
-+ ((uint32_t *)d)[4] = palette[vga_read_byte(vga, addr + 4)];
-+ ((uint32_t *)d)[5] = palette[vga_read_byte(vga, addr + 5)];
-+ ((uint32_t *)d)[6] = palette[vga_read_byte(vga, addr + 6)];
-+ ((uint32_t *)d)[7] = palette[vga_read_byte(vga, addr + 7)];
- d += 32;
-- s += 8;
-+ addr += 8;
- }
- }
-
- /*
- * 15 bit color
- */
--static void vga_draw_line15_le(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line15_le(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t v, r, g, b;
-
- w = width;
- do {
-- v = lduw_le_p((void *)s);
-+ v = vga_read_word_le(vga, addr);
- r = (v >> 7) & 0xf8;
- g = (v >> 2) & 0xf8;
- b = (v << 3) & 0xf8;
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 2;
-+ addr += 2;
- d += 4;
- } while (--w != 0);
- }
-
--static void vga_draw_line15_be(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line15_be(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t v, r, g, b;
-
- w = width;
- do {
-- v = lduw_be_p((void *)s);
-+ v = vga_read_word_be(vga, addr);
- r = (v >> 7) & 0xf8;
- g = (v >> 2) & 0xf8;
- b = (v << 3) & 0xf8;
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 2;
-+ addr += 2;
- d += 4;
- } while (--w != 0);
- }
-@@ -320,38 +346,38 @@ static void vga_draw_line15_be(VGACommonState *s1, uint8_t *d,
- /*
- * 16 bit color
- */
--static void vga_draw_line16_le(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line16_le(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t v, r, g, b;
-
- w = width;
- do {
-- v = lduw_le_p((void *)s);
-+ v = vga_read_word_le(vga, addr);
- r = (v >> 8) & 0xf8;
- g = (v >> 3) & 0xfc;
- b = (v << 3) & 0xf8;
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 2;
-+ addr += 2;
- d += 4;
- } while (--w != 0);
- }
-
--static void vga_draw_line16_be(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line16_be(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t v, r, g, b;
-
- w = width;
- do {
-- v = lduw_be_p((void *)s);
-+ v = vga_read_word_be(vga, addr);
- r = (v >> 8) & 0xf8;
- g = (v >> 3) & 0xfc;
- b = (v << 3) & 0xf8;
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 2;
-+ addr += 2;
- d += 4;
- } while (--w != 0);
- }
-@@ -359,36 +385,36 @@ static void vga_draw_line16_be(VGACommonState *s1, uint8_t *d,
- /*
- * 24 bit color
- */
--static void vga_draw_line24_le(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line24_le(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t r, g, b;
-
- w = width;
- do {
-- b = s[0];
-- g = s[1];
-- r = s[2];
-+ b = vga_read_byte(vga, addr + 0);
-+ g = vga_read_byte(vga, addr + 1);
-+ r = vga_read_byte(vga, addr + 2);
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 3;
-+ addr += 3;
- d += 4;
- } while (--w != 0);
- }
-
--static void vga_draw_line24_be(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line24_be(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
- int w;
- uint32_t r, g, b;
-
- w = width;
- do {
-- r = s[0];
-- g = s[1];
-- b = s[2];
-+ r = vga_read_byte(vga, addr + 0);
-+ g = vga_read_byte(vga, addr + 1);
-+ b = vga_read_byte(vga, addr + 2);
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 3;
-+ addr += 3;
- d += 4;
- } while (--w != 0);
- }
-@@ -396,44 +422,36 @@ static void vga_draw_line24_be(VGACommonState *s1, uint8_t *d,
- /*
- * 32 bit color
- */
--static void vga_draw_line32_le(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line32_le(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
--#ifndef HOST_WORDS_BIGENDIAN
-- memcpy(d, s, width * 4);
--#else
- int w;
- uint32_t r, g, b;
-
- w = width;
- do {
-- b = s[0];
-- g = s[1];
-- r = s[2];
-+ b = vga_read_byte(vga, addr + 0);
-+ g = vga_read_byte(vga, addr + 1);
-+ r = vga_read_byte(vga, addr + 2);
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 4;
-+ addr += 4;
- d += 4;
- } while (--w != 0);
--#endif
- }
-
--static void vga_draw_line32_be(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width)
-+static void vga_draw_line32_be(VGACommonState *vga, uint8_t *d,
-+ uint32_t addr, int width)
- {
--#ifdef HOST_WORDS_BIGENDIAN
-- memcpy(d, s, width * 4);
--#else
- int w;
- uint32_t r, g, b;
-
- w = width;
- do {
-- r = s[1];
-- g = s[2];
-- b = s[3];
-+ r = vga_read_byte(vga, addr + 1);
-+ g = vga_read_byte(vga, addr + 2);
-+ b = vga_read_byte(vga, addr + 3);
- ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b);
-- s += 4;
-+ addr += 4;
- d += 4;
- } while (--w != 0);
--#endif
- }
-diff --git a/hw/display/vga.c b/hw/display/vga.c
-index ad7a465..6fc8c87 100644
---- a/hw/display/vga.c
-+++ b/hw/display/vga.c
-@@ -1005,7 +1005,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val)
- }
-
- typedef void vga_draw_line_func(VGACommonState *s1, uint8_t *d,
-- const uint8_t *s, int width);
-+ uint32_t srcaddr, int width);
-
- #include "vga-helpers.h"
-
-@@ -1666,7 +1666,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
- if (y_start < 0)
- y_start = y;
- if (!(is_buffer_shared(surface))) {
-- vga_draw_line(s, d, s->vram_ptr + addr, width);
-+ vga_draw_line(s, d, addr, width);
- if (s->cursor_draw_line)
- s->cursor_draw_line(s, d, y);
- }
-@@ -2170,6 +2170,7 @@ void vga_common_init(VGACommonState *s, Object *obj, bool global_vmstate)
- if (!s->vbe_size) {
- s->vbe_size = s->vram_size;
- }
-+ s->vbe_size_mask = s->vbe_size - 1;
-
- s->is_vbe_vmstate = 1;
- memory_region_init_ram_nomigrate(&s->vram, obj, "vga.vram", s->vram_size,
-diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
-index dd6c958..ad34a1f 100644
---- a/hw/display/vga_int.h
-+++ b/hw/display/vga_int.h
-@@ -94,6 +94,7 @@ typedef struct VGACommonState {
- uint32_t vram_size;
- uint32_t vram_size_mb; /* property */
- uint32_t vbe_size;
-+ uint32_t vbe_size_mask;
- uint32_t latch;
- bool has_chain4_alias;
- MemoryRegion chain4_alias;
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch
deleted file mode 100644
index 3d0695f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From e65294157d4b69393b3f819c99f4f647452b48e3 Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Mon, 28 Aug 2017 14:33:07 +0200
-Subject: [PATCH] vga: fix display update region calculation (split screen)
-
-vga display update mis-calculated the region for the dirty bitmap
-snapshot in case split screen mode is used. This can trigger an
-assert in cpu_physical_memory_snapshot_get_dirty().
-
-Impact: DoS for privileged guest users.
-
-Fixes: CVE-2017-13673
-Fixes: fec5e8c92becad223df9d972770522f64aafdb72
-Cc: P J P <ppandit@redhat.com>
-Reported-by: David Buchanan <d@vidbuchanan.co.uk>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Message-id: 20170828123307.15392-1-kraxel@redhat.com
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=e65294157d4b69393b3f819c99f4f647452b48e3]
-
-CVE: CVE-2017-13673
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- hw/display/vga.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/hw/display/vga.c b/hw/display/vga.c
-index 3433102..ad7a465 100644
---- a/hw/display/vga.c
-+++ b/hw/display/vga.c
-@@ -1628,9 +1628,15 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
- y1 = 0;
-
- if (!full_update) {
-+ ram_addr_t region_start = addr1;
-+ ram_addr_t region_end = addr1 + line_offset * height;
- vga_sync_dirty_bitmap(s);
-- snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
-- line_offset * height,
-+ if (s->line_compare < height) {
-+ /* split screen mode */
-+ region_start = 0;
-+ }
-+ snap = memory_region_snapshot_and_clear_dirty(&s->vram, region_start,
-+ region_end - region_start,
- DIRTY_MEMORY_VGA);
- }
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch
deleted file mode 100644
index 352f73f..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 1201d308519f1e915866d7583d5136d03cc1d384 Mon Sep 17 00:00:00 2001
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date: Fri, 25 Aug 2017 01:35:53 +0200
-Subject: [PATCH] slirp: fix clearing ifq_so from pending packets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The if_fastq and if_batchq contain not only packets, but queues of packets
-for the same socket. When sofree frees a socket, it thus has to clear ifq_so
-from all the packets from the queues, not only the first.
-
-Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
-Cc: qemu-stable@nongnu.org
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=1201d308519f1e915866d7583d5136d03cc1d384]
-
-CVE: CVE-2017-13711
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- slirp/socket.c | 39 +++++++++++++++++++++++----------------
- 1 file changed, 23 insertions(+), 16 deletions(-)
-
-diff --git a/slirp/socket.c b/slirp/socket.c
-index ecec029..cb7b5b6 100644
---- a/slirp/socket.c
-+++ b/slirp/socket.c
-@@ -60,29 +60,36 @@ socreate(Slirp *slirp)
- }
-
- /*
-+ * Remove references to so from the given message queue.
-+ */
-+static void
-+soqfree(struct socket *so, struct quehead *qh)
-+{
-+ struct mbuf *ifq;
-+
-+ for (ifq = (struct mbuf *) qh->qh_link;
-+ (struct quehead *) ifq != qh;
-+ ifq = ifq->ifq_next) {
-+ if (ifq->ifq_so == so) {
-+ struct mbuf *ifm;
-+ ifq->ifq_so = NULL;
-+ for (ifm = ifq->ifs_next; ifm != ifq; ifm = ifm->ifs_next) {
-+ ifm->ifq_so = NULL;
-+ }
-+ }
-+ }
-+}
-+
-+/*
- * remque and free a socket, clobber cache
- */
- void
- sofree(struct socket *so)
- {
- Slirp *slirp = so->slirp;
-- struct mbuf *ifm;
-
-- for (ifm = (struct mbuf *) slirp->if_fastq.qh_link;
-- (struct quehead *) ifm != &slirp->if_fastq;
-- ifm = ifm->ifq_next) {
-- if (ifm->ifq_so == so) {
-- ifm->ifq_so = NULL;
-- }
-- }
--
-- for (ifm = (struct mbuf *) slirp->if_batchq.qh_link;
-- (struct quehead *) ifm != &slirp->if_batchq;
-- ifm = ifm->ifq_next) {
-- if (ifm->ifq_so == so) {
-- ifm->ifq_so = NULL;
-- }
-- }
-+ soqfree(so, &slirp->if_fastq);
-+ soqfree(so, &slirp->if_batchq);
-
- if (so->so_emu==EMU_RSH && so->extra) {
- sofree(so->extra);
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch
deleted file mode 100644
index 969ad87..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From ed4f86e8b6eff8e600c69adee68c7cd34dd2cccb Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 7 Sep 2017 12:02:56 +0530
-Subject: [PATCH] multiboot: validate multiboot header address values
-
-While loading kernel via multiboot-v1 image, (flags & 0x00010000)
-indicates that multiboot header contains valid addresses to load
-the kernel image. These addresses are used to compute kernel
-size and kernel text offset in the OS image. Validate these
-address values to avoid an OOB access issue.
-
-This is CVE-2017-14167.
-
-Reported-by: Thomas Garnier <thgarnie@google.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Message-Id: <20170907063256.7418-1-ppandit@redhat.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
-Upstream-Status: Backport
-[https://git.qemu.org/?p=qemu.git;a=commit;h=ed4f86e8b6eff8e600c69adee68c7cd34dd2cccb]
-
-CVE: CVE-2017-14167
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- hw/i386/multiboot.c | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
-
-diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
-index 6001f4c..c7b70c9 100644
---- a/hw/i386/multiboot.c
-+++ b/hw/i386/multiboot.c
-@@ -221,15 +221,34 @@ int load_multiboot(FWCfgState *fw_cfg,
- uint32_t mh_header_addr = ldl_p(header+i+12);
- uint32_t mh_load_end_addr = ldl_p(header+i+20);
- uint32_t mh_bss_end_addr = ldl_p(header+i+24);
-+
- mh_load_addr = ldl_p(header+i+16);
-+ if (mh_header_addr < mh_load_addr) {
-+ fprintf(stderr, "invalid mh_load_addr address\n");
-+ exit(1);
-+ }
-+
- uint32_t mb_kernel_text_offset = i - (mh_header_addr - mh_load_addr);
- uint32_t mb_load_size = 0;
- mh_entry_addr = ldl_p(header+i+28);
-
- if (mh_load_end_addr) {
-+ if (mh_bss_end_addr < mh_load_addr) {
-+ fprintf(stderr, "invalid mh_bss_end_addr address\n");
-+ exit(1);
-+ }
- mb_kernel_size = mh_bss_end_addr - mh_load_addr;
-+
-+ if (mh_load_end_addr < mh_load_addr) {
-+ fprintf(stderr, "invalid mh_load_end_addr address\n");
-+ exit(1);
-+ }
- mb_load_size = mh_load_end_addr - mh_load_addr;
- } else {
-+ if (kernel_file_size < mb_kernel_text_offset) {
-+ fprintf(stderr, "invalid kernel_file_size\n");
-+ exit(1);
-+ }
- mb_kernel_size = kernel_file_size - mb_kernel_text_offset;
- mb_load_size = mb_kernel_size;
- }
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
index 9bbbc6f..d6a3522 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
@@ -28,12 +28,12 @@
hw/intc/apic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/hw/intc/apic.c b/hw/intc/apic.c
-index 45887d99..c5ae4087 100644
---- a/hw/intc/apic.c
-+++ b/hw/intc/apic.c
-@@ -587,7 +587,7 @@ int apic_accept_pic_intr(DeviceState *dev)
- APICCommonState *s = APIC_COMMON(dev);
+Index: qemu-2.11.1/hw/intc/apic.c
+===================================================================
+--- qemu-2.11.1.orig/hw/intc/apic.c
++++ qemu-2.11.1/hw/intc/apic.c
+@@ -591,7 +591,7 @@ int apic_accept_pic_intr(DeviceState *de
+ APICCommonState *s = APIC(dev);
uint32_t lvt0;
- if (!s)
@@ -41,6 +41,3 @@
return -1;
lvt0 = s->lvt[APIC_LVT_LINT0];
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
new file mode 100644
index 0000000..6e6bf95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
@@ -0,0 +1,242 @@
+From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@xilinx.com>
+Date: Thu, 21 Dec 2017 11:35:16 -0800
+Subject: [PATCH] chardev: connect socket to a spawned command
+
+The command is started in a shell (sh -c) with stdin connect to QEMU
+via a Unix domain stream socket. QEMU then exchanges data via its own
+end of the socket, just like it normally does.
+
+"-chardev socket" supports some ways of connecting via protocols like
+telnet, but that is only a subset of the functionality supported by
+tools socat. To use socat instead, for example to connect via a socks
+proxy, use:
+
+ -chardev 'socket,id=socat,cmd=exec socat FD:0 SOCKS4A:socks-proxy.localdomain:example.com:9999,,socksuser=nobody' \
+ -device usb-serial,chardev=socat
+
+Beware that commas in the command must be escaped as double commas.
+
+Or interactively in the console:
+ (qemu) chardev-add socket,id=cat,cmd=cat
+ (qemu) device_add usb-serial,chardev=cat
+ ^ac
+ # cat >/dev/ttyUSB0
+ hello
+ hello
+
+Another usage is starting swtpm from inside QEMU. swtpm will
+automatically shut down once it looses the connection to the parent
+QEMU, so there is no risk of lingering processes:
+
+ -chardev 'socket,id=chrtpm0,cmd=exec swtpm socket --terminate --ctrl type=unixio,,clientfd=0 --tpmstate dir=... --log file=swtpm.log' \
+ -tpmdev emulator,id=tpm0,chardev=chrtpm0 \
+ -device tpm-tis,tpmdev=tpm0
+
+The patch was discussed upstream, but QEMU developers believe that the
+code calling QEMU should be responsible for managing additional
+processes. In OE-core, that would imply enhancing runqemu and
+oeqa. This patch is a simpler solution.
+
+Because it is not going upstream, the patch was written so that it is
+as simple as possible.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+---
+ chardev/char-socket.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++---
+ chardev/char.c | 3 ++
+ qapi/char.json | 5 +++
+ 3 files changed, 90 insertions(+), 4 deletions(-)
+
+diff --git a/chardev/char-socket.c b/chardev/char-socket.c
+index 53eda8ef00..f566107c35 100644
+--- a/chardev/char-socket.c
++++ b/chardev/char-socket.c
+@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
+ return false;
+ }
+
++#ifndef _WIN32
++static void chardev_open_socket_cmd(Chardev *chr,
++ const char *cmd,
++ Error **errp)
++{
++ int fds[2] = { -1, -1 };
++ QIOChannelSocket *sioc = NULL;
++ pid_t pid = -1;
++ const char *argv[] = { "/bin/sh", "-c", cmd, NULL };
++
++ /*
++ * We need a Unix domain socket for commands like swtpm and a single
++ * connection, therefore we cannot use qio_channel_command_new_spawn()
++ * without patching it first. Duplicating the functionality is easier.
++ */
++ if (socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds)) {
++ error_setg_errno(errp, errno, "Error creating socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC)");
++ goto error;
++ }
++
++ pid = qemu_fork(errp);
++ if (pid < 0) {
++ goto error;
++ }
++
++ if (!pid) {
++ /* child */
++ dup2(fds[1], STDIN_FILENO);
++ execv(argv[0], (char * const *)argv);
++ _exit(1);
++ }
++
++ /*
++ * Hand over our end of the socket pair to the qio channel.
++ *
++ * We don't reap the child because it is expected to keep
++ * running. We also don't support the "reconnect" option for the
++ * same reason.
++ */
++ sioc = qio_channel_socket_new_fd(fds[0], errp);
++ if (!sioc) {
++ goto error;
++ }
++ fds[0] = -1;
++
++ g_free(chr->filename);
++ chr->filename = g_strdup_printf("cmd:%s", cmd);
++ tcp_chr_new_client(chr, sioc);
++
++ error:
++ if (fds[0] >= 0) {
++ close(fds[0]);
++ }
++ if (fds[1] >= 0) {
++ close(fds[1]);
++ }
++ if (sioc) {
++ object_unref(OBJECT(sioc));
++ }
++}
++#endif
++
+ static void qmp_chardev_open_socket(Chardev *chr,
+ ChardevBackend *backend,
+ bool *be_opened,
+@@ -859,6 +921,9 @@
+ {
+ SocketChardev *s = SOCKET_CHARDEV(chr);
+ ChardevSocket *sock = backend->u.socket.data;
++#ifndef _WIN32
++ const char *cmd = sock->cmd;
++#endif
+ bool do_nodelay = sock->has_nodelay ? sock->nodelay : false;
+ bool is_listen = sock->has_server ? sock->server : true;
+ bool is_telnet = sock->has_telnet ? sock->telnet : false;
+@@ -925,7 +990,14 @@
+ } else if (reconnect > 0) {
+ s->reconnect_time = reconnect;
+ }
+-
++#ifndef _WIN32
++ if (cmd) {
++ chardev_open_socket_cmd(chr, cmd, errp);
++
++ /* everything ready (or failed permanently) before we return */
++ *be_opened = true;
++ } else
++#endif
+ if (s->reconnect_time) {
+ sioc = qio_channel_socket_new();
+ tcp_chr_set_client_ioc_name(chr, sioc);
+@@ -985,10 +1057,26 @@
+ const char *host = qemu_opt_get(opts, "host");
+ const char *port = qemu_opt_get(opts, "port");
+ const char *tls_creds = qemu_opt_get(opts, "tls-creds");
++#ifndef _WIN32
++ const char *cmd = qemu_opt_get(opts, "cmd");
++#endif
+ SocketAddressLegacy *addr;
+ ChardevSocket *sock;
+
+ backend->type = CHARDEV_BACKEND_KIND_SOCKET;
++#ifndef _WIN32
++ if (cmd) {
++ /*
++ * Here we have to ensure that no options are set which are incompatible with
++ * spawning a command, otherwise unmodified code that doesn't know about
++ * command spawning (like socket_reconnect_timeout()) might get called.
++ */
++ if (path || is_listen || is_telnet || is_tn3270 || reconnect || host || port || tls_creds) {
++ error_setg(errp, "chardev: socket: cmd does not support any additional options");
++ return;
++ }
++ } else
++#endif
+ if (!path) {
+ if (!host) {
+ error_setg(errp, "chardev: socket: no host given");
+@@ -1021,13 +1109,24 @@
+ sock->has_reconnect = true;
+ sock->reconnect = reconnect;
+ sock->tls_creds = g_strdup(tls_creds);
++#ifndef _WIN32
++ sock->cmd = g_strdup(cmd);
++#endif
+
+ addr = g_new0(SocketAddressLegacy, 1);
++#ifndef _WIN32
++ if (path || cmd) {
++#else
+ if (path) {
++#endif
+ UnixSocketAddress *q_unix;
+ addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;
+ q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
++#ifndef _WIN32
++ q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path);
++#else
+ q_unix->path = g_strdup(path);
++#endif
+ } else {
+ addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
+ addr->u.inet.data = g_new(InetSocketAddress, 1);
+diff --git a/chardev/char.c b/chardev/char.c
+index 2ae4f465ec..5d52cd5de5 100644
+--- a/chardev/char.c
++++ b/chardev/char.c
+@@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
+ },{
+ .name = "path",
+ .type = QEMU_OPT_STRING,
++ },{
++ .name = "cmd",
++ .type = QEMU_OPT_STRING,
+ },{
+ .name = "host",
+ .type = QEMU_OPT_STRING,
+diff --git a/qapi/char.json b/qapi/char.json
+index ae19dcd1ed..6de0f29bcd 100644
+--- a/qapi/char.json
++++ b/qapi/char.json
+@@ -241,6 +241,10 @@
+ #
+ # @addr: socket address to listen on (server=true)
+ # or connect to (server=false)
++# @cmd: command to run via "sh -c" with stdin as one end of
++# a AF_UNIX SOCK_DSTREAM socket pair. The other end
++# is used by the chardev. Either an addr or a cmd can
++# be specified, but not both.
+ # @tls-creds: the ID of the TLS credentials object (since 2.6)
+ # @server: create server socket (default: true)
+ # @wait: wait for incoming connection on server
+@@ -258,6 +262,7 @@
+ # Since: 1.4
+ ##
+ { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddressLegacy',
++ '*cmd' : 'str',
+ '*tls-creds' : 'str',
+ '*server' : 'bool',
+ '*wait' : 'bool',
+--
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
new file mode 100644
index 0000000..f8d7f66
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
@@ -0,0 +1,63 @@
+From ee9a17d0e12143971a9676227cce953c0dbe52fb Mon Sep 17 00:00:00 2001
+From: Prasad J Pandit <pjp@fedoraproject.org>
+Date: Thu, 16 Nov 2017 13:21:55 +0530
+Subject: [PATCH] ps2: check PS2Queue pointers in post_load routine
+
+During Qemu guest migration, a destination process invokes ps2
+post_load function. In that, if 'rptr' and 'count' values were
+invalid, it could lead to OOB access or infinite loop issue.
+Add check to avoid it.
+
+Reported-by: Cyrille Chatras <cyrille.chatras@orange.com>
+Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
+Message-id: 20171116075155.22378-1-ppandit@redhat.com
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+
+CVE: CVE-2017-16845
+Upstream-Status: Backport
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ hw/input/ps2.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/hw/input/ps2.c b/hw/input/ps2.c
+index f388a23..de171a2 100644
+--- a/hw/input/ps2.c
++++ b/hw/input/ps2.c
+@@ -1225,24 +1225,21 @@ static void ps2_common_reset(PS2State *s)
+ static void ps2_common_post_load(PS2State *s)
+ {
+ PS2Queue *q = &s->queue;
+- int size;
+- int i;
+- int tmp_data[PS2_QUEUE_SIZE];
++ uint8_t i, size;
++ uint8_t tmp_data[PS2_QUEUE_SIZE];
+
+ /* set the useful data buffer queue size, < PS2_QUEUE_SIZE */
+- size = q->count > PS2_QUEUE_SIZE ? 0 : q->count;
++ size = (q->count < 0 || q->count > PS2_QUEUE_SIZE) ? 0 : q->count;
+
+ /* move the queue elements to the start of data array */
+- if (size > 0) {
+- for (i = 0; i < size; i++) {
+- /* move the queue elements to the temporary buffer */
+- tmp_data[i] = q->data[q->rptr];
+- if (++q->rptr == 256) {
+- q->rptr = 0;
+- }
++ for (i = 0; i < size; i++) {
++ if (q->rptr < 0 || q->rptr >= sizeof(q->data)) {
++ q->rptr = 0;
+ }
+- memcpy(q->data, tmp_data, size);
++ tmp_data[i] = q->data[q->rptr++];
+ }
++ memcpy(q->data, tmp_data, size);
++
+ /* reset rptr/wptr/count */
+ q->rptr = 0;
+ q->wptr = size;
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
index 123833f..7711789 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
@@ -24,11 +24,11 @@
ui/sdl.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
-diff --git a/ui/sdl.c b/ui/sdl.c
-index 39a42d6..9b8abe5 100644
---- a/ui/sdl.c
-+++ b/ui/sdl.c
-@@ -59,6 +59,10 @@ static SDL_Cursor *guest_sprite = NULL;
+Index: qemu-2.11.1/ui/sdl.c
+===================================================================
+--- qemu-2.11.1.orig/ui/sdl.c
++++ qemu-2.11.1/ui/sdl.c
+@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
static int scaling_active = 0;
static Notifier mouse_mode_notifier;
static int idle_counter;
@@ -37,10 +37,10 @@
+#endif
+static doing_grabs = True;
- static void sdl_update(DisplayChangeListener *dcl,
- int x, int y, int w, int h)
-@@ -384,14 +388,16 @@ static void sdl_grab_start(void)
- }
+ #define SDL_REFRESH_INTERVAL_BUSY 10
+ #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
+@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
+ }
} else
sdl_hide_cursor();
- SDL_WM_GrabInput(SDL_GRAB_ON);
@@ -58,7 +58,7 @@
gui_grab = 0;
sdl_show_cursor();
sdl_update_caption();
-@@ -909,6 +915,8 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
+@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
* This requires SDL >= 1.2.14. */
setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
@@ -67,6 +67,3 @@
flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
if (SDL_Init (flags)) {
fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
deleted file mode 100644
index f593cf9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-[PATCH] exclude some arm EABI obsolete syscalls
-
-Upstream-Status: Pending
-
-some syscalls are obsolete and no longer available for EABI, exclude them to
-fix the below error:
- In file included from qemu-seccomp.c:16:0:
- qemu-seccomp.c:28:7: error: '__NR_select' undeclared here (not in a function)
- { SCMP_SYS(select), 252 },
- ^
- qemu-seccomp.c:36:7: error: '__NR_mmap' undeclared here (not in a function)
- { SCMP_SYS(mmap), 247 },
- ^
- qemu-seccomp.c:57:7: error: '__NR_getrlimit' undeclared here (not in a function)
- { SCMP_SYS(getrlimit), 245 },
- ^
- qemu-seccomp.c:96:7: error: '__NR_time' undeclared here (not in a function)
- { SCMP_SYS(time), 245 },
- ^
- qemu-seccomp.c:185:7: error: '__NR_alarm' undeclared here (not in a function)
- { SCMP_SYS(alarm), 241 },
-
-please refer source files:
- arch/arm/include/uapi/asm/unistd.h
-or kernel header:
- /usr/include/asm/unistd.h
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- qemu-seccomp.c | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/qemu-seccomp.c b/qemu-seccomp.c
-index df75d9c..0e577f8 100644
---- a/qemu-seccomp.c
-+++ b/qemu-seccomp.c
-@@ -35,15 +35,21 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(timer_settime), 255 },
- { SCMP_SYS(timer_gettime), 254 },
- { SCMP_SYS(futex), 253 },
-+#if !defined(__ARM_EABI__)
- { SCMP_SYS(select), 252 },
-+ { SCMP_SYS(time), 245 },
-+ { SCMP_SYS(alarm), 241 },
-+ { SCMP_SYS(getrlimit), 245 },
-+ { SCMP_SYS(mmap), 247 },
-+ { SCMP_SYS(socketcall), 250 },
-+ { SCMP_SYS(ipc), 245 },
-+#endif
- { SCMP_SYS(recvfrom), 251 },
- { SCMP_SYS(sendto), 250 },
-- { SCMP_SYS(socketcall), 250 },
- { SCMP_SYS(read), 249 },
- { SCMP_SYS(io_submit), 249 },
- { SCMP_SYS(brk), 248 },
- { SCMP_SYS(clone), 247 },
-- { SCMP_SYS(mmap), 247 },
- { SCMP_SYS(mprotect), 246 },
- { SCMP_SYS(execve), 245 },
- { SCMP_SYS(open), 245 },
-@@ -58,7 +64,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(bind), 245 },
- { SCMP_SYS(listen), 245 },
- { SCMP_SYS(semget), 245 },
-- { SCMP_SYS(ipc), 245 },
- { SCMP_SYS(gettimeofday), 245 },
- { SCMP_SYS(readlink), 245 },
- { SCMP_SYS(access), 245 },
-@@ -104,7 +109,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(times), 245 },
- { SCMP_SYS(exit), 245 },
- { SCMP_SYS(clock_gettime), 245 },
-- { SCMP_SYS(time), 245 },
- { SCMP_SYS(restart_syscall), 245 },
- { SCMP_SYS(pwrite64), 245 },
- { SCMP_SYS(nanosleep), 245 },
-@@ -194,7 +198,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
- { SCMP_SYS(lstat64), 241 },
- { SCMP_SYS(sendfile64), 241 },
- { SCMP_SYS(ugetrlimit), 241 },
-- { SCMP_SYS(alarm), 241 },
- { SCMP_SYS(rt_sigsuspend), 241 },
- { SCMP_SYS(rt_sigqueueinfo), 241 },
- { SCMP_SYS(rt_tgsigqueueinfo), 241 },
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch
deleted file mode 100644
index a6908bd..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From: Christopher Covington
-Date: Wed, 28 Dec 2016 15:04:33 -0500
-Subject: [Qemu-devel] [PATCH v3] build: include sys/sysmacros.h for major() and minor()a
-
-The definition of the major() and minor() macros are moving within glibc to
-<sys/sysmacros.h>. Include this header when it is available to avoid the
-following sorts of build-stopping messages:
-
-qga/commands-posix.c: In function ‘dev_major_minor’:
-qga/commands-posix.c:656:13: error: In the GNU C Library, "major" is defined
- by <sys/sysmacros.h>. For historical compatibility, it is
- currently defined by <sys/types.h> as well, but we plan to
- remove this soon. To use "major", include <sys/sysmacros.h>
- directly. If you did not intend to use a system-defined macro
- "major", you should undefine it after including <sys/types.h>. [-Werror]
- *devmajor = major(st.st_rdev);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~
-
-qga/commands-posix.c:657:13: error: In the GNU C Library, "minor" is defined
- by <sys/sysmacros.h>. For historical compatibility, it is
- currently defined by <sys/types.h> as well, but we plan to
- remove this soon. To use "minor", include <sys/sysmacros.h>
- directly. If you did not intend to use a system-defined macro
- "minor", you should undefine it after including <sys/types.h>. [-Werror]
- *devminor = minor(st.st_rdev);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The additional include allows the build to complete on Fedora 26 (Rawhide)
-with glibc version 2.24.90.
-
-Signed-off-by: Christopher Covington <address@hidden>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Upstream-Status: Submitted https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg03548.html
-
-diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure
---- qemu-2.8.0.orig/configure 2017-02-21 19:05:13.180094708 +0100
-+++ qemu-2.8.0/configure 2017-02-21 19:08:53.114087084 +0100
-@@ -4727,6 +4727,20 @@
- then
- fi
-
- ##########################################
-+# check for sysmacros.h
-+
-+have_sysmacros=no
-+cat > $TMPC << EOF
-+#include <sys/sysmacros.h>
-+int main(void) {
-+ return makedev(0, 0);
-+}
-+EOF
-+if compile_prog "" "" ; then
-+ have_sysmacros=yes
-+fi
-+
-+##########################################
- # End of CC checks
- # After here, no more $cc or $ld runs
-
-diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure
---- qemu-2.8.0.orig/configure 2017-02-21 19:05:13.180094708 +0100
-+++ qemu-2.8.0/configure 2017-02-21 19:08:53.114087084 +0100
-@@ -5695,6 +5709,10 @@
- echo "CONFIG_AF_VSOCK=y" >> $config_host_mak
- fi
-
-+if test "$have_sysmacros" = "yes" ; then
-+ echo "CONFIG_SYSMACROS=y" >> $config_host_mak
-+fi
-+
- # Hold two types of flag:
- # CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on
- # a thread we have a handle to
-diff -uNr qemu-2.8.0.orig/include/sysemu/os-posix.h qemu-2.8.0/include/sysemu/os-posix.h
---- qemu-2.8.0.orig/include/sysemu/os-posix.h 2016-12-20 21:16:48.000000000 +0100
-+++ qemu-2.8.0/include/sysemu/os-posix.h 2017-02-21 19:07:18.009090381 +0100
-@@ -34,6 +34,10 @@
- #include <netdb.h>
- #include <sys/un.h>
-
-+#ifdef CONFIG_SYSMACROS
-+#include <sys/sysmacros.h>
-+#endif
-+
- void os_set_line_buffering(void);
- void os_set_proc_name(const char *s);
- void os_setup_signal_handling(void);
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
new file mode 100644
index 0000000..d2c5225
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
@@ -0,0 +1,35 @@
+From 4fa4aae4176ef6d8f4d4b8323d061e2433918a26 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@xilinx.com>
+Date: Wed, 17 Jan 2018 10:51:49 -0800
+Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
+
+Since commit "linux-user: Tidy and enforce reserved_va initialization"
+(18e80c55bb6ec17c05ec0ba717ec83933c2bfc07) the Yocto webkitgtk build
+hangs when cross compiling for 32-bit x86 on a 64-bit x86 machine using
+musl.
+
+To fix the issue reduce the MAX_RESERVED_VA macro to be a closer match
+to what it was before the problematic commit.
+
+Upstream-Status: Submitted http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
+Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
+---
+ linux-user/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux-user/main.c b/linux-user/main.c
+index 450eb3ce65..c7cc0a184e 100644
+--- a/linux-user/main.c
++++ b/linux-user/main.c
+@@ -77,7 +77,7 @@ do { \
+ (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
+ /* There are a number of places where we assign reserved_va to a variable
+ of type abi_ulong and expect it to fit. Avoid the last page. */
+-# define MAX_RESERVED_VA (0xfffffffful & TARGET_PAGE_MASK)
++# define MAX_RESERVED_VA (0x7ffffffful & TARGET_PAGE_MASK)
+ # else
+ # define MAX_RESERVED_VA (1ul << TARGET_VIRT_ADDR_SPACE_BITS)
+ # endif
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch
deleted file mode 100644
index 6f72243..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-I've tracked down what I think is a problem causing qemu-system-ppc
-to hang whilst booting images.
-
-I believe the decrementer timer stops receiving interrupts so
-tasks in our images hang indefinitely as the timer stopped.
-
-It can be summed up with this line of debug:
-
-ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 00000100req 00000004
-
-It should normally read:
-
-ppc_set_irq: 0x55b4e0d562f0 n_IRQ 8 level 1 => pending 00000100req 00000002
-
-The question is why CPU_INTERRUPT_EXITTB ends up being set when the
-lines above this log message clearly sets CPU_INTERRUPT_HARD (via
-cpu_interrupt() ).
-
-I note in cpu.h:
-
- /* updates protected by BQL */
- uint32_t interrupt_request;
-
-(for struct CPUState)
-
-The ppc code does "cs->interrupt_request |= CPU_INTERRUPT_EXITTB" in 5
-places, 3 in excp_helper.c and 2 in helper_regs.h. In all cases,
-g_assert(qemu_mutex_iothread_locked()); fails. If I do something like:
-
-if (!qemu_mutex_iothread_locked()) {
- qemu_mutex_lock_iothread();
- cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
- qemu_mutex_unlock_iothread();
-} else {
- cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-}
-
-in these call sites then I can no longer lock qemu up with my test
-case.
-
-I suspect the _HARD setting gets overwritten which stops the
-decrementer interrupts being delivered.
-
-Upstream-Status: Submitted [Issue discussed on qemu mailing list 2017/11/20]
-RP 2017/11/20
-
-Index: qemu-2.10.1/target/ppc/excp_helper.c
-===================================================================
---- qemu-2.10.1.orig/target/ppc/excp_helper.c
-+++ qemu-2.10.1/target/ppc/excp_helper.c
-@@ -207,7 +207,9 @@ static inline void powerpc_excp(PowerPCC
- "Entering checkstop state\n");
- }
- cs->halted = 1;
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
- }
- if (env->msr_mask & MSR_HVB) {
- /* ISA specifies HV, but can be delivered to guest with HV clear
-@@ -940,7 +942,9 @@ void helper_store_msr(CPUPPCState *env,
-
- if (excp != 0) {
- CPUState *cs = CPU(ppc_env_get_cpu(env));
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
- raise_exception(env, excp);
- }
- }
-@@ -995,7 +999,9 @@ static inline void do_rfi(CPUPPCState *e
- /* No need to raise an exception here,
- * as rfi is always the last insn of a TB
- */
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
-
- /* Reset the reservation */
- env->reserve_addr = -1;
-Index: qemu-2.10.1/target/ppc/helper_regs.h
-===================================================================
---- qemu-2.10.1.orig/target/ppc/helper_regs.h
-+++ qemu-2.10.1/target/ppc/helper_regs.h
-@@ -114,11 +114,15 @@ static inline int hreg_store_msr(CPUPPCS
- }
- if (((value >> MSR_IR) & 1) != msr_ir ||
- ((value >> MSR_DR) & 1) != msr_dr) {
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
- }
- if ((env->mmu_model & POWERPC_MMU_BOOKE) &&
- ((value >> MSR_GS) & 1) != msr_gs) {
-- cs->interrupt_request |= CPU_INTERRUPT_EXITTB;
-+ qemu_mutex_lock_iothread();
-+ cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
-+ qemu_mutex_unlock_iothread();
- }
- if (unlikely((env->flags & POWERPC_FLAG_TGPR) &&
- ((value ^ env->msr) & (1 << MSR_TGPR)))) {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.11.1.bb
similarity index 67%
rename from import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.11.1.bb
index bdf6c21..ab82c5f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.11.1.bb
@@ -10,7 +10,6 @@
SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
file://powerpc_rom.bin \
file://disable-grabs.patch \
- file://exclude-some-arm-EABI-obsolete-syscalls.patch \
file://wacom.patch \
file://add-ptest-in-makefile-v10.patch \
file://run-ptest \
@@ -18,18 +17,12 @@
file://no-valgrind.patch \
file://pathlimit.patch \
file://qemu-2.5.0-cflags.patch \
- file://glibc-2.25.patch \
- file://0001-Provide-support-for-the-CUSE-TPM.patch \
- file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \
- file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \
- file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch \
+ file://chardev-connect-socket-to-a-spawned-command.patch \
file://apic-fixup-fallthrough-to-PIC.patch \
- file://CVE-2017-13711.patch \
- file://CVE-2017-13673.patch \
- file://CVE-2017-13672.patch \
- file://CVE-2017-14167.patch \
- file://ppc_locking.patch \
+ file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
file://memfd.patch \
+ file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
+ file://check-PS2Queue-pointers-in-post_load-routine.patch \
"
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
@@ -39,8 +32,8 @@
file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
"
-SRC_URI[md5sum] = "ca73441de73a9b52c6c49c97190d2185"
-SRC_URI[sha256sum] = "7e9f39e1306e6dcc595494e91c1464d4b03f55ddd2053183e0e1b69f7f776d48"
+SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
+SRC_URI[sha256sum] = "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
COMPATIBLE_HOST_mipsarchn32 = "null"
COMPATIBLE_HOST_mipsarchn64 = "null"
@@ -60,4 +53,7 @@
find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
+ # Don't check the file genreated by configure
+ sed -i -e '/wildcard config-host.mak/d' \
+ -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch
deleted file mode 100644
index daf4429..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt/aclocal.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-Upstream-Status: Pending
-
-Add the aclocal.m4 as acinclude.m4
-
-Index: quilt-0.47/acinclude.m4
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ quilt-0.47/acinclude.m4 2006-10-10 17:05:56.000000000 +0100
-@@ -0,0 +1,119 @@
-+dnl Allow configure to specify a specific binary
-+dnl 1: Environment variable
-+dnl 2: binary name
-+dnl 3: optional list of alternative binary names
-+dnl 4: optional list of additional search directories
-+AC_DEFUN([QUILT_COMPAT_PROG_PATH],[
-+ m4_define([internal_$2_cmd],[esyscmd(ls compat/$2.in 2>/dev/null)])
-+
-+ AC_ARG_WITH($2, AC_HELP_STRING(
-+ [--with-$2], [name of the $2 executable to use]
-+ m4_if(internal_$2_cmd,[],[],[ (use --without-$2
-+ to use an internal mechanism)])),
-+ [
-+ if test x"$withval" = xnone; then
-+ AC_MSG_ERROR([Invalid configure argument. use --without-$2])
-+ fi
-+ if test x"$withval" != xno; then
-+ AC_MSG_CHECKING(for $2)
-+ $1="$withval"
-+ if test -e "$$1"; then
-+ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
-+ AC_MSG_ERROR([$$1 is not an executable file])
-+ fi
-+ fi
-+ AC_MSG_RESULT([$$1])
-+ if test ! -e "$$1"; then
-+ AC_MSG_WARN([$$1 does not exist])
-+ fi
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ],[
-+ m4_if([$3],[],[
-+ AC_PATH_PROG($1,$2,,$PATH:$4)
-+ ],[
-+ AC_PATH_PROGS($1,$3,,$PATH:$4)
-+ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ])
-+ m4_if([$4],[],[],[
-+ if test -n "$$1"; then
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+ for dir in "$4"; do
-+ if test "`dirname $$1`" = "$dir"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ break
-+ fi
-+ done
-+ IFS="$as_save_IFS"
-+ fi
-+ ])
-+ ])
-+ if test -z "$$1"; then
-+ m4_if(internal_$2_cmd,[],[
-+ AC_MSG_ERROR([Please specify the location of $2 with the option '--with-$2'])
-+ ],[
-+ AC_MSG_WARN([Using internal $2 mechanism. Use option '--with-$2' to override])
-+ COMPAT_PROGRAMS="$COMPAT_PROGRAMS $2"
-+ $1=$2
-+ INTERNAL_$1=1
-+ ])
-+ fi
-+ AC_SUBST($1)
-+])
-+
-+dnl Allow configure to specify a specific binary
-+dnl This variant is for optional binaries.
-+dnl 1: Environment variable
-+dnl 2: binary name
-+dnl 3: optional list of alternative binary names
-+dnl 4: optional list of additional search directories
-+AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[
-+ AC_ARG_WITH($2, AC_HELP_STRING(
-+ [--with-$2], [name of the $2 executable to use]),
-+ [
-+ if test x"$withval" != xno; then
-+ AC_MSG_CHECKING(for $2)
-+ $1="$withval"
-+ if test -e "$$1"; then
-+ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
-+ AC_MSG_ERROR([$$1 is not an executable file])
-+ fi
-+ fi
-+ AC_MSG_RESULT([$$1])
-+ if test ! -e "$$1"; then
-+ AC_MSG_WARN([$$1 does not exist])
-+ fi
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ],[
-+ m4_if([$3],[],[
-+ AC_PATH_PROG($1,$2,,$PATH:$4)
-+ ],[
-+ AC_PATH_PROGS($1,$3,,$PATH:$4)
-+ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ fi
-+ ])
-+ m4_if([$4],[],[],[
-+ if test -n "$$1"; then
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+ for dir in "$4"; do
-+ if test "`dirname $$1`" = "$dir"; then
-+ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
-+ break
-+ fi
-+ done
-+ IFS="$as_save_IFS"
-+ fi
-+ ])
-+ if test -z "$$1"; then
-+ AC_MSG_WARN([$2 not found, some optional functionalities will be missing])
-+ fi
-+ ])
-+ if test -z "$$1"; then
-+ $1=$2
-+ fi
-+ AC_SUBST($1)
-+])
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb
index 12859f0..5bf818d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt_0.65.bb
@@ -1,6 +1,8 @@
require quilt.inc
inherit gettext
+
+SRC_URI += "file://gnu_patch_test_fix_target.patch"
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
-SRC_URI += "file://aclocal.patch \
- file://gnu_patch_test_fix_target.patch \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch
deleted file mode 100644
index b809332..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 36cf0ff26ece53e529e8b4f2d2f09acd8794b055 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 24 Mar 2017 15:35:47 +0200
-Subject: [PATCH] Add PYTHON_ABI when searching for python libraries.
-
-It has a value of 'm' when using Python3, and so without it
-configure will not find the libraries.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9c58467c1..a506ec819 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -642,7 +642,7 @@ AS_IF([test "$enable_python" = yes],[
- ])
- CPPFLAGS="$save_CPPFLAGS"
- save_LIBS="$LIBS"
-- AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python],[
-+ AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION}${PYTHON_ABI} python],[
- WITH_PYTHON_LIB="$ac_res"
- ],[AC_MSG_ERROR([missing python library])
- ])
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index 1f61aca..5604cb9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -1,10 +1,10 @@
-From d82691b8d58201dd03e30585daacd8ffd1556ae2 Mon Sep 17 00:00:00 2001
+From c82c19dc583843b1a975f2e3f2e151656a6f377c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 27 Feb 2017 09:43:30 +0200
-Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
+Subject: [PATCH 06/14] Do not hardcode "lib/rpm" as the installation path for
default configuration and macros.
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/263]
+Upstream-Status: Denied [https://github.com/rpm-software-management/rpm/pull/263]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
@@ -14,10 +14,10 @@
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 4f3be8770..92ffd3d68 100644
+index 7155d9f00..21b95ae5f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -875,7 +875,7 @@ else
+@@ -1047,7 +1047,7 @@ else
usrprefix=$prefix
fi
@@ -27,10 +27,10 @@
AC_SUBST(OBJDUMP)
diff --git a/macros.in b/macros.in
-index c6d5a6b03..84ae25275 100644
+index d08624856..68a972f1e 100644
--- a/macros.in
+++ b/macros.in
-@@ -877,7 +877,7 @@ package or when debugging this package.\
+@@ -954,7 +954,7 @@ package or when debugging this package.\
%_sharedstatedir %{_prefix}/com
%_localstatedir %{_prefix}/var
%_lib lib
@@ -40,7 +40,7 @@
%_infodir %{_datadir}/info
%_mandir %{_datadir}/man
diff --git a/rpm.am b/rpm.am
-index 1f43ad8a0..6854ff6ba 100644
+index 51225892d..e0c834d37 100644
--- a/rpm.am
+++ b/rpm.am
@@ -1,10 +1,10 @@
@@ -55,7 +55,7 @@
+rpmconfigdir = $(libdir)/rpm
# Libtool version (current-revision-age) for all our libraries
- rpm_version_info = 7:0:0
+ rpm_version_info = 8:1:0
--
-2.11.0
+2.15.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
index a38675f..bf24d43 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
@@ -6,6 +6,9 @@
We add lots of native stuff into it and scriptlets rely on that.
+Also need to remove the xx test later in the function since the
+value could now be used un-initialised.
+
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
@@ -25,6 +28,13 @@
free(ipath);
}
---
-2.11.0
-
+@@ -206,9 +206,7 @@ static void doScriptExec(ARGV_const_t ar
+ /* XXX Don't mtrace into children. */
+ unsetenv("MALLOC_CHECK_");
+
+- if (xx == 0) {
+ xx = execv(argv[0], argv);
+- }
+ }
+ _exit(127); /* exit 127 for compatibility with bash(1) */
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch
new file mode 100644
index 0000000..6f440c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch
@@ -0,0 +1,148 @@
+From 9c3e5de3240554c8ea1b29d52eeadee4840fefac Mon Sep 17 00:00:00 2001
+From: Kir Kolyshkin <kolyshkin@gmail.com>
+Date: Tue, 29 May 2018 17:37:05 -0700
+Subject: [PATCH 1/3] Factor out and unify setting CLOEXEC
+
+Commit 7a7c31f5 ("Set FD_CLOEXEC on opened files before exec from
+lua script is called") copied the code that sets CLOEXEC flag on all
+possible file descriptors from lib/rpmscript.c to luaext/lposix.c,
+essentially creating two copies of the same code (modulo comments
+and the unused assignment).
+
+This commit moves the functionality into its own function, without
+any code modifications, using the version from luaext/lposix.c.
+
+Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ lib/rpmscript.c | 18 ++----------------
+ luaext/lposix.c | 13 ++-----------
+ rpmio/rpmio.c | 16 ++++++++++++++++
+ rpmio/rpmio_internal.h | 6 ++++++
+ 4 files changed, 26 insertions(+), 27 deletions(-)
+
+diff --git a/lib/rpmscript.c b/lib/rpmscript.c
+index 747385a5b..b4ccd3246 100644
+--- a/lib/rpmscript.c
++++ b/lib/rpmscript.c
+@@ -3,7 +3,6 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <errno.h>
+-#include <unistd.h>
+
+ #include <rpm/rpmfileutil.h>
+ #include <rpm/rpmmacro.h>
+@@ -14,6 +13,7 @@
+
+ #include "rpmio/rpmlua.h"
+ #include "lib/rpmscript.h"
++#include "rpmio/rpmio_internal.h"
+
+ #include "lib/rpmplugins.h" /* rpm plugins hooks */
+
+@@ -170,26 +170,12 @@ static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr
+ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
+ FD_t scriptFd, FD_t out)
+ {
+- int flag;
+- int fdno;
+ int xx;
+- int open_max;
+
+ /* SIGPIPE is ignored in rpm, reset to default for the scriptlet */
+ (void) signal(SIGPIPE, SIG_DFL);
+
+- /* XXX Force FD_CLOEXEC on all inherited fdno's. */
+- open_max = sysconf(_SC_OPEN_MAX);
+- if (open_max == -1) {
+- open_max = 1024;
+- }
+- for (fdno = 3; fdno < open_max; fdno++) {
+- flag = fcntl(fdno, F_GETFD);
+- if (flag == -1 || (flag & FD_CLOEXEC))
+- continue;
+- xx = fcntl(fdno, F_SETFD, FD_CLOEXEC);
+- /* XXX W2DO? debug msg for inheirited fdno w/o FD_CLOEXEC */
+- }
++ rpmSetCloseOnExec();
+
+ if (scriptFd != NULL) {
+ int sfdno = Fileno(scriptFd);
+diff --git a/luaext/lposix.c b/luaext/lposix.c
+index 0a7c26c71..5d7ad3c87 100644
+--- a/luaext/lposix.c
++++ b/luaext/lposix.c
+@@ -27,6 +27,7 @@
+ #include <unistd.h>
+ #include <utime.h>
+ #include <rpm/rpmutil.h>
++#include "rpmio/rpmio_internal.h"
+
+ #define MYNAME "posix"
+ #define MYVERSION MYNAME " library for " LUA_VERSION " / Nov 2003"
+@@ -335,21 +336,11 @@ static int Pexec(lua_State *L) /** exec(path,[args]) */
+ const char *path = luaL_checkstring(L, 1);
+ int i,n=lua_gettop(L);
+ char **argv;
+- int flag, fdno, open_max;
+
+ if (!have_forked)
+ return luaL_error(L, "exec not permitted in this context");
+
+- open_max = sysconf(_SC_OPEN_MAX);
+- if (open_max == -1) {
+- open_max = 1024;
+- }
+- for (fdno = 3; fdno < open_max; fdno++) {
+- flag = fcntl(fdno, F_GETFD);
+- if (flag == -1 || (flag & FD_CLOEXEC))
+- continue;
+- fcntl(fdno, F_SETFD, FD_CLOEXEC);
+- }
++ rpmSetCloseOnExec();
+
+ argv = malloc((n+1)*sizeof(char*));
+ if (argv==NULL) return luaL_error(L,"not enough memory");
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index c7cbc32aa..ea111d2ec 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -1759,3 +1759,19 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id)
+
+ return ctx;
+ }
++
++void rpmSetCloseOnExec(void)
++{
++ int flag, fdno, open_max;
++
++ open_max = sysconf(_SC_OPEN_MAX);
++ if (open_max == -1) {
++ open_max = 1024;
++ }
++ for (fdno = 3; fdno < open_max; fdno++) {
++ flag = fcntl(fdno, F_GETFD);
++ if (flag == -1 || (flag & FD_CLOEXEC))
++ continue;
++ fcntl(fdno, F_SETFD, FD_CLOEXEC);
++ }
++}
+diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h
+index fbed183b0..370cbdc75 100644
+--- a/rpmio/rpmio_internal.h
++++ b/rpmio/rpmio_internal.h
+@@ -41,6 +41,12 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id);
+ int rpmioSlurp(const char * fn,
+ uint8_t ** bp, ssize_t * blenp);
+
++/**
++ * Set close-on-exec flag for all opened file descriptors, except
++ * stdin/stdout/stderr.
++ */
++void rpmSetCloseOnExec(void);
++
+ #ifdef __cplusplus
+ }
+ #endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
index edf9ec0..0b1d629 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
@@ -1,24 +1,21 @@
-From 211c2d11200e6657132c52e7ac68f8c118231262 Mon Sep 17 00:00:00 2001
+From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 27 Feb 2017 14:43:21 +0200
-Subject: [PATCH] Fix build with musl C library.
+Subject: [PATCH 1/9] Fix build with musl C library.
-Upstream-Status: Inappropriate [problem already solved in master branch]
+Upstream-Status: Pending
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- configure.ac | 3 ++-
- misc/Makefile.am | 3 +--
- misc/rpmxprogname.c | 3 +--
- 3 files changed, 4 insertions(+), 5 deletions(-)
+ configure.ac | 3 ++-
+ rpmio/digest_nss.c | 1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 92ffd3d68..9c58467c1 100644
+index c04a2e8d1..c9d9ac16d 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -229,6 +229,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
+@@ -255,6 +255,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
# Check for libelf library. Prefer external, otherwise none.
WITH_LIBELF_LIB=
AC_CHECK_HEADER([libelf.h])
@@ -26,7 +23,7 @@
AC_CHECK_HEADERS([gelf.h], [
AC_CHECK_LIB(elf, gelf_getvernaux, [
AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
-@@ -237,7 +238,7 @@ AC_CHECK_HEADERS([gelf.h], [
+@@ -263,7 +264,7 @@ AC_CHECK_HEADERS([gelf.h], [
])
])
AC_SUBST(WITH_LIBELF_LIB)
@@ -35,40 +32,17 @@
AC_CHECK_HEADERS([dwarf.h], [
WITH_LIBDWARF=yes
-diff --git a/misc/Makefile.am b/misc/Makefile.am
-index 8bf0093d9..b9db3d31a 100644
---- a/misc/Makefile.am
-+++ b/misc/Makefile.am
-@@ -5,10 +5,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/misc
+diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
+index 992d9acf6..e11920e3e 100644
+--- a/rpmio/digest_nss.c
++++ b/rpmio/digest_nss.c
+@@ -1,5 +1,6 @@
+ #include "system.h"
- EXTRA_DIST = \
- fnmatch.c fnmatch.h \
-- rpmxprogname.c rpmxprogname.h \
- stpcpy.c stpncpy.c
-
- noinst_LTLIBRARIES = libmisc.la
-
--libmisc_la_SOURCES = fts.c fts.h
-+libmisc_la_SOURCES = fts.c fts.h rpmxprogname.c rpmxprogname.h
- libmisc_la_LIBADD = @LTLIBOBJS@
-diff --git a/misc/rpmxprogname.c b/misc/rpmxprogname.c
-index f89600613..e94625ea8 100644
---- a/misc/rpmxprogname.c
-+++ b/misc/rpmxprogname.c
-@@ -13,7 +13,7 @@ char *_rpmxgetprogname(void)
- {
- const char *empty = "";
-
-- if (_rpmxprognam != NULL) /* never return NULL string */
-+ if (_rpmxprogname != NULL) /* never return NULL string */
- return _rpmxprogname;
- else
- return empty;
-@@ -30,4 +30,3 @@ void _rpmxsetprogname(const char *pn)
- }
- }
-
--#endif /* _RPMXPROGNAME_H */
++#include <signal.h>
+ #include <pthread.h>
+ #include <nss.h>
+ #include <sechash.h>
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
deleted file mode 100644
index 9648cac..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d42ece6fa15b98d7f9221b90b85b78631df2c0a0 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 14 Feb 2017 13:51:19 +0200
-Subject: [PATCH] When nice value cannot be reset, issue a notice instead of a
- warning
-
-Otherwise build logs on the autobuilder get very clutter, as it
-doesn't allow the nice value to be reset for some reason.
-
-Upstream-Status: Inappropriate [oe specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- lib/rpmscript.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/rpmscript.c b/lib/rpmscript.c
-index 5e1e99906..3975aead8 100644
---- a/lib/rpmscript.c
-+++ b/lib/rpmscript.c
-@@ -347,7 +347,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
- int ret;
- ret = setpriority(PRIO_PROCESS, 0, 0);
- if (ret == -1) {
-- rpmlog(RPMLOG_WARNING, _("Unable to reset nice value: %s"),
-+ rpmlog(RPMLOG_NOTICE, _("Unable to reset nice value: %s\n"),
- strerror(errno));
- }
-
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
new file mode 100644
index 0000000..dc71d9b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-configure.ac-add-option-for-dbus.patch
@@ -0,0 +1,42 @@
+From dfb422c744fdc1838afc40b8e1f161bb46093d92 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Sun, 8 Apr 2018 12:06:42 +0800
+Subject: [PATCH] configure.ac: add option for dbus
+
+Add option for dbus so that users could choose to build with dbus
+or with no dbus.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ configure.ac | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4db15c7909..493f393d31 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -976,12 +976,15 @@ AS_IF([test "$enable_plugins" = yes],[
+ ])
+ AM_CONDITIONAL(ENABLE_PLUGINS,[test "$enable_plugins" = yes])
+
+-with_dbus=no
+-AS_IF([test "$enable_plugins" != no],[
++AC_ARG_WITH([dbus], [AS_HELP_STRING([--with-dbus], [build with dbus support])],
++ [],
++ [with_dbus=yes])
++
++AS_IF([test "$with_dbus" != no],[
+ PKG_CHECK_MODULES([DBUS],
+ [dbus-1 >= 1.3],
+- [AC_DEFINE(DBUS, 1, [Build with dbus support?]) with_dbus=yes],
+- [with_dbus=no])
++ [AC_DEFINE(DBUS, 1, [Build with dbus support?])],
++ [AC_MSG_ERROR([dbus not present (--without-dbus to disable)])])
+ AC_SUBST(DBUS_CFLAGS)
+ AC_SUBST(DBUS_LIBS)
+ ])
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch
new file mode 100644
index 0000000..a27f8e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch
@@ -0,0 +1,100 @@
+From 5e6f05cd8dad6c1ee6bd1e6e43f176976c9c3416 Mon Sep 17 00:00:00 2001
+From: Kir Kolyshkin <kolyshkin@gmail.com>
+Date: Tue, 29 May 2018 17:52:56 -0700
+Subject: [PATCH 2/3] Optimize rpmSetCloseOnExec
+
+In case maximum number of open files limit is set too high, both
+luaext/Pexec() and lib/doScriptExec() spend way too much time
+trying to set FD_CLOEXEC flag for all those file descriptors,
+resulting in severe increase of time it takes to execute say
+rpm or dnf.
+
+This becomes increasingly noticeable when running with e.g. under
+Docker, the reason being:
+
+> $ docker run fedora ulimit -n
+> 1048576
+
+One obvious fix is to use procfs to get the actual list of opened fds
+and iterate over it. My quick-n-dirty benchmark shows the /proc approach
+is about 10x faster than iterating through a list of just 1024 fds,
+so it's an improvement even for default ulimit values.
+
+Note that the old method is still used in case /proc is not available.
+
+While at it,
+
+ 1. fix the function by making sure we modify (rather than set)
+ the existing flags. As the only known flag is FD_CLOEXEC,
+ this change is currently purely aesthetical, but in case
+ other flags will appear it will become a real bug fix.
+
+ 2. get rid of magic number 3; use STDERR_FILENO
+
+Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
+
+Fixes #444
+
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ rpmio/rpmio.c | 43 ++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 34 insertions(+), 9 deletions(-)
+
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index ea111d2ec..55351c221 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -1760,18 +1760,43 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id)
+ return ctx;
+ }
+
++static void set_cloexec(int fd)
++{
++ int flags = fcntl(fd, F_GETFD);
++
++ if (flags == -1 || (flags & FD_CLOEXEC))
++ return;
++
++ fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
++}
++
+ void rpmSetCloseOnExec(void)
+ {
+- int flag, fdno, open_max;
++ const int min_fd = STDERR_FILENO; /* don't touch stdin/out/err */
++ int fd;
++
++ DIR *dir = opendir("/proc/self/fd");
++ if (dir == NULL) { /* /proc not available */
++ /* iterate over all possible fds, might be slow */
++ int open_max = sysconf(_SC_OPEN_MAX);
++ if (open_max == -1)
++ open_max = 1024;
+
+- open_max = sysconf(_SC_OPEN_MAX);
+- if (open_max == -1) {
+- open_max = 1024;
++ for (fd = min_fd + 1; fd < open_max; fd++)
++ set_cloexec(fd);
++
++ return;
+ }
+- for (fdno = 3; fdno < open_max; fdno++) {
+- flag = fcntl(fdno, F_GETFD);
+- if (flag == -1 || (flag & FD_CLOEXEC))
+- continue;
+- fcntl(fdno, F_SETFD, FD_CLOEXEC);
++
++ /* iterate over fds obtained from /proc */
++ struct dirent *entry;
++ while ((entry = readdir(dir)) != NULL) {
++ fd = atoi(entry->d_name);
++ if (fd > min_fd)
++ set_cloexec(fd);
+ }
++
++ closedir(dir);
++
++ return;
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch
new file mode 100644
index 0000000..389b41b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch
@@ -0,0 +1,53 @@
+From 307e28b4cb08b05bc044482058eeebc9f59bb9a9 Mon Sep 17 00:00:00 2001
+From: Kir Kolyshkin <kolyshkin@gmail.com>
+Date: Tue, 29 May 2018 18:09:27 -0700
+Subject: [PATCH 3/3] rpmSetCloseOnExec: use getrlimit()
+
+In case /proc is not available to get the actual list of opened fds,
+we fall back to iterating through the list of all possible fds.
+
+It is possible that during the course of the program execution the limit
+on number of open file descriptors might be lowered, so using the
+current limit, as returned by sysconf(_SC_OPEN_MAX), might omit some
+fds. Therefore, it is better to use rlim_max from the structure
+filled in by gertlimit(RLIMIT_NOFILE) to make sure we're checking
+all fds.
+
+This slows down the function, but only in the case /proc is not
+available, which should be rare in practice.
+
+Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ rpmio/rpmio.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
+index 55351c221..e051c9863 100644
+--- a/rpmio/rpmio.c
++++ b/rpmio/rpmio.c
+@@ -10,6 +10,7 @@
+ #include <sys/personality.h>
+ #endif
+ #include <sys/utsname.h>
++#include <sys/resource.h>
+
+ #include <rpm/rpmlog.h>
+ #include <rpm/rpmmacro.h>
+@@ -1778,7 +1779,14 @@ void rpmSetCloseOnExec(void)
+ DIR *dir = opendir("/proc/self/fd");
+ if (dir == NULL) { /* /proc not available */
+ /* iterate over all possible fds, might be slow */
+- int open_max = sysconf(_SC_OPEN_MAX);
++ struct rlimit rl;
++ int open_max;
++
++ if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && rl.rlim_max != RLIM_INFINITY)
++ open_max = rl.rlim_max;
++ else
++ open_max = sysconf(_SC_OPEN_MAX);
++
+ if (open_max == -1)
+ open_max = 1024;
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
index 64a5651..8989dce 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
@@ -1,7 +1,7 @@
-From ec305795a302d226343e69031ff2024dfcde69c0 Mon Sep 17 00:00:00 2001
+From 8ce9fbab2990609bdace457e146160334e931c89 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 8 Jun 2017 17:08:09 +0300
-Subject: [PATCH 3/3] build/pack.c: remove static local variables from
+Subject: [PATCH 14/15] build/pack.c: remove static local variables from
buildHost() and getBuildTime()
Their use is causing difficult to diagnoze data races when building multiple
@@ -11,8 +11,8 @@
Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
build/build.c | 54 ++++++++++++++++++++++++++++--
build/pack.c | 84 +++++++++--------------------------------------
@@ -20,7 +20,7 @@
3 files changed, 74 insertions(+), 72 deletions(-)
diff --git a/build/build.c b/build/build.c
-index 5f99c8db7..09a1311c5 100644
+index 81152e53e..6001f9e52 100644
--- a/build/build.c
+++ b/build/build.c
@@ -6,6 +6,8 @@
@@ -83,7 +83,7 @@
/**
*/
static rpmRC doRmSource(rpmSpec spec)
-@@ -203,6 +249,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
rpmRC rc = RPMRC_OK;
int test = (what & RPMBUILD_NOBUILD);
char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
@@ -93,7 +93,7 @@
if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
getenv("SOURCE_DATE_EPOCH") == NULL) {
-@@ -271,11 +320,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
goto exit;
if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
@@ -107,7 +107,7 @@
goto exit;
if ((what & RPMBUILD_CLEAN) &&
-@@ -295,6 +344,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
(void) unlink(spec->specFile);
exit:
@@ -116,7 +116,7 @@
spec->rootDir = NULL;
if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
diff --git a/build/pack.c b/build/pack.c
-index ed5b9ab4e..62427065a 100644
+index df15876ff..17a4b0905 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -6,8 +6,6 @@
@@ -128,7 +128,7 @@
#include <sys/wait.h>
#include <rpm/rpmlib.h> /* RPMSIGTAG*, rpmReadPackageFile */
-@@ -151,57 +149,6 @@ exit:
+@@ -152,57 +150,6 @@ exit:
return rc;
}
@@ -186,9 +186,9 @@
static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
{
struct TriggerFileEntry *p;
-@@ -308,7 +255,8 @@ static int haveRichDep(Package pkg)
- }
-
+@@ -476,7 +423,8 @@ exit:
+ * order to how the RPM format is laid on disk.
+ */
static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
- const char *fileName, char **cookie)
+ const char *fileName, char **cookie,
@@ -196,7 +196,7 @@
{
FD_t fd = NULL;
char * rpmio_flags = NULL;
-@@ -397,7 +345,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
+@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
/* Create and add the cookie */
if (cookie) {
@@ -204,8 +204,8 @@
+ rasprintf(cookie, "%s %d", buildHost, buildTime);
headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
}
-
-@@ -546,7 +494,7 @@ static rpmRC checkPackages(char *pkgcheck)
+
+@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
return RPMRC_OK;
}
@@ -214,7 +214,7 @@
{
const char *errorString;
rpmRC rc = RPMRC_OK;
-@@ -565,8 +513,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
headerCopyTags(spec->packages->header, pkg->header, copyTags);
headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
@@ -225,7 +225,7 @@
if (spec->sourcePkgId != NULL) {
headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
-@@ -604,7 +552,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
free(binRpm);
}
@@ -234,7 +234,7 @@
if (rc == RPMRC_OK) {
/* Do check each written package if enabled */
char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
-@@ -624,7 +572,7 @@ struct binaryPackageTaskData
+@@ -719,7 +667,7 @@ struct binaryPackageTaskData
struct binaryPackageTaskData *next;
};
@@ -243,7 +243,7 @@
{
struct binaryPackageTaskData *tasks = NULL;
struct binaryPackageTaskData *task = NULL;
-@@ -636,7 +584,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
+@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
if (pkg == spec->packages) {
// the first package needs to be processed ahead of others, as they copy
// changelog data from it, and so otherwise data races would happen
@@ -252,7 +252,7 @@
rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
tasks = task;
}
-@@ -653,7 +601,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
+@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
if (task != tasks)
#pragma omp task
{
@@ -261,7 +261,7 @@
rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
}
}
-@@ -671,11 +619,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
+@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
}
}
@@ -275,7 +275,7 @@
for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
if (task->result == RPMRC_OK) {
-@@ -702,22 +650,22 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
return RPMRC_OK;
}
@@ -284,6 +284,7 @@
{
Package sourcePkg = spec->sourcePackage;
rpmRC rc;
+@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
/* Add some cruft */
headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
@@ -291,9 +292,10 @@
- headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
+ headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
+ headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
+ headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
/* XXX this should be %_srpmdir */
- { char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL);
+@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
spec->sourcePkgId = NULL;
@@ -303,10 +305,10 @@
/* Do check SRPM package if enabled */
if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
-index 8351a6a34..797337ca7 100644
+index 439b7d3b5..07e8338ad 100644
--- a/build/rpmbuild_internal.h
+++ b/build/rpmbuild_internal.h
-@@ -408,19 +408,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
+@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
* @param spec spec file control structure
* @param cookie build identifier "cookie" or NULL
* @param cheating was build shortcircuited?
@@ -333,5 +335,5 @@
RPM_GNUC_INTERNAL
int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
--
-2.11.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
index c910a47..4ac5c38 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
@@ -1,7 +1,7 @@
-From d65d6e8760afbd7f70b22a1f3297a037bc475fea Mon Sep 17 00:00:00 2001
+From 5141d50d7b3d3c209a22c53deedb4ceef014401d Mon Sep 17 00:00:00 2001
From: Peter Kjellerstedt <pkj@axis.com>
Date: Mon, 15 May 2017 10:21:08 +0200
-Subject: [PATCH 11/13] Do not require that ELF binaries are executable to be
+Subject: [PATCH 09/15] Do not require that ELF binaries are executable to be
identifiable
There is nothing that requires, e.g., a DSO to be executable, but it
@@ -14,19 +14,20 @@
Upstream-Status: Inappropriate
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+
---
fileattrs/elf.attr | 1 -
1 file changed, 1 deletion(-)
diff --git a/fileattrs/elf.attr b/fileattrs/elf.attr
-index 595b33e09..bac52649d 100644
+index 5805dd0ee..3516f309d 100644
--- a/fileattrs/elf.attr
+++ b/fileattrs/elf.attr
@@ -1,4 +1,3 @@
%__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
%__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
- %__elf_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*$
+ %__elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$
-%__elf_flags exeonly
--
-2.12.0
+2.14.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch
deleted file mode 100644
index 996da90..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 77808db4036dc4a012c47aca36255549ed764a6a Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <pkj@axis.com>
-Date: Tue, 16 May 2017 10:58:18 +0200
-Subject: [PATCH 12/13] Use conditional to access %{_docdir} in macros.in
-
-This avoids the following warning:
-
-warning: Ignoring invalid regex %{_docdir}
-
-when runing `rpmdeps -R <file>`, since %{_docdir} is only defined when
-parsing a spec file (in parseSpec()).
-
-Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/216]
-Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
----
- macros.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/macros.in b/macros.in
-index 84ae25275..cca67a500 100644
---- a/macros.in
-+++ b/macros.in
-@@ -200,8 +200,8 @@ package or when debugging this package.\
- # Their purpouse is to set up global filtering for all packages. If you need
- # to set up specific filtering for your package use %__requires_exclude_from
- # and %__provides_exclude_from instead.
--%__global_requires_exclude_from %{_docdir}
--%__global_provides_exclude_from %{_docdir}
-+%__global_requires_exclude_from %{?_docdir:%{_docdir}}
-+%__global_provides_exclude_from %{?_docdir:%{_docdir}}
-
- # The path to the gzip executable (legacy, use %{__gzip} instead).
- %_gzipbin %{__gzip}
---
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch
deleted file mode 100644
index faaf629..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 3bf20a6116ae3e1a5a3a6907bee7e881b17efb2f Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <pkj@axis.com>
-Date: Mon, 15 May 2017 11:23:26 +0200
-Subject: [PATCH 13/13] Add a new option --alldeps to rpmdeps
-
-This will send the output from rpmfcPrint() to stdout. This is an
-alternative to using the --rpmfcdebug option, which will send the same
-output to stderr. The two options have totally different use cases
-though. While --alldeps is used when the output from rpmfcPrint() is
-what is wanted, --rpmfcdebug can be used together with the other
-output options, e.g., --requires, without affecting their output.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/220]
-Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
----
- build/rpmfc.c | 27 ++++++++++++++-------------
- build/rpmfc.h | 1 -
- tools/rpmdeps.c | 44 +++++++++++++++++++++++++-------------------
- 3 files changed, 39 insertions(+), 33 deletions(-)
-
-diff --git a/build/rpmfc.c b/build/rpmfc.c
-index c8e2f876a..44f1cdc9a 100644
---- a/build/rpmfc.c
-+++ b/build/rpmfc.c
-@@ -732,7 +732,6 @@ static rpm_color_t rpmfcColor(const char * fmstr)
-
- void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp)
- {
-- rpm_color_t fcolor;
- int ndx;
- int dx;
- int fx;
-@@ -744,21 +743,23 @@ void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp)
-
- if (fc)
- for (fx = 0; fx < fc->nfiles; fx++) {
-- rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */
-- fcolor = fc->fcolor[fx];
-- ARGV_t fattrs = fc->fattrs[fx];
--
- fprintf(fp, "%3d %s", fx, fc->fn[fx]);
-- if (fcolor != RPMFC_BLACK)
-+ if (_rpmfc_debug) {
-+ rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */
-+ rpm_color_t fcolor = fc->fcolor[fx];
-+ ARGV_t fattrs = fc->fattrs[fx];
-+
-+ if (fcolor != RPMFC_BLACK)
- fprintf(fp, "\t0x%x", fc->fcolor[fx]);
-- else
-+ else
- fprintf(fp, "\t%s", rpmstrPoolStr(fc->cdict, cx));
-- if (fattrs) {
-- char *attrs = argvJoin(fattrs, ",");
-- fprintf(fp, " [%s]", attrs);
-- free(attrs);
-- } else {
-- fprintf(fp, " [none]");
-+ if (fattrs) {
-+ char *attrs = argvJoin(fattrs, ",");
-+ fprintf(fp, " [%s]", attrs);
-+ free(attrs);
-+ } else {
-+ fprintf(fp, " [none]");
-+ }
- }
- fprintf(fp, "\n");
-
-diff --git a/build/rpmfc.h b/build/rpmfc.h
-index dae8ea5b1..3d87b31cf 100644
---- a/build/rpmfc.h
-+++ b/build/rpmfc.h
-@@ -45,7 +45,6 @@ typedef const struct rpmfcTokens_s * rpmfcToken;
-
- /** \ingroup rpmfc
- * Print results of file classification.
-- * @todo Remove debugging routine.
- * @param msg message prefix (NULL for none)
- * @param fc file classifier
- * @param fp output file handle (NULL for stderr)
-diff --git a/tools/rpmdeps.c b/tools/rpmdeps.c
-index a414b6343..f260a38c4 100644
---- a/tools/rpmdeps.c
-+++ b/tools/rpmdeps.c
-@@ -23,6 +23,8 @@ static int print_conflicts;
-
- static int print_obsoletes;
-
-+static int print_alldeps;
-+
- static void rpmdsPrint(const char * msg, rpmds ds, FILE * fp)
- {
- if (fp == NULL) fp = stderr;
-@@ -57,6 +59,8 @@ static struct poptOption optionsTable[] = {
- NULL, NULL },
- { "obsoletes", '\0', POPT_ARG_VAL, &print_obsoletes, -1,
- NULL, NULL },
-+ { "alldeps", '\0', POPT_ARG_VAL, &print_alldeps, -1,
-+ NULL, NULL },
-
- POPT_AUTOALIAS
- POPT_AUTOHELP
-@@ -100,25 +104,27 @@ main(int argc, char *argv[])
- if (rpmfcClassify(fc, av, NULL) || rpmfcApply(fc))
- goto exit;
-
-- if (_rpmfc_debug)
-- rpmfcPrint(buf, fc, NULL);
--
-- if (print_provides)
-- rpmdsPrint(NULL, rpmfcProvides(fc), stdout);
-- if (print_requires)
-- rpmdsPrint(NULL, rpmfcRequires(fc), stdout);
-- if (print_recommends)
-- rpmdsPrint(NULL, rpmfcRecommends(fc), stdout);
-- if (print_suggests)
-- rpmdsPrint(NULL, rpmfcSuggests(fc), stdout);
-- if (print_supplements)
-- rpmdsPrint(NULL, rpmfcSupplements(fc), stdout);
-- if (print_enhances)
-- rpmdsPrint(NULL, rpmfcEnhances(fc), stdout);
-- if (print_conflicts)
-- rpmdsPrint(NULL, rpmfcConflicts(fc), stdout);
-- if (print_obsoletes)
-- rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout);
-+ if (print_alldeps || _rpmfc_debug)
-+ rpmfcPrint(NULL, fc, print_alldeps ? stdout : NULL);
-+
-+ if (!print_alldeps) {
-+ if (print_provides)
-+ rpmdsPrint(NULL, rpmfcProvides(fc), stdout);
-+ if (print_requires)
-+ rpmdsPrint(NULL, rpmfcRequires(fc), stdout);
-+ if (print_recommends)
-+ rpmdsPrint(NULL, rpmfcRecommends(fc), stdout);
-+ if (print_suggests)
-+ rpmdsPrint(NULL, rpmfcSuggests(fc), stdout);
-+ if (print_supplements)
-+ rpmdsPrint(NULL, rpmfcSupplements(fc), stdout);
-+ if (print_enhances)
-+ rpmdsPrint(NULL, rpmfcEnhances(fc), stdout);
-+ if (print_conflicts)
-+ rpmdsPrint(NULL, rpmfcConflicts(fc), stdout);
-+ if (print_obsoletes)
-+ rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout);
-+ }
-
- ec = 0;
-
---
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb
similarity index 86%
rename from import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb
index 7866314..6012922 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_4.14.1.bb
@@ -22,33 +22,31 @@
# libraries are also LGPL - how to express this?
LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f5259151d26ff18e78023450a5ac8d96"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
-SRC_URI = "git://github.com/rpm-software-management/rpm \
+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
file://0001-Do-not-read-config-files-from-HOME.patch \
file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
- file://0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch \
file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
file://0001-Fix-build-with-musl-C-library.patch \
file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
- file://0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch \
file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
- file://0012-Use-conditional-to-access-_docdir-in-macros.in.patch \
- file://0013-Add-a-new-option-alldeps-to-rpmdeps.patch \
file://0001-Split-binary-package-building-into-a-separate-functi.patch \
file://0002-Run-binary-package-creation-via-thread-pools.patch \
file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
file://0001-perl-disable-auto-reqs.patch \
+ file://0001-configure.ac-add-option-for-dbus.patch \
+ file://0001-Factor-out-and-unify-setting-CLOEXEC.patch \
+ file://0002-Optimize-rpmSetCloseOnExec.patch \
+ file://0003-rpmSetCloseOnExec-use-getrlimit.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
-PV = "4.13.90+git${SRCPV}"
PE = "1"
-SRCREV = "a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be"
+SRCREV = "bfee1410af51c1cc9724791fb8d985260a62102b"
S = "${WORKDIR}/git"
@@ -68,8 +66,9 @@
#
# --localstatedir prevents rpm from writing its database to native sysroot when building images
#
-# Also disable plugins, so that rpm doesn't attempt to inhibit shutdown via session dbus
-EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
+# Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled.
+# Also disable plugins by default for native.
+EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --without-dbus --disable-plugins"
BBCLASSEXTEND = "native nativesdk"
@@ -111,7 +110,8 @@
${D}/${libdir}/rpm/macros
sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
- ${D}${libdir}/rpm/pythondistdeps.py
+ ${D}${libdir}/rpm/pythondistdeps.py \
+ ${D}${libdir}/rpm/python-macro-helper
}
FILES_${PN} += "${libdir}/rpm-plugins/*.so \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
similarity index 86%
rename from import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
index 1031984..84a0258 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
@@ -2,8 +2,8 @@
SRC_URI += "file://makefile-no-rebuild.patch"
-SRC_URI[md5sum] = "0f758d7e000c0f7f7d3792610fad70cb"
-SRC_URI[sha256sum] = "ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2"
+SRC_URI[md5sum] = "1581a588fde9d89f6bc6201e8129afaf"
+SRC_URI[sha256sum] = "55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0"
# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
LICENSE = "GPLv3+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
index d719898..fd3911b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
@@ -8,13 +8,13 @@
SECTION = "devel/ruby"
LICENSE = "Ruby | BSD | GPLv2"
LIC_FILES_CHKSUM = "\
- file://COPYING;md5=8a960b08d972f43f91ae84a6f00dcbfb \
+ file://COPYING;md5=340948e1882e579731841bf49cdc22c1 \
file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\
file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\
- file://LEGAL;md5=daf349ad59dd19bd8c919171bff3c5d6 \
+ file://LEGAL;md5=8f871f3f03732c018a5fa9b185958231 \
"
-DEPENDS = "ruby-native zlib openssl tcl libyaml db gdbm readline"
+DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline"
DEPENDS_class-native = "openssl-native libyaml-native"
SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
index b0114ba..4cf579f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
@@ -10,19 +10,16 @@
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Makefile.in b/Makefile.in
-index 7da2488..5b4aea1 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -75,7 +75,7 @@ EXTLIBS =
- LIBS = @LIBS@ $(EXTLIBS)
+Index: ruby-2.5.0/Makefile.in
+===================================================================
+--- ruby-2.5.0.orig/Makefile.in
++++ ruby-2.5.0/Makefile.in
+@@ -77,7 +77,7 @@ LIBS = @LIBS@ $(EXTLIBS)
MISSING = @LIBOBJS@ @ALLOCA@
+ ENABLE_SHARED = @ENABLE_SHARED@
LDSHARED = @LIBRUBY_LDSHARED@
-DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
+DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
SOLIBS = @SOLIBS@
+ ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@
MAINLIBS = @MAINLIBS@
- ARCHMINIOBJS = @MINIOBJS@
---
-2.8.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch
index a5b2184..404b9af 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch
@@ -2,13 +2,15 @@
diff -ru ruby-1.8.7-p248.orig/ext/extmk.rb ruby-1.8.7-p248/ext/extmk.rb
--- ruby-1.8.7-p248.orig/ext/extmk.rb 2009-12-24 03:01:58.000000000 -0600
+++ ruby-1.8.7-p248/ext/extmk.rb 2010-02-12 15:55:27.370061558 -0600
-@@ -354,8 +354,8 @@
- $ruby = '$(topdir)/miniruby' + EXEEXT
+@@ -413,8 +413,8 @@ def $mflags.defined?(var)
end
- $ruby << " -I'$(topdir)'"
-+$ruby << " -I'$(top_srcdir)/lib'"
+ $ruby = [$ruby]
+ $ruby << "-I'$(topdir)'"
++$ruby << "-I'$(top_srcdir)/lib'"
unless CROSS_COMPILING
-- $ruby << " -I'$(top_srcdir)/lib'"
- $ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
- $ruby << " -I./- -I'$(top_srcdir)/ext' -rpurelib.rb"
+- $ruby << "-I'$(top_srcdir)/lib'"
+ $ruby << "-I'$(extout)/$(arch)'" << "-I'$(extout)/common'" if $extout
ENV["RUBYLIB"] = "-"
+ end
+--
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch
deleted file mode 100644
index 88e693c..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 8f782fd8e181d9cfe9387ded43a5ca9692266b85 Mon Sep 17 00:00:00 2001
-From: Florian Frank <flori@ping.de>
-Date: Thu, 2 Mar 2017 12:12:33 +0100
-Subject: [PATCH] Fix arbitrary heap exposure problem
-
-Upstream-Status: Backport
-CVE: CVE-2017-14064
-
-Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
----
- ext/json/generator/generator.c | 12 ++++++------
- ext/json/generator/generator.h | 1 -
- 2 files changed, 6 insertions(+), 7 deletions(-)
-
-diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
-index ef85bb7..c88818c 100644
---- a/ext/json/generator/generator.c
-+++ b/ext/json/generator/generator.c
-@@ -308,7 +308,7 @@ static char *fstrndup(const char *ptr, unsigned long len) {
- char *result;
- if (len <= 0) return NULL;
- result = ALLOC_N(char, len);
-- memccpy(result, ptr, 0, len);
-+ memcpy(result, ptr, len);
- return result;
- }
-
-@@ -1062,7 +1062,7 @@ static VALUE cState_indent_set(VALUE self, VALUE indent)
- }
- } else {
- if (state->indent) ruby_xfree(state->indent);
-- state->indent = strdup(RSTRING_PTR(indent));
-+ state->indent = fstrndup(RSTRING_PTR(indent), len);
- state->indent_len = len;
- }
- return Qnil;
-@@ -1100,7 +1100,7 @@ static VALUE cState_space_set(VALUE self, VALUE space)
- }
- } else {
- if (state->space) ruby_xfree(state->space);
-- state->space = strdup(RSTRING_PTR(space));
-+ state->space = fstrndup(RSTRING_PTR(space), len);
- state->space_len = len;
- }
- return Qnil;
-@@ -1136,7 +1136,7 @@ static VALUE cState_space_before_set(VALUE self, VALUE space_before)
- }
- } else {
- if (state->space_before) ruby_xfree(state->space_before);
-- state->space_before = strdup(RSTRING_PTR(space_before));
-+ state->space_before = fstrndup(RSTRING_PTR(space_before), len);
- state->space_before_len = len;
- }
- return Qnil;
-@@ -1173,7 +1173,7 @@ static VALUE cState_object_nl_set(VALUE self, VALUE object_nl)
- }
- } else {
- if (state->object_nl) ruby_xfree(state->object_nl);
-- state->object_nl = strdup(RSTRING_PTR(object_nl));
-+ state->object_nl = fstrndup(RSTRING_PTR(object_nl), len);
- state->object_nl_len = len;
- }
- return Qnil;
-@@ -1208,7 +1208,7 @@ static VALUE cState_array_nl_set(VALUE self, VALUE array_nl)
- }
- } else {
- if (state->array_nl) ruby_xfree(state->array_nl);
-- state->array_nl = strdup(RSTRING_PTR(array_nl));
-+ state->array_nl = fstrndup(RSTRING_PTR(array_nl), len);
- state->array_nl_len = len;
- }
- return Qnil;
-diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h
-index 900b4d5..c367a62 100644
---- a/ext/json/generator/generator.h
-+++ b/ext/json/generator/generator.h
-@@ -1,7 +1,6 @@
- #ifndef _GENERATOR_H_
- #define _GENERATOR_H_
-
--#include <string.h>
- #include <math.h>
- #include <ctype.h>
-
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch
deleted file mode 100644
index 848139b..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9224.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 690313a061f7a4fa614ec5cc8368b4f2284e059b Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Tue, 23 May 2017 10:28:58 +0900
-Subject: [PATCH] fix #57 : DATA_ENSURE() check must be before data access
-
----
- regexec.c | 5 -----
- 1 file changed, 5 deletions(-)
-
---- end of original header
-
-CVE: CVE-2017-9224
-
-Context modified so that patch applies for version 2.4.1.
-
-Upstream-Status: Pending
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-
-diff --git a/regexec.c b/regexec.c
-index 35fef11..d4e577d 100644
---- a/regexec.c
-+++ b/regexec.c
-@@ -1473,14 +1473,9 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
- NEXT;
-
- CASE(OP_EXACT1) MOP_IN(OP_EXACT1);
--#if 0
- DATA_ENSURE(1);
- if (*p != *s) goto fail;
- p++; s++;
--#endif
-- if (*p != *s++) goto fail;
-- DATA_ENSURE(0);
-- p++;
- MOP_OUT;
- break;
-
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
index 0f2a430..89437bb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9226.patch
@@ -20,22 +20,13 @@
--- ruby-2.4.1.orig/regparse.c
+++ ruby-2.4.1/regparse.c
-@@ -3644,7 +3644,7 @@ fetch_token(OnigToken* tok, UChar** src,
- if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
- prev = p;
- num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc);
-- if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
-+ if (num < 0 || 0xff < num) return ONIGERR_TOO_BIG_NUMBER;
- if (p == prev) { /* can't read nothing. */
- num = 0; /* but, it's not error */
- }
@@ -4450,6 +4450,9 @@ next_state_val(CClassNode* cc, CClassNod
switch (*state) {
case CCS_VALUE:
if (*type == CCV_SB) {
-+ if (*vs > 0xff)
++ if (*from > 0xff)
+ return ONIGERR_INVALID_CODE_POINT_VALUE;
+
- BITSET_SET_BIT_CHKDUP(cc->bs, (int )(*vs));
+ BITSET_SET_BIT_CHKDUP(cc->bs, (int )(*from));
if (IS_NOT_NULL(asc_cc))
- BITSET_SET_BIT(asc_cc->bs, (int )(*vs));
+ BITSET_SET_BIT(asc_cc->bs, (int )(*from));
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9227.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9227.patch
deleted file mode 100644
index 85e7ccb..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9227.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 9690d3ab1f9bcd2db8cbe1fe3ee4a5da606b8814 Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Tue, 23 May 2017 16:15:35 +0900
-Subject: [PATCH] fix #58 : access to invalid address by reg->dmin value
-
----
- regexec.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- end of original header
-
-CVE: CVE-2017-9227
-
-Upstream-Status: Inappropriate [not author]
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-diff --git a/regexec.c b/regexec.c
-index d4e577d..2fa0f3d 100644
---- a/regexec.c
-+++ b/regexec.c
-@@ -3154,6 +3154,8 @@ forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
- }
- else {
- UChar *q = p + reg->dmin;
-+
-+ if (q >= end) return 0; /* fail */
- while (p < q) p += enclen(reg->enc, p, end);
- }
- }
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9229.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9229.patch
deleted file mode 100644
index 6e765bf..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-9229.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From b690371bbf97794b4a1d3f295d4fb9a8b05d402d Mon Sep 17 00:00:00 2001
-From: "K.Kosako" <kosako@sofnec.co.jp>
-Date: Wed, 24 May 2017 10:27:04 +0900
-Subject: [PATCH] fix #59 : access to invalid address by reg->dmax value
-
----
- regexec.c | 27 +++++++++++++++++----------
- 1 file changed, 17 insertions(+), 10 deletions(-)
-
---- end of original header
-
-CVE: CVE-2017-9229
-
-Upstream-Status: Inappropriate [not author]
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-diff --git a/regexec.c b/regexec.c
-index 49bcc50..c0626ef 100644
---- a/regexec.c
-+++ b/regexec.c
-@@ -3756,18 +3756,25 @@ forward_search_range(regex_t* reg, const
- }
- else {
- if (reg->dmax != ONIG_INFINITE_DISTANCE) {
-- *low = p - reg->dmax;
-- if (*low > s) {
-- *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
-- *low, end, (const UChar** )low_prev);
-- if (low_prev && IS_NULL(*low_prev))
-- *low_prev = onigenc_get_prev_char_head(reg->enc,
-- (pprev ? pprev : s), *low, end);
-+ if (p - str < reg->dmax) {
-+ *low = (UChar* )str;
-+ if (low_prev)
-+ *low_prev = onigenc_get_prev_char_head(reg->enc, str, *low, end);
- }
- else {
-- if (low_prev)
-- *low_prev = onigenc_get_prev_char_head(reg->enc,
-- (pprev ? pprev : str), *low, end);
-+ *low = p - reg->dmax;
-+ if (*low > s) {
-+ *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
-+ *low, end, (const UChar** )low_prev);
-+ if (low_prev && IS_NULL(*low_prev))
-+ *low_prev = onigenc_get_prev_char_head(reg->enc,
-+ (pprev ? pprev : s), *low, end);
-+ }
-+ else {
-+ if (low_prev)
-+ *low_prev = onigenc_get_prev_char_head(reg->enc,
-+ (pprev ? pprev : str), *low, end);
-+ }
- }
- }
- }
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb
similarity index 77%
rename from import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb
index 7d27ac8..1ac7f2a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.5.0.bb
@@ -1,16 +1,12 @@
require ruby.inc
SRC_URI += " \
- file://ruby-CVE-2017-9224.patch \
file://ruby-CVE-2017-9226.patch \
- file://ruby-CVE-2017-9227.patch \
file://ruby-CVE-2017-9228.patch \
- file://ruby-CVE-2017-9229.patch \
- file://ruby-CVE-2017-14064.patch \
"
-SRC_URI[md5sum] = "782bca562e474dd25956dd0017d92677"
-SRC_URI[sha256sum] = "a330e10d5cb5e53b3a0078326c5731888bb55e32c4abfeb27d9e7f8e5d000250"
+SRC_URI[md5sum] = "f4711f856fe14de222b9da3d3b8efa89"
+SRC_URI[sha256sum] = "46e6f3630f1888eb653b15fa811d77b5b1df6fd7a3af436b343cfe4f4503f2ab"
# it's unknown to configure script, but then passed to extconf.rb
# maybe it's not really needed as we're hardcoding the result with
@@ -21,7 +17,7 @@
PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
-PACKAGECONFIG[gpm] = "--with-gmp=yes, --with-gmp=no, gmp"
+PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
EXTRA_AUTORECONF += "--exclude=aclocal"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 50c0a1a..307feb7 100755
--- a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -43,7 +43,7 @@
fi
}
-if [ -z "$pi_dir" ]; then
+if ! [ -d $pi_dir ]; then
remove_rcsd_link
exit 0
fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 31c98ec..85b3fc8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -1,6 +1,6 @@
SUMMARY = "Runs postinstall scripts on first boot of the target device"
SECTION = "devel"
-PR = "r9"
+PR = "r10"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
index d545146..0ce7b4e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
@@ -23,7 +23,7 @@
===================================================================
--- squashfs-tools.orig/mksquashfs.c
+++ squashfs-tools/mksquashfs.c
-@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
+@@ -1261,6 +1261,10 @@ void write_dir(squashfs_inode *inode, st
dir_size + 3, directory_block, directory_offset, NULL, NULL,
dir, 0);
@@ -50,9 +50,9 @@
===================================================================
--- squashfs-tools.orig/unsquashfs.c
+++ squashfs-tools/unsquashfs.c
-@@ -38,6 +38,10 @@
- #include <limits.h>
- #include <ctype.h>
+@@ -42,6 +42,10 @@
+ #include <sys/sysmacros.h>
+ #endif
+#ifndef FNM_EXTMATCH
+#define FNM_EXTMATCH 0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index 0f99170..a8baca5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -16,7 +16,7 @@
file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \
file://fix-compat.patch \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
+UPSTREAM_CHECK_COMMITS = "1"
SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index 97bcc90..a12f4c3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -14,23 +14,23 @@
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 61d6425..6387c24 100644
+index 5f0aec4..8eaacc6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -41,7 +41,7 @@ AC_COPYRIGHT([Copyright (C) 1999-]copyright_year[ The strace developers.])
+@@ -42,7 +42,7 @@ AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.])
AC_CONFIG_SRCDIR([strace.c])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_HEADERS([config.h])
--AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests])
-+AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests])
- AM_EXTRA_RECURSIVE_TARGETS([check-valgrind])
+-AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests 1.13])
++AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests 1.13])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
+
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 5aa7f89..a55a355 100644
+index b4ba22a..5836438 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
-@@ -379,3 +379,21 @@ clean-local-check:
+@@ -408,3 +408,21 @@ BUILT_SOURCES = ksysent.h
CLEANFILES = ksysent.h
include ../scno.am
@@ -52,6 +52,3 @@
+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
+ done
+ for i in net scm_rights-fd rt_sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.20.bb
similarity index 87%
rename from import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.20.bb
index 5b2891a..869c12f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.20.bb
@@ -1,10 +1,10 @@
SUMMARY = "System call tracing tool"
-HOMEPAGE = "http://strace.sourceforge.net"
+HOMEPAGE = "http://strace.io"
SECTION = "console/utils"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=f132b4d2adfccc63da4139a609367711"
-SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
+SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
file://disable-git-version-gen.patch \
file://more-robust-test-for-m32-mx32-compile-support.patch \
file://update-gawk-paths.patch \
@@ -16,8 +16,8 @@
file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
"
-SRC_URI[md5sum] = "3579b3266bb096cebaefbe2cdb1a3a78"
-SRC_URI[sha256sum] = "89ad887c1e6226bdbca8da31d589cadea4be0744b142eb47b768086c937fca08"
+SRC_URI[md5sum] = "f2271ab0fac49ebee9cbd7f3469227cb"
+SRC_URI[sha256sum] = "5bf3148dd17306a42566f7da17368fdd781afa147db05ea63a4ca2b50f58c523"
inherit autotools ptest bluetooth
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch
deleted file mode 100644
index 0599c2b..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-------------------------------------------------------------------------
-r1804691 | danielsh | 2017-08-10 11:14:13 -0700 (Thu, 10 Aug 2017) | 18 lines
-
-Fix CVE-2017-9800.
-
-See: https://subversion.apache.org/security/CVE-2017-0800-advisory.txt
-
-* subversion/libsvn_ra_svn/client.c
- (svn_ctype.h): Include.
- (find_tunnel_agent): Pass a "--" end-of-options guard to ssh.
- Expect the 'hostinfo' parameter to be URI-decoded.
- (is_valid_hostinfo): New.
- (ra_svn_open): Validate the hostname before using it.
-
-* subversion/libsvn_subr/config_file.c
- (svn_config_ensure): Update the example configuration likewise.
-
-Patch by: philip
-Review by: danielsh
- stsp
- astieger (earlier version)
-
-Upstream-Status: Backport
-http://svn.apache.org/viewvc?view=revision&sortby=rev&revision=1804691
-
-CVE: CVE-2017-9800
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
-Index: subversion/libsvn_subr/config_file.c
-===================================================================
---- subversion/libsvn_subr/config_file.c (revision 1804690)
-+++ subversion/libsvn_subr/config_file.c (revision 1804691)
-@@ -1448,12 +1448,12 @@
- "### passed to the tunnel agent as <user>@<hostname>.) If the" NL
- "### built-in ssh scheme were not predefined, it could be defined" NL
- "### as:" NL
-- "# ssh = $SVN_SSH ssh -q" NL
-+ "# ssh = $SVN_SSH ssh -q --" NL
- "### If you wanted to define a new 'rsh' scheme, to be used with" NL
- "### 'svn+rsh:' URLs, you could do so as follows:" NL
-- "# rsh = rsh" NL
-+ "# rsh = rsh --" NL
- "### Or, if you wanted to specify a full path and arguments:" NL
-- "# rsh = /path/to/rsh -l myusername" NL
-+ "# rsh = /path/to/rsh -l myusername --" NL
- "### On Windows, if you are specifying a full path to a command," NL
- "### use a forward slash (/) or a paired backslash (\\\\) as the" NL
- "### path separator. A single backslash will be treated as an" NL
-Index: subversion/libsvn_ra_svn/client.c
-===================================================================
---- subversion/libsvn_ra_svn/client.c (revision 1804690)
-+++ subversion/libsvn_ra_svn/client.c (revision 1804691)
-@@ -46,6 +46,7 @@
- #include "svn_props.h"
- #include "svn_mergeinfo.h"
- #include "svn_version.h"
-+#include "svn_ctype.h"
-
- #include "svn_private_config.h"
-
-@@ -398,7 +399,7 @@
- * versions have it too. If the user is using some other ssh
- * implementation that doesn't accept it, they can override it
- * in the [tunnels] section of the config. */
-- val = "$SVN_SSH ssh -q";
-+ val = "$SVN_SSH ssh -q --";
- }
-
- if (!val || !*val)
-@@ -443,7 +444,7 @@
- for (n = 0; cmd_argv[n] != NULL; n++)
- argv[n] = cmd_argv[n];
-
-- argv[n++] = svn_path_uri_decode(hostinfo, pool);
-+ argv[n++] = hostinfo;
- argv[n++] = "svnserve";
- argv[n++] = "-t";
- argv[n] = NULL;
-@@ -811,7 +812,33 @@
- }
-
-
-+/* A simple whitelist to ensure the following are valid:
-+ * user@server
-+ * [::1]:22
-+ * server-name
-+ * server_name
-+ * 127.0.0.1
-+ * with an extra restriction that a leading '-' is invalid.
-+ */
-+static svn_boolean_t
-+is_valid_hostinfo(const char *hostinfo)
-+{
-+ const char *p = hostinfo;
-
-+ if (p[0] == '-')
-+ return FALSE;
-+
-+ while (*p)
-+ {
-+ if (!svn_ctype_isalnum(*p) && !strchr(":.-_[]@", *p))
-+ return FALSE;
-+
-+ ++p;
-+ }
-+
-+ return TRUE;
-+}
-+
- static svn_error_t *ra_svn_open(svn_ra_session_t *session,
- const char **corrected_url,
- const char *url,
-@@ -844,8 +871,18 @@
- || (callbacks->check_tunnel_func && callbacks->open_tunnel_func
- && !callbacks->check_tunnel_func(callbacks->tunnel_baton,
- tunnel))))
-- SVN_ERR(find_tunnel_agent(tunnel, uri.hostinfo, &tunnel_argv, config,
-- result_pool));
-+ {
-+ const char *decoded_hostinfo;
-+
-+ decoded_hostinfo = svn_path_uri_decode(uri.hostinfo, result_pool);
-+
-+ if (!is_valid_hostinfo(decoded_hostinfo))
-+ return svn_error_createf(SVN_ERR_BAD_URL, NULL, _("Invalid host '%s'"),
-+ uri.hostinfo);
-+
-+ SVN_ERR(find_tunnel_agent(tunnel, decoded_hostinfo, &tunnel_argv,
-+ config, result_pool));
-+ }
- else
- tunnel_argv = NULL;
-
-
-------------------------------------------------------------------------
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.7.bb
similarity index 94%
rename from import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.7.bb
index 532edeb..57735f7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.7.bb
@@ -15,11 +15,10 @@
file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
file://0001-Fix-libtool-name-in-configure.ac.patch \
file://serfmacro.patch \
- file://CVE-2017-9800.patch;striplevel=0 \
"
-SRC_URI[md5sum] = "f27e00338d4a9f7f9aec9d4a3f8b418b"
-SRC_URI[sha256sum] = "dbcbc51fb634082f009121f2cb64350ce32146612787ffb0f7ced351aacaae19"
+SRC_URI[md5sum] = "05b0c677681073920f938c1f322e0be2"
+SRC_URI[sha256sum] = "c3b118333ce12e501d509e66bb0a47bcc34d053990acab45559431ac3e491623"
LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
index 8cb6fbd..bf61b02 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
@@ -11,7 +11,7 @@
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
-inherit autotools python3native
+inherit autotools python3native pkgconfig
EXTRA_OECONF = " \
--with-python3=${PYTHON} \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
new file mode 100644
index 0000000..885c395
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
@@ -0,0 +1,330 @@
+From 1a5aadcd66e85c63d228bfd811a521d617c22a38 Mon Sep 17 00:00:00 2001
+From: Patrick Schneider <patrick.schneider@meetnow.eu>
+Date: Thu, 13 Apr 2017 15:02:53 +0200
+Subject: [PATCH] Add Node 7.x aka V8 5.2+ support
+
+* Use WeakCallbackInfo instead of WeakCallbackData
+* Use GetPrivate instead of GetHiddenValue
+* Adopted new signature for SetWeak to support destructor calling
+* SetAccessor deprecation fixed
+* Proper version checks where applicable
+
+Upstream-Status: Submitted [https://github.com/swig/swig/pull/968]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ Lib/javascript/v8/javascriptcode.swg | 27 +++++++++++++++++-----
+ Lib/javascript/v8/javascripthelpers.swg | 29 +++++++++++++++++++++---
+ Lib/javascript/v8/javascriptinit.swg | 16 +++++++++++--
+ Lib/javascript/v8/javascriptrun.swg | 40 ++++++++++++++++++++++++++++-----
+ 4 files changed, 95 insertions(+), 17 deletions(-)
+
+diff --git a/Lib/javascript/v8/javascriptcode.swg b/Lib/javascript/v8/javascriptcode.swg
+index fb7d55c..b8c5089 100644
+--- a/Lib/javascript/v8/javascriptcode.swg
++++ b/Lib/javascript/v8/javascriptcode.swg
+@@ -133,10 +133,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++ static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -147,7 +150,9 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ }
+ delete proxy;
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
++#endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+ object.Dispose();
+@@ -155,7 +160,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ object.Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032100)
+ object->Dispose(isolate);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object->Dispose();
+ #endif
+ }
+@@ -177,10 +182,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ static void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ if(proxy->swigCMemOwn && proxy->swigCObject) {
+@@ -197,7 +205,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
+ #endif
+ }
+@@ -211,7 +219,11 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
+ * ----------------------------------------------------------------------------- */
+ %fragment("js_getter", "templates")
+ %{
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ static SwigV8ReturnValue $jswrapper(v8::Local<v8::String> property, const SwigV8PropertyCallbackInfo &info) {
++#else
++static SwigV8ReturnValue $jswrapper(v8::Local<v8::Name> property, const SwigV8PropertyCallbackInfo &info) {
++#endif
+ SWIGV8_HANDLESCOPE();
+
+ v8::Handle<v8::Value> jsresult;
+@@ -233,8 +245,11 @@ fail:
+ * ----------------------------------------------------------------------------- */
+ %fragment("js_setter", "templates")
+ %{
+-static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+- const SwigV8PropertyCallbackInfoVoid &info) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#else
++static void $jswrapper(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
++#endif
+ SWIGV8_HANDLESCOPE();
+
+ $jslocals
+diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
+index 091467d..7461079 100644
+--- a/Lib/javascript/v8/javascripthelpers.swg
++++ b/Lib/javascript/v8/javascripthelpers.swg
+@@ -6,11 +6,16 @@ typedef v8::InvocationCallback SwigV8FunctionCallback;
+ typedef v8::AccessorGetter SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetter SwigV8AccessorSetterCallback;
+ typedef v8::AccessorInfo SwigV8PropertyCallbackInfoVoid;
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ typedef v8::FunctionCallback SwigV8FunctionCallback;
+ typedef v8::AccessorGetterCallback SwigV8AccessorGetterCallback;
+ typedef v8::AccessorSetterCallback SwigV8AccessorSetterCallback;
+ typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
++#else
++typedef v8::FunctionCallback SwigV8FunctionCallback;
++typedef v8::AccessorNameGetterCallback SwigV8AccessorGetterCallback;
++typedef v8::AccessorNameSetterCallback SwigV8AccessorSetterCallback;
++typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
+ #endif
+
+ /**
+@@ -65,18 +70,36 @@ SWIGRUNTIME void SWIGV8_AddStaticFunction(v8::Handle<v8::Object> obj, const char
+ */
+ SWIGRUNTIME void SWIGV8_AddStaticVariable(v8::Handle<v8::Object> obj, const char* symbol,
+ SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) {
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ obj->SetAccessor(SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#else
++ obj->SetAccessor(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), getter, setter);
++#endif
+ }
+
+-SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value,
+- const SwigV8PropertyCallbackInfoVoid& info)
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#else
++SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
++#endif
+ {
+ char buffer[256];
+ char msg[512];
+ int res;
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ property->WriteUtf8(buffer, 256);
+ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++#else
++ v8::Local<v8::String> sproperty;
++ if (property->ToString(SWIGV8_CURRENT_CONTEXT()).ToLocal(&sproperty)) {
++ sproperty->WriteUtf8(buffer, 256);
++ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
++ }
++ else {
++ res = -1;
++ }
++#endif
+
+ if(res<0) {
+ SWIG_exception(SWIG_ERROR, "Tried to write read-only variable.");
+diff --git a/Lib/javascript/v8/javascriptinit.swg b/Lib/javascript/v8/javascriptinit.swg
+index 34befa7..86008d9 100644
+--- a/Lib/javascript/v8/javascriptinit.swg
++++ b/Lib/javascript/v8/javascriptinit.swg
+@@ -7,15 +7,27 @@ SWIG_V8_SetModule(void *, swig_module_info *swig_module) {
+ v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
+ v8::Local<v8::External> mod = SWIGV8_EXTERNAL_NEW(swig_module);
+ assert(!mod.IsEmpty());
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ global_obj->SetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"), mod);
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++ global_obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, mod);
++#endif
+ }
+
+ SWIGRUNTIME swig_module_info *
+ SWIG_V8_GetModule(void *) {
+ v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ v8::Local<v8::Value> moduleinfo = global_obj->GetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
++ v8::Local<v8::Value> moduleinfo;
++ if (!global_obj->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&moduleinfo))
++ return 0;
++#endif
+
+- if (moduleinfo.IsEmpty())
++ if (moduleinfo.IsEmpty() || moduleinfo->IsNull() || moduleinfo->IsUndefined())
+ {
+ // It's not yet loaded
+ return 0;
+@@ -23,7 +35,7 @@ SWIG_V8_GetModule(void *) {
+
+ v8::Local<v8::External> moduleinfo_extern = v8::Local<v8::External>::Cast(moduleinfo);
+
+- if (moduleinfo_extern.IsEmpty())
++ if (moduleinfo_extern.IsEmpty() || moduleinfo_extern->IsNull() || moduleinfo_extern->IsUndefined())
+ {
+ // Something's not right
+ return 0;
+diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
+index 5ac52a5..30002c0 100644
+--- a/Lib/javascript/v8/javascriptrun.swg
++++ b/Lib/javascript/v8/javascriptrun.swg
+@@ -193,8 +193,10 @@ public:
+ void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Value> object, void *parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ void (*dtor) (const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data);
++#else
++ void (*dtor) (const v8::WeakCallbackInfo<SWIGV8_Proxy> &data);
+ #endif
+ };
+
+@@ -241,9 +243,12 @@ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Val
+ SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
+ SWIGV8_Proxy *proxy = data.GetParameter();
++#else
++SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
++ SWIGV8_Proxy *proxy = data.GetParameter();
+ #endif
+
+ delete proxy;
+@@ -312,12 +317,18 @@ SWIGRUNTIME void SWIGV8_SetPrivateData(v8::Handle<v8::Object> obj, void *ptr, sw
+ } else {
+ cdata->handle.MakeWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+ }
+-#else
++#elifif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
+ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor);
+ } else {
+ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor);
+ }
++#else
++ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
++ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor, v8::WeakCallbackType::kParameter);
++ } else {
++ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor, v8::WeakCallbackType::kParameter);
++ }
+ #endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+@@ -470,7 +481,14 @@ int SwigV8Packed_Check(v8::Handle<v8::Value> valRef) {
+
+ v8::Handle<v8::Object> objRef = valRef->ToObject();
+ if(objRef->InternalFieldCount() < 1) return false;
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ v8::Handle<v8::Value> flag = objRef->GetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++ v8::Local<v8::Value> flag;
++ if (!objRef->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&flag))
++ return false;
++#endif
+ return (flag->IsBoolean() && flag->BooleanValue());
+ }
+
+@@ -519,10 +537,13 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persist
+ SwigV8PackedData *cdata = static_cast<SwigV8PackedData *>(parameter);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SwigV8PackedData *cdata) {
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Object, SwigV8PackedData> &data) {
+ v8::Local<v8::Object> object = data.GetValue();
+ SwigV8PackedData *cdata = data.GetParameter();
++#else
++SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackInfo<SwigV8PackedData> &data) {
++ SwigV8PackedData *cdata = data.GetParameter();
+ #endif
+
+ delete cdata;
+@@ -537,7 +558,7 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Ob
+ object->Dispose(isolate);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ object->Dispose();
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ object.Clear();
+ #endif
+ }
+@@ -550,7 +571,12 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+ // v8::Handle<v8::Object> obj = SWIGV8_OBJECT_NEW();
+ v8::Local<v8::Object> obj = SWIGV8_OBJECT_NEW();
+
++#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ obj->SetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"), SWIGV8_BOOLEAN_NEW(true));
++#else
++ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
++ obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, SWIGV8_BOOLEAN_NEW(true));
++#endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031511)
+ obj->SetPointerInInternalField(0, cdata);
+@@ -573,9 +599,11 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
+ cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, _wrap_SwigV8PackedData_delete);
+ #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
+ cdata->handle.MakeWeak(cdata, _wrap_SwigV8PackedData_delete);
+-#else
++#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
+ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete);
+ // v8::V8::SetWeak(&cdata->handle, cdata, _wrap_SwigV8PackedData_delete);
++#else
++ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete, v8::WeakCallbackType::kParameter);
+ #endif
+
+ #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
+--
+2.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb
index d5caa67..15f7348 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig_3.0.12.bb
@@ -2,6 +2,7 @@
SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
file://0001-configure-use-pkg-config-for-pcre-detection.patch \
+ file://0001-Add-Node-7.x-aka-V8-5.2-support.patch \
"
SRC_URI[md5sum] = "82133dfa7bba75ff9ad98a7046be687c"
SRC_URI[sha256sum] = "7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
index c0714b5..6ba96ae 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
@@ -20,15 +20,12 @@
com32/Makefile | 1 +
1 file changed, 1 insertion(+)
-diff --git a/com32/Makefile b/com32/Makefile
-index 9a1721b..f172db2 100644
---- a/com32/Makefile
-+++ b/com32/Makefile
-@@ -21,3 +21,4 @@ rosh: lib libutil
- samples: libutil elflink/ldlinux
- sysdump: libupload gpllib
+Index: syslinux-6.03/com32/Makefile
+===================================================================
+--- syslinux-6.03.orig/com32/Makefile
++++ syslinux-6.03/com32/Makefile
+@@ -22,3 +22,4 @@ samples: libutil elflink/ldlinux
+ sysdump: lib libutil libupload gpllib
+ lua/src: cmenu modules
gpllib: lib
+libupload: lib
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
deleted file mode 100644
index 5aa0463..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From d379126d56d0b6e935b2d97ca71579e6cc54d1bb Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 18 Jul 2017 13:37:27 +0300
-Subject: [PATCH] parse-util: Don't use xlocale.h
-
-glibc 2.26 no longer contains the non-standard xlocale.h
-(http://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27)
-
-This change shouldn't break anything as xlocale.h was a subset of
-locale.h.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted [https://github.com/systemd/systemd-bootchart/pull/35]
----
- src/parse-util.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/parse-util.c b/src/parse-util.c
-index 5635a68..1b2169c 100644
---- a/src/parse-util.c
-+++ b/src/parse-util.c
-@@ -21,7 +21,6 @@
- #include <locale.h>
- #include <stdlib.h>
- #include <string.h>
--#include <xlocale.h>
-
- #include "macro.h"
- #include "parse-util.h"
---
-2.13.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
new file mode 100644
index 0000000..f392cea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -0,0 +1,36 @@
+From 45b401a947af944c20b3c451a35dfe53bca5ef3b Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 21:24:57 -0800
+Subject: [PATCH 1/3] comparison_fn_t is glibc specific, use raw signature in
+ function pointer
+
+Make it work with musl where comparison_fn_t is not provided
+
+Reuse the approach from systemd:
+systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
+
+Based on work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ src/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util.h b/src/util.h
+index 561f9e7..e9cfd81 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -57,7 +57,7 @@ extern char **saved_argv;
+ * Normal qsort requires base to be nonnull. Here were require
+ * that only if nmemb > 0.
+ */
+-static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
++static inline void qsort_safe(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)) {
+ if (nmemb <= 1)
+ return;
+
+--
+2.13.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
new file mode 100644
index 0000000..196272f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
@@ -0,0 +1,423 @@
+From 6f9454184a02310802b1ed3e40287958b524a495 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 21:39:51 -0800
+Subject: [PATCH 2/3] musl does not provide printf.h
+
+Reuse the approach from systemd:
+systemd/0001-add-fallback-parse_printf_format-implementation.patch
+
+Original patch author: Emil Renner Berthing <systemd@esmil.dk>
+Includes work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ Makefile.am | 4 +
+ configure.ac | 3 +
+ src/log.c | 1 +
+ src/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++++++++
+ src/parse-printf-format.h | 57 ++++++++++
+ src/stdio-util.h | 1 -
+ 6 files changed, 338 insertions(+), 1 deletion(-)
+ create mode 100644 src/parse-printf-format.c
+ create mode 100644 src/parse-printf-format.h
+
+diff --git a/Makefile.am b/Makefile.am
+index 9bbc8fa..b887d16 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -169,6 +169,10 @@ libutils_la_SOURCES = \
+ src/util.c \
+ src/util.h
+
++if !HAVE_PRINTF_H
++libutils_la_SOURCES += src/parse-printf-format.c
++endif
++
+ libutils_la_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(LIBSYSTEMD_CFLAGS)
+diff --git a/configure.ac b/configure.ac
+index 7f74bac..062e310 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -73,6 +73,9 @@ AS_IF([test "x$with_libsystemd" != xno],
+ )]
+ )
+
++AC_CHECK_HEADERS([printf.h], [], [])
++AM_CONDITIONAL(HAVE_PRINTF_H, [test "x$ac_cv_header_print_h" = xyes])
++
+ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+ -pipe \
+ -Wall \
+diff --git a/src/log.c b/src/log.c
+index 15dec83..aecf231 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -28,6 +28,7 @@
+ #include <sys/uio.h>
+ #include <unistd.h>
+
++#include "parse-printf-format.h"
+ #include "sd-messages.h"
+
+ #include "fd-util.h"
+diff --git a/src/parse-printf-format.c b/src/parse-printf-format.c
+new file mode 100644
+index 0000000..49437e5
+--- /dev/null
++++ b/src/parse-printf-format.c
+@@ -0,0 +1,273 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the musl C library
++ Copyright 2005-2014 Rich Felker, et al.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#include <stddef.h>
++#include <string.h>
++
++#include "parse-printf-format.h"
++
++static const char *consume_nonarg(const char *fmt)
++{
++ do {
++ if (*fmt == '\0')
++ return fmt;
++ } while (*fmt++ != '%');
++ return fmt;
++}
++
++static const char *consume_num(const char *fmt)
++{
++ for (;*fmt >= '0' && *fmt <= '9'; fmt++)
++ /* do nothing */;
++ return fmt;
++}
++
++static const char *consume_argn(const char *fmt, size_t *arg)
++{
++ const char *p = fmt;
++ size_t val = 0;
++
++ if (*p < '1' || *p > '9')
++ return fmt;
++ do {
++ val = 10*val + (*p++ - '0');
++ } while (*p >= '0' && *p <= '9');
++
++ if (*p != '$')
++ return fmt;
++ *arg = val;
++ return p+1;
++}
++
++static const char *consume_flags(const char *fmt)
++{
++ while (1) {
++ switch (*fmt) {
++ case '#':
++ case '0':
++ case '-':
++ case ' ':
++ case '+':
++ case '\'':
++ case 'I':
++ fmt++;
++ continue;
++ }
++ return fmt;
++ }
++}
++
++enum state {
++ BARE,
++ LPRE,
++ LLPRE,
++ HPRE,
++ HHPRE,
++ BIGLPRE,
++ ZTPRE,
++ JPRE,
++ STOP
++};
++
++enum type {
++ NONE,
++ PTR,
++ INT,
++ UINT,
++ ULLONG,
++ LONG,
++ ULONG,
++ SHORT,
++ USHORT,
++ CHAR,
++ UCHAR,
++ LLONG,
++ SIZET,
++ IMAX,
++ UMAX,
++ PDIFF,
++ UIPTR,
++ DBL,
++ LDBL,
++ MAXTYPE
++};
++
++static const short pa_types[MAXTYPE] = {
++ [NONE] = PA_INT,
++ [PTR] = PA_POINTER,
++ [INT] = PA_INT,
++ [UINT] = PA_INT,
++ [ULLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [LONG] = PA_INT | PA_FLAG_LONG,
++ [ULONG] = PA_INT | PA_FLAG_LONG,
++ [SHORT] = PA_INT | PA_FLAG_SHORT,
++ [USHORT] = PA_INT | PA_FLAG_SHORT,
++ [CHAR] = PA_CHAR,
++ [UCHAR] = PA_CHAR,
++ [LLONG] = PA_INT | PA_FLAG_LONG_LONG,
++ [SIZET] = PA_INT | PA_FLAG_LONG,
++ [IMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [UMAX] = PA_INT | PA_FLAG_LONG_LONG,
++ [PDIFF] = PA_INT | PA_FLAG_LONG_LONG,
++ [UIPTR] = PA_INT | PA_FLAG_LONG,
++ [DBL] = PA_DOUBLE,
++ [LDBL] = PA_DOUBLE | PA_FLAG_LONG_DOUBLE
++};
++
++#define S(x) [(x)-'A']
++#define E(x) (STOP + (x))
++
++static const unsigned char states[]['z'-'A'+1] = {
++ { /* 0: bare types */
++ S('d') = E(INT), S('i') = E(INT),
++ S('o') = E(UINT),S('u') = E(UINT),S('x') = E(UINT), S('X') = E(UINT),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(CHAR),S('C') = E(INT),
++ S('s') = E(PTR), S('S') = E(PTR), S('p') = E(UIPTR),S('n') = E(PTR),
++ S('m') = E(NONE),
++ S('l') = LPRE, S('h') = HPRE, S('L') = BIGLPRE,
++ S('z') = ZTPRE, S('j') = JPRE, S('t') = ZTPRE
++ }, { /* 1: l-prefixed */
++ S('d') = E(LONG), S('i') = E(LONG),
++ S('o') = E(ULONG),S('u') = E(ULONG),S('x') = E(ULONG),S('X') = E(ULONG),
++ S('e') = E(DBL), S('f') = E(DBL), S('g') = E(DBL), S('a') = E(DBL),
++ S('E') = E(DBL), S('F') = E(DBL), S('G') = E(DBL), S('A') = E(DBL),
++ S('c') = E(INT), S('s') = E(PTR), S('n') = E(PTR),
++ S('l') = LLPRE
++ }, { /* 2: ll-prefixed */
++ S('d') = E(LLONG), S('i') = E(LLONG),
++ S('o') = E(ULLONG),S('u') = E(ULLONG),
++ S('x') = E(ULLONG),S('X') = E(ULLONG),
++ S('n') = E(PTR)
++ }, { /* 3: h-prefixed */
++ S('d') = E(SHORT), S('i') = E(SHORT),
++ S('o') = E(USHORT),S('u') = E(USHORT),
++ S('x') = E(USHORT),S('X') = E(USHORT),
++ S('n') = E(PTR),
++ S('h') = HHPRE
++ }, { /* 4: hh-prefixed */
++ S('d') = E(CHAR), S('i') = E(CHAR),
++ S('o') = E(UCHAR),S('u') = E(UCHAR),
++ S('x') = E(UCHAR),S('X') = E(UCHAR),
++ S('n') = E(PTR)
++ }, { /* 5: L-prefixed */
++ S('e') = E(LDBL),S('f') = E(LDBL),S('g') = E(LDBL), S('a') = E(LDBL),
++ S('E') = E(LDBL),S('F') = E(LDBL),S('G') = E(LDBL), S('A') = E(LDBL),
++ S('n') = E(PTR)
++ }, { /* 6: z- or t-prefixed (assumed to be same size) */
++ S('d') = E(PDIFF),S('i') = E(PDIFF),
++ S('o') = E(SIZET),S('u') = E(SIZET),
++ S('x') = E(SIZET),S('X') = E(SIZET),
++ S('n') = E(PTR)
++ }, { /* 7: j-prefixed */
++ S('d') = E(IMAX), S('i') = E(IMAX),
++ S('o') = E(UMAX), S('u') = E(UMAX),
++ S('x') = E(UMAX), S('X') = E(UMAX),
++ S('n') = E(PTR)
++ }
++};
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types)
++{
++ size_t i = 0;
++ size_t last = 0;
++
++ memset(types, 0, n);
++
++ while (1) {
++ size_t arg;
++ unsigned int state;
++
++ fmt = consume_nonarg(fmt);
++ if (*fmt == '\0')
++ break;
++ if (*fmt == '%') {
++ fmt++;
++ continue;
++ }
++ arg = 0;
++ fmt = consume_argn(fmt, &arg);
++ /* flags */
++ fmt = consume_flags(fmt);
++ /* width */
++ if (*fmt == '*') {
++ size_t warg = 0;
++ fmt = consume_argn(fmt+1, &warg);
++ if (warg == 0)
++ warg = ++i;
++ if (warg > last)
++ last = warg;
++ if (warg <= n && types[warg-1] == NONE)
++ types[warg-1] = INT;
++ } else
++ fmt = consume_num(fmt);
++ /* precision */
++ if (*fmt == '.') {
++ fmt++;
++ if (*fmt == '*') {
++ size_t parg = 0;
++ fmt = consume_argn(fmt+1, &parg);
++ if (parg == 0)
++ parg = ++i;
++ if (parg > last)
++ last = parg;
++ if (parg <= n && types[parg-1] == NONE)
++ types[parg-1] = INT;
++ } else {
++ if (*fmt == '-')
++ fmt++;
++ fmt = consume_num(fmt);
++ }
++ }
++ /* length modifier and conversion specifier */
++ state = BARE;
++ do {
++ unsigned char c = *fmt++;
++
++ if (c < 'A' || c > 'z')
++ continue;
++ state = states[state]S(c);
++ if (state == 0)
++ continue;
++ } while (state < STOP);
++
++ if (state == E(NONE))
++ continue;
++
++ if (arg == 0)
++ arg = ++i;
++ if (arg > last)
++ last = arg;
++ if (arg <= n)
++ types[arg-1] = state - STOP;
++ }
++
++ if (last > n)
++ last = n;
++ for (i = 0; i < last; i++)
++ types[i] = pa_types[types[i]];
++
++ return last;
++}
+diff --git a/src/parse-printf-format.h b/src/parse-printf-format.h
+new file mode 100644
+index 0000000..4371177
+--- /dev/null
++++ b/src/parse-printf-format.h
+@@ -0,0 +1,57 @@
++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
++
++/***
++ This file is part of systemd.
++
++ Copyright 2014 Emil Renner Berthing <systemd@esmil.dk>
++
++ With parts from the GNU C Library
++ Copyright 1991-2014 Free Software Foundation, Inc.
++
++ systemd is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ systemd is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with systemd; If not, see <http://www.gnu.org/licenses/>.
++***/
++
++#pragma once
++
++#include "config.h"
++
++#ifdef HAVE_PRINTF_H
++#include <printf.h>
++#else
++
++#include <stddef.h>
++
++enum { /* C type: */
++ PA_INT, /* int */
++ PA_CHAR, /* int, cast to char */
++ PA_WCHAR, /* wide char */
++ PA_STRING, /* const char *, a '\0'-terminated string */
++ PA_WSTRING, /* const wchar_t *, wide character string */
++ PA_POINTER, /* void * */
++ PA_FLOAT, /* float */
++ PA_DOUBLE, /* double */
++ PA_LAST
++};
++
++/* Flag bits that can be set in a type returned by `parse_printf_format'. */
++#define PA_FLAG_MASK 0xff00
++#define PA_FLAG_LONG_LONG (1 << 8)
++#define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG
++#define PA_FLAG_LONG (1 << 9)
++#define PA_FLAG_SHORT (1 << 10)
++#define PA_FLAG_PTR (1 << 11)
++
++size_t parse_printf_format(const char *fmt, size_t n, int *types);
++
++#endif /* HAVE_PRINTF_H */
+diff --git a/src/stdio-util.h b/src/stdio-util.h
+index 0a67557..21cc515 100644
+--- a/src/stdio-util.h
++++ b/src/stdio-util.h
+@@ -19,7 +19,6 @@
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+
+-#include <printf.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+--
+2.13.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
new file mode 100644
index 0000000..7670d95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
@@ -0,0 +1,33 @@
+From 79396449d264bde58b4daa3ef6dd99f0f0652429 Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@linux.intel.com>
+Date: Thu, 28 Dec 2017 22:10:58 -0800
+Subject: [PATCH 3/3] musl does not provide canonicalize_file_name
+
+Reuse the approach from systemd:
+systemd/0007-check-for-missing-canonicalize_file_name.patch
+
+Based on work by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+---
+Upstream-Status: Pending
+
+ src/path-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/path-util.c b/src/path-util.c
+index 2fb6366..12e2e17 100644
+--- a/src/path-util.c
++++ b/src/path-util.c
+@@ -63,7 +63,7 @@ char **path_strv_resolve(char **l, const char *prefix) {
+ t = *s;
+
+ errno = 0;
+- u = canonicalize_file_name(t);
++ u = realpath(t, NULL);
+ if (!u) {
+ if (errno == ENOENT) {
+ if (prefix) {
+--
+2.13.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb
similarity index 73%
rename from import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb
index 4da000e..1ae21b1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb
@@ -3,12 +3,18 @@
file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https \
- file://0001-parse-util-Don-t-use-xlocale.h.patch \
"
+SRC_URI_append_libc-musl = " \
+ file://0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
+ file://0002-musl-does-not-provide-printf-h.patch \
+ file://0003-musl-does-not-provide-canonicalize_file_name.patch \
+ "
+
+
# Modify these as desired
-PV = "231+git${SRCPV}"
-SRCREV = "9ee2ffc1dc6c8209725e625954bbd89f96cb7139"
+PV = "233+git${SRCPV}"
+SRCREV = "fe1c5e41e6bdb78043dad8fa863fc2df66d1dadf"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
index 5d70456..b66f41a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
@@ -1,14 +1,16 @@
Upstream-Status: Inappropriate [poky-specific fix]
---- a/Makefile.inc
-+++ b/Makefile.inc
-@@ -57,6 +57,9 @@
- ifeq ($(NO_UUID),)
- LIBS += -luuid
+Index: agent/Makefile.inc
+===================================================================
+--- agent.orig/Makefile.inc
++++ agent/Makefile.inc
+@@ -88,6 +88,9 @@ ifneq ($(OPSYS),Windows)
+ ifneq ($(CC),g++)
+ OPTS += -Wmissing-prototypes
endif
+ ifneq ($(RANLIB),)
+ RANLIB += $@
+ endif
endif
- ifneq ($(OPSYS),Windows)
+ # Compiler flags definition
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index 9db26dc..ba14c42 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -16,7 +16,6 @@
file://tcf-agent.init \
file://tcf-agent.service \
"
-UPSTREAM_VERSION_UNKNOWN = "1"
DEPENDS = "util-linux openssl"
RDEPENDS_${PN} = "bash"
@@ -31,7 +30,7 @@
INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
# mangling needed for make
-MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64,a64,`"
+MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64.*,a64,`"
MAKE_OS = "`echo ${TARGET_OS} | sed s,^linux.*,GNU/Linux,`"
EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
index 96276ea..d1fc9b9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
@@ -11,7 +11,7 @@
+ # following line added by CW for Debian GNU/Linux
+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
+
- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
Index: unix/tcl.m4
@@ -25,7 +25,7 @@
+ # following line added by CW for Debian GNU/Linux
+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
+
- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
Index: unix/Makefile.in
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.8.bb
similarity index 95%
rename from import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb
rename to import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.8.bb
index dac73be..4be2e89 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.8.bb
@@ -24,8 +24,8 @@
file://alter-includedir.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "5673aaf45b5de5d8dd80bb3daaeb8838"
-SRC_URI[sha256sum] = "7c6b8f84e37332423cfe5bae503440d88450da8cc1243496249faa5268026ba5"
+SRC_URI[md5sum] = "81656d3367af032e0ae6157eff134f89"
+SRC_URI[sha256sum] = "c43cb0c1518ce42b00e7c8f6eaddd5195c53a98f94adc717234a65cbcfd3f96a"
SRC_URI_class-native = "${BASE_SRC_URI}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
index 1261c02..b22faad 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
@@ -34,6 +34,8 @@
chmod +x ${B}/vapigen-wrapper
}
+EXTRA_OECONF += " --disable-graphviz"
+
# Vapigen wrapper needs to be available system-wide, because it will be used
# to build vapi files from all other packages with vala support
do_install_append_class-target() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
new file mode 100644
index 0000000..9b27b7f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/0001-Disable-valadoc.patch
@@ -0,0 +1,32 @@
+From b6ca3876e233c724fd460c1579abc4ab63c8d01e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 4 Oct 2017 15:23:08 +0300
+Subject: [PATCH] Disable valadoc
+
+Valadoc is a documentation generator for Vala sources, which was
+recently merged into the main vala source tree. Unsurprisingly,
+it's broken in cross-compile environment in multiple ways,
+so let's fix it some other time.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e5dc0cc..813b3fc 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,8 +13,6 @@ SUBDIRS = \
+ doc \
+ gobject-introspection \
+ vapigen \
+- libvaladoc \
+- valadoc \
+ $(NULL)
+
+ if ENABLE_UNVERSIONED
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch
new file mode 100644
index 0000000..15d186d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala/disable-graphviz.patch
@@ -0,0 +1,223 @@
+From eb716dc856c20b3da146a4e83e9800bd1f53c739 Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz <ricotz@ubuntu.com>
+Date: Wed, 6 Sep 2017 18:52:55 +0200
+Subject: [PATCH] libvaladoc: Allow disabling the graphviz dependency of
+ valadoc
+
+https://bugzilla.gnome.org/show_bug.cgi?id=787375
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Upstream-Status: Submitted [bugzilla link above]
+---
+ configure.ac | 60 +++++++++++++++++++----------------
+ libvaladoc/Makefile.am | 25 +++++++++++----
+ libvaladoc/html/basicdoclet.vala | 8 +++++
+ libvaladoc/html/htmlmarkupwriter.vala | 4 +++
+ 4 files changed, 63 insertions(+), 34 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c73d5d6b1..291e503d5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,34 +98,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
+ AC_SUBST(GMODULE_CFLAGS)
+ AC_SUBST(GMODULE_LIBS)
+
+-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+-AC_MSG_CHECKING([for CGRAPH])
+-cgraph_tmp_LIBADD="$LIBADD"
+-cgraph_tmp_CFLAGS="$CFLAGS"
+-LIBADD="$LIBADD $LIBGVC_LIBS"
+-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
+-AC_RUN_IFELSE(
+- [AC_LANG_SOURCE([
+- #include <gvc.h>
+-
+- int main(void) {
+- #ifdef WITH_CGRAPH
+- return 0;
+- #else
+- return -1;
+- #endif
+- }
+- ])], [
+- AC_MSG_RESULT([yes])
+- VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
+- have_cgraph=yes
+- ], [
+- AC_MSG_RESULT([no])
+- have_cgraph=no
+- ]
+-)
+-LIBADD="$cgraph_tmp_LIBADD"
+-CFLAGS="$cgraph_tmp_CFLAGS"
++AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
++if test x$enable_graphviz = xyes; then
++ PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
++ AC_MSG_CHECKING([for CGRAPH])
++ VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
++ cgraph_tmp_LIBADD="$LIBADD"
++ cgraph_tmp_CFLAGS="$CFLAGS"
++ LIBADD="$LIBADD $LIBGVC_LIBS"
++ CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
++ AC_RUN_IFELSE(
++ [AC_LANG_SOURCE([
++ #include <gvc.h>
++ int main(void) {
++ #ifdef WITH_CGRAPH
++ return 0;
++ #else
++ return -1;
++ #endif
++ }
++ ])], [
++ AC_MSG_RESULT([yes])
++ VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
++ have_cgraph=yes
++ ], [
++ AC_MSG_RESULT([no])
++ have_cgraph=no
++ ]
++ )
++ LIBADD="$cgraph_tmp_LIBADD"
++ CFLAGS="$cgraph_tmp_CFLAGS"
++fi
++AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
+ AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
+
+ AC_PATH_PROG([XSLTPROC], [xsltproc], :)
+diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
+index 89245d86b..7c07498b9 100644
+--- a/libvaladoc/Makefile.am
++++ b/libvaladoc/Makefile.am
+@@ -127,10 +127,6 @@ libvaladoc_la_VALASOURCES = \
+ content/tablerow.vala \
+ content/taglet.vala \
+ content/text.vala \
+- charts/chart.vala \
+- charts/chartfactory.vala \
+- charts/hierarchychart.vala \
+- charts/simplechartfactory.vala \
+ parser/manyrule.vala \
+ parser/oneofrule.vala \
+ parser/optionalrule.vala \
+@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
+ highlighter/codetoken.vala \
+ highlighter/highlighter.vala \
+ html/basicdoclet.vala \
+- html/htmlchartfactory.vala \
+ html/linkhelper.vala \
+ html/cssclassresolver.vala \
+ html/htmlmarkupwriter.vala \
+ html/htmlrenderer.vala \
+ $(NULL)
+
++if ENABLE_GRAPHVIZ
++libvaladoc_la_VALASOURCES += \
++ charts/chart.vala \
++ charts/chartfactory.vala \
++ charts/hierarchychart.vala \
++ charts/simplechartfactory.vala \
++ html/htmlchartfactory.vala \
++ $(NULL)
++
++LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
++endif
++
+ libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
+ libvaladoc.vala.stamp \
+ $(libvaladoc_la_VALASOURCES:.vala=.c) \
+@@ -182,8 +189,8 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
+ --library valadoc \
+ --vapi valadoc@PACKAGE_SUFFIX@.vapi \
+ --vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
+- --vapidir $(top_srcdir)/vapi --pkg libgvc \
+ --vapidir $(top_srcdir)/gee --pkg gee \
++ $(LIBGVC_PKG) \
+ --pkg config \
+ $(filter %.vala %.c,$^)
+ touch $@
+@@ -209,6 +216,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
+
+ valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
+ cp $< $@
++if !ENABLE_GRAPHVIZ
++ sed -i "s/libgvc //g" $@
++endif
+
+ vapidir = $(datadir)/vala/vapi
+ dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
+@@ -216,6 +226,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
+
+ valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
+ cp $< $@
++if !ENABLE_GRAPHVIZ
++ sed -i "s/libgvc//g" $@
++endif
+
+ EXTRA_DIST = \
+ $(libvaladoc_la_VALASOURCES) \
+diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala
+index cc9ea4ed7..432c3818f 100644
+--- a/libvaladoc/html/basicdoclet.vala
++++ b/libvaladoc/html/basicdoclet.vala
+@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ protected HtmlRenderer _renderer;
+ protected Html.MarkupWriter writer;
+ protected Html.CssClassResolver cssresolver;
++#if HAVE_GRAPHVIZ
+ protected Charts.Factory image_factory;
++#else
++ protected void* image_factory;
++#endif
+ protected ErrorReporter reporter;
+ protected string package_list_link = "../index.html";
+
+@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ this.linker = new LinkHelper ();
+
+ _renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
++#if HAVE_GRAPHVIZ
+ this.image_factory = new SimpleChartFactory (settings, linker);
++#endif
+ }
+
+
+@@ -1025,6 +1031,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ }
+
+ protected void write_image_block (Api.Node element) {
++#if HAVE_GRAPHVIZ
+ if (element is Class || element is Interface || element is Struct) {
+ unowned string format = (settings.use_svg_images ? "svg" : "png");
+ var chart = new Charts.Hierarchy (image_factory, element);
+@@ -1044,6 +1051,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ this.get_img_path_html (element, format)});
+ writer.add_usemap (chart);
+ }
++#endif
+ }
+
+ public void write_namespace_content (Namespace node, Api.Node? parent) {
+diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
+index 15ed9efd1..fe0d705d4 100644
+--- a/libvaladoc/html/htmlmarkupwriter.vala
++++ b/libvaladoc/html/htmlmarkupwriter.vala
+@@ -43,12 +43,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
+ }, xml_declaration);
+ }
+
++#if HAVE_GRAPHVIZ
+ public MarkupWriter add_usemap (Charts.Chart chart) {
+ string? buf = (string?) chart.write_buffer ("cmapx");
+ if (buf != null) {
+ raw_text ("\n");
+ raw_text ((!) buf);
+ }
++#else
++ public MarkupWriter add_usemap (void* chart) {
++#endif
+
+ return this;
+ }
+--
+2.14.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb
deleted file mode 100644
index 51000d9..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
- file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
-"
-
-SRC_URI[md5sum] = "3c19014093f1a3d995357253b463082c"
-SRC_URI[sha256sum] = "e9f23ce711c1a72ce664d10946fbc5953f01b0b7f2a3562e7a01e362d86de059"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.38.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.38.8.bb
new file mode 100644
index 0000000..e2baf65
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.38.8.bb
@@ -0,0 +1,10 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
+ file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
+ file://disable-graphviz.patch \
+ file://0001-Disable-valadoc.patch \
+"
+
+SRC_URI[md5sum] = "37edd0467d056fd9e3937d0bbceda80b"
+SRC_URI[sha256sum] = "2fa746b51cd66e43577d1da06a80b708c2875cadaafee77e9700ea35cf23882c"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
deleted file mode 100644
index e9112da..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f96cf1f4eaa72860ab8b5e18ad10fdc704d78c5f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 15 Dec 2015 15:01:34 +0200
-Subject: [PATCH 2/5] remove rpath
-
-Upstream-Status: Inappropriate [embedded config]
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- none/tests/Makefile.am | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
-index 54f2a7e..25b0f49 100644
---- a/none/tests/Makefile.am
-+++ b/none/tests/Makefile.am
-@@ -326,7 +326,6 @@ threadederrno_CFLAGS += --std=c99
- endif
- tls_SOURCES = tls.c tls2.c
- tls_DEPENDENCIES = tls.so tls2.so
--tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests
- tls_LDADD = tls.so tls2.so -lpthread
- tls_so_SOURCES = tls_so.c
- tls_so_DEPENDENCIES = tls2.so
-@@ -334,7 +333,7 @@ if VGCONF_OS_IS_DARWIN
- tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic
- tls_so_LDADD = `pwd`/tls2.so
- else
-- tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
-+ tls_so_LDFLAGS = -shared -fPIC
- tls_so_LDADD = tls2.so
- endif
- tls_so_CFLAGS = $(AM_CFLAGS) -fPIC
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch
new file mode 100644
index 0000000..89a95b8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/mask-CPUID-support-in-HWCAP-on-aarch64.patch
@@ -0,0 +1,36 @@
+Fix runtime Valgrind failure
+
+This patch is derived from
+https://bugzilla.redhat.com/show_bug.cgi?id=1464211
+
+At runtime it will fails like this:
+
+ARM64 front end: branch_etc
+disInstr(arm64): unhandled instruction 0xD5380001
+disInstr(arm64): 1101'0101 0011'1000 0000'0000 0000'0001 ==2082==
+valgrind: Unrecognised instruction at address 0x4014e64.
+
+This patch is a workaround by masking all HWCAP
+
+Upstream-Status: Pending
+
+Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
+
+Index: valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c
+===================================================================
+
+--- valgrind-3.13.0.orig/coregrind/m_initimg/initimg-linux.c 2018-03-04 22:22:17.698572675 -0800
++++ valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c 2018-03-04 22:23:25.727815624 -0800
+@@ -703,6 +703,12 @@
+ (and anything above) are not supported by Valgrind. */
+ auxv->u.a_val &= VKI_HWCAP_S390_TE - 1;
+ }
++# elif defined(VGP_arm64_linux)
++ {
++ /* Linux 4.11 started populating this for arm64, but we
++ currently don't support any. */
++ auxv->u.a_val = 0;
++ }
+ # endif
+ break;
+ # if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
index bf3cfd7..d3af35e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
@@ -16,7 +16,6 @@
file://fixed-perl-path.patch \
file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
file://run-ptest \
- file://0002-remove-rpath.patch \
file://0004-Fix-out-of-tree-builds.patch \
file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
@@ -37,6 +36,7 @@
file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
file://link-gz-tests.patch \
file://ppc-headers.patch \
+ file://mask-CPUID-support-in-HWCAP-on-aarch64.patch \
"
SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369"
SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b"
@@ -86,6 +86,8 @@
do_configure_prepend () {
rm -rf ${S}/config.h
+ sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g' ${S}/none/tests/Makefile.am
+ sed -i -e 's:$(top_builddir):$(pkglibdir)/ptest:g' ${S}/memcheck/tests/Makefile.am
}
do_install_append () {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
deleted file mode 100644
index 021c058..0000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/zisofs-tools/zisofs-tools-native_1.0.8.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-# zisofs-tools-native OE build file
-# Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-SUMMARY = "Utilities for creating compressed CD-ROM filesystems"
-HOMEPAGE = "http://freecode.com/projects/zisofs-tools"
-SECTION = "console/utils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "zlib-native"
-
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/zisofs-tools/zisofs-tools-${PV}.tar.bz2/2d0ed8c9a1f60b45f949b136f9be1f6c/zisofs-tools-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "2d0ed8c9a1f60b45f949b136f9be1f6c"
-SRC_URI[sha256sum] = "ae4e53e4914934d41660248fb59d3c8761f1f1fd180d5ec993c17ddb3afd04f3"
-
-inherit native
-
-do_install() {
- oe_runmake install INSTALLROOT=${D} bindir=${bindir}
-}