summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools')
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch80
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.24.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0001-config-libopts.m4-regenerate-it-from-config-libopts..patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.28.inc85
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc43
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.28.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch)26
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch52
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch)492
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-Add-the-armv5e-architecture-to-binutils.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-warn-for-uses-of-system-directories-when-cross-linki.patch)58
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Change-default-emulation-for-mips64-linux.patch)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Add-support-for-Netlogic-XLP.patch)134
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch)12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0016-Detect-64-bit-MIPS-targets.patch)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-sync-with-OE-libtool-changes.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch75
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch124
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch241
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969_2.patch122
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7209.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch71
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7223.patch52
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7614.patch103
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8393.patch205
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8394.patch118
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8395.patch72
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8396_8397.patch102
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8398.patch147
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8421.patch52
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9038_9044.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9039.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9040_9042.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9745.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch91
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch77
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9750.patch247
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch3748
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9752.patch208
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9753.patch79
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9755.patch63
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch58
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_1.patch168
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_2.patch122
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_3.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_5.patch89
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_7.patch80
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_8.patch187
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_9.patch361
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.28.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch9
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.9.1.bb)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch25
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb)1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc9
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.7.2.bb)1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_git.bb)11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/noman.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.10.bb)7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch255
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch130
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb)15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.168.bb)39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch52
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch)15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch)23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch)15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch)38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch)168
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff)115
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/file/file_5.30.bb)2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc147
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch87
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch2862
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch257
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch68
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch542
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch101
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch74
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch83
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch26
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch270
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch216
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch78
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch66
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch103
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch307
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch85
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/CVE-2016-6131.patch251
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3.inc11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0002-uclibc-conf.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch87
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0004-uclibc-locale.patch2862
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0005-uclibc-locale-no__x.patch257
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0006-uclibc-locale-wchar_fix.patch68
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0007-uclibc-locale-update.patch542
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-ssp_nonshared.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch)13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc128
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch)12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch)66
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch)12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch125
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch)20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch)16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch)84
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch)22
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch)18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch)30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch)26
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch)12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch)8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch)20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch)30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch)12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch)40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch)10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch)72
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch)20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch)15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch124
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch91
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb)3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_7.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc (renamed from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.12.1.inc)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.1.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.12.1.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.12.1.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/git/git.inc1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/git/git_2.11.1.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch170
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4.inc16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch225
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/syslog.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6.inc19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/gotooldir.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/syslog.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7.inc19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/gotooldir.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/syslog.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8.inc19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-cc-handling.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-target-cc-for-build.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/gotooldir.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/split-host-and-target-build.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/syslog.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch67
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch)65
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch68
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/set-external-linker.patch111
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-common.inc6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc62
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc64
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.7.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.8.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/go/go_1.7.bb)2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.8.bb)1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc98
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc61
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go.inc86
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go_1.6.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go_1.8.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_aarch64.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_endianness.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch60
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.14.bb125
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb)17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_git.bb)3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch93
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb185
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c348
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch112
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb)22
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/opkg-configure.service2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/status-conffile.patch69
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.4.bb)5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.26.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/libtool-tag.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.71.bb)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-perl_0.08.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.24.1.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/doc_info.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/errno_ver.diff2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fakeroot.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/find_html2text.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/mod_paths.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/patchlevel.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perlivp.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prune_libs.diff2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/regen-skip.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.24.1.bb27
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch224
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in6
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb73
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch292
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch76
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb)17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb)16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.1.1.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.6.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-native-2.7-manifest.inc5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-native-3.5-manifest.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.1.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl.inc31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_32.1.1.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch82
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.14.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.13.1.bb)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.1.bb)2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.6.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb)9
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_9.0.1.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.22.0.bb)7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygpgme_0.3.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb)14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch66
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch)56
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch82
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch148
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch97
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/upstream-random-fixes.patch288
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb)15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.13.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/04b33e21866412689f18b7ad6daf0a54d8f959a7.patch282
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch504
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch87
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch70
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch)24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch105
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb63
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.8.0.bb65
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/remake/remake.inc16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/remake/remake/version-remake.texi.patch16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch84
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch127
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch207
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch337
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/CVE-2017-14064.patch353
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/extmk.patch1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch87
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.0.bb)6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch58
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.16.bb)18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch136
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.5.bb)7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb)30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.34.4.bb)4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch69
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch108
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch68
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch87
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/run-ptest19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb)46
573 files changed, 9322 insertions, 23810 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb
deleted file mode 100644
index 1e660da74..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require apt-native.inc
-
-SRC_URI += "file://noconfigure.patch \
- file://no-curl.patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb
new file mode 100644
index 000000000..5b16b503d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb
@@ -0,0 +1,7 @@
+require apt-native.inc
+
+SRC_URI += "file://noconfigure.patch \
+ file://no-curl.patch \
+ file://gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch \
+ file://gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch \
+ file://gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc
index 302637084..f1cde3068 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc
@@ -2,7 +2,7 @@ SUMMARY = "Advanced front-end for dpkg"
LICENSE = "GPLv2.0+"
SECTION = "base"
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
+SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
file://use-host.patch \
file://makerace.patch \
file://no-nls-dpkg.patch \
@@ -14,9 +14,9 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/
file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
file://0001-apt-1.2.12-Fix-musl-build.patch \
"
-SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7"
-SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6"
-LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
+SRC_URI[md5sum] = "ce8f9ab11f4fd0a08ec73eaffd75c8f0"
+SRC_URI[sha256sum] = "fa1311a9ce00e72379a0a3bc6d240ba30c0968cfbbb3472859e50b99e24e9598"
+LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
# the package is taken from snapshots.debian.org; that source is static and goes stale
# so we check the latest upstream from a directory that does get updated
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
index b3a883bae..734ba00d4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
@@ -22,10 +22,10 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
3 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
-index 834cb0e..84ded3a 100644
+index 533d9b367..6ce81bbd9 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
-@@ -1037,12 +1037,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
+@@ -1041,12 +1041,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
PackagesTotal++;
}
}
@@ -38,7 +38,7 @@ index 834cb0e..84ded3a 100644
}
/*}}}*/
bool pkgDPkgPM::Go(int StatusFd)
-@@ -1250,8 +1244,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
+@@ -1268,8 +1262,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
// support subpressing of triggers processing for special
// cases like d-i that runs the triggers handling manually
@@ -50,7 +50,7 @@ index 834cb0e..84ded3a 100644
// for the progress
diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822
-index 58fd732..3359762 100755
+index a8d59608d..0c6a9bbbf 100755
--- a/test/integration/test-apt-progress-fd-deb822
+++ b/test/integration/test-apt-progress-fd-deb822
@@ -27,36 +27,36 @@ Message: Installing testing (amd64)
@@ -69,19 +69,19 @@ index 58fd732..3359762 100755
Status: progress
Package: testing:amd64
--Percent: 50
-+Percent: 60
+-Percent: 50.0000
++Percent: 60.0000
Message: Preparing to configure testing (amd64)
Status: progress
--Percent: 50
-+Percent: 60
+-Percent: 50.0000
++Percent: 60.0000
Message: Running dpkg
Status: progress
Package: testing:amd64
--Percent: 50
-+Percent: 60
+-Percent: 50.0000
++Percent: 60.0000
Message: Configuring testing (amd64)
Status: progress
@@ -98,7 +98,7 @@ index 58fd732..3359762 100755
Status: progress
diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts
-index d86e638..ef6d23b 100755
+index d86e638cd..ef6d23be2 100755
--- a/test/integration/test-no-fds-leaked-to-maintainer-scripts
+++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts
@@ -59,8 +59,7 @@ startup packages configure
@@ -122,5 +122,5 @@ index d86e638..ef6d23b 100755
checkpurge
--
-2.1.4
+2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
index 04b040658..f7ac19bfd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
@@ -11,7 +11,7 @@ header so define it manually.
apt-pkg/contrib/srvrec.h: Add explicity include of sys/types.h
to avoid errors in types u_int_SIZE.
-Upstream-status: Pending
+Upstream-Status: Pending
Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
---
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
new file mode 100644
index 000000000..438de209a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
@@ -0,0 +1,80 @@
+From 7ef2b2dba0e0bee450da3c8450ea782a3e7d6429 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Tue, 22 Aug 2017 11:49:01 -0500
+Subject: [PATCH 3/3] Revert "avoid changing the global LC_TIME for Release
+ writing"
+
+This reverts commit 78e7b683c645e907db12658405a4b201a6243ea8.
+
+After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available)
+versions this patch can be remove.
+
+Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ ftparchive/writer.cc | 29 +++++++++++++++++------------
+ 1 file changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
+index 2596382..e43a643 100644
+--- a/ftparchive/writer.cc
++++ b/ftparchive/writer.cc
+@@ -37,7 +37,6 @@
+ #include <unistd.h>
+ #include <ctime>
+ #include <iostream>
+-#include <iomanip>
+ #include <sstream>
+ #include <memory>
+ #include <utility>
+@@ -984,29 +983,35 @@ ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) :
+ AddPatterns(_config->FindVector("APT::FTPArchive::Release::Patterns"));
+
+ time_t const now = time(NULL);
+- auto const posix = std::locale("C.UTF-8");
+
+- // FIXME: use TimeRFC1123 here? But that uses GMT to satisfy HTTP/1.1
+- std::ostringstream datestr;
+- datestr.imbue(posix);
+- datestr << std::put_time(gmtime(&now), "%a, %d %b %Y %H:%M:%S UTC");
++ setlocale(LC_TIME, "C");
++
++ char datestr[128];
++ if (strftime(datestr, sizeof(datestr), "%a, %d %b %Y %H:%M:%S UTC",
++ gmtime(&now)) == 0)
++ {
++ datestr[0] = '\0';
++ }
+
+ time_t const validuntil = now + _config->FindI("APT::FTPArchive::Release::ValidTime", 0);
+- std::ostringstream validstr;
+- if (validuntil != now)
++ char validstr[128];
++ if (now == validuntil ||
++ strftime(validstr, sizeof(validstr), "%a, %d %b %Y %H:%M:%S UTC",
++ gmtime(&validuntil)) == 0)
+ {
+- datestr.imbue(posix);
+- validstr << std::put_time(gmtime(&validuntil), "%a, %d %b %Y %H:%M:%S UTC");
++ validstr[0] = '\0';
+ }
+
++ setlocale(LC_TIME, "");
++
+ map<string,string> Fields;
+ Fields["Origin"] = "";
+ Fields["Label"] = "";
+ Fields["Suite"] = "";
+ Fields["Version"] = "";
+ Fields["Codename"] = "";
+- Fields["Date"] = datestr.str();
+- Fields["Valid-Until"] = validstr.str();
++ Fields["Date"] = datestr;
++ Fields["Valid-Until"] = validstr;
+ Fields["Architectures"] = "";
+ Fields["Components"] = "";
+ Fields["Description"] = "";
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
new file mode 100644
index 000000000..088a66a3c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
@@ -0,0 +1,46 @@
+From c72ef9b6ae83a0a2fbbefd5c050335f65f0d2bc9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Tue, 22 Aug 2017 11:48:46 -0500
+Subject: [PATCH 2/3] Revert "use de-localed std::put_time instead rolling our
+ own"
+
+This reverts commit 4ed2a17ab4334f019c00512aa54a162f0bf083c4.
+
+After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available)
+versions this patch can be remove.
+
+Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ apt-pkg/contrib/strutl.cc | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+index c2ff01d..e9ef2be 100644
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -760,11 +760,15 @@ string TimeRFC1123(time_t Date)
+ if (gmtime_r(&Date, &Conv) == NULL)
+ return "";
+
+- auto const posix = std::locale::classic();
+- std::ostringstream datestr;
+- datestr.imbue(posix);
+- datestr << std::put_time(&Conv, "%a, %d %b %Y %H:%M:%S GMT");
+- return datestr.str();
++ char Buf[300];
++ const char *Day[] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
++ const char *Month[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul",
++ "Aug","Sep","Oct","Nov","Dec"};
++
++ snprintf(Buf, sizeof(Buf), "%s, %02i %s %i %02i:%02i:%02i GMT",Day[Conv.tm_wday],
++ Conv.tm_mday,Month[Conv.tm_mon],Conv.tm_year+1900,Conv.tm_hour,
++ Conv.tm_min,Conv.tm_sec);
++ return Buf;
+ }
+ /*}}}*/
+ // ReadMessages - Read messages from the FD /*{{{*/
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch
new file mode 100644
index 000000000..cb3259187
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch
@@ -0,0 +1,33 @@
+From ff8562f7724c4db4b83635af9e627f3495222327 Mon Sep 17 00:00:00 2001
+From: Anibal Limon <limon.anibal@gmail.com>
+Date: Tue, 22 Aug 2017 04:41:31 -0500
+Subject: [PATCH 1/3] apt-pkg/contrib/strutl.cc: Include array header
+
+If GCC version is less than 5 the array header needs to be included
+to support std::array.
+
+After we drop debian8 and centos7 that has gcc < 5 versions this patch
+can be remove.
+
+Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ apt-pkg/contrib/strutl.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+index 60d0ca8..c2ff01d 100644
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -27,6 +27,7 @@
+ #include <sstream>
+ #include <string>
+ #include <vector>
++#include <array>
+
+ #include <stddef.h>
+ #include <stdlib.h>
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.24.bb
index ae0bce933..ae0bce933 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.24.bb
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
new file mode 100644
index 000000000..104dc3896
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2016.09.16.bb
@@ -0,0 +1,14 @@
+SUMMARY = "a collection of freely re-usable Autoconf macros"
+HOMEPAGE = "http://www.gnu.org/software/autoconf-archive/"
+SECTION = "devel"
+LICENSE = "GPL-3.0-with-autoconf-exception"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.EXCEPTION;md5=fdef168ebff3bc2f13664c365a5fb515"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "bf19d4cddce260b3c3e1d51d42509071"
+SRC_URI[sha256sum] = "e8f2efd235f842bad2f6938bf4a72240a5e5fcd248e8444335e63beb60fabd82"
+
+inherit autotools
+
+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 f1b2dfca7..ea62df8fb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
@@ -1,4 +1,4 @@
-SUMMARY = "A GNU tool that procude shell scripts to automatically configure software"
+SUMMARY = "A GNU tool that produce shell scripts to automatically configure software"
DESCRIPTION = "Autoconf is an extensible package of M4 macros that produce shell scripts to automatically \
configure software source code packages. Autoconf creates a configuration script for a package from a template \
file that lists the operating system features that the package can use, in the form of M4 macro calls."
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
deleted file mode 100644
index 853477cf7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.12.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Automated text and program generation tool"
-DESCRIPTION = "AutoGen is a tool designed to simplify the creation and\
- maintenance of programs that contain large amounts of repetitious text.\
- It is especially valuable in programs that have several blocks of text\
- that must be kept synchronized."
-HOMEPAGE = "http://www.gnu.org/software/autogen/"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
- file://increase-timeout-limit.patch \
- file://mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch \
- file://fix-script-err-when-processing-libguile.patch \
- file://0001-config-libopts.m4-regenerate-it-from-config-libopts..patch \
- file://0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch \
-"
-
-SRC_URI[md5sum] = "551d15ccbf5b5fc5658da375d5003389"
-SRC_URI[sha256sum] = "805c20182f3cb0ebf1571d3b01972851c56fb34348dfdc38799fd0ec3b2badbe"
-
-UPSTREAM_CHECK_URI = "http://ftp.gnu.org/gnu/autogen/"
-UPSTREAM_CHECK_REGEX = "rel(?P<pver>\d+(\.\d+)+)/"
-
-DEPENDS = "guile-native libtool-native libxml2-native"
-
-inherit autotools texinfo native pkgconfig
-
-# autogen-native links against libguile which may have been relocated with sstate
-# these environment variables ensure there isn't a relocation issue
-export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
-export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
-
-export POSIX_SHELL = "/usr/bin/env sh"
-
-do_install_append () {
- create_wrapper ${D}/${bindir}/autogen \
- GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
- GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0001-config-libopts.m4-regenerate-it-from-config-libopts..patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0001-config-libopts.m4-regenerate-it-from-config-libopts..patch
deleted file mode 100644
index a14018e33..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0001-config-libopts.m4-regenerate-it-from-config-libopts..patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 45040e7d268329ebc40e6cb237c64a6637cfab5c Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 13 Mar 2017 20:22:10 -0700
-Subject: [PATCH] config/libopts.m4: regenerate it from config/libopts.def
-
-It was out of date compared to config/libopts.def, so regenerate it via
-"autogen config/libopts.def" command.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- config/libopts.m4 | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/config/libopts.m4 b/config/libopts.m4
-index c7ba4f3..51e6a39 100644
---- a/config/libopts.m4
-+++ b/config/libopts.m4
-@@ -2,7 +2,7 @@ dnl -*- buffer-read-only: t -*- vi: set ro:
- dnl
- dnl DO NOT EDIT THIS FILE (libopts.m4)
- dnl
--dnl It has been AutoGen-ed
-+dnl It has been AutoGen-ed March 13, 2017 at 08:21:21 PM by AutoGen 5.18
- dnl From the definitions libopts.def
- dnl and the template file conftest.tpl
- dnl
-@@ -114,6 +114,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
- AC_PROG_SED
- [while :
- do
-+ test -x "$POSIX_SHELL" && break
- POSIX_SHELL=`which bash`
- test -x "$POSIX_SHELL" && break
- POSIX_SHELL=`which dash`
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch
deleted file mode 100644
index d5fe143ce..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/0002-autoopts-mk-tpl-config.sh-fix-perl-path.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 9f69f3f5ef22bf1bcffb0e651efc260889cfaa46 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 13 Mar 2017 20:33:30 -0700
-Subject: [PATCH] autoopts/mk-tpl-config.sh: fix perl path
-
-Use "which perl" as shebang doesn't work when it is longer than
-BINPRM_BUF_SIZE which is 128 usually. So use "/usr/bin/env perl" to
-instead of.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- autoopts/mk-tpl-config.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/autoopts/mk-tpl-config.sh b/autoopts/mk-tpl-config.sh
-index 093e808..8dfc6dd 100755
---- a/autoopts/mk-tpl-config.sh
-+++ b/autoopts/mk-tpl-config.sh
-@@ -98,7 +98,7 @@ fix_scripts() {
- st=`sed 1q $f`
-
- case "$st" in
-- *perl ) echo '#!' `which perl`
-+ *perl ) echo '#!/usr/bin/env perl'
- sed 1d $f
- ;;
-
---
-2.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch
deleted file mode 100644
index 694a3953e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-autogen-native: fix script err when processing libguile
-
-do_configure for autogen will fail if project directory path
-contains '-I' character, which is caused by the unsuitable sed
-script when processing libguile.
-
-Upstream-Status: Pending
-
-Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-
-diff --git a/config/ag_macros.m4 b/config/ag_macros.m4
-index 58186b6..58ed2ad 100644
---- a/config/ag_macros.m4
-+++ b/config/ag_macros.m4
-@@ -32,7 +32,7 @@ AC_DEFUN([INVOKE_AG_MACROS_LAST],[
- GUILE_FLAGS
- [ag_gv=`gdir=\`pkg-config --cflags-only-I \
- guile-${GUILE_EFFECTIVE_VERSION} | \
-- sed 's/-I *//;s/ *-I.*/ /g'\`
-+ sed 's/ *-I *\// \//g'\`
- for d in $gdir
- do test -f "$d/libguile/version.h" && gdir=$d && break
- done
-diff --git a/config/misc.def b/config/misc.def
-index 490d361..6e183ef 100644
---- a/config/misc.def
-+++ b/config/misc.def
-@@ -342,7 +342,7 @@ do-always = <<- _END_ALWAYS_
- GUILE_FLAGS
- [ag_gv=`gdir=\`pkg-config --cflags-only-I \
- guile-${GUILE_EFFECTIVE_VERSION} | \
-- sed 's/-I *//;s/ *-I.*/ /g'\`
-+ sed 's/ *-I *\// \//g'\`
- test -z "$gdir" && gdir=/usr/include
- for d in $gdir
- do test -f "$d/libguile/version.h" && gdir=$d && break
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch
deleted file mode 100644
index 9efd7e558..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Subject: [PATCH] autogen: increase timeout limit for shell commands
-
-On some overloaded hosts, shell commands of autogen may can not
-finish in 5 secs. This has caused many build failures, so increase
-the timeout limit to fix this.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
----
- configure.ac | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 58a848b..170dd9e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -178,9 +178,9 @@ time_delta=`expr ${config_end_time} - ${config_start_time} 2>/dev/null`
- if test -z "${AG_TIMEOUT}"
- then
- if test -z "${time_delta}"
-- then time_delta=10
-- elif test ${time_delta} -lt 5
-- then time_delta=5 ; fi
-+ then time_delta=60
-+ elif test ${time_delta} -lt 30
-+ then time_delta=30 ; fi
-
- AG_TIMEOUT=${time_delta}
- fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch
deleted file mode 100644
index e56da7b1d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Pending
-
-mk-tpl-config.sh: force exit value to be 0 in subprocess
-
-The return value of statement list=`<subcommands>` is the exit value of the
-subcommands. So if the subcommands fails, the compilation fails. This is obviously
-not intended. In the normal case, we expect the grep command to fail as there should
-be no 'noreturn' word in the libguile files.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- autoopts/mk-tpl-config.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/autoopts/mk-tpl-config.sh b/autoopts/mk-tpl-config.sh
-index 926f5ab..6b4a0fb 100755
---- a/autoopts/mk-tpl-config.sh
-+++ b/autoopts/mk-tpl-config.sh
-@@ -202,7 +202,7 @@ fix_guile() {
-
- list=`set +e ; exec 2>/dev/null
- find ${libguiledir}/libguile* -type f | \
-- xargs grep -l -E '\<noreturn\>'`
-+ xargs grep -l -E '\<noreturn\>' ; exit 0`
-
- test -z "$list" && exit 0
-
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch
new file mode 100644
index 000000000..1221f1306
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-Add-default-libtool_tag-to-cppasm.patch
@@ -0,0 +1,27 @@
+From 25a8ac30486798d23f516722d73eb622e6264f28 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 26 Jul 2017 11:19:56 -0700
+Subject: [PATCH] automake: Add default libtool_tag to cppasm.
+
+ * bin/automake.in (register_language): Define default libtool tag to be CC
+ since CPPASCOMPILE is using CC to call assembler
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ bin/automake.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: automake-1.15.1/bin/automake.in
+===================================================================
+--- automake-1.15.1.orig/bin/automake.in
++++ automake-1.15.1/bin/automake.in
+@@ -831,6 +831,7 @@ register_language ('name' => 'cppasm',
+ 'compiler' => 'CPPASCOMPILE',
+ 'compile_flag' => '-c',
+ 'output_flag' => '-o',
++ 'libtool_tag' => 'CC',
+ 'extensions' => ['.S', '.sx']);
+
+ # Fortran 77
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch
deleted file mode 100644
index 0e6895fb4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 13f00eb4493c217269b76614759e452d8302955e Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Thu, 31 Mar 2016 16:35:29 -0700
-Subject: [PATCH] automake: port to Perl 5.22 and later
-
-Without this change, Perl 5.22 complains "Unescaped left brace in
-regex is deprecated" and this is planned to become a hard error in
-Perl 5.26. See:
-http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
-* bin/automake.in (substitute_ac_subst_variables): Escape left brace.
-
-Upstream-Status: Backport [13f00eb4493c217269b76614759e452d8302955e]
----
- bin/automake.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bin/automake.in b/bin/automake.in
-index a3a0aa318..2c8f31e14 100644
---- a/bin/automake.in
-+++ b/bin/automake.in
-@@ -3878,7 +3878,7 @@ sub substitute_ac_subst_variables_worker
- sub substitute_ac_subst_variables
- {
- my ($text) = @_;
-- $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
-+ $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
- return $text;
- }
-
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.1.bb
index 902dd63db..4f9b616b6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake_1.15.1.bb
@@ -24,11 +24,11 @@ SRC_URI += "file://python-libdir.patch \
file://performance.patch \
file://new_rt_path_for_test-driver.patch \
file://automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch \
- file://0001-automake-port-to-Perl-5.22-and-later.patch \
+ file://0001-automake-Add-default-libtool_tag-to-cppasm.patch \
"
-SRC_URI[md5sum] = "716946a105ca228ab545fc37a70df3a3"
-SRC_URI[sha256sum] = "7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924"
+SRC_URI[md5sum] = "95df3f2d6eb8f81e70b8cb63a93c8853"
+SRC_URI[sha256sum] = "988e32527abe052307d21c8ca000aa238b914df363a617e38f4fb89f5abf6260"
PERL = "${USRBINPATH}/perl"
PERL_class-native = "${USRBINPATH}/env perl"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.28.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.28.inc
deleted file mode 100644
index 1784c52ff..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.28.inc
+++ /dev/null
@@ -1,85 +0,0 @@
-LIC_FILES_CHKSUM="\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
- file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
- file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- "
-
-def binutils_branch_version(d):
- pvsplit = d.getVar('PV').split('.')
- return pvsplit[0] + "_" + pvsplit[1]
-
-BINUPV = "${@binutils_branch_version(d)}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
-
-SRCREV = "354199c7692c1bed53a2a15f0e4d531457e95f17"
-SRC_URI = "\
- git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
- file://0003-gprof-add-uclibc-support-to-configure.patch \
- file://0004-Point-scripts-location-to-libdir.patch \
- file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
- file://0006-Explicitly-link-with-libm-on-uclibc.patch \
- file://0007-Use-libtool-2.4.patch \
- file://0008-Add-the-armv5e-architecture-to-binutils.patch \
- file://0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
- file://0010-warn-for-uses-of-system-directories-when-cross-linki.patch \
- file://0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
- file://0012-Change-default-emulation-for-mips64-linux.patch \
- file://0013-Add-support-for-Netlogic-XLP.patch \
- file://0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
- file://0015-sync-with-OE-libtool-changes.patch \
- file://0016-Detect-64-bit-MIPS-targets.patch \
- file://CVE-2017-6965.patch \
- file://CVE-2017-6966.patch \
- file://0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch \
- file://0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch \
- file://CVE-2017-6969.patch \
- file://CVE-2017-6969_2.patch \
- file://CVE-2017-7209.patch \
- file://CVE-2017-7210.patch \
- file://CVE-2017-7223.patch \
- file://CVE-2017-7614.patch \
- file://CVE-2017-8393.patch \
- file://CVE-2017-8394.patch \
- file://CVE-2017-8395.patch \
- file://CVE-2017-8396_8397.patch \
- file://CVE-2017-8398.patch \
- file://CVE-2017-8421.patch \
- file://CVE-2017-9038_9044.patch \
- file://CVE-2017-9039.patch \
- file://CVE-2017-9040_9042.patch \
- file://CVE-2017-9742.patch \
- file://CVE-2017-9744.patch \
- file://CVE-2017-9745.patch \
- file://CVE-2017-9746.patch \
- file://CVE-2017-9747.patch \
- file://CVE-2017-9748.patch \
- file://CVE-2017-9749.patch \
- file://CVE-2017-9750.patch \
- file://CVE-2017-9751.patch \
- file://CVE-2017-9752.patch \
- file://CVE-2017-9753.patch \
- file://CVE-2017-9755.patch \
- file://CVE-2017-9756.patch \
- file://CVE-2017-9954.patch \
- file://CVE-2017-9955_1.patch \
- file://CVE-2017-9955_2.patch \
- file://CVE-2017-9955_3.patch \
- file://CVE-2017-9955_4.patch \
- file://CVE-2017-9955_5.patch \
- file://CVE-2017-9955_6.patch \
- file://CVE-2017-9955_7.patch \
- file://CVE-2017-9955_8.patch \
- file://CVE-2017-9955_9.patch \
-"
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
- rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
-}
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.29.1.inc
new file mode 100644
index 000000000..07a72e2b5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.29.1.inc
@@ -0,0 +1,43 @@
+LIC_FILES_CHKSUM="\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+ file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+ file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ "
+
+def binutils_branch_version(d):
+ pvsplit = d.getVar('PV').split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+BINUPV = "${@binutils_branch_version(d)}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
+
+SRCREV ?= "90276f15379d380761fc499da2ba24cfb3c12a94"
+BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git"
+SRC_URI = "\
+ ${BINUTILS_GIT_URI} \
+ file://0003-configure-widen-the-regexp-for-SH-architectures.patch \
+ file://0004-Point-scripts-location-to-libdir.patch \
+ file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
+ file://0006-Use-libtool-2.4.patch \
+ file://0007-Add-the-armv5e-architecture-to-binutils.patch \
+ file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
+ file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
+ file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
+ file://0011-Change-default-emulation-for-mips64-linux.patch \
+ file://0012-Add-support-for-Netlogic-XLP.patch \
+ file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
+ file://0014-Detect-64-bit-MIPS-targets.patch \
+ file://0015-sync-with-OE-libtool-changes.patch \
+"
+S = "${WORKDIR}/git"
+
+do_configure_prepend () {
+ rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb
index 5dbaa0301..5dbaa0301 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.28.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.29.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb
index fbd1f7d25..fbd1f7d25 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.28.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.bb
index 37f4d6d2e..37f4d6d2e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.28.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.29.1.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 8fb1b4ede..0b515d83c 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 689d011688b5ff9481d4367bef3dea7a7b2867fb Mon Sep 17 00:00:00 2001
+From 58ac9f95a3d83c29efaf7a8906fb6aefea8c8e79 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
@@ -43,7 +43,7 @@ index b6940d376d..a42c4d7a4b 100755
LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index e65f9a3ccf..d99d2c1d2a 100644
+index d9138bc059..e48faeca43 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -138,8 +138,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
@@ -58,5 +58,5 @@ index e65f9a3ccf..d99d2c1d2a 100644
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
--
-2.12.0
+2.14.0
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 14299fd1a..370333d5d 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 7c7de107b4b0a507d2aeca3e3a86d01cb4b51360 Mon Sep 17 00:00:00 2001
+From 8f929c616208351d0971d7dfd7574d48d3144603 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
@@ -57,5 +57,5 @@ index a42c4d7a4b..d727b4d07e 100755
libs=${NATIVE_LIB_DIRS}
if [ "x${NATIVE}" = "xyes" ] ; then
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
index eddb42b4e..b6c09ccf1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-gprof-add-uclibc-support-to-configure.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-configure-widen-the-regexp-for-SH-architectures.patch
@@ -1,17 +1,33 @@
-From 7893d2b24d0303bda3a0049846489619ffd1387b Mon Sep 17 00:00:00 2001
+From e5a806aae02a10290c71deb72f6294c98068368d 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] gprof: add uclibc support to configure
+Subject: [PATCH 03/15] configure: widen the regexp for SH architectures
+
+gprof needs to know about uclibc
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+ configure | 2 +-
gprof/configure | 5 +++++
- 1 file changed, 5 insertions(+)
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+diff --git a/configure b/configure
+index be9dd89d9b..d8af155ab5 100755
+--- a/configure
++++ b/configure
+@@ -3844,7 +3844,7 @@ case "${target}" in
+ or1k*-*-*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+- sh-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
diff --git a/gprof/configure b/gprof/configure
-index 9e6b8f3525..38a4c0b0e5 100755
+index e71fe8b9e4..679e0dce77 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -5874,6 +5874,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -27,5 +43,5 @@ index 9e6b8f3525..38a4c0b0e5 100755
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.12.0
+2.14.0
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 c6b9de799..38eee3085 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 e34650c50574a8a39d694567ed607a63006b6f99 Mon Sep 17 00:00:00 2001
+From 3634ec3547bc0f8a5d1b8ad15365e2f836cda642 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 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 15beaa7021..bbf9c671d8 100644
+index 625347ff62..d5334d2681 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -57,7 +57,7 @@ endif
@@ -25,10 +25,10 @@ index 15beaa7021..bbf9c671d8 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 042b690ed6..37e7b25e9a 100644
+index ba251777b0..a2cf2282b5 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
-@@ -452,7 +452,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+@@ -446,7 +446,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
@@ -38,5 +38,5 @@ index 042b690ed6..37e7b25e9a 100644
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
--
-2.12.0
+2.14.0
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 726f7020d..59150a2e4 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 42292f5533bca904f230a8e03ceee1f84ef0c4ec Mon Sep 17 00:00:00 2001
+From 9d37c8f68c07da63186cb993f1221f6c11eca422 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,19 +15,19 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 84adaef6df..ab8c74257e 100644
+index 9ac1840316..9dc4c149bc 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1411,6 +1411,8 @@ fragment <<EOF
+@@ -1463,6 +1463,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
- lib_path = (const char *) getenv ("LD_RUN_PATH");
-+ if ((lib_path) && (strlen (lib_path) == 0))
-+ lib_path = NULL;
- if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
- force))
+ path = (const char *) getenv ("LD_RUN_PATH");
++ if ((path) && (strlen (path) == 0))
++ path = NULL;
+ if (path
+ && gld${EMULATION_NAME}_search_needed (path, &n, force))
break;
-@@ -1692,6 +1694,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1740,6 +1742,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 @@ index 84adaef6df..ab8c74257e 100644
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch
deleted file mode 100644
index 9770ca7f0..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Explicitly-link-with-libm-on-uclibc.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 6a46bf151d7e53df8b5e7645a2d241967688368a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:32:49 +0000
-Subject: [PATCH 06/15] Explicitly link with libm on uclibc
-
-Description:
-
-We do not need to have the libtool patch anymore for binutils after
-libtool has been updated upstream it include support for it. However
-for building gas natively on uclibc systems we have to link it with
--lm so that it picks up missing symbols.
-
-/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o):
-In function `floatformat_from_double':
-floatformat.c:(.text+0x1ec): undefined reference to `frexp'
-floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
-/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o):
-In function `floatformat_to_double':
-floatformat.c:(.text+0x38a): undefined reference to `ldexp'
-floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
-floatformat.c:(.text+0x43e): undefined reference to `ldexp'
-floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
-collect2: ld returned 1 exit status
-make[4]: *** [as-new] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gas/configure.tgt | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/gas/configure.tgt b/gas/configure.tgt
-index 711d537e95..7cd2dc176a 100644
---- a/gas/configure.tgt
-+++ b/gas/configure.tgt
-@@ -494,6 +494,12 @@ case ${generic_target} in
- *-*-netware) fmt=elf em=netware ;;
- esac
-
-+case ${generic_target} in
-+ arm-*-*uclibc*)
-+ need_libm=yes
-+ ;;
-+esac
-+
- case ${cpu_type} in
- aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | riscv | sparc | z80 | z8k)
- bfd_gas=yes
---
-2.12.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
index 6b7f75389..e87efe653 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
@@ -1,17 +1,18 @@
-From 9a3651e120261c72090689ad770ad048b0baf506 Mon Sep 17 00:00:00 2001
+From 71c734bb3754319029dcfc898cedbade42274dcb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 6 Mar 2017 23:28:33 -0800
-Subject: [PATCH 07/15] Use libtool 2.4
+Date: Sun, 14 Feb 2016 17:04:07 +0000
+Subject: [PATCH 06/15] Use libtool 2.4
get libtool sysroot support
+Upstream-Status: Pending
+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
-Upstream-Status: Inappropriate [ OE configuration Specific]
-
bfd/configure | 1318 +++++++++++++++++------
bfd/configure.ac | 2 +-
binutils/configure | 1316 +++++++++++++++++------
+ configure | 2 +-
gas/configure | 1314 +++++++++++++++++------
gprof/configure | 1321 +++++++++++++++++------
ld/configure | 1691 +++++++++++++++++++++--------
@@ -23,10 +24,10 @@ Upstream-Status: Inappropriate [ OE configuration Specific]
opcodes/configure | 1318 +++++++++++++++++------
opcodes/configure.ac | 2 +-
zlib/configure | 1316 +++++++++++++++++------
- 14 files changed, 9926 insertions(+), 3693 deletions(-)
+ 15 files changed, 9927 insertions(+), 3694 deletions(-)
diff --git a/bfd/configure b/bfd/configure
-index f30bfabef3..fa1a545e9d 100755
+index 48276594ed..3ece8943f3 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -672,6 +672,9 @@ OTOOL
@@ -212,7 +213,7 @@ index f30bfabef3..fa1a545e9d 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6523,9 +6624,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6521,11 +6622,164 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -226,6 +227,8 @@ index f30bfabef3..fa1a545e9d 100755
+
+
+
+
+
if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -588,12 +591,17 @@ index f30bfabef3..fa1a545e9d 100755
-@@ -7147,6 +7488,45 @@ fi
+@@ -7142,6 +7483,45 @@ fi
+
+
++
++
++
++
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -626,14 +634,9 @@ index f30bfabef3..fa1a545e9d 100755
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
-+
-+
-+
-+
-+
- # Check whether --enable-libtool-lock was given.
- if test "${enable_libtool_lock+set}" = set; then :
- enableval=$enable_libtool_lock;
+
+
+
@@ -7353,6 +7733,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -1331,7 +1334,7 @@ index f30bfabef3..fa1a545e9d 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -14122,7 +14777,7 @@ SHARED_LDFLAGS=
+@@ -14172,7 +14827,7 @@ SHARED_LDFLAGS=
if test "$enable_shared" = "yes"; then
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
if test -n "$x"; then
@@ -1340,7 +1343,7 @@ index f30bfabef3..fa1a545e9d 100755
fi
# More hacks to build DLLs on Windows.
-@@ -16826,13 +17481,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -16879,13 +17534,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"`'
@@ -1361,7 +1364,7 @@ index f30bfabef3..fa1a545e9d 100755
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"`'
-@@ -16847,14 +17509,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -16900,14 +17562,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"`'
@@ -1380,7 +1383,7 @@ index f30bfabef3..fa1a545e9d 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -16887,12 +17552,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -16940,12 +17605,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"`'
@@ -1394,7 +1397,7 @@ index f30bfabef3..fa1a545e9d 100755
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"`'
-@@ -16947,8 +17612,13 @@ reload_flag \
+@@ -17000,8 +17665,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -1408,7 +1411,7 @@ index f30bfabef3..fa1a545e9d 100755
STRIP \
RANLIB \
CC \
-@@ -16958,12 +17628,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -17011,12 +17681,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 \
@@ -1424,7 +1427,7 @@ index f30bfabef3..fa1a545e9d 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -16979,7 +17651,6 @@ no_undefined_flag \
+@@ -17032,7 +17704,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -1432,7 +1435,7 @@ index f30bfabef3..fa1a545e9d 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -17015,6 +17686,7 @@ module_cmds \
+@@ -17068,6 +17739,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -1440,7 +1443,7 @@ index f30bfabef3..fa1a545e9d 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -17794,7 +18466,8 @@ $as_echo X"$file" |
+@@ -17847,7 +18519,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,
@@ -1450,7 +1453,7 @@ index f30bfabef3..fa1a545e9d 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -17897,19 +18570,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -17950,19 +18623,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -1494,7 +1497,7 @@ index f30bfabef3..fa1a545e9d 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -17939,6 +18635,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -17992,6 +18688,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
@@ -1507,7 +1510,7 @@ index f30bfabef3..fa1a545e9d 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -17948,6 +18650,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -18001,6 +18703,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -1517,7 +1520,7 @@ index f30bfabef3..fa1a545e9d 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -18062,12 +18767,12 @@ with_gcc=$GCC
+@@ -18115,12 +18820,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -1533,7 +1536,7 @@ index f30bfabef3..fa1a545e9d 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -18154,9 +18859,6 @@ inherit_rpath=$inherit_rpath
+@@ -18207,9 +18912,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -1543,7 +1546,7 @@ index f30bfabef3..fa1a545e9d 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -18172,6 +18874,9 @@ include_expsyms=$lt_include_expsyms
+@@ -18225,6 +18927,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -1553,7 +1556,7 @@ index f30bfabef3..fa1a545e9d 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -18204,210 +18909,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -18257,210 +18962,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?
@@ -1928,10 +1931,10 @@ index f30bfabef3..fa1a545e9d 100755
chmod +x "$ofile"
diff --git a/bfd/configure.ac b/bfd/configure.ac
-index 9a183c1628..3d8ea07836 100644
+index 8fd03a7ea8..8816c3286c 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
-@@ -253,7 +253,7 @@ changequote(,)dnl
+@@ -254,7 +254,7 @@ changequote(,)dnl
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
changequote([,])dnl
if test -n "$x"; then
@@ -1941,7 +1944,7 @@ index 9a183c1628..3d8ea07836 100644
# More hacks to build DLLs on Windows.
diff --git a/binutils/configure b/binutils/configure
-index 82119efe72..4a98918ce1 100755
+index 22e1b1736e..321b63535b 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -659,8 +659,11 @@ OTOOL
@@ -2513,10 +2516,12 @@ index 82119efe72..4a98918ce1 100755
-@@ -6910,6 +7256,40 @@ fi
+@@ -6908,6 +7254,40 @@ fi
++
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -2549,8 +2554,6 @@ index 82119efe72..4a98918ce1 100755
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
-+
-+
@@ -3251,7 +3254,7 @@ index 82119efe72..4a98918ce1 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15436,13 +16091,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15446,13 +16101,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"`'
@@ -3272,7 +3275,7 @@ index 82119efe72..4a98918ce1 100755
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 +16119,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15467,14 +16129,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"`'
@@ -3291,7 +3294,7 @@ index 82119efe72..4a98918ce1 100755
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 +16162,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15507,12 +16172,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"`'
@@ -3305,7 +3308,7 @@ index 82119efe72..4a98918ce1 100755
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 +16222,13 @@ reload_flag \
+@@ -15567,8 +16232,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -3319,7 +3322,7 @@ index 82119efe72..4a98918ce1 100755
STRIP \
RANLIB \
CC \
-@@ -15568,12 +16238,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -15578,12 +16248,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 \
@@ -3335,7 +3338,7 @@ index 82119efe72..4a98918ce1 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -15589,7 +16261,6 @@ no_undefined_flag \
+@@ -15599,7 +16271,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -3343,7 +3346,7 @@ index 82119efe72..4a98918ce1 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -15625,6 +16296,7 @@ module_cmds \
+@@ -15635,6 +16306,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -3351,7 +3354,7 @@ index 82119efe72..4a98918ce1 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -16382,7 +17054,8 @@ $as_echo X"$file" |
+@@ -16392,7 +17064,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,
@@ -3361,7 +3364,7 @@ index 82119efe72..4a98918ce1 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -16485,19 +17158,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16495,19 +17168,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -3405,7 +3408,7 @@ index 82119efe72..4a98918ce1 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -16527,6 +17223,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -16537,6 +17233,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
@@ -3418,7 +3421,7 @@ index 82119efe72..4a98918ce1 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -16536,6 +17238,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -16546,6 +17248,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -3428,7 +3431,7 @@ index 82119efe72..4a98918ce1 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -16650,12 +17355,12 @@ with_gcc=$GCC
+@@ -16660,12 +17365,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -3444,7 +3447,7 @@ index 82119efe72..4a98918ce1 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -16742,9 +17447,6 @@ inherit_rpath=$inherit_rpath
+@@ -16752,9 +17457,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -3454,7 +3457,7 @@ index 82119efe72..4a98918ce1 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -16760,6 +17462,9 @@ include_expsyms=$lt_include_expsyms
+@@ -16770,6 +17472,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -3464,7 +3467,7 @@ index 82119efe72..4a98918ce1 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -16792,210 +17497,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -16802,210 +17507,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?
@@ -3838,8 +3841,21 @@ index 82119efe72..4a98918ce1 100755
(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 e574cb8514..a36f1ae161 100755
+index 93afb20c8f..81dd4cbd97 100755
--- a/gas/configure
+++ b/gas/configure
@@ -650,8 +650,11 @@ OTOOL
@@ -4402,10 +4418,12 @@ index e574cb8514..a36f1ae161 100755
-@@ -6671,6 +7015,40 @@ fi
+@@ -6669,6 +7013,40 @@ fi
++
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -4438,8 +4456,6 @@ index e574cb8514..a36f1ae161 100755
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
-+
-+
@@ -5140,7 +5156,7 @@ index e574cb8514..a36f1ae161 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15425,13 +16078,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15436,13 +16089,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"`'
@@ -5161,7 +5177,7 @@ index e574cb8514..a36f1ae161 100755
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"`'
-@@ -15446,14 +16106,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15457,14 +16117,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"`'
@@ -5180,7 +5196,7 @@ index e574cb8514..a36f1ae161 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15486,12 +16149,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15497,12 +16160,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"`'
@@ -5194,7 +5210,7 @@ index e574cb8514..a36f1ae161 100755
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"`'
-@@ -15546,8 +16209,13 @@ reload_flag \
+@@ -15557,8 +16220,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -5208,7 +5224,7 @@ index e574cb8514..a36f1ae161 100755
STRIP \
RANLIB \
CC \
-@@ -15557,12 +16225,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -15568,12 +16236,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 \
@@ -5224,7 +5240,7 @@ index e574cb8514..a36f1ae161 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -15578,7 +16248,6 @@ no_undefined_flag \
+@@ -15589,7 +16259,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -5232,7 +5248,7 @@ index e574cb8514..a36f1ae161 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -15614,6 +16283,7 @@ module_cmds \
+@@ -15625,6 +16294,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -5240,7 +5256,7 @@ index e574cb8514..a36f1ae161 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -16378,7 +17048,8 @@ $as_echo X"$file" |
+@@ -16389,7 +17059,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,
@@ -5250,7 +5266,7 @@ index e574cb8514..a36f1ae161 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -16481,19 +17152,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16492,19 +17163,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -5294,7 +5310,7 @@ index e574cb8514..a36f1ae161 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -16523,6 +17217,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -16534,6 +17228,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
@@ -5307,7 +5323,7 @@ index e574cb8514..a36f1ae161 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -16532,6 +17232,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -16543,6 +17243,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -5317,7 +5333,7 @@ index e574cb8514..a36f1ae161 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -16646,12 +17349,12 @@ with_gcc=$GCC
+@@ -16657,12 +17360,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -5333,7 +5349,7 @@ index e574cb8514..a36f1ae161 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -16738,9 +17441,6 @@ inherit_rpath=$inherit_rpath
+@@ -16749,9 +17452,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -5343,7 +5359,7 @@ index e574cb8514..a36f1ae161 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -16756,6 +17456,9 @@ include_expsyms=$lt_include_expsyms
+@@ -16767,6 +17467,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -5353,7 +5369,7 @@ index e574cb8514..a36f1ae161 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -16788,210 +17491,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -16799,210 +17502,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?
@@ -5728,7 +5744,7 @@ index e574cb8514..a36f1ae161 100755
chmod +x "$ofile"
diff --git a/gprof/configure b/gprof/configure
-index 38a4c0b0e5..38d1f699c7 100755
+index 679e0dce77..ac4c016a63 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -631,8 +631,11 @@ OTOOL
@@ -6309,10 +6325,15 @@ index 38a4c0b0e5..38d1f699c7 100755
-@@ -6595,6 +6933,43 @@ fi
+@@ -6590,6 +6928,43 @@ fi
++
++
++
++
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -6345,14 +6366,9 @@ index 38a4c0b0e5..38d1f699c7 100755
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
-+
-+
-+
-+
-+
- # Check whether --enable-libtool-lock was given.
- if test "${enable_libtool_lock+set}" = set; then :
- enableval=$enable_libtool_lock;
+
+
+
@@ -6801,6 +7176,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -7638,10 +7654,10 @@ index 38a4c0b0e5..38d1f699c7 100755
chmod +x "$ofile"
diff --git a/ld/configure b/ld/configure
-index a16c6db059..4277b74bad 100755
+index d7f66f8cdc..4e71511bd1 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -659,8 +659,11 @@ OTOOL
+@@ -655,8 +655,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -7653,7 +7669,7 @@ index a16c6db059..4277b74bad 100755
OBJDUMP
LN_S
NM
-@@ -782,6 +785,7 @@ enable_static
+@@ -778,6 +781,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -7661,7 +7677,7 @@ index a16c6db059..4277b74bad 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1463,6 +1467,8 @@ Optional Packages:
+@@ -1464,6 +1468,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -7670,7 +7686,7 @@ index a16c6db059..4277b74bad 100755
--with-lib-path=dir1:dir2... set default LIB_PATH
--with-sysroot=DIR Search for usr/lib et al within DIR.
-@@ -5657,8 +5663,8 @@ esac
+@@ -5658,8 +5664,8 @@ esac
@@ -7681,7 +7697,7 @@ index a16c6db059..4277b74bad 100755
-@@ -5698,7 +5704,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5699,7 +5705,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -7690,7 +7706,7 @@ index a16c6db059..4277b74bad 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6384,8 +6390,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6385,8 +6391,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -7701,7 +7717,7 @@ index a16c6db059..4277b74bad 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -6434,6 +6440,80 @@ esac
+@@ -6435,6 +6441,80 @@ esac
@@ -7782,7 +7798,7 @@ index a16c6db059..4277b74bad 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -6450,6 +6530,11 @@ case $reload_flag in
+@@ -6451,6 +6531,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -7794,7 +7810,7 @@ index a16c6db059..4277b74bad 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6618,7 +6703,8 @@ mingw* | pw32*)
+@@ -6619,7 +6704,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -7804,7 +7820,7 @@ index a16c6db059..4277b74bad 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6772,6 +6858,21 @@ esac
+@@ -6773,6 +6859,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -7826,7 +7842,7 @@ index a16c6db059..4277b74bad 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6787,9 +6888,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6788,9 +6889,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -7991,7 +8007,7 @@ index a16c6db059..4277b74bad 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6805,7 +7059,7 @@ do
+@@ -6806,7 +7060,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -8000,7 +8016,7 @@ index a16c6db059..4277b74bad 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6825,11 +7079,15 @@ $as_echo "no" >&6; }
+@@ -6826,11 +7080,15 @@ $as_echo "no" >&6; }
fi
@@ -8019,7 +8035,7 @@ index a16c6db059..4277b74bad 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6845,7 +7103,7 @@ do
+@@ -6846,7 +7104,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -8028,7 +8044,7 @@ index a16c6db059..4277b74bad 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6864,6 +7122,10 @@ else
+@@ -6865,6 +7123,10 @@ else
$as_echo "no" >&6; }
fi
@@ -8039,7 +8055,7 @@ index a16c6db059..4277b74bad 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6875,12 +7137,12 @@ ac_tool_warned=yes ;;
+@@ -6876,12 +7138,12 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -8056,7 +8072,7 @@ index a16c6db059..4277b74bad 100755
-@@ -6890,6 +7152,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6891,6 +7153,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -8119,7 +8135,7 @@ index a16c6db059..4277b74bad 100755
if test -n "$ac_tool_prefix"; then
-@@ -7226,8 +7544,8 @@ esac
+@@ -7227,8 +7545,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -8130,7 +8146,7 @@ index a16c6db059..4277b74bad 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -7263,6 +7581,7 @@ for ac_symprfx in "" "_"; do
+@@ -7264,6 +7582,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -8138,7 +8154,7 @@ index a16c6db059..4277b74bad 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -7304,6 +7623,18 @@ _LT_EOF
+@@ -7305,6 +7624,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -8157,7 +8173,7 @@ index a16c6db059..4277b74bad 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -7315,7 +7646,7 @@ _LT_EOF
+@@ -7316,7 +7647,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -8166,7 +8182,7 @@ index a16c6db059..4277b74bad 100755
const char *name;
void *address;
}
-@@ -7341,8 +7672,8 @@ static const void *lt_preloaded_setup() {
+@@ -7342,8 +7673,8 @@ static const void *lt_preloaded_setup() {
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -8177,7 +8193,7 @@ index a16c6db059..4277b74bad 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7352,8 +7683,8 @@ _LT_EOF
+@@ -7353,8 +7684,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -8188,7 +8204,7 @@ index a16c6db059..4277b74bad 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -7390,6 +7721,19 @@ else
+@@ -7391,6 +7722,19 @@ else
$as_echo "ok" >&6; }
fi
@@ -8208,10 +8224,14 @@ index a16c6db059..4277b74bad 100755
-@@ -7410,6 +7754,42 @@ fi
+@@ -7404,6 +7748,42 @@ fi
++
++
++
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -8244,14 +8264,10 @@ index a16c6db059..4277b74bad 100755
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
-+
-+
-+
-+
- # Check whether --enable-libtool-lock was given.
- if test "${enable_libtool_lock+set}" = set; then :
-@@ -7617,6 +7997,123 @@ esac
+
+
+@@ -7618,6 +7998,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -8375,7 +8391,7 @@ index a16c6db059..4277b74bad 100755
case $host_os in
rhapsody* | darwin*)
-@@ -8180,6 +8677,8 @@ _LT_EOF
+@@ -8181,6 +8678,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -8384,7 +8400,7 @@ index a16c6db059..4277b74bad 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -8248,6 +8747,16 @@ done
+@@ -8249,6 +8748,16 @@ done
@@ -8401,7 +8417,7 @@ index a16c6db059..4277b74bad 100755
# Set options
-@@ -8376,7 +8885,8 @@ fi
+@@ -8377,7 +8886,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -8411,7 +8427,7 @@ index a16c6db059..4277b74bad 100755
-@@ -8465,7 +8975,7 @@ aix3*)
+@@ -8466,7 +8976,7 @@ aix3*)
esac
# Global variables:
@@ -8420,7 +8436,7 @@ index a16c6db059..4277b74bad 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8763,8 +9273,6 @@ fi
+@@ -8764,8 +9274,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -8429,7 +8445,7 @@ index a16c6db059..4277b74bad 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8930,6 +9438,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8931,6 +9439,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -8442,7 +8458,7 @@ index a16c6db059..4277b74bad 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8992,7 +9506,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8993,7 +9507,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -8451,7 +8467,7 @@ index a16c6db059..4277b74bad 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -9049,13 +9563,17 @@ case $host_os in
+@@ -9050,13 +9564,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -8475,7 +8491,7 @@ index a16c6db059..4277b74bad 100755
#
# Check to make sure the PIC flag actually works.
-@@ -9116,6 +9634,11 @@ fi
+@@ -9117,6 +9635,11 @@ fi
@@ -8487,7 +8503,7 @@ index a16c6db059..4277b74bad 100755
#
# Check to make sure the static flag actually works.
#
-@@ -9466,7 +9989,8 @@ _LT_EOF
+@@ -9467,7 +9990,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -8497,7 +8513,7 @@ index a16c6db059..4277b74bad 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9565,12 +10089,12 @@ _LT_EOF
+@@ -9566,12 +10090,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -8512,7 +8528,7 @@ index a16c6db059..4277b74bad 100755
fi
;;
esac
-@@ -9584,8 +10108,8 @@ _LT_EOF
+@@ -9585,8 +10109,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -8523,7 +8539,7 @@ index a16c6db059..4277b74bad 100755
fi
;;
-@@ -9603,8 +10127,8 @@ _LT_EOF
+@@ -9604,8 +10128,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8534,7 +8550,7 @@ index a16c6db059..4277b74bad 100755
else
ld_shlibs=no
fi
-@@ -9650,8 +10174,8 @@ _LT_EOF
+@@ -9651,8 +10175,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8545,7 +8561,7 @@ index a16c6db059..4277b74bad 100755
else
ld_shlibs=no
fi
-@@ -9781,7 +10305,13 @@ _LT_EOF
+@@ -9782,7 +10306,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -8560,7 +8576,7 @@ index a16c6db059..4277b74bad 100755
/* end confdefs.h. */
int
-@@ -9794,22 +10324,29 @@ main ()
+@@ -9795,22 +10325,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -8603,7 +8619,7 @@ index a16c6db059..4277b74bad 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9821,7 +10358,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9822,7 +10359,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -8618,7 +8634,7 @@ index a16c6db059..4277b74bad 100755
/* end confdefs.h. */
int
-@@ -9834,22 +10377,29 @@ main ()
+@@ -9835,22 +10378,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -8661,7 +8677,7 @@ index a16c6db059..4277b74bad 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9893,21 +10443,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9894,21 +10444,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -8741,7 +8757,7 @@ index a16c6db059..4277b74bad 100755
;;
darwin* | rhapsody*)
-@@ -9968,7 +10561,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9969,7 +10562,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -8750,7 +8766,7 @@ index a16c6db059..4277b74bad 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9976,7 +10569,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9977,7 +10570,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux9*)
if test "$GCC" = yes; then
@@ -8759,7 +8775,7 @@ index a16c6db059..4277b74bad 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9992,7 +10585,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9993,7 +10586,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -8768,7 +8784,7 @@ index a16c6db059..4277b74bad 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -10016,10 +10609,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10017,10 +10610,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -8781,7 +8797,7 @@ index a16c6db059..4277b74bad 100755
;;
esac
else
-@@ -10098,23 +10691,36 @@ fi
+@@ -10099,23 +10692,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -8826,7 +8842,7 @@ index a16c6db059..4277b74bad 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -10199,7 +10805,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10200,7 +10806,7 @@ rm -f core conftest.err conftest.$ac_objext \
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -8835,7 +8851,7 @@ index a16c6db059..4277b74bad 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -10218,9 +10824,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10219,9 +10825,9 @@ rm -f core conftest.err conftest.$ac_objext \
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -8847,7 +8863,7 @@ index a16c6db059..4277b74bad 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10796,8 +11402,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10797,8 +11403,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -8859,7 +8875,7 @@ index a16c6db059..4277b74bad 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10830,13 +11437,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10831,13 +11438,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -8932,7 +8948,7 @@ index a16c6db059..4277b74bad 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10928,7 +11593,7 @@ haiku*)
+@@ -10929,7 +11594,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -8941,7 +8957,7 @@ index a16c6db059..4277b74bad 100755
hardcode_into_libs=yes
;;
-@@ -11768,10 +12433,10 @@ else
+@@ -11769,10 +12434,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -8954,7 +8970,7 @@ index a16c6db059..4277b74bad 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11874,10 +12539,10 @@ else
+@@ -11875,10 +12540,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -8967,7 +8983,7 @@ index a16c6db059..4277b74bad 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12269,6 +12934,7 @@ $RM -r conftest*
+@@ -12270,6 +12935,7 @@ $RM -r conftest*
# Allow CC to be a program name with arguments.
lt_save_CC=$CC
@@ -8975,7 +8991,7 @@ index a16c6db059..4277b74bad 100755
lt_save_LD=$LD
lt_save_GCC=$GCC
GCC=$GXX
-@@ -12286,6 +12952,7 @@ $RM -r conftest*
+@@ -12287,6 +12953,7 @@ $RM -r conftest*
fi
test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"}
@@ -8983,7 +8999,7 @@ index a16c6db059..4277b74bad 100755
compiler=$CC
compiler_CXX=$CC
for cc_temp in $compiler""; do
-@@ -12568,7 +13235,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -12569,7 +13236,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
allow_undefined_flag_CXX='-berok'
# Determine the default libpath from the value encoded in an empty
# executable.
@@ -8998,7 +9014,7 @@ index a16c6db059..4277b74bad 100755
/* end confdefs.h. */
int
-@@ -12581,22 +13254,29 @@ main ()
+@@ -12582,22 +13255,29 @@ main ()
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
@@ -9041,7 +9057,7 @@ index a16c6db059..4277b74bad 100755
hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-@@ -12609,7 +13289,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12610,7 +13290,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -9056,7 +9072,7 @@ index a16c6db059..4277b74bad 100755
/* end confdefs.h. */
int
-@@ -12622,22 +13308,29 @@ main ()
+@@ -12623,22 +13309,29 @@ main ()
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
@@ -9099,7 +9115,7 @@ index a16c6db059..4277b74bad 100755
hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -12680,29 +13373,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12681,29 +13374,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
cygwin* | mingw* | pw32* | cegcc*)
@@ -9198,7 +9214,7 @@ index a16c6db059..4277b74bad 100755
darwin* | rhapsody*)
-@@ -12808,7 +13547,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12809,7 +13548,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
*)
if test "$GXX" = yes; then
@@ -9207,7 +9223,7 @@ index a16c6db059..4277b74bad 100755
else
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
-@@ -12879,10 +13618,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12880,10 +13619,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
@@ -9220,7 +9236,7 @@ index a16c6db059..4277b74bad 100755
;;
esac
fi
-@@ -12923,9 +13662,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12924,9 +13663,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
*)
if test "$GXX" = yes; then
if test "$with_gnu_ld" = no; then
@@ -9232,7 +9248,7 @@ index a16c6db059..4277b74bad 100755
fi
fi
link_all_deplibs_CXX=yes
-@@ -12995,20 +13734,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12996,20 +13735,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
prelink_cmds_CXX='tpldir=Template.dir~
rm -rf $tpldir~
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
@@ -9257,7 +9273,7 @@ index a16c6db059..4277b74bad 100755
;;
*) # Version 6 and above use weak symbols
archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-@@ -13203,7 +13942,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13204,7 +13943,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
;;
*)
@@ -9266,7 +9282,7 @@ index a16c6db059..4277b74bad 100755
;;
esac
-@@ -13249,7 +13988,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13250,7 +13989,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
solaris*)
case $cc_basename in
@@ -9275,7 +9291,7 @@ index a16c6db059..4277b74bad 100755
# Sun C++ 4.2, 5.x and Centerline C++
archive_cmds_need_lc_CXX=yes
no_undefined_flag_CXX=' -zdefs'
-@@ -13290,9 +14029,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13291,9 +14030,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
@@ -9287,7 +9303,7 @@ index a16c6db059..4277b74bad 100755
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
-@@ -13427,6 +14166,13 @@ private:
+@@ -13428,6 +14167,13 @@ private:
};
_LT_EOF
@@ -9301,7 +9317,7 @@ index a16c6db059..4277b74bad 100755
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
-@@ -13440,7 +14186,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13441,7 +14187,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
pre_test_object_deps_done=no
for p in `eval "$output_verbose_link_cmd"`; do
@@ -9310,7 +9326,7 @@ index a16c6db059..4277b74bad 100755
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
-@@ -13449,13 +14195,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13450,13 +14196,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
test $p = "-R"; then
prev=$p
continue
@@ -9337,7 +9353,7 @@ index a16c6db059..4277b74bad 100755
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
-@@ -13475,8 +14230,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13476,8 +14231,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
postdeps_CXX="${postdeps_CXX} ${prev}${p}"
fi
fi
@@ -9348,7 +9364,7 @@ index a16c6db059..4277b74bad 100755
*.$objext)
# This assumes that the test object file only shows up
# once in the compiler output.
-@@ -13512,6 +14269,7 @@ else
+@@ -13513,6 +14270,7 @@ else
fi
$RM -f confest.$objext
@@ -9356,7 +9372,7 @@ index a16c6db059..4277b74bad 100755
# PORTME: override above test on systems where it is broken
case $host_os in
-@@ -13547,7 +14305,7 @@ linux*)
+@@ -13548,7 +14306,7 @@ linux*)
solaris*)
case $cc_basename in
@@ -9365,7 +9381,7 @@ index a16c6db059..4277b74bad 100755
# The more standards-conforming stlport4 library is
# incompatible with the Cstd library. Avoid specifying
# it if it's in CXXFLAGS. Ignore libCrun as
-@@ -13612,8 +14370,6 @@ fi
+@@ -13613,8 +14371,6 @@ fi
lt_prog_compiler_pic_CXX=
lt_prog_compiler_static_CXX=
@@ -9374,7 +9390,7 @@ index a16c6db059..4277b74bad 100755
# C++ specific cases for pic, static, wl, etc.
if test "$GXX" = yes; then
-@@ -13718,6 +14474,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -13719,6 +14475,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
;;
esac
;;
@@ -9386,7 +9402,7 @@ index a16c6db059..4277b74bad 100755
dgux*)
case $cc_basename in
ec++*)
-@@ -13870,7 +14631,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -13871,7 +14632,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
;;
solaris*)
case $cc_basename in
@@ -9395,7 +9411,7 @@ index a16c6db059..4277b74bad 100755
# Sun C++ 4.2, 5.x and Centerline C++
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-Bstatic'
-@@ -13935,10 +14696,17 @@ case $host_os in
+@@ -13936,10 +14697,17 @@ case $host_os in
lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
;;
esac
@@ -9416,7 +9432,7 @@ index a16c6db059..4277b74bad 100755
#
# Check to make sure the PIC flag actually works.
-@@ -13996,6 +14764,8 @@ fi
+@@ -13997,6 +14765,8 @@ fi
@@ -9425,7 +9441,7 @@ index a16c6db059..4277b74bad 100755
#
# Check to make sure the static flag actually works.
#
-@@ -14173,6 +14943,7 @@ fi
+@@ -14174,6 +14944,7 @@ fi
$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -9433,7 +9449,7 @@ index a16c6db059..4277b74bad 100755
case $host_os in
aix[4-9]*)
# If we're using GNU nm, then we don't want the "-C" option.
-@@ -14187,15 +14958,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -14188,15 +14959,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
;;
pw32*)
export_symbols_cmds_CXX="$ltdll_cmds"
@@ -9459,7 +9475,7 @@ index a16c6db059..4277b74bad 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
$as_echo "$ld_shlibs_CXX" >&6; }
-@@ -14458,8 +15234,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14459,8 +15235,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -9471,7 +9487,7 @@ index a16c6db059..4277b74bad 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -14491,13 +15268,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14492,13 +15269,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -9544,7 +9560,7 @@ index a16c6db059..4277b74bad 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -14588,7 +15423,7 @@ haiku*)
+@@ -14589,7 +15424,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -9553,7 +9569,7 @@ index a16c6db059..4277b74bad 100755
hardcode_into_libs=yes
;;
-@@ -15047,6 +15882,7 @@ fi
+@@ -15048,6 +15883,7 @@ fi
fi # test -n "$compiler"
CC=$lt_save_CC
@@ -9561,7 +9577,7 @@ index a16c6db059..4277b74bad 100755
LDCXX=$LD
LD=$lt_save_LD
GCC=$lt_save_GCC
-@@ -18026,13 +18862,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -18083,13 +18919,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"`'
@@ -9582,7 +9598,7 @@ index a16c6db059..4277b74bad 100755
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"`'
-@@ -18047,14 +18890,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -18104,14 +18947,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"`'
@@ -9601,7 +9617,7 @@ index a16c6db059..4277b74bad 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -18087,12 +18933,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -18144,12 +18990,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"`'
@@ -9615,7 +9631,7 @@ index a16c6db059..4277b74bad 100755
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"`'
-@@ -18131,8 +18977,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
+@@ -18188,8 +19034,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9625,7 +9641,7 @@ index a16c6db059..4277b74bad 100755
lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -18159,12 +19005,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
+@@ -18216,12 +19062,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9639,7 +9655,7 @@ index a16c6db059..4277b74bad 100755
file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -18202,8 +19048,13 @@ reload_flag \
+@@ -18259,8 +19105,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -9653,7 +9669,7 @@ index a16c6db059..4277b74bad 100755
STRIP \
RANLIB \
CC \
-@@ -18213,12 +19064,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -18270,12 +19121,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 \
@@ -9669,7 +9685,7 @@ index a16c6db059..4277b74bad 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -18234,7 +19087,6 @@ no_undefined_flag \
+@@ -18291,7 +19144,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -9677,7 +9693,7 @@ index a16c6db059..4277b74bad 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -18256,8 +19108,8 @@ LD_CXX \
+@@ -18313,8 +19165,8 @@ LD_CXX \
reload_flag_CXX \
compiler_CXX \
lt_prog_compiler_no_builtin_flag_CXX \
@@ -9687,7 +9703,7 @@ index a16c6db059..4277b74bad 100755
lt_prog_compiler_static_CXX \
lt_cv_prog_compiler_c_o_CXX \
export_dynamic_flag_spec_CXX \
-@@ -18269,7 +19121,6 @@ no_undefined_flag_CXX \
+@@ -18326,7 +19178,6 @@ no_undefined_flag_CXX \
hardcode_libdir_flag_spec_CXX \
hardcode_libdir_flag_spec_ld_CXX \
hardcode_libdir_separator_CXX \
@@ -9695,7 +9711,7 @@ index a16c6db059..4277b74bad 100755
exclude_expsyms_CXX \
include_expsyms_CXX \
file_list_spec_CXX \
-@@ -18303,6 +19154,7 @@ module_cmds \
+@@ -18360,6 +19211,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -9703,7 +9719,7 @@ index a16c6db059..4277b74bad 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -18317,7 +19169,8 @@ archive_expsym_cmds_CXX \
+@@ -18374,7 +19226,8 @@ archive_expsym_cmds_CXX \
module_cmds_CXX \
module_expsym_cmds_CXX \
export_symbols_cmds_CXX \
@@ -9713,7 +9729,7 @@ index a16c6db059..4277b74bad 100755
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-@@ -19110,7 +19963,8 @@ $as_echo X"$file" |
+@@ -19167,7 +20020,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,
@@ -9723,7 +9739,7 @@ index a16c6db059..4277b74bad 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -19213,19 +20067,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -19270,19 +20124,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -9767,7 +9783,7 @@ index a16c6db059..4277b74bad 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -19255,6 +20132,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -19312,6 +20189,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
@@ -9780,7 +9796,7 @@ index a16c6db059..4277b74bad 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -19264,6 +20147,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -19321,6 +20204,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -9790,7 +9806,7 @@ index a16c6db059..4277b74bad 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -19378,12 +20264,12 @@ with_gcc=$GCC
+@@ -19435,12 +20321,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -9806,7 +9822,7 @@ index a16c6db059..4277b74bad 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -19470,9 +20356,6 @@ inherit_rpath=$inherit_rpath
+@@ -19527,9 +20413,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -9816,7 +9832,7 @@ index a16c6db059..4277b74bad 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -19488,6 +20371,9 @@ include_expsyms=$lt_include_expsyms
+@@ -19545,6 +20428,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -9826,7 +9842,7 @@ index a16c6db059..4277b74bad 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -19534,210 +20420,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -19591,210 +20477,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?
@@ -10200,7 +10216,7 @@ index a16c6db059..4277b74bad 100755
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-@@ -19765,12 +20610,12 @@ with_gcc=$GCC_CXX
+@@ -19822,12 +20667,12 @@ with_gcc=$GCC_CXX
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
@@ -10216,7 +10232,7 @@ index a16c6db059..4277b74bad 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static_CXX
-@@ -19857,9 +20702,6 @@ inherit_rpath=$inherit_rpath_CXX
+@@ -19914,9 +20759,6 @@ inherit_rpath=$inherit_rpath_CXX
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs_CXX
@@ -10226,7 +10242,7 @@ index a16c6db059..4277b74bad 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols_CXX
-@@ -19875,6 +20717,9 @@ include_expsyms=$lt_include_expsyms_CXX
+@@ -19932,6 +20774,9 @@ include_expsyms=$lt_include_expsyms_CXX
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds_CXX
@@ -17320,7 +17336,7 @@ index bf92b5e079..c573da90c5 100644
# These exist entirely to fool aclocal when bootstrapping libtool.
#
diff --git a/opcodes/configure b/opcodes/configure
-index 0b352a454d..7eaea7db73 100755
+index 17530f54b9..79b39611c2 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -650,6 +650,9 @@ OTOOL
@@ -17506,7 +17522,7 @@ index 0b352a454d..7eaea7db73 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6245,9 +6346,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6243,11 +6344,164 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -17520,6 +17536,8 @@ index 0b352a454d..7eaea7db73 100755
+
+
+
+
+
if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -17882,12 +17900,17 @@ index 0b352a454d..7eaea7db73 100755
-@@ -6869,6 +7210,45 @@ fi
+@@ -6864,6 +7205,45 @@ fi
+
+
++
++
++
++
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -17920,14 +17943,9 @@ index 0b352a454d..7eaea7db73 100755
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
-+
-+
-+
-+
-+
- # Check whether --enable-libtool-lock was given.
- if test "${enable_libtool_lock+set}" = set; then :
- enableval=$enable_libtool_lock;
+
+
+
@@ -7075,6 +7455,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -18634,7 +18652,7 @@ index 0b352a454d..7eaea7db73 100755
fi
case "${host}" in
-@@ -13518,13 +14173,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -13520,13 +14175,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"`'
@@ -18655,7 +18673,7 @@ index 0b352a454d..7eaea7db73 100755
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"`'
-@@ -13539,14 +14201,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -13541,14 +14203,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"`'
@@ -18674,7 +18692,7 @@ index 0b352a454d..7eaea7db73 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -13579,12 +14244,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -13581,12 +14246,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"`'
@@ -18688,7 +18706,7 @@ index 0b352a454d..7eaea7db73 100755
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"`'
-@@ -13639,8 +14304,13 @@ reload_flag \
+@@ -13641,8 +14306,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -18702,7 +18720,7 @@ index 0b352a454d..7eaea7db73 100755
STRIP \
RANLIB \
CC \
-@@ -13650,12 +14320,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -13652,12 +14322,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 \
@@ -18718,7 +18736,7 @@ index 0b352a454d..7eaea7db73 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -13671,7 +14343,6 @@ no_undefined_flag \
+@@ -13673,7 +14345,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -18726,7 +18744,7 @@ index 0b352a454d..7eaea7db73 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -13707,6 +14378,7 @@ module_cmds \
+@@ -13709,6 +14380,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -18734,7 +18752,7 @@ index 0b352a454d..7eaea7db73 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -14463,7 +15135,8 @@ $as_echo X"$file" |
+@@ -14465,7 +15137,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,
@@ -18744,7 +18762,7 @@ index 0b352a454d..7eaea7db73 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -14566,19 +15239,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -14568,19 +15241,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -18788,7 +18806,7 @@ index 0b352a454d..7eaea7db73 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -14608,6 +15304,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -14610,6 +15306,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
@@ -18801,7 +18819,7 @@ index 0b352a454d..7eaea7db73 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -14617,6 +15319,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -14619,6 +15321,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -18811,7 +18829,7 @@ index 0b352a454d..7eaea7db73 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -14731,12 +15436,12 @@ with_gcc=$GCC
+@@ -14733,12 +15438,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -18827,7 +18845,7 @@ index 0b352a454d..7eaea7db73 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -14823,9 +15528,6 @@ inherit_rpath=$inherit_rpath
+@@ -14825,9 +15530,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -18837,7 +18855,7 @@ index 0b352a454d..7eaea7db73 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -14841,6 +15543,9 @@ include_expsyms=$lt_include_expsyms
+@@ -14843,6 +15545,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -18847,7 +18865,7 @@ index 0b352a454d..7eaea7db73 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -14873,210 +15578,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -14875,210 +15580,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?
@@ -19222,7 +19240,7 @@ index 0b352a454d..7eaea7db73 100755
chmod +x "$ofile"
diff --git a/opcodes/configure.ac b/opcodes/configure.ac
-index b9f5eb8a4f..a31b66a2f0 100644
+index a9fbfd61f1..c43780f64d 100644
--- a/opcodes/configure.ac
+++ b/opcodes/configure.ac
@@ -167,7 +167,7 @@ changequote(,)dnl
@@ -19235,7 +19253,7 @@ index b9f5eb8a4f..a31b66a2f0 100644
case "${host}" in
diff --git a/zlib/configure b/zlib/configure
-index bed9e3ea2b..caef0b674e 100755
+index dc2d9ed383..ed9a492f5c 100755
--- a/zlib/configure
+++ b/zlib/configure
@@ -614,8 +614,11 @@ OTOOL
@@ -19423,7 +19441,7 @@ index bed9e3ea2b..caef0b674e 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -5170,9 +5271,163 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -5168,11 +5269,165 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -19437,6 +19455,8 @@ index bed9e3ea2b..caef0b674e 100755
+
+
+
+
+
if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -19803,10 +19823,13 @@ index bed9e3ea2b..caef0b674e 100755
-@@ -5793,6 +6138,41 @@ fi
+@@ -5790,6 +6135,41 @@ fi
++
++
++
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
@@ -19839,12 +19862,9 @@ index bed9e3ea2b..caef0b674e 100755
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
-+
-+
-+
- # Check whether --enable-libtool-lock was given.
+
@@ -6004,6 +6384,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -21133,5 +21153,5 @@ index bed9e3ea2b..caef0b674e 100755
chmod +x "$ofile"
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-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 449225a36..88019606f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-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,7 +1,7 @@
-From 9c313e8a15a7e7c5c0f2906e3218ed211563ac2a Mon Sep 17 00:00:00 2001
+From 2b87aad1741bc481dd0982f100ad5ea7f937bb61 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 08/15] Add the armv5e architecture to binutils
+Subject: [PATCH 07/15] Add the armv5e architecture to binutils
Binutils has a comment that indicates it is supposed to match gcc for
all of the support "-march=" settings, but it was lacking the armv5e setting.
@@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
-index 60bda51070..eb6d0afd6e 100644
+index a885efe4fc..735eaa7447 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
-@@ -25633,6 +25633,7 @@ static const struct arm_arch_option_table arm_archs[] =
+@@ -25990,6 +25990,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 @@ index 60bda51070..eb6d0afd6e 100644
ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-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 1c4059392..30a22b504 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-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,7 +1,7 @@
-From 2be9b44a4a308e3ea42a027c4c3211170f10c9c0 Mon Sep 17 00:00:00 2001
+From 331443a87a31ec504e5652fc099d9129a9a4deb8 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 09/15] don't let the distro compiler point to the wrong
+Subject: [PATCH 08/15] don't let the distro compiler point to the wrong
installation location
Thanks to RP for helping find the source code causing the issue.
@@ -17,10 +17,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index 0ff9e45e45..42c32642b2 100644
+index 25cfa29ad5..ce67a710e3 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
-@@ -366,7 +366,8 @@ install-strip: install
+@@ -364,7 +364,8 @@ install-strip: install
# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
# default multilib, so we have to take CFLAGS into account as well,
# since it will be passed the multilib flags.
@@ -31,5 +31,5 @@ index 0ff9e45e45..42c32642b2 100644
if test -n "${target_header_dir}"; then \
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-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 0774ad6f0..e0e257880 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-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,7 +1,7 @@
-From b1ab17abe4128684f19775448545176fb2a5e27e Mon Sep 17 00:00:00 2001
+From 0a4afdcf0700efd45963568e2d0049127cdf4434 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 10/15] warn for uses of system directories when cross linking
+Subject: [PATCH 09/15] warn for uses of system directories when cross linking
2008-07-02 Joseph Myers <joseph@codesourcery.com>
@@ -45,12 +45,12 @@ Subject: [PATCH 10/15] warn for uses of system directories when cross linking
ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
/usr/lib, /usr/local/lib or /usr/X11R6/lib.
+Upstream-Status: Pending
+
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
-Upstream-Status: Pending
-
ld/config.in | 3 +++
ld/configure | 16 ++++++++++++++++
ld/configure.ac | 10 ++++++++++
@@ -63,10 +63,10 @@ Upstream-Status: Pending
9 files changed, 86 insertions(+)
diff --git a/ld/config.in b/ld/config.in
-index 2c6d698b6c..d3cb7e882d 100644
+index a846743da6..df3cd5fb60 100644
--- a/ld/config.in
+++ b/ld/config.in
-@@ -17,6 +17,9 @@
+@@ -27,6 +27,9 @@
language is requested. */
#undef ENABLE_NLS
@@ -77,10 +77,10 @@ index 2c6d698b6c..d3cb7e882d 100644
#undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure
-index 4277b74bad..63109644b6 100755
+index 4e71511bd1..71c6ad1fd1 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -793,6 +793,7 @@ with_lib_path
+@@ -789,6 +789,7 @@ with_lib_path
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -88,7 +88,7 @@ index 4277b74bad..63109644b6 100755
enable_gold
enable_got
enable_compressed_debug_sections
-@@ -1450,6 +1451,8 @@ Optional Features:
+@@ -1448,6 +1449,8 @@ Optional Features:
--disable-largefile omit support for large files
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -97,7 +97,7 @@ index 4277b74bad..63109644b6 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
-@@ -16314,6 +16317,19 @@ fi
+@@ -16315,6 +16318,19 @@ fi
@@ -118,7 +118,7 @@ index 4277b74bad..63109644b6 100755
if test "${enable_gold+set}" = set; then :
enableval=$enable_gold; case "${enableval}" in
diff --git a/ld/configure.ac b/ld/configure.ac
-index 36a9f5083a..47f1d33fa5 100644
+index 00080f85fd..3aa98e37fb 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
@@ -139,12 +139,12 @@ index 36a9f5083a..47f1d33fa5 100644
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 104bb8e237..74c914bdd5 100644
+index c6fa1247f0..01c373498f 100644
--- a/ld/ld.h
+++ b/ld/ld.h
-@@ -172,6 +172,14 @@ typedef struct
- /* If set, display the target memory usage (per memory region). */
- bfd_boolean print_memory_usage;
+@@ -174,6 +174,14 @@ typedef struct
+ in the linker script. */
+ bfd_boolean force_group_allocation;
+ /* If TRUE (the default) warn for uses of system directories when
+ cross linking. */
@@ -158,10 +158,10 @@ index 104bb8e237..74c914bdd5 100644
enum endian_enum endian;
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index d393acdd94..ba995b1e3a 100644
+index ebe7e7b7bd..33aa2c62fa 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
-@@ -2403,6 +2403,18 @@ string identifying the original linked file does not change.
+@@ -2480,6 +2480,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,11 +181,11 @@ index d393acdd94..ba995b1e3a 100644
@c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 0943bb2dfa..95874c75de 100644
+index 3b37a0a3e2..5c85b01849 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
-@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
- new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
+@@ -116,6 +116,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
+ new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL);
else
new_dirs->name = xstrdup (name);
+
@@ -209,23 +209,23 @@ index 0943bb2dfa..95874c75de 100644
/* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 3ecac2bc86..34117f43a5 100644
+index 5aa7f6bc3e..cb655e0399 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
-@@ -146,6 +146,8 @@ enum option_values
- OPTION_PRINT_MEMORY_USAGE,
+@@ -147,6 +147,8 @@ enum option_values
OPTION_REQUIRE_DEFINED_SYMBOL,
OPTION_ORPHAN_HANDLING,
+ OPTION_FORCE_GROUP_ALLOCATION,
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
};
/* The initial parser states. */
diff --git a/ld/ldmain.c b/ld/ldmain.c
-index 1e48b1a2db..21f27bacf1 100644
+index 2b09f20413..89e2a3a805 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
-@@ -270,6 +270,8 @@ main (int argc, char **argv)
+@@ -261,6 +261,8 @@ main (int argc, char **argv)
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
@@ -235,10 +235,10 @@ index 1e48b1a2db..21f27bacf1 100644
/* 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 0b7d4976ac..dedc07a143 100644
+index effa277b16..e4929607e9 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
-@@ -535,6 +535,14 @@ static const struct ld_option ld_options[] =
+@@ -538,6 +538,14 @@ static const struct ld_option ld_options[] =
{ {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
'\0', N_("=MODE"), N_("Control how orphan sections are handled."),
TWO_DASHES },
@@ -253,7 +253,7 @@ index 0b7d4976ac..dedc07a143 100644
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -1562,6 +1570,14 @@ parse_args (unsigned argc, char **argv)
+@@ -1568,6 +1576,14 @@ parse_args (unsigned argc, char **argv)
einfo (_("%P%F: invalid argument to option"
" \"--orphan-handling\"\n"));
break;
@@ -269,5 +269,5 @@ index 0b7d4976ac..dedc07a143 100644
}
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-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 949ef51bd..496242efa 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-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,7 +1,7 @@
-From 4fe13a36997253a5c91bcb086aeb392ab2095f67 Mon Sep 17 00:00:00 2001
+From 88fac08f1c472c612f381cbb9408756f2f58b4ff 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 11/15] Fix rpath in libtool when sysroot is enabled
+Subject: [PATCH 10/15] Fix rpath in libtool when sysroot is enabled
Enabling sysroot support in libtool exposed a bug where the final
library had an RPATH encoded into it which still pointed to the
@@ -48,5 +48,5 @@ index 70e856e065..11ee684ccc 100644
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-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 2ac101c95..ac87a2d1d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-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,7 +1,7 @@
-From f43f832e0009caea6a3d5bcaa8f0a64d943072ea Mon Sep 17 00:00:00 2001
+From 497660bdbeb6788786553a5d733105f7f898dc62 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 12/15] Change default emulation for mips64*-*-linux
+Subject: [PATCH 11/15] Change default emulation for mips64*-*-linux
we change the default emulations to be N64 instead of N32
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 1b28016b91..63596c2ebc 100644
+index dc24aabad5..4511024f22 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
-@@ -1183,12 +1183,12 @@ case "${targ}" in
+@@ -1186,12 +1186,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,10 +35,10 @@ index 1b28016b91..63596c2ebc 100644
mips*el-*-linux*)
targ_defvec=mips_elf32_trad_le_vec
diff --git a/ld/configure.tgt b/ld/configure.tgt
-index b85c6bb35a..4e77383a19 100644
+index 47c719cd05..fe7b9238b2 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
-@@ -518,11 +518,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
+@@ -530,11 +530,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
@@ -55,5 +55,5 @@ index b85c6bb35a..4e77383a19 100644
mips*el-*-linux-*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Add-support-for-Netlogic-XLP.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
index b03e04608..dc5e58073 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Add-support-for-Netlogic-XLP.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
@@ -1,7 +1,7 @@
-From fc6fa6a6e6e9e6e5ad7080785af31b4ea68f60c4 Mon Sep 17 00:00:00 2001
+From 8c60a55d3678589d93739bd27fec216911d80968 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 13/15] Add support for Netlogic XLP
+Subject: [PATCH 12/15] Add support for Netlogic XLP
Patch From: Nebu Philips <nphilips@netlogicmicro.com>
@@ -11,12 +11,12 @@ Netlogic. Also, update vendor name to NLM wherever applicable.
Use 0x00000080 for INSN_XLP, the value 0x00000040 has already been
assigned to INSN_OCTEON3
+Upstream-Status: Pending
+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
-Upstream-Status: Pending
-
bfd/aoutx.h | 1 +
bfd/archures.c | 1 +
bfd/bfd-in2.h | 1 +
@@ -27,17 +27,17 @@ Upstream-Status: Pending
gas/config/tc-mips.c | 4 +++-
gas/configure | 3 +++
include/elf/mips.h | 1 +
- include/opcode/mips.h | 10 ++++++++--
+ include/opcode/mips.h | 6 ++++++
ld/configure.tgt | 2 ++
opcodes/mips-dis.c | 12 +++++-------
- opcodes/mips-opc.c | 33 +++++++++++++++++++++------------
- 14 files changed, 64 insertions(+), 24 deletions(-)
+ opcodes/mips-opc.c | 31 ++++++++++++++++++++-----------
+ 14 files changed, 61 insertions(+), 21 deletions(-)
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
-index d30e8b8fbc..913b499744 100644
+index 3d38fda14b..0aec49bbb3 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
-@@ -812,6 +812,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
+@@ -814,6 +814,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
case bfd_mach_mipsisa64r6:
case bfd_mach_mips_sb1:
case bfd_mach_mips_xlr:
@@ -46,34 +46,34 @@ index d30e8b8fbc..913b499744 100644
arch_flags = M_MIPS2;
break;
diff --git a/bfd/archures.c b/bfd/archures.c
-index 6f35a5b2a7..d12cdf609a 100644
+index 433b95fa08..063b7943a1 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
-@@ -197,6 +197,7 @@ DESCRIPTION
- .#define bfd_mach_mips_octeon2 6502
+@@ -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
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index 6288c3bb4a..e9f9859a7b 100644
+index d126aed086..2b753b3a93 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
-@@ -2041,6 +2041,7 @@ enum bfd_architecture
- #define bfd_mach_mips_octeon2 6502
+@@ -2060,6 +2060,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_mipsisa32 32
#define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 63596c2ebc..6e923fb0ed 100644
+index 4511024f22..f0f9072f10 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
-@@ -1166,6 +1166,11 @@ case "${targ}" in
+@@ -1169,6 +1169,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,23 +86,23 @@ index 63596c2ebc..6e923fb0ed 100644
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 b9ecdd6e55..df1bffc25b 100644
+index 2493094bef..8375d1ae96 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
-@@ -104,7 +104,8 @@ enum
- I_mipsocteon2,
+@@ -105,7 +105,8 @@ enum
I_mipsocteon3,
I_xlr,
+ I_interaptiv_mr2,
- I_micromips
+ I_micromips,
+ I_xlp
};
#define NN(index) (&arch_info_struct[(index) + 1])
-@@ -155,7 +156,8 @@ static const bfd_arch_info_type arch_info_struct[] =
- N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", FALSE, NN(I_mipsocteon2)),
- N (64, 64, bfd_mach_mips_octeon3, "mips:octeon3", FALSE, NN(I_mipsocteon3)),
+@@ -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 (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)
+ N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)),
+ N (64, 64, bfd_mach_mips_xlp, "mips:xlp", FALSE, 0)
@@ -110,20 +110,20 @@ index b9ecdd6e55..df1bffc25b 100644
/* 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 723853f821..7b464211c3 100644
+index fddf68c816..354c85d00b 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
-@@ -6787,6 +6787,9 @@ _bfd_elf_mips_mach (flagword flags)
- case E_MIPS_MACH_XLR:
- return bfd_mach_mips_xlr;
+@@ -6796,6 +6796,9 @@ _bfd_elf_mips_mach (flagword flags)
+ case E_MIPS_MACH_IAMR2:
+ return bfd_mach_mips_interaptiv_mr2;
-+ case E_MIPS_MACH_XLP:
++ case E_MIPS_MACH_XLP:
+ return bfd_mach_mips_xlp;
+
default:
switch (flags & EF_MIPS_ARCH)
{
-@@ -12106,6 +12109,10 @@ mips_set_isa_flags (bfd *abfd)
+@@ -11956,6 +11959,10 @@ mips_set_isa_flags (bfd *abfd)
val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
break;
@@ -134,7 +134,7 @@ index 723853f821..7b464211c3 100644
case bfd_mach_mipsisa32:
val = E_MIPS_ARCH_32;
break;
-@@ -14135,6 +14142,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
+@@ -13989,6 +13996,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,19 +143,19 @@ index 723853f821..7b464211c3 100644
/* MIPS64 extensions. */
{ bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 8dca490226..b5f577f5a1 100644
+index 2b15f0f2cb..092744708e 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
-@@ -3261,6 +3261,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
- case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
+@@ -3335,6 +3335,7 @@ get_machine_flags (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_XLP: strcat (buf, ", xlp"); break;
+ case E_MIPS_MACH_IAMR2: strcat (buf, ", interaptiv-mr2"); break;
++ case E_MIPS_MACH_XLP: strcat (buf, ", xlp"); break;
case 0:
/* 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 e24e84df54..baf84e419d 100644
+index 3804df2958..9576c986db 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 @@ index e24e84df54..baf84e419d 100644
)
/* Whether the processor uses hardware interlocks to protect reads
-@@ -19409,7 +19411,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
+@@ -19738,7 +19740,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 @@ index e24e84df54..baf84e419d 100644
/* MIPS 64 Release 6 */
{ "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
diff --git a/gas/configure b/gas/configure
-index a36f1ae161..99f0a94e20 100755
+index 81dd4cbd97..95bdf3b19b 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12989,6 +12989,9 @@ _ACEOF
@@ -198,7 +198,7 @@ index a36f1ae161..99f0a94e20 100755
mips_cpu=r3900
;;
diff --git a/include/elf/mips.h b/include/elf/mips.h
-index 3e27b05122..81ea78a817 100644
+index a4bea43ff8..73d904e25f 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
@@ -210,31 +210,27 @@ index 3e27b05122..81ea78a817 100644
#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 0d043d9520..450e9c2d67 100644
+index ceae9ec50a..276ee3c6c1 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
-@@ -1244,8 +1244,10 @@ static const unsigned int mips_isa_table[] = {
- #define INSN_LOONGSON_2F 0x80000000
- /* Loongson 3A. */
- #define INSN_LOONGSON_3A 0x00000400
--/* RMI Xlr instruction */
--#define INSN_XLR 0x00000020
-+/* Netlogic Xlr instruction */
-+#define INSN_XLR 0x00000020
+@@ -1259,6 +1259,8 @@ static const unsigned int mips_isa_table[] = {
+ #define INSN_XLR 0x00000020
+ /* Imagination interAptiv MR2. */
+ #define INSN_INTERAPTIV_MR2 0x04000000
+/* Netlogic XlP instruction */
+#define INSN_XLP 0x00000080
/* DSP ASE */
#define ASE_DSP 0x00000001
-@@ -1344,6 +1346,7 @@ static const unsigned int mips_isa_table[] = {
- #define CPU_OCTEON2 6502
+@@ -1365,6 +1367,7 @@ static const unsigned int mips_isa_table[] = {
#define CPU_OCTEON3 6503
#define CPU_XLR 887682 /* decimal 'XLR' */
+ #define CPU_INTERAPTIV_MR2 736550 /* decimal 'IA2' */
+#define CPU_XLP 887680 /* decimal 'XLP' */
/* Return true if the given CPU is included in INSN_* mask MASK. */
-@@ -1421,6 +1424,9 @@ cpu_is_member (int cpu, unsigned int mask)
+@@ -1445,6 +1448,9 @@ cpu_is_member (int cpu, unsigned int mask)
return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
|| ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
@@ -245,10 +241,10 @@ index 0d043d9520..450e9c2d67 100644
return FALSE;
}
diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 4e77383a19..8a81f7ac39 100644
+index fe7b9238b2..2adf108b17 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
-@@ -504,6 +504,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
+@@ -516,6 +516,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" ;;
@@ -258,10 +254,10 @@ index 4e77383a19..8a81f7ac39 100644
targ_extra_emuls="elf32lr5900"
targ_extra_libpath=$targ_extra_emuls ;;
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
-index bb9912e462..70ecc51717 100644
+index 45195007c1..4a80a05d19 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
-@@ -648,13 +648,11 @@ const struct mips_arch_choice mips_arch_choices[] =
+@@ -655,13 +655,11 @@ const struct mips_arch_choice mips_arch_choices[] =
mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
mips_cp1_names_mips3264, mips_hwr_names_numeric },
@@ -281,20 +277,18 @@ index bb9912e462..70ecc51717 100644
/* 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 5cb8e7365f..f2074856a2 100644
+index 19fca408c9..d02069c528 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
-@@ -320,7 +320,8 @@ decode_mips_operand (const char *p)
- #define IOCTP (INSN_OCTEONP | INSN_OCTEON2 | INSN_OCTEON3)
- #define IOCT2 (INSN_OCTEON2 | INSN_OCTEON3)
+@@ -328,6 +328,7 @@ decode_mips_operand (const char *p)
#define IOCT3 INSN_OCTEON3
--#define XLR INSN_XLR
-+#define XLR INSN_XLR
+ #define XLR INSN_XLR
+ #define IAMR2 INSN_INTERAPTIV_MR2
+#define XLP INSN_XLP
#define IVIRT ASE_VIRT
#define IVIRT64 ASE_VIRT64
-@@ -958,6 +959,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -966,6 +967,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
{"clz", "d,s", 0x00000050, 0xfc1f07ff, WR_1|RD_2, 0, I37, 0, 0 },
{"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
@@ -302,7 +296,7 @@ index 5cb8e7365f..f2074856a2 100644
/* ctc0 is at the bottom of the table. */
{"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
{"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
-@@ -990,12 +992,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -998,12 +1000,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 },
{"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 },
{"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 },
@@ -317,7 +311,7 @@ index 5cb8e7365f..f2074856a2 100644
/* dctr and dctw are used on the r5000. */
{"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
{"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
-@@ -1067,6 +1070,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1075,6 +1078,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 },
{"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
{"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
@@ -325,7 +319,7 @@ index 5cb8e7365f..f2074856a2 100644
{"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 },
{"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 },
{"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE },
-@@ -1082,6 +1086,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1090,6 +1094,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* dmfc3 is at the bottom of the table. */
/* dmtc3 is at the bottom of the table. */
{"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
@@ -334,7 +328,7 @@ index 5cb8e7365f..f2074856a2 100644
{"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
{"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 },
{"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 },
-@@ -1235,9 +1241,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1243,9 +1249,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 },
{"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 },
{"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 },
@@ -347,7 +341,7 @@ index 5cb8e7365f..f2074856a2 100644
{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
{"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF },
-@@ -1402,7 +1408,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1410,7 +1416,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 },
{"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 },
{"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 },
@@ -356,7 +350,7 @@ index 5cb8e7365f..f2074856a2 100644
{"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 },
{"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 },
{"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 },
-@@ -1447,10 +1453,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1455,10 +1461,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* move is at the top of the table. */
{"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 },
{"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 },
@@ -372,7 +366,7 @@ index 5cb8e7365f..f2074856a2 100644
{"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, I37 },
{"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 },
{"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 },
-@@ -1500,7 +1509,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1508,7 +1517,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 },
{"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 },
{"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 },
@@ -381,7 +375,7 @@ index 5cb8e7365f..f2074856a2 100644
{"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
{"mtm0", "s,t", 0x70000008, 0xfc00ffff, RD_1|RD_2, 0, IOCT3, 0, 0 },
{"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
-@@ -1937,9 +1946,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1945,9 +1954,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, I37},
{"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 },
{"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 },
@@ -395,5 +389,5 @@ index 5cb8e7365f..f2074856a2 100644
{"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.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-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 bb95a0cb0..247376b7e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-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,7 +1,7 @@
-From a9177150f808d7e6285e1011c85d0ce89037b553 Mon Sep 17 00:00:00 2001
+From e46202becab625c6c08caf91e08ccbbc1bf799c4 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 14/15] fix the incorrect assembling for ppc wait mnemonic
+Subject: [PATCH 13/15] fix the incorrect assembling for ppc wait mnemonic
Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
@@ -11,10 +11,10 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
-index 30fd789182..f2708e2276 100644
+index 426261ab21..0d35916cdd 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
-@@ -4876,7 +4876,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -4881,7 +4881,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 @@ index 30fd789182..f2708e2276 100644
{"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
-@@ -4930,7 +4929,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -4935,7 +4934,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 @@ index 30fd789182..f2708e2276 100644
{"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}},
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0016-Detect-64-bit-MIPS-targets.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
index 1b2eb8485..42b1065f8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0016-Detect-64-bit-MIPS-targets.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Detect-64-bit-MIPS-targets.patch
@@ -1,7 +1,7 @@
-From c3ebde5d8cc3b0092966b4d725cad7cfd074fd8d Mon Sep 17 00:00:00 2001
+From bf20d5823662d1f2eb47de2cdfd173627a205b17 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 16/16] Detect 64-bit MIPS targets
+Subject: [PATCH 14/15] Detect 64-bit MIPS targets
Add mips64 target triplets and default to N64
@@ -46,5 +46,5 @@ index 3d63027297..c1f92a1360 100644
targ_obj=mips
targ_machine=EM_MIPS
--
-2.12.1
+2.14.0
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 1559038e5..2c8900cb6 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 58cdb28ed71cb57b4a0ea1b412a708fdb0f84c27 Mon Sep 17 00:00:00 2001
+From 9b456a0e4f284fd41ac36595144ed44dc82410ee 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 @@ index 11ee684ccc..3b19ac1532 100644
elif test -n "$runpath_var"; then
case "$finalize_perm_rpath " in
--
-2.12.0
+2.14.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch
deleted file mode 100644
index 23ad10ab4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0017-bfd-Improve-lookup-of-file-line-information-for-erro.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 3239a4231ff79bf8b67b8faaf414b1667486167c Mon Sep 17 00:00:00 2001
-From: Andrew Burgess <andrew.burgess@embecosm.com>
-Date: Mon, 19 Dec 2016 15:27:59 +0000
-Subject: [PATCH] bfd: Improve lookup of file / line information for errors
-
-When looking up file and line information (used from the linker to
-report error messages) if no symbol is passed in, then use the symbol
-list to look for a matching symbol.
-
-If a matching symbol is found then use this to look up the file / line
-information.
-
-This should improve errors when looking up file / line information for
-data sections. Hopefully we should find a matching data symbol, which
-should, in turn (we hope) match a DW_TAG_variable in the DWARF, this
-should allow us to give accurate file / line errors for data symbols.
-
-As the hope is to find a matching DW_TAG_variable in the DWARF then we
-ignore section symbols, and prefer global symbols to locals.
-
-CVE: CVE-2017-8392
-Upstream-Status: Accepted
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
----
- bfd/dwarf2.c | 32 ++++++++++++++++++++++++++++++++
- 1 files changed, 32 insertions(+)
-
-
-diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
-index 03447a9..9bb8126 100644
---- a/bfd/dwarf2.c
-+++ b/bfd/dwarf2.c
-@@ -4155,6 +4155,38 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
- {
- BFD_ASSERT (section != NULL && functionname_ptr != NULL);
- addr = offset;
-+
-+ /* If we have no SYMBOL but the section we're looking at is not a
-+ code section, then take a look through the list of symbols to see
-+ if we have a symbol at the address we're looking for. If we do
-+ then use this to look up line information. This will allow us to
-+ give file and line results for data symbols. We exclude code
-+ symbols here, if we look up a function symbol and then look up the
-+ line information we'll actually return the line number for the
-+ opening '{' rather than the function definition line. This is
-+ because looking up by symbol uses the line table, in which the
-+ first line for a function is usually the opening '{', while
-+ looking up the function by section + offset uses the
-+ DW_AT_decl_line from the function DW_TAG_subprogram for the line,
-+ which will be the line of the function name. */
-+ if ((section->flags & SEC_CODE) == 0)
-+ {
-+ asymbol **tmp;
-+
-+ for (tmp = symbols; (*tmp) != NULL; ++tmp)
-+ if ((*tmp)->the_bfd == abfd
-+ && (*tmp)->section == section
-+ && (*tmp)->value == offset
-+ && ((*tmp)->flags & BSF_SECTION_SYM) == 0)
-+ {
-+ symbol = *tmp;
-+ do_line = TRUE;
-+ /* For local symbols, keep going in the hope we find a
-+ global. */
-+ if ((symbol->flags & BSF_GLOBAL) != 0)
-+ break;
-+ }
-+ }
- }
-
- if (section->output_section)
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch
deleted file mode 100644
index acb37df16..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0018-PR-21409-segfault-in-_bfd_dwarf2_find_nearest_line.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 97e83a100aa8250be783304bfe0429761c6e6b6b Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Sun, 23 Apr 2017 13:55:49 +0930
-Subject: [PATCH] PR 21409, segfault in _bfd_dwarf2_find_nearest_line
-
- PR 21409
- * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
- no symbols.
-
-CVE: CVE-2017-8392
-Upstream-Status: Accepted
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
----
- bfd/dwarf2.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletion(-)
-
-diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
-index 132a674..0ef3e1f 100644
---- a/bfd/dwarf2.c
-+++ b/bfd/dwarf2.c
-@@ -4205,7 +4205,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
- looking up the function by section + offset uses the
- DW_AT_decl_line from the function DW_TAG_subprogram for the line,
- which will be the line of the function name. */
-- if ((section->flags & SEC_CODE) == 0)
-+ if (symbols != NULL && (section->flags & SEC_CODE) == 0)
- {
- asymbol **tmp;
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch
deleted file mode 100644
index 1334c9444..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6965.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From bdc5166c274b842f83f8328e7cfaaf80fd29934e Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Mon, 13 Feb 2017 13:08:32 +0000
-Subject: [PATCH 1/2] Fix readelf writing to illegal addresses whilst
- processing corrupt input files containing symbol-difference relocations.
-
- PR binutils/21137
- * readelf.c (target_specific_reloc_handling): Add end parameter.
- Check for buffer overflow before writing relocated values.
- (apply_relocations): Pass end to target_specific_reloc_handling.
-
-(cherry pick from commit 03f7786e2f440b9892b1c34a58fb26222ce1b493)
-Upstream-Status: Backport [master]
-CVE: CVE-2017-6965
-
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- binutils/ChangeLog | 7 +++++++
- binutils/readelf.c | 30 +++++++++++++++++++++++++-----
- 2 files changed, 32 insertions(+), 5 deletions(-)
-
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index f21867f98c..e789a3b99b 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,10 @@
-+2017-02-13 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21137
-+ * readelf.c (target_specific_reloc_handling): Add end parameter.
-+ Check for buffer overflow before writing relocated values.
-+ (apply_relocations): Pass end to target_specific_reloc_handling.
-+
- 2017-03-02 Tristan Gingold <gingold@adacore.com>
-
- * configure: Regenerate.
-diff --git a/binutils/readelf.c b/binutils/readelf.c
-index b5f577f5a1..8cdaae3b8c 100644
---- a/binutils/readelf.c
-+++ b/binutils/readelf.c
-@@ -11585,6 +11585,7 @@ process_syminfo (FILE * file ATTRIBUTE_UNUSED)
- static bfd_boolean
- target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- unsigned char * start,
-+ unsigned char * end,
- Elf_Internal_Sym * symtab)
- {
- unsigned int reloc_type = get_reloc_type (reloc->r_info);
-@@ -11625,13 +11626,19 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- handle_sym_diff:
- if (saved_sym != NULL)
- {
-+ int reloc_size = reloc_type == 1 ? 4 : 2;
- bfd_vma value;
-
- value = reloc->r_addend
- + (symtab[get_reloc_symindex (reloc->r_info)].st_value
- - saved_sym->st_value);
-
-- byte_put (start + reloc->r_offset, value, reloc_type == 1 ? 4 : 2);
-+ if (start + reloc->r_offset + reloc_size >= end)
-+ /* PR 21137 */
-+ error (_("MSP430 sym diff reloc writes past end of section (%p vs %p)\n"),
-+ start + reloc->r_offset + reloc_size, end);
-+ else
-+ byte_put (start + reloc->r_offset, value, reloc_size);
-
- saved_sym = NULL;
- return TRUE;
-@@ -11662,13 +11669,18 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- case 2: /* R_MN10300_16 */
- if (saved_sym != NULL)
- {
-+ int reloc_size = reloc_type == 1 ? 4 : 2;
- bfd_vma value;
-
- value = reloc->r_addend
- + (symtab[get_reloc_symindex (reloc->r_info)].st_value
- - saved_sym->st_value);
-
-- byte_put (start + reloc->r_offset, value, reloc_type == 1 ? 4 : 2);
-+ if (start + reloc->r_offset + reloc_size >= end)
-+ error (_("MN10300 sym diff reloc writes past end of section (%p vs %p)\n"),
-+ start + reloc->r_offset + reloc_size, end);
-+ else
-+ byte_put (start + reloc->r_offset, value, reloc_size);
-
- saved_sym = NULL;
- return TRUE;
-@@ -11703,12 +11715,20 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- break;
-
- case 0x41: /* R_RL78_ABS32. */
-- byte_put (start + reloc->r_offset, value, 4);
-+ if (start + reloc->r_offset + 4 >= end)
-+ error (_("RL78 sym diff reloc writes past end of section (%p vs %p)\n"),
-+ start + reloc->r_offset + 2, end);
-+ else
-+ byte_put (start + reloc->r_offset, value, 4);
- value = 0;
- return TRUE;
-
- case 0x43: /* R_RL78_ABS16. */
-- byte_put (start + reloc->r_offset, value, 2);
-+ if (start + reloc->r_offset + 2 >= end)
-+ error (_("RL78 sym diff reloc writes past end of section (%p vs %p)\n"),
-+ start + reloc->r_offset + 2, end);
-+ else
-+ byte_put (start + reloc->r_offset, value, 2);
- value = 0;
- return TRUE;
-
-@@ -12325,7 +12345,7 @@ apply_relocations (void * file,
-
- reloc_type = get_reloc_type (rp->r_info);
-
-- if (target_specific_reloc_handling (rp, start, symtab))
-+ if (target_specific_reloc_handling (rp, start, end, symtab))
- continue;
- else if (is_none_reloc (reloc_type))
- continue;
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch
deleted file mode 100644
index dd58df5fb..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6966.patch
+++ /dev/null
@@ -1,241 +0,0 @@
-From 383ec757d27652448d1511169e1133f486abf54f Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Mon, 13 Feb 2017 14:03:22 +0000
-Subject: [PATCH] Fix read-after-free error in readelf when processing
- multiple, relocated sections in an MSP430 binary.
-
- PR binutils/21139
- * readelf.c (target_specific_reloc_handling): Add num_syms
- parameter. Check for symbol table overflow before accessing
- symbol value. If reloc pointer is NULL, discard all saved state.
- (apply_relocations): Pass num_syms to target_specific_reloc_handling.
- Call target_specific_reloc_handling with a NULL reloc pointer
- after processing all of the relocs.
-
-(cherry pick from commit f84ce13b6708801ca1d6289b7c4003e2f5a6d7f9)
-Upstream-Status: Backport [master]
-CVE: CVE-2017-6966
-
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- binutils/ChangeLog | 10 +++++
- binutils/readelf.c | 109 +++++++++++++++++++++++++++++++++++++++++------------
- 2 files changed, 94 insertions(+), 25 deletions(-)
-
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index e789a3b99b..bd63c8a0d8 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,5 +1,15 @@
- 2017-02-13 Nick Clifton <nickc@redhat.com>
-
-+ PR binutils/21139
-+ * readelf.c (target_specific_reloc_handling): Add num_syms
-+ parameter. Check for symbol table overflow before accessing
-+ symbol value. If reloc pointer is NULL, discard all saved state.
-+ (apply_relocations): Pass num_syms to target_specific_reloc_handling.
-+ Call target_specific_reloc_handling with a NULL reloc pointer
-+ after processing all of the relocs.
-+
-+2017-02-13 Nick Clifton <nickc@redhat.com>
-+
- PR binutils/21137
- * readelf.c (target_specific_reloc_handling): Add end parameter.
- Check for buffer overflow before writing relocated values.
-diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 8cdaae3b8c..7c158c6342 100644
---- a/binutils/readelf.c
-+++ b/binutils/readelf.c
-@@ -11580,15 +11580,27 @@ process_syminfo (FILE * file ATTRIBUTE_UNUSED)
-
- /* Check to see if the given reloc needs to be handled in a target specific
- manner. If so then process the reloc and return TRUE otherwise return
-- FALSE. */
-+ FALSE.
-+
-+ If called with reloc == NULL, then this is a signal that reloc processing
-+ for the current section has finished, and any saved state should be
-+ discarded. */
-
- static bfd_boolean
- target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- unsigned char * start,
- unsigned char * end,
-- Elf_Internal_Sym * symtab)
-+ Elf_Internal_Sym * symtab,
-+ unsigned long num_syms)
- {
-- unsigned int reloc_type = get_reloc_type (reloc->r_info);
-+ unsigned int reloc_type = 0;
-+ unsigned long sym_index = 0;
-+
-+ if (reloc)
-+ {
-+ reloc_type = get_reloc_type (reloc->r_info);
-+ sym_index = get_reloc_symindex (reloc->r_info);
-+ }
-
- switch (elf_header.e_machine)
- {
-@@ -11597,6 +11609,12 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- {
- static Elf_Internal_Sym * saved_sym = NULL;
-
-+ if (reloc == NULL)
-+ {
-+ saved_sym = NULL;
-+ return TRUE;
-+ }
-+
- switch (reloc_type)
- {
- case 10: /* R_MSP430_SYM_DIFF */
-@@ -11604,7 +11622,12 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- break;
- /* Fall through. */
- case 21: /* R_MSP430X_SYM_DIFF */
-- saved_sym = symtab + get_reloc_symindex (reloc->r_info);
-+ /* PR 21139. */
-+ if (sym_index >= num_syms)
-+ error (_("MSP430 SYM_DIFF reloc contains invalid symbol index %lu\n"),
-+ sym_index);
-+ else
-+ saved_sym = symtab + sym_index;
- return TRUE;
-
- case 1: /* R_MSP430_32 or R_MSP430_ABS32 */
-@@ -11629,16 +11652,21 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- int reloc_size = reloc_type == 1 ? 4 : 2;
- bfd_vma value;
-
-- value = reloc->r_addend
-- + (symtab[get_reloc_symindex (reloc->r_info)].st_value
-- - saved_sym->st_value);
--
-- if (start + reloc->r_offset + reloc_size >= end)
-- /* PR 21137 */
-- error (_("MSP430 sym diff reloc writes past end of section (%p vs %p)\n"),
-- start + reloc->r_offset + reloc_size, end);
-+ if (sym_index >= num_syms)
-+ error (_("MSP430 reloc contains invalid symbol index %lu\n"),
-+ sym_index);
- else
-- byte_put (start + reloc->r_offset, value, reloc_size);
-+ {
-+ value = reloc->r_addend + (symtab[sym_index].st_value
-+ - saved_sym->st_value);
-+
-+ if (start + reloc->r_offset + reloc_size >= end)
-+ /* PR 21137 */
-+ error (_("MSP430 sym diff reloc writes past end of section (%p vs %p)\n"),
-+ start + reloc->r_offset + reloc_size, end);
-+ else
-+ byte_put (start + reloc->r_offset, value, reloc_size);
-+ }
-
- saved_sym = NULL;
- return TRUE;
-@@ -11658,13 +11686,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- {
- static Elf_Internal_Sym * saved_sym = NULL;
-
-+ if (reloc == NULL)
-+ {
-+ saved_sym = NULL;
-+ return TRUE;
-+ }
-+
- switch (reloc_type)
- {
- case 34: /* R_MN10300_ALIGN */
- return TRUE;
- case 33: /* R_MN10300_SYM_DIFF */
-- saved_sym = symtab + get_reloc_symindex (reloc->r_info);
-+ if (sym_index >= num_syms)
-+ error (_("MN10300_SYM_DIFF reloc contains invalid symbol index %lu\n"),
-+ sym_index);
-+ else
-+ saved_sym = symtab + sym_index;
- return TRUE;
-+
- case 1: /* R_MN10300_32 */
- case 2: /* R_MN10300_16 */
- if (saved_sym != NULL)
-@@ -11672,15 +11711,20 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- int reloc_size = reloc_type == 1 ? 4 : 2;
- bfd_vma value;
-
-- value = reloc->r_addend
-- + (symtab[get_reloc_symindex (reloc->r_info)].st_value
-- - saved_sym->st_value);
--
-- if (start + reloc->r_offset + reloc_size >= end)
-- error (_("MN10300 sym diff reloc writes past end of section (%p vs %p)\n"),
-- start + reloc->r_offset + reloc_size, end);
-+ if (sym_index >= num_syms)
-+ error (_("MN10300 reloc contains invalid symbol index %lu\n"),
-+ sym_index);
- else
-- byte_put (start + reloc->r_offset, value, reloc_size);
-+ {
-+ value = reloc->r_addend + (symtab[sym_index].st_value
-+ - saved_sym->st_value);
-+
-+ if (start + reloc->r_offset + reloc_size >= end)
-+ error (_("MN10300 sym diff reloc writes past end of section (%p vs %p)\n"),
-+ start + reloc->r_offset + reloc_size, end);
-+ else
-+ byte_put (start + reloc->r_offset, value, reloc_size);
-+ }
-
- saved_sym = NULL;
- return TRUE;
-@@ -11700,12 +11744,24 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
- static bfd_vma saved_sym2 = 0;
- static bfd_vma value;
-
-+ if (reloc == NULL)
-+ {
-+ saved_sym1 = saved_sym2 = 0;
-+ return TRUE;
-+ }
-+
- switch (reloc_type)
- {
- case 0x80: /* R_RL78_SYM. */
- saved_sym1 = saved_sym2;
-- saved_sym2 = symtab[get_reloc_symindex (reloc->r_info)].st_value;
-- saved_sym2 += reloc->r_addend;
-+ if (sym_index >= num_syms)
-+ error (_("RL78_SYM reloc contains invalid symbol index %lu\n"),
-+ sym_index);
-+ else
-+ {
-+ saved_sym2 = symtab[sym_index].st_value;
-+ saved_sym2 += reloc->r_addend;
-+ }
- return TRUE;
-
- case 0x83: /* R_RL78_OPsub. */
-@@ -12345,7 +12401,7 @@ apply_relocations (void * file,
-
- reloc_type = get_reloc_type (rp->r_info);
-
-- if (target_specific_reloc_handling (rp, start, end, symtab))
-+ if (target_specific_reloc_handling (rp, start, end, symtab, num_syms))
- continue;
- else if (is_none_reloc (reloc_type))
- continue;
-@@ -12441,6 +12497,9 @@ apply_relocations (void * file,
- }
-
- free (symtab);
-+ /* Let the target specific reloc processing code know that
-+ we have finished with these relocs. */
-+ target_specific_reloc_handling (NULL, NULL, NULL, NULL, 0);
-
- if (relocs_return)
- {
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969.patch
deleted file mode 100644
index ed5403430..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 1d9a2696903fc59d6a936f4ab4e4407ef329d066 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Fri, 17 Feb 2017 15:59:45 +0000
-Subject: Fix illegal memory accesses in readelf when parsing
- a corrupt binary.
-
- PR binutils/21156
- * readelf.c (find_section_in_set): Test for invalid section
- indicies.
-
-CVE: CVE-2017-6969
-Upstream-Status: Backport [master]
-
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- binutils/ChangeLog | 6 ++++++
- binutils/readelf.c | 10 ++++++++--
- 2 files changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index bd63c8a0d8..1d840b42f9 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-02-17 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21156
-+ * readelf.c (find_section_in_set): Test for invalid section
-+ indicies.
-+
- 2017-02-13 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21139
-diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 7c158c6342..4960491c5c 100644
---- a/binutils/readelf.c
-+++ b/binutils/readelf.c
-@@ -675,8 +675,14 @@ find_section_in_set (const char * name, unsigned int * set)
- if (set != NULL)
- {
- while ((i = *set++) > 0)
-- if (streq (SECTION_NAME (section_headers + i), name))
-- return section_headers + i;
-+ {
-+ /* See PR 21156 for a reproducer. */
-+ if (i >= elf_header.e_shnum)
-+ continue; /* FIXME: Should we issue an error message ? */
-+
-+ if (streq (SECTION_NAME (section_headers + i), name))
-+ return section_headers + i;
-+ }
- }
-
- return find_section (name);
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969_2.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969_2.patch
deleted file mode 100644
index 59a5dec67..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-6969_2.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From ef81126314f67472a46db9581530fbf5ccb6b3f2 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Mon, 20 Feb 2017 14:40:39 +0000
-Subject: Fix another memory access error in readelf when
- parsing a corrupt binary.
-
- PR binutils/21156
- * dwarf.c (cu_tu_indexes_read): Move into...
- (load_cu_tu_indexes): ... here. Change the variable into
- tri-state. Change the function into boolean, returning
- false if the indicies could not be loaded.
- (find_cu_tu_set): Return NULL if the indicies could not be
- loaded.
-
-CVE: CVE-2017-6969
-Upstream-Status: Backport [master]
-
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- binutils/ChangeLog | 10 ++++++++++
- binutils/dwarf.c | 34 ++++++++++++++++++++--------------
- 2 files changed, 30 insertions(+), 14 deletions(-)
-
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index 1d840b42f9..53352c1801 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,13 @@
-+2017-02-20 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21156
-+ * dwarf.c (cu_tu_indexes_read): Move into...
-+ (load_cu_tu_indexes): ... here. Change the variable into
-+ tri-state. Change the function into boolean, returning
-+ false if the indicies could not be loaded.
-+ (find_cu_tu_set): Return NULL if the indicies could not be
-+ loaded.
-+
- 2017-02-17 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21156
-diff --git a/binutils/dwarf.c b/binutils/dwarf.c
-index 0184a7ab2e..6d879c9b61 100644
---- a/binutils/dwarf.c
-+++ b/binutils/dwarf.c
-@@ -76,7 +76,6 @@ int dwarf_check = 0;
- as a zero-terminated list of section indexes comprising one set of debug
- sections from a .dwo file. */
-
--static int cu_tu_indexes_read = 0;
- static unsigned int *shndx_pool = NULL;
- static unsigned int shndx_pool_size = 0;
- static unsigned int shndx_pool_used = 0;
-@@ -99,7 +98,7 @@ static int tu_count = 0;
- static struct cu_tu_set *cu_sets = NULL;
- static struct cu_tu_set *tu_sets = NULL;
-
--static void load_cu_tu_indexes (void *file);
-+static bfd_boolean load_cu_tu_indexes (void *);
-
- /* Values for do_debug_lines. */
- #define FLAG_DEBUG_LINES_RAW 1
-@@ -2715,7 +2714,7 @@ load_debug_info (void * file)
- return num_debug_info_entries;
-
- /* If this is a DWARF package file, load the CU and TU indexes. */
-- load_cu_tu_indexes (file);
-+ (void) load_cu_tu_indexes (file);
-
- if (load_debug_section (info, file)
- && process_debug_info (&debug_displays [info].section, file, abbrev, 1, 0))
-@@ -7378,21 +7377,27 @@ process_cu_tu_index (struct dwarf_section *section, int do_display)
- section sets that we can use to associate a .debug_info.dwo section
- with its associated .debug_abbrev.dwo section in a .dwp file. */
-
--static void
-+static bfd_boolean
- load_cu_tu_indexes (void *file)
- {
-+ static int cu_tu_indexes_read = -1; /* Tri-state variable. */
-+
- /* If we have already loaded (or tried to load) the CU and TU indexes
- then do not bother to repeat the task. */
-- if (cu_tu_indexes_read)
-- return;
--
-- if (load_debug_section (dwp_cu_index, file))
-- process_cu_tu_index (&debug_displays [dwp_cu_index].section, 0);
--
-- if (load_debug_section (dwp_tu_index, file))
-- process_cu_tu_index (&debug_displays [dwp_tu_index].section, 0);
-+ if (cu_tu_indexes_read == -1)
-+ {
-+ cu_tu_indexes_read = TRUE;
-+
-+ if (load_debug_section (dwp_cu_index, file))
-+ if (! process_cu_tu_index (&debug_displays [dwp_cu_index].section, 0))
-+ cu_tu_indexes_read = FALSE;
-+
-+ if (load_debug_section (dwp_tu_index, file))
-+ if (! process_cu_tu_index (&debug_displays [dwp_tu_index].section, 0))
-+ cu_tu_indexes_read = FALSE;
-+ }
-
-- cu_tu_indexes_read = 1;
-+ return (bfd_boolean) cu_tu_indexes_read;
- }
-
- /* Find the set of sections that includes section SHNDX. */
-@@ -7402,7 +7407,8 @@ find_cu_tu_set (void *file, unsigned int shndx)
- {
- unsigned int i;
-
-- load_cu_tu_indexes (file);
-+ if (! load_cu_tu_indexes (file))
-+ return NULL;
-
- /* Find SHNDX in the shndx pool. */
- for (i = 0; i < shndx_pool_used; i++)
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7209.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7209.patch
deleted file mode 100644
index 2357a1283..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7209.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From b2706ceadac7239e7b02d43f05100fc6538b0d65 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Mon, 13 Feb 2017 15:04:37 +0000
-Subject: Fix invalid read of section contents whilst processing a corrupt binary.
-
- PR binutils/21135
- * readelf.c (dump_section_as_bytes): Handle the case where
- uncompress_section_contents returns false.
-
-CVE: CVE-2017-7209
-Upstream-Status: Backport[master]
-
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- binutils/ChangeLog | 6 ++++++
- binutils/readelf.c | 16 ++++++++++++----
- 2 files changed, 18 insertions(+), 4 deletions(-)
-
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index 53352c1801..cf92744c12 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-02-13 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21135
-+ * readelf.c (dump_section_as_bytes): Handle the case where
-+ uncompress_section_contents returns false.
-+
- 2017-02-20 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21156
-diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 4960491c5c..f0e7b080e8 100644
---- a/binutils/readelf.c
-+++ b/binutils/readelf.c
-@@ -12803,10 +12803,18 @@ dump_section_as_bytes (Elf_Internal_Shdr * section,
- new_size -= 12;
- }
-
-- if (uncompressed_size
-- && uncompress_section_contents (& start, uncompressed_size,
-- & new_size))
-- section_size = new_size;
-+ if (uncompressed_size)
-+ {
-+ if (uncompress_section_contents (& start, uncompressed_size,
-+ & new_size))
-+ section_size = new_size;
-+ else
-+ {
-+ error (_("Unable to decompress section %s\n"),
-+ printable_section_name (section));
-+ return;
-+ }
-+ }
- }
-
- if (relocate)
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch
deleted file mode 100644
index 8791792c7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7210.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 4da598a472e1d298825035e452e3bc68f714311c Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Tue, 14 Feb 2017 14:07:29 +0000
-Subject: Fix handling of corrupt STABS enum type strings.
-
- PR binutils/21157
- * stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE
- pairs.
- (parse_number): Exit early if passed an empty string.
-
-CVE: CVE-2017-7210
-Upstream-Status: Backport [master]
-
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- binutils/ChangeLog | 7 +++++++
- binutils/stabs.c | 14 +++++++++++++-
- 2 files changed, 20 insertions(+), 1 deletion(-)
-
-diff --git a/binutils/ChangeLog b/binutils/ChangeLog
-index cf92744c12..0045fbaaa6 100644
---- a/binutils/ChangeLog
-+++ b/binutils/ChangeLog
-@@ -1,3 +1,10 @@
-+2017-02-14 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21157
-+ * stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE
-+ pairs.
-+ (parse_number): Exit early if passed an empty string.
-+
- 2017-02-13 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21135
-diff --git a/binutils/stabs.c b/binutils/stabs.c
-index f5c5d2d8e0..5d013cc361 100644
---- a/binutils/stabs.c
-+++ b/binutils/stabs.c
-@@ -232,6 +232,10 @@ parse_number (const char **pp, bfd_boolean *poverflow)
-
- orig = *pp;
-
-+ /* Stop early if we are passed an empty string. */
-+ if (*orig == 0)
-+ return (bfd_vma) 0;
-+
- errno = 0;
- ul = strtoul (*pp, (char **) pp, 0);
- if (ul + 1 != 0 || errno == 0)
-@@ -1975,9 +1979,17 @@ parse_stab_enum_type (void *dhandle, const char **pp)
- bfd_signed_vma val;
-
- p = *pp;
-- while (*p != ':')
-+ while (*p != ':' && *p != 0)
- ++p;
-
-+ if (*p == 0)
-+ {
-+ bad_stab (orig);
-+ free (names);
-+ free (values);
-+ return DEBUG_TYPE_NULL;
-+ }
-+
- name = savestring (*pp, p - *pp);
-
- *pp = p + 1;
---
-2.11.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7223.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7223.patch
deleted file mode 100644
index c78c8bf00..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7223.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 69ace2200106348a1b00d509a6a234337c104c17 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 1 Dec 2016 15:20:19 +0000
-Subject: [PATCH] Fix seg fault attempting to unget an EOF character.
-
- PR gas/20898
- * app.c (do_scrub_chars): Do not attempt to unget EOF.
-
-Affects: <= 2.28
-Upstream-Status: Backport
-CVE: CVE-2017-7223
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- gas/ChangeLog | 3 +++
- gas/app.c | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-Index: git/gas/ChangeLog
-===================================================================
---- git.orig/gas/ChangeLog
-+++ git/gas/ChangeLog
-@@ -1,3 +1,8 @@
-+2016-12-01 Nick Clifton <nickc@redhat.com>
-+
-+ PR gas/20898
-+ * app.c (do_scrub_chars): Do not attempt to unget EOF.
-+
- 2017-03-02 Tristan Gingold <gingold@adacore.com>
-
- * configure: Regenerate.
-@@ -198,7 +203,6 @@
- * config/tc-pru.c (md_number_to_chars): Fix parameter to be
- valueT, as declared in tc.h.
- (md_apply_fix): Fix to work on 32-bit hosts.
-->>>>>>> 0115611... RISC-V/GAS: Correct branch relaxation for weak symbols.
-
- 2017-01-02 Alan Modra <amodra@gmail.com>
-
-Index: git/gas/app.c
-===================================================================
---- git.orig/gas/app.c
-+++ git/gas/app.c
-@@ -1350,7 +1350,7 @@ do_scrub_chars (size_t (*get) (char *, s
- PUT (ch);
- break;
- }
-- else
-+ else if (ch2 != EOF)
- {
- state = 9;
- if (ch == EOF || !IS_SYMBOL_COMPONENT (ch))
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7614.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7614.patch
deleted file mode 100644
index be8631ab7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-7614.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From ad32986fdf9da1c8748e47b8b45100398223dba8 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Tue, 4 Apr 2017 11:23:36 +0100
-Subject: [PATCH] Fix null pointer dereferences when using a link built with
- clang.
-
- PR binutils/21342
- * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
- dereference.
- (bfd_elf_final_link): Only initialize the extended symbol index
- section if there are extended symbol tables to list.
-
-Upstream-Status: Backport
-CVE: CVE-2017-7614
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 8 ++++++++
- bfd/elflink.c | 35 +++++++++++++++++++++--------------
- 2 files changed, 29 insertions(+), 14 deletions(-)
-
-Index: git/bfd/elflink.c
-===================================================================
---- git.orig/bfd/elflink.c
-+++ git/bfd/elflink.c
-@@ -119,15 +119,18 @@ _bfd_elf_define_linkage_sym (bfd *abfd,
- defined in shared libraries can't be overridden, because we
- lose the link to the bfd which is via the symbol section. */
- h->root.type = bfd_link_hash_new;
-+ bh = &h->root;
- }
-+ else
-+ bh = NULL;
-
-- bh = &h->root;
- bed = get_elf_backend_data (abfd);
- if (!_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL,
- sec, 0, NULL, FALSE, bed->collect,
- &bh))
- return NULL;
- h = (struct elf_link_hash_entry *) bh;
-+ BFD_ASSERT (h != NULL);
- h->def_regular = 1;
- h->non_elf = 0;
- h->root.linker_def = 1;
-@@ -11973,24 +11976,28 @@ bfd_elf_final_link (bfd *abfd, struct bf
- {
- /* Finish up and write out the symbol string table (.strtab)
- section. */
-- Elf_Internal_Shdr *symstrtab_hdr;
-+ Elf_Internal_Shdr *symstrtab_hdr = NULL;
- file_ptr off = symtab_hdr->sh_offset + symtab_hdr->sh_size;
-
-- symtab_shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr;
-- if (symtab_shndx_hdr != NULL && symtab_shndx_hdr->sh_name != 0)
-+ if (elf_symtab_shndx_list (abfd))
- {
-- symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX;
-- symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx);
-- symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx);
-- amt = bfd_get_symcount (abfd) * sizeof (Elf_External_Sym_Shndx);
-- symtab_shndx_hdr->sh_size = amt;
-+ symtab_shndx_hdr = & elf_symtab_shndx_list (abfd)->hdr;
-
-- off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr,
-- off, TRUE);
-+ if (symtab_shndx_hdr != NULL && symtab_shndx_hdr->sh_name != 0)
-+ {
-+ symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX;
-+ symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx);
-+ symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx);
-+ amt = bfd_get_symcount (abfd) * sizeof (Elf_External_Sym_Shndx);
-+ symtab_shndx_hdr->sh_size = amt;
-
-- if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0
-- || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt))
-- return FALSE;
-+ off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr,
-+ off, TRUE);
-+
-+ if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0
-+ || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt))
-+ return FALSE;
-+ }
- }
-
- symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr;
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,11 @@
-+2017-04-04 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21342
-+ * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
-+ dereference.
-+ (bfd_elf_final_link): Only initialize the extended symbol index
-+ section if there are extended symbol tables to list.
-+
- 2017-03-07 Alan Modra <amodra@gmail.com>
-
- PR 21224
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8393.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8393.patch
deleted file mode 100644
index 8500a03b1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8393.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-From bce964aa6c777d236fbd641f2bc7bb931cfe4bf3 Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Sun, 23 Apr 2017 11:03:34 +0930
-Subject: [PATCH] PR 21412, get_reloc_section assumes .rel/.rela name for
- SHT_REL/RELA.
-
-This patch fixes an assumption made by code that runs for objcopy and
-strip, that SHT_REL/SHR_RELA sections are always named starting with a
-.rel/.rela prefix. I'm also modifying the interface for
-elf_backend_get_reloc_section, so any backend function just needs to
-handle name mapping.
-
- PR 21412
- * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
- parameters and comment.
- (_bfd_elf_get_reloc_section): Delete.
- (_bfd_elf_plt_get_reloc_section): Declare.
- * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
- New functions. Don't blindly skip over assumed .rel/.rela prefix.
- Extracted from..
- (_bfd_elf_get_reloc_section): ..here. Delete.
- (assign_section_numbers): Call elf_get_reloc_section.
- * elf64-ppc.c (elf_backend_get_reloc_section): Define.
- * elfxx-target.h (elf_backend_get_reloc_section): Update.
-
-Upstream-Status: Backport
-CVE: CVE-2017-8393
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 15 ++++++++++++++
- bfd/elf-bfd.h | 8 ++++---
- bfd/elf.c | 61 +++++++++++++++++++++++++++++++-----------------------
- bfd/elf64-ppc.c | 1 +
- bfd/elfxx-target.h | 2 +-
- 5 files changed, 57 insertions(+), 30 deletions(-)
-
-Index: git/bfd/elf-bfd.h
-===================================================================
---- git.orig/bfd/elf-bfd.h
-+++ git/bfd/elf-bfd.h
-@@ -1322,8 +1322,10 @@ struct elf_backend_data
- bfd_size_type (*maybe_function_sym) (const asymbol *sym, asection *sec,
- bfd_vma *code_off);
-
-- /* Return the section which RELOC_SEC applies to. */
-- asection *(*get_reloc_section) (asection *reloc_sec);
-+ /* Given NAME, the name of a relocation section stripped of its
-+ .rel/.rela prefix, return the section in ABFD to which the
-+ relocations apply. */
-+ asection *(*get_reloc_section) (bfd *abfd, const char *name);
-
- /* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which
- has a type >= SHT_LOOS. Returns TRUE if the fields were initialised,
-@@ -2392,7 +2394,7 @@ extern bfd_boolean _bfd_elf_is_function_
- extern bfd_size_type _bfd_elf_maybe_function_sym (const asymbol *, asection *,
- bfd_vma *);
-
--extern asection *_bfd_elf_get_reloc_section (asection *);
-+extern asection *_bfd_elf_plt_get_reloc_section (bfd *, const char *);
-
- extern int bfd_elf_get_default_section_type (flagword);
-
-Index: git/bfd/elf.c
-===================================================================
---- git.orig/bfd/elf.c
-+++ git/bfd/elf.c
-@@ -3532,17 +3532,39 @@ bfd_elf_set_group_contents (bfd *abfd, a
- H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc);
- }
-
--/* Return the section which RELOC_SEC applies to. */
-+/* Given NAME, the name of a relocation section stripped of its
-+ .rel/.rela prefix, return the section in ABFD to which the
-+ relocations apply. */
-
- asection *
--_bfd_elf_get_reloc_section (asection *reloc_sec)
-+_bfd_elf_plt_get_reloc_section (bfd *abfd, const char *name)
-+{
-+ /* If a target needs .got.plt section, relocations in rela.plt/rel.plt
-+ section likely apply to .got.plt or .got section. */
-+ if (get_elf_backend_data (abfd)->want_got_plt
-+ && strcmp (name, ".plt") == 0)
-+ {
-+ asection *sec;
-+
-+ name = ".got.plt";
-+ sec = bfd_get_section_by_name (abfd, name);
-+ if (sec != NULL)
-+ return sec;
-+ name = ".got";
-+ }
-+
-+ return bfd_get_section_by_name (abfd, name);
-+}
-+
-+/* Return the section to which RELOC_SEC applies. */
-+
-+static asection *
-+elf_get_reloc_section (asection *reloc_sec)
- {
- const char *name;
- unsigned int type;
- bfd *abfd;
--
-- if (reloc_sec == NULL)
-- return NULL;
-+ const struct elf_backend_data *bed;
-
- type = elf_section_data (reloc_sec)->this_hdr.sh_type;
- if (type != SHT_REL && type != SHT_RELA)
-@@ -3550,28 +3572,15 @@ _bfd_elf_get_reloc_section (asection *re
-
- /* We look up the section the relocs apply to by name. */
- name = reloc_sec->name;
-- if (type == SHT_REL)
-- name += 4;
-- else
-- name += 5;
-+ if (strncmp (name, ".rel", 4) != 0)
-+ return NULL;
-+ name += 4;
-+ if (type == SHT_RELA && *name++ != 'a')
-+ return NULL;
-
-- /* If a target needs .got.plt section, relocations in rela.plt/rel.plt
-- section apply to .got.plt section. */
- abfd = reloc_sec->owner;
-- if (get_elf_backend_data (abfd)->want_got_plt
-- && strcmp (name, ".plt") == 0)
-- {
-- /* .got.plt is a linker created input section. It may be mapped
-- to some other output section. Try two likely sections. */
-- name = ".got.plt";
-- reloc_sec = bfd_get_section_by_name (abfd, name);
-- if (reloc_sec != NULL)
-- return reloc_sec;
-- name = ".got";
-- }
--
-- reloc_sec = bfd_get_section_by_name (abfd, name);
-- return reloc_sec;
-+ bed = get_elf_backend_data (abfd);
-+ return bed->get_reloc_section (abfd, name);
- }
-
- /* Assign all ELF section numbers. The dummy first section is handled here
-@@ -3833,7 +3842,7 @@ assign_section_numbers (bfd *abfd, struc
- if (s != NULL)
- d->this_hdr.sh_link = elf_section_data (s)->this_idx;
-
-- s = get_elf_backend_data (abfd)->get_reloc_section (sec);
-+ s = elf_get_reloc_section (sec);
- if (s != NULL)
- {
- d->this_hdr.sh_info = elf_section_data (s)->this_idx;
-Index: git/bfd/elf64-ppc.c
-===================================================================
---- git.orig/bfd/elf64-ppc.c
-+++ git/bfd/elf64-ppc.c
-@@ -121,6 +121,7 @@ static bfd_vma opd_entry_value
- #define elf_backend_special_sections ppc64_elf_special_sections
- #define elf_backend_merge_symbol_attribute ppc64_elf_merge_symbol_attribute
- #define elf_backend_merge_symbol ppc64_elf_merge_symbol
-+#define elf_backend_get_reloc_section bfd_get_section_by_name
-
- /* The name of the dynamic interpreter. This is put in the .interp
- section. */
-Index: git/bfd/elfxx-target.h
-===================================================================
---- git.orig/bfd/elfxx-target.h
-+++ git/bfd/elfxx-target.h
-@@ -706,7 +706,7 @@
- #endif
-
- #ifndef elf_backend_get_reloc_section
--#define elf_backend_get_reloc_section _bfd_elf_get_reloc_section
-+#define elf_backend_get_reloc_section _bfd_elf_plt_get_reloc_section
- #endif
-
- #ifndef elf_backend_copy_special_section_fields
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,18 @@
-+2017-04-23 Alan Modra <amodra@gmail.com>
-+
-+ PR 21412
-+ * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
-+ parameters and comment.
-+ (_bfd_elf_get_reloc_section): Delete.
-+ (_bfd_elf_plt_get_reloc_section): Declare.
-+ * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
-+ New functions. Don't blindly skip over assumed .rel/.rela prefix.
-+ Extracted from..
-+ (_bfd_elf_get_reloc_section): ..here. Delete.
-+ (assign_section_numbers): Call elf_get_reloc_section.
-+ * elf64-ppc.c (elf_backend_get_reloc_section): Define.
-+ * elfxx-target.h (elf_backend_get_reloc_section): Update.
-+
- 2017-04-04 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21342
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8394.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8394.patch
deleted file mode 100644
index e6c6b17da..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8394.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 7eacd66b086cabb1daab20890d5481894d4f56b2 Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Sun, 23 Apr 2017 15:21:11 +0930
-Subject: [PATCH] PR 21414, null pointer deref of _bfd_elf_large_com_section
- sym
-
- PR 21414
- * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
- * elf.c (lcomm_sym): New.
- (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
- * bfd-in2.h: Regenerate.
-
-Upstream-Status: Backport
-CVE: CVE-2017-8394
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 8 ++++++++
- bfd/bfd-in2.h | 12 ++++++++++++
- bfd/elf.c | 6 ++++--
- bfd/section.c | 24 ++++++++++++------------
- 4 files changed, 36 insertions(+), 14 deletions(-)
-
-Index: git/bfd/bfd-in2.h
-===================================================================
---- git.orig/bfd/bfd-in2.h
-+++ git/bfd/bfd-in2.h
-@@ -1838,6 +1838,18 @@ extern asection _bfd_std_section[4];
- { NULL }, { NULL } \
- }
-
-+/* We use a macro to initialize the static asymbol structures because
-+ traditional C does not permit us to initialize a union member while
-+ gcc warns if we don't initialize it.
-+ the_bfd, name, value, attr, section [, udata] */
-+#ifdef __STDC__
-+#define GLOBAL_SYM_INIT(NAME, SECTION) \
-+ { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
-+#else
-+#define GLOBAL_SYM_INIT(NAME, SECTION) \
-+ { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
-+#endif
-+
- void bfd_section_list_clear (bfd *);
-
- asection *bfd_get_section_by_name (bfd *abfd, const char *name);
-Index: git/bfd/elf.c
-===================================================================
---- git.orig/bfd/elf.c
-+++ git/bfd/elf.c
-@@ -11164,9 +11164,11 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd
-
- /* It is only used by x86-64 so far.
- ??? This repeats *COM* id of zero. sec->id is supposed to be unique,
-- but current usage would allow all of _bfd_std_section to be zero. t*/
-+ but current usage would allow all of _bfd_std_section to be zero. */
-+static const asymbol lcomm_sym
-+ = GLOBAL_SYM_INIT ("LARGE_COMMON", &_bfd_elf_large_com_section);
- asection _bfd_elf_large_com_section
-- = BFD_FAKE_SECTION (_bfd_elf_large_com_section, NULL,
-+ = BFD_FAKE_SECTION (_bfd_elf_large_com_section, &lcomm_sym,
- "LARGE_COMMON", 0, SEC_IS_COMMON);
-
- void
-Index: git/bfd/section.c
-===================================================================
---- git.orig/bfd/section.c
-+++ git/bfd/section.c
-@@ -738,20 +738,20 @@ CODE_FRAGMENT
- . { NULL }, { NULL } \
- . }
- .
-+.{* We use a macro to initialize the static asymbol structures because
-+. traditional C does not permit us to initialize a union member while
-+. gcc warns if we don't initialize it.
-+. the_bfd, name, value, attr, section [, udata] *}
-+.#ifdef __STDC__
-+.#define GLOBAL_SYM_INIT(NAME, SECTION) \
-+. { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
-+.#else
-+.#define GLOBAL_SYM_INIT(NAME, SECTION) \
-+. { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
-+.#endif
-+.
- */
-
--/* We use a macro to initialize the static asymbol structures because
-- traditional C does not permit us to initialize a union member while
-- gcc warns if we don't initialize it. */
-- /* the_bfd, name, value, attr, section [, udata] */
--#ifdef __STDC__
--#define GLOBAL_SYM_INIT(NAME, SECTION) \
-- { 0, NAME, 0, BSF_SECTION_SYM, SECTION, { 0 }}
--#else
--#define GLOBAL_SYM_INIT(NAME, SECTION) \
-- { 0, NAME, 0, BSF_SECTION_SYM, SECTION }
--#endif
--
- /* These symbols are global, not specific to any BFD. Therefore, anything
- that tries to change them is broken, and should be repaired. */
-
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,4 +1,12 @@
-+
- 2017-04-23 Alan Modra <amodra@gmail.com>
-+ PR 21414
-+ * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
-+ * elf.c (lcomm_sym): New.
-+ (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
-+ * bfd-in2.h: Regenerate.
-+
-++2017-04-23 Alan Modra <amodra@gmail.com>
-
- PR 21412
- * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8395.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8395.patch
deleted file mode 100644
index 0a9bce337..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8395.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From e63d123268f23a4cbc45ee55fb6dbc7d84729da3 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Wed, 26 Apr 2017 13:07:49 +0100
-Subject: [PATCH] Fix seg-fault attempting to compress a debug section in a
- corrupt binary.
-
- PR binutils/21431
- * compress.c (bfd_init_section_compress_status): Check the return
- value from bfd_malloc.
-
-Upstream-Status: Backport
-CVE: CVE-2017-8395
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 6 ++++++
- bfd/compress.c | 19 +++++++++----------
- 2 files changed, 15 insertions(+), 10 deletions(-)
-
-Index: git/bfd/compress.c
-===================================================================
---- git.orig/bfd/compress.c
-+++ git/bfd/compress.c
-@@ -542,7 +542,6 @@ bfd_init_section_compress_status (bfd *a
- {
- bfd_size_type uncompressed_size;
- bfd_byte *uncompressed_buffer;
-- bfd_boolean ret;
-
- /* Error if not opened for read. */
- if (abfd->direction != read_direction
-@@ -558,18 +557,18 @@ bfd_init_section_compress_status (bfd *a
- /* Read in the full section contents and compress it. */
- uncompressed_size = sec->size;
- uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size);
-+ /* PR 21431 */
-+ if (uncompressed_buffer == NULL)
-+ return FALSE;
-+
- if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer,
- 0, uncompressed_size))
-- ret = FALSE;
-- else
-- {
-- uncompressed_size = bfd_compress_section_contents (abfd, sec,
-- uncompressed_buffer,
-- uncompressed_size);
-- ret = uncompressed_size != 0;
-- }
-+ return FALSE;
-
-- return ret;
-+ uncompressed_size = bfd_compress_section_contents (abfd, sec,
-+ uncompressed_buffer,
-+ uncompressed_size);
-+ return uncompressed_size != 0;
- }
-
- /*
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,8 @@
-+2017-04-26 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21431
-+ * compress.c (bfd_init_section_compress_status): Check the return
-+ value from bfd_malloc.
-
- 2017-04-23 Alan Modra <amodra@gmail.com>
- PR 21414
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8396_8397.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8396_8397.patch
deleted file mode 100644
index 14f42824a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8396_8397.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From a941291cab71b9ac356e1c03968c177c03e602ab Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Sat, 29 Apr 2017 14:48:16 +0930
-Subject: [PATCH] PR21432, buffer overflow in perform_relocation
-
-The existing reloc offset range tests didn't catch small negative
-offsets less than the size of the reloc field.
-
- PR 21432
- * reloc.c (reloc_offset_in_range): New function.
- (bfd_perform_relocation, bfd_install_relocation): Use it.
- (_bfd_final_link_relocate): Likewise.
-
-Upstream-Status: Backport
-CVE: CVE-2017-8396
-CVE: CVE-2017-8397
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 7 +++++++
- bfd/reloc.c | 32 ++++++++++++++++++++------------
- 2 files changed, 27 insertions(+), 12 deletions(-)
-
-Index: git/bfd/reloc.c
-===================================================================
---- git.orig/bfd/reloc.c
-+++ git/bfd/reloc.c
-@@ -538,6 +538,22 @@ bfd_check_overflow (enum complain_overfl
- return flag;
- }
-
-+/* HOWTO describes a relocation, at offset OCTET. Return whether the
-+ relocation field is within SECTION of ABFD. */
-+
-+static bfd_boolean
-+reloc_offset_in_range (reloc_howto_type *howto, bfd *abfd,
-+ asection *section, bfd_size_type octet)
-+{
-+ bfd_size_type octet_end = bfd_get_section_limit_octets (abfd, section);
-+ bfd_size_type reloc_size = bfd_get_reloc_size (howto);
-+
-+ /* The reloc field must be contained entirely within the section.
-+ Allow zero length fields (marker relocs or NONE relocs where no
-+ relocation will be performed) at the end of the section. */
-+ return octet <= octet_end && octet + reloc_size <= octet_end;
-+}
-+
- /*
- FUNCTION
- bfd_perform_relocation
-@@ -618,13 +634,10 @@ bfd_perform_relocation (bfd *abfd,
- /* PR 17512: file: 0f67f69d. */
- if (howto == NULL)
- return bfd_reloc_undefined;
--
-- /* Is the address of the relocation really within the section?
-- Include the size of the reloc in the test for out of range addresses.
-- PR 17512: file: c146ab8b, 46dff27f, 38e53ebf. */
-+
-+ /* Is the address of the relocation really within the section? */
- octets = reloc_entry->address * bfd_octets_per_byte (abfd);
-- if (octets + bfd_get_reloc_size (howto)
-- > bfd_get_section_limit_octets (abfd, input_section))
-+ if (!reloc_offset_in_range (howto, abfd, input_section, octets))
- return bfd_reloc_outofrange;
-
- /* Work out which section the relocation is targeted at and the
-@@ -1012,8 +1025,7 @@ bfd_install_relocation (bfd *abfd,
-
- /* Is the address of the relocation really within the section? */
- octets = reloc_entry->address * bfd_octets_per_byte (abfd);
-- if (octets + bfd_get_reloc_size (howto)
-- > bfd_get_section_limit_octets (abfd, input_section))
-+ if (!reloc_offset_in_range (howto, abfd, input_section, octets))
- return bfd_reloc_outofrange;
-
- /* Work out which section the relocation is targeted at and the
-@@ -1351,8 +1363,7 @@ _bfd_final_link_relocate (reloc_howto_ty
- bfd_size_type octets = address * bfd_octets_per_byte (input_bfd);
-
- /* Sanity check the address. */
-- if (octets + bfd_get_reloc_size (howto)
-- > bfd_get_section_limit_octets (input_bfd, input_section))
-+ if (!reloc_offset_in_range (howto, input_bfd, input_section, octets))
- return bfd_reloc_outofrange;
-
- /* This function assumes that we are dealing with a basic relocation
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,10 @@
-+2017-04-29 Alan Modra <amodra@gmail.com>
-+
-+ PR 21432
-+ * reloc.c (reloc_offset_in_range): New function.
-+ (bfd_perform_relocation, bfd_install_relocation): Use it.
-+ (_bfd_final_link_relocate): Likewise.
-+
- 2017-04-26 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21431
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8398.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8398.patch
deleted file mode 100644
index 5b9acc8cf..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8398.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From d949ff5607b9f595e0eed2ff15fbe5eb84eb3a34 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Fri, 28 Apr 2017 10:28:04 +0100
-Subject: [PATCH] Fix heap-buffer overflow bugs caused when dumping debug
- information from a corrupt binary.
-
- PR binutils/21438
- * dwarf.c (process_extended_line_op): Do not assume that the
- string extracted from the section is NUL terminated.
- (fetch_indirect_string): If the string retrieved from the section
- is not NUL terminated, return an error message.
- (fetch_indirect_line_string): Likewise.
- (fetch_indexed_string): Likewise.
-
-Upstream-Status: Backport
-CVE: CVE-2017-8398
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- binutils/ChangeLog | 10 +++++++++
- binutils/dwarf.c | 66 +++++++++++++++++++++++++++++++++++++++++-------------
- 2 files changed, 60 insertions(+), 16 deletions(-)
-
-Index: git/binutils/dwarf.c
-===================================================================
---- git.orig/binutils/dwarf.c
-+++ git/binutils/dwarf.c
-@@ -472,15 +472,20 @@ process_extended_line_op (unsigned char
- printf (_(" Entry\tDir\tTime\tSize\tName\n"));
- printf (" %d\t", ++state_machine_regs.last_file_entry);
-
-- name = data;
-- data += strnlen ((char *) data, end - data) + 1;
-- printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end)));
-- data += bytes_read;
-- printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end)));
-- data += bytes_read;
-- printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end)));
-- data += bytes_read;
-- printf ("%s\n\n", name);
-+ {
-+ size_t l;
-+
-+ name = data;
-+ l = strnlen ((char *) data, end - data);
-+ data += len + 1;
-+ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end)));
-+ data += bytes_read;
-+ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end)));
-+ data += bytes_read;
-+ printf ("%s\t", dwarf_vmatoa ("u", read_uleb128 (data, & bytes_read, end)));
-+ data += bytes_read;
-+ printf ("%.*s\n\n", (int) l, name);
-+ }
-
- if (((unsigned int) (data - orig_data) != len) || data == end)
- warn (_("DW_LNE_define_file: Bad opcode length\n"));
-@@ -597,18 +602,27 @@ static const unsigned char *
- fetch_indirect_string (dwarf_vma offset)
- {
- struct dwarf_section *section = &debug_displays [str].section;
-+ const unsigned char * ret;
-
- if (section->start == NULL)
- return (const unsigned char *) _("<no .debug_str section>");
-
-- if (offset > section->size)
-+ if (offset >= section->size)
- {
- warn (_("DW_FORM_strp offset too big: %s\n"),
- dwarf_vmatoa ("x", offset));
- return (const unsigned char *) _("<offset is too big>");
- }
-+ ret = section->start + offset;
-+ /* Unfortunately we cannot rely upon the .debug_str section ending with a
-+ NUL byte. Since our caller is expecting to receive a well formed C
-+ string we test for the lack of a terminating byte here. */
-+ if (strnlen ((const char *) ret, section->size - offset)
-+ == section->size - offset)
-+ ret = (const unsigned char *)
-+ _("<no NUL byte at end of .debug_str section>");
-
-- return (const unsigned char *) section->start + offset;
-+ return ret;
- }
-
- static const char *
-@@ -621,6 +635,7 @@ fetch_indexed_string (dwarf_vma idx, str
- struct dwarf_section *str_section = &debug_displays [str_sec_idx].section;
- dwarf_vma index_offset = idx * offset_size;
- dwarf_vma str_offset;
-+ const char * ret;
-
- if (index_section->start == NULL)
- return (dwo ? _("<no .debug_str_offsets.dwo section>")
-@@ -628,7 +643,7 @@ fetch_indexed_string (dwarf_vma idx, str
-
- if (this_set != NULL)
- index_offset += this_set->section_offsets [DW_SECT_STR_OFFSETS];
-- if (index_offset > index_section->size)
-+ if (index_offset >= index_section->size)
- {
- warn (_("DW_FORM_GNU_str_index offset too big: %s\n"),
- dwarf_vmatoa ("x", index_offset));
-@@ -641,14 +656,22 @@ fetch_indexed_string (dwarf_vma idx, str
-
- str_offset = byte_get (index_section->start + index_offset, offset_size);
- str_offset -= str_section->address;
-- if (str_offset > str_section->size)
-+ if (str_offset >= str_section->size)
- {
- warn (_("DW_FORM_GNU_str_index indirect offset too big: %s\n"),
- dwarf_vmatoa ("x", str_offset));
- return _("<indirect index offset is too big>");
- }
-
-- return (const char *) str_section->start + str_offset;
-+ ret = (const char *) str_section->start + str_offset;
-+ /* Unfortunately we cannot rely upon str_section ending with a NUL byte.
-+ Since our caller is expecting to receive a well formed C string we test
-+ for the lack of a terminating byte here. */
-+ if (strnlen (ret, str_section->size - str_offset)
-+ == str_section->size - str_offset)
-+ ret = (const char *) _("<no NUL byte at end of section>");
-+
-+ return ret;
- }
-
- static const char *
-Index: git/binutils/ChangeLog
-===================================================================
---- git.orig/binutils/ChangeLog
-+++ git/binutils/ChangeLog
-@@ -1,3 +1,13 @@
-+2017-04-28 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21438
-+ * dwarf.c (process_extended_line_op): Do not assume that the
-+ string extracted from the section is NUL terminated.
-+ (fetch_indirect_string): If the string retrieved from the section
-+ is not NUL terminated, return an error message.
-+ (fetch_indirect_line_string): Likewise.
-+ (fetch_indexed_string): Likewise.
-+
- 2017-02-14 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21157
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8421.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8421.patch
deleted file mode 100644
index 7969c66f3..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-8421.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 39ff1b79f687b65f4144ddb379f22587003443fb Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Tue, 2 May 2017 11:54:53 +0100
-Subject: [PATCH] Prevent memory exhaustion from a corrupt PE binary with an
- overlarge number of relocs.
-
- PR 21440
- * objdump.c (dump_relocs_in_section): Check for an excessive
- number of relocs before attempting to dump them.
-
-Upstream-Status: Backport
-CVE: CVE-2017-8421
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- binutils/ChangeLog | 6 ++++++
- binutils/objdump.c | 8 ++++++++
- 2 files changed, 14 insertions(+)
-
-Index: git/binutils/objdump.c
-===================================================================
---- git.orig/binutils/objdump.c
-+++ git/binutils/objdump.c
-@@ -3311,6 +3311,14 @@ dump_relocs_in_section (bfd *abfd,
- return;
- }
-
-+ if ((bfd_get_file_flags (abfd) & (BFD_IN_MEMORY | BFD_LINKER_CREATED)) == 0
-+ && relsize > get_file_size (bfd_get_filename (abfd)))
-+ {
-+ printf (" (too many: 0x%x)\n", section->reloc_count);
-+ bfd_set_error (bfd_error_file_truncated);
-+ bfd_fatal (bfd_get_filename (abfd));
-+ }
-+
- relpp = (arelent **) xmalloc (relsize);
- relcount = bfd_canonicalize_reloc (abfd, section, relpp, syms);
-
-Index: git/binutils/ChangeLog
-===================================================================
---- git.orig/binutils/ChangeLog
-+++ git/binutils/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-05-02 Nick Clifton <nickc@redhat.com>
-+
-+ PR 21440
-+ * objdump.c (dump_relocs_in_section): Check for an excessive
-+ number of relocs before attempting to dump them.
-+
- 2017-04-28 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21438
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9038_9044.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9038_9044.patch
deleted file mode 100644
index 535efc314..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9038_9044.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From f32ba72991d2406b21ab17edc234a2f3fa7fb23d Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Mon, 3 Apr 2017 11:01:45 +0100
-Subject: [PATCH] readelf: Update check for invalid word offsets in ARM unwind
- information.
-
- PR binutils/21343
- * readelf.c (get_unwind_section_word): Fix snafu checking for
- invalid word offsets in ARM unwind information.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9038
-CVE: CVE-2017-9044
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- binutils/ChangeLog | 6 ++++++
- binutils/readelf.c | 6 +++---
- 2 files changed, 9 insertions(+), 3 deletions(-)
-
-Index: git/binutils/readelf.c
-===================================================================
---- git.orig/binutils/readelf.c
-+++ git/binutils/readelf.c
-@@ -7972,9 +7972,9 @@ get_unwind_section_word (struct arm_unw_
- return FALSE;
-
- /* If the offset is invalid then fail. */
-- if (word_offset > (sec->sh_size - 4)
-- /* PR 18879 */
-- || (sec->sh_size < 5 && word_offset >= sec->sh_size)
-+ if (/* PR 21343 *//* PR 18879 */
-+ sec->sh_size < 4
-+ || word_offset > (sec->sh_size - 4)
- || ((bfd_signed_vma) word_offset) < 0)
- return FALSE;
-
-Index: git/binutils/ChangeLog
-===================================================================
---- git.orig/binutils/ChangeLog
-+++ git/binutils/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-04-03 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21343
-+ * readelf.c (get_unwind_section_word): Fix snafu checking for
-+ invalid word offsets in ARM unwind information.
-+
- 2017-05-02 Nick Clifton <nickc@redhat.com>
-
- PR 21440
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9039.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9039.patch
deleted file mode 100644
index aed8f7f40..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9039.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 82156ab704b08b124d319c0decdbd48b3ca2dac5 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Mon, 3 Apr 2017 12:14:06 +0100
-Subject: [PATCH] readelf: Fix overlarge memory allocation when reading a
- binary with an excessive number of program headers.
-
- PR binutils/21345
- * readelf.c (get_program_headers): Check for there being too many
- program headers before attempting to allocate space for them.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9039
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- binutils/ChangeLog | 6 ++++++
- binutils/readelf.c | 17 ++++++++++++++---
- 2 files changed, 20 insertions(+), 3 deletions(-)
-
-Index: git/binutils/readelf.c
-===================================================================
---- git.orig/binutils/readelf.c
-+++ git/binutils/readelf.c
-@@ -4765,9 +4765,19 @@ get_program_headers (FILE * file)
- if (program_headers != NULL)
- return 1;
-
-- phdrs = (Elf_Internal_Phdr *) cmalloc (elf_header.e_phnum,
-- sizeof (Elf_Internal_Phdr));
-+ /* Be kind to memory checkers by looking for
-+ e_phnum values which we know must be invalid. */
-+ if (elf_header.e_phnum
-+ * (is_32bit_elf ? sizeof (Elf32_External_Phdr) : sizeof (Elf64_External_Phdr))
-+ >= current_file_size)
-+ {
-+ error (_("Too many program headers - %#x - the file is not that big\n"),
-+ elf_header.e_phnum);
-+ return FALSE;
-+ }
-
-+ phdrs = (Elf_Internal_Phdr *) cmalloc (elf_header.e_phnum,
-+ sizeof (Elf_Internal_Phdr));
- if (phdrs == NULL)
- {
- error (_("Out of memory reading %u program headers\n"),
-Index: git/binutils/ChangeLog
-===================================================================
---- git.orig/binutils/ChangeLog
-+++ git/binutils/ChangeLog
-@@ -1,5 +1,11 @@
- 2017-04-03 Nick Clifton <nickc@redhat.com>
-
-+ PR binutils/21345
-+ * readelf.c (get_program_headers): Check for there being too many
-+ program headers before attempting to allocate space for them.
-+
-+2017-04-03 Nick Clifton <nickc@redhat.com>
-+
- PR binutils/21343
- * readelf.c (get_unwind_section_word): Fix snafu checking for
- invalid word offsets in ARM unwind information.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9040_9042.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9040_9042.patch
deleted file mode 100644
index 79c6a7d8a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9040_9042.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 7296a62a2a237f6b1ad8db8c38b090e9f592c8cf Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 13 Apr 2017 16:06:30 +0100
-Subject: [PATCH] readelf: fix out of range subtraction, seg fault from a NULL
- pointer and memory exhaustion, all from parsing corrupt binaries.
-
- PR binutils/21379
- * readelf.c (process_dynamic_section): Detect over large section
- offsets in the DT_SYMTAB entry.
-
- PR binutils/21345
- * readelf.c (process_mips_specific): Catch an unfeasible memory
- allocation before it happens and print a suitable error message.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9040
-CVE: CVE-2017-9042
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- binutils/ChangeLog | 12 ++++++++++++
- binutils/readelf.c | 26 +++++++++++++++++++++-----
- 2 files changed, 33 insertions(+), 5 deletions(-)
-
-Index: git/binutils/readelf.c
-===================================================================
---- git.orig/binutils/readelf.c
-+++ git/binutils/readelf.c
-@@ -9306,6 +9306,12 @@ process_dynamic_section (FILE * file)
- processing that. This is overkill, I know, but it
- should work. */
- section.sh_offset = offset_from_vma (file, entry->d_un.d_val, 0);
-+ if ((bfd_size_type) section.sh_offset > current_file_size)
-+ {
-+ /* See PR 21379 for a reproducer. */
-+ error (_("Invalid DT_SYMTAB entry: %lx"), (long) section.sh_offset);
-+ return FALSE;
-+ }
-
- if (archive_file_offset != 0)
- section.sh_size = archive_file_size - section.sh_offset;
-@@ -15175,6 +15181,15 @@ process_mips_specific (FILE * file)
- return 0;
- }
-
-+ /* PR 21345 - print a slightly more helpful error message
-+ if we are sure that the cmalloc will fail. */
-+ if (conflictsno * sizeof (* iconf) > current_file_size)
-+ {
-+ error (_("Overlarge number of conflicts detected: %lx\n"),
-+ (long) conflictsno);
-+ return FALSE;
-+ }
-+
- iconf = (Elf32_Conflict *) cmalloc (conflictsno, sizeof (* iconf));
- if (iconf == NULL)
- {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch
deleted file mode 100644
index 0c9ed0d2a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9742.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From e64519d1ed7fd8f990f05a5562d5b5c0c44b7d7e Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Wed, 14 Jun 2017 17:10:28 +0100
-Subject: [PATCH] Fix seg-fault when trying to disassemble a corrupt score
- binary.
-
- PR binutils/21576
- * score7-dis.c (score_opcodes): Add sentinel.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9742
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- opcodes/ChangeLog | 5 +++++
- opcodes/score7-dis.c | 3 ++-
- 2 files changed, 7 insertions(+), 1 deletion(-)
-
-Index: git/opcodes/score7-dis.c
-===================================================================
---- git.orig/opcodes/score7-dis.c
-+++ git/opcodes/score7-dis.c
-@@ -513,7 +513,8 @@ static struct score_opcode score_opcodes
- {0x00000d05, 0x00007f0f, "tvc!"},
- {0x00000026, 0x3e0003ff, "xor\t\t%20-24r, %15-19r, %10-14r"},
- {0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"},
-- {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"}
-+ {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"},
-+ { 0, 0, NULL }
- };
-
- typedef struct
-Index: git/opcodes/ChangeLog
-===================================================================
---- git.orig/opcodes/ChangeLog
-+++ git/opcodes/ChangeLog
-@@ -1,3 +1,8 @@
-+2017-06-14 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21576
-+ * score7-dis.c (score_opcodes): Add sentinel.
-+
- 2017-03-07 Alan Modra <amodra@gmail.com>
-
- Apply from master
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch
deleted file mode 100644
index c34a5a6ec..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9744.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From f461bbd847f15657f3dd2f317c30c75a7520da1f Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Wed, 14 Jun 2017 17:01:54 +0100
-Subject: [PATCH] Fix address violation bug when disassembling a corrupt SH
- binary.
-
- PR binutils/21578
- * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
- flag value.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9744
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 6 ++++++
- bfd/elf32-sh.c | 2 +-
- 2 files changed, 7 insertions(+), 1 deletion(-)
-
-Index: git/bfd/elf32-sh.c
-===================================================================
---- git.orig/bfd/elf32-sh.c
-+++ git/bfd/elf32-sh.c
-@@ -6344,7 +6344,7 @@ sh_elf_set_mach_from_flags (bfd *abfd)
- {
- flagword flags = elf_elfheader (abfd)->e_flags & EF_SH_MACH_MASK;
-
-- if (flags >= sizeof(sh_ef_bfd_table))
-+ if (flags >= ARRAY_SIZE (sh_ef_bfd_table))
- return FALSE;
-
- if (sh_ef_bfd_table[flags] == 0)
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-06-14 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21578
-+ * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
-+ flag value.
-+
- 2017-04-29 Alan Modra <amodra@gmail.com>
-
- PR 21432
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9745.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9745.patch
deleted file mode 100644
index 0b3885b94..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9745.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 76800cba595efc3fe95a446c2d664e42ae4ee869 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 15 Jun 2017 12:08:57 +0100
-Subject: [PATCH] Handle EITR records in VMS Alpha binaries with overlarge
- command length parameters.
-
- PR binutils/21579
- * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9745
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 5 +++++
- bfd/vms-alpha.c | 16 ++++++++--------
- 2 files changed, 13 insertions(+), 8 deletions(-)
-
-Index: git/bfd/vms-alpha.c
-===================================================================
---- git.orig/bfd/vms-alpha.c
-+++ git/bfd/vms-alpha.c
-@@ -1741,6 +1741,12 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- _bfd_hexdump (8, ptr, cmd_length - 4, 0);
- #endif
-
-+#if VMS_DEBUG
-+ _bfd_vms_debug (4, "etir: %s(%d)\n",
-+ _bfd_vms_etir_name (cmd), cmd);
-+ _bfd_hexdump (8, ptr, cmd_length - 4, 0);
-+#endif
-+
- switch (cmd)
- {
- /* Stack global
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch
deleted file mode 100644
index bd4a40c35..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9746.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From ae87f7e73eba29bd38b3a9684a10b948ed715612 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Wed, 14 Jun 2017 16:50:03 +0100
-Subject: [PATCH] Fix address violation when disassembling a corrupt binary.
-
- PR binutils/21580
-binutils * objdump.c (disassemble_bytes): Check for buffer overrun when
- printing out rae insns.
-
-ld * testsuite/ld-nds32/diff.d: Adjust expected output.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9746
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- binutils/objdump.c | 27 +++++++++++++++------------
- ld/ChangeLog | 5 +++++
- ld/testsuite/ld-nds32/diff.d | 6 +++---
- 3 files changed, 23 insertions(+), 15 deletions(-)
-
-Index: git/binutils/objdump.c
-===================================================================
---- git.orig/binutils/objdump.c
-+++ git/binutils/objdump.c
-@@ -1855,20 +1855,23 @@ disassemble_bytes (struct disassemble_in
-
- for (j = addr_offset * opb; j < addr_offset * opb + pb; j += bpc)
- {
-- int k;
--
-- if (bpc > 1 && inf->display_endian == BFD_ENDIAN_LITTLE)
-- {
-- for (k = bpc - 1; k >= 0; k--)
-- printf ("%02x", (unsigned) data[j + k]);
-- putchar (' ');
-- }
-- else
-+ /* PR 21580: Check for a buffer ending early. */
-+ if (j + bpc <= stop_offset * opb)
- {
-- for (k = 0; k < bpc; k++)
-- printf ("%02x", (unsigned) data[j + k]);
-- putchar (' ');
-+ int k;
-+
-+ if (inf->display_endian == BFD_ENDIAN_LITTLE)
-+ {
-+ for (k = bpc - 1; k >= 0; k--)
-+ printf ("%02x", (unsigned) data[j + k]);
-+ }
-+ else
-+ {
-+ for (k = 0; k < bpc; k++)
-+ printf ("%02x", (unsigned) data[j + k]);
-+ }
- }
-+ putchar (' ');
- }
-
- for (; pb < octets_per_line; pb += bpc)
-Index: git/ld/testsuite/ld-nds32/diff.d
-===================================================================
---- git.orig/ld/testsuite/ld-nds32/diff.d
-+++ git/ld/testsuite/ld-nds32/diff.d
-@@ -7,9 +7,9 @@
-
- Disassembly of section .data:
- 00008000 <WORD> (7e 00 00 00|00 00 00 7e).*
--00008004 <HALF> (7e 00 7e fe|00 7e 7e fe).*
--00008006 <BYTE> 7e fe 00 fe.*
--00008007 <ULEB128> fe 00.*
-+00008004 <HALF> (7e 00|00 7e).*
-+00008006 <BYTE> 7e.*
-+00008007 <ULEB128> fe.*
- ...
- 00008009 <ULEB128_2> fe 00.*
- .*
-Index: git/ld/ChangeLog
-===================================================================
---- git.orig/ld/ChangeLog
-+++ git/ld/ChangeLog
-@@ -1,3 +1,8 @@
-+2017-06-14 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21580
-+ * testsuite/ld-nds32/diff.d: Adjust expected output.
-+
- 2017-03-07 Alan Modra <amodra@gmail.com>
-
- * ldlang.c (open_input_bfds): Check that lang_assignment_statement
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch
deleted file mode 100644
index 41ead54a9..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 62b76e4b6e0b4cb5b3e0053d1de4097b32577049 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 15 Jun 2017 13:08:47 +0100
-Subject: [PATCH] Fix address violation parsing a corrupt ieee binary.
-
- PR binutils/21581
- (ieee_archive_p): Use a static buffer to avoid compiler bugs.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9747
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 2 ++
- bfd/ieee.c | 2 +-
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-Index: git/bfd/ieee.c
-===================================================================
---- git.orig/bfd/ieee.c
-+++ git/bfd/ieee.c
-@@ -1357,7 +1357,7 @@ ieee_archive_p (bfd *abfd)
- {
- char *library;
- unsigned int i;
-- unsigned char buffer[512];
-+ static unsigned char buffer[512];
- file_ptr buffer_offset = 0;
- ieee_ar_data_type *save = abfd->tdata.ieee_ar_data;
- ieee_ar_data_type *ieee;
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,8 @@
-+2017-06-15 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21581
-+ (ieee_archive_p): Likewise.
-+
- 2017-06-14 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21578
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch
deleted file mode 100644
index 02070235a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 63634bb4a107877dd08b6282e28e11cfd1a1649e Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 15 Jun 2017 12:44:23 +0100
-Subject: [PATCH] Avoid a possible compiler bug by using a static buffer
- instead of a stack local buffer.
-
- PR binutils/21582
- * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
- bugs.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9748
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 6 ++++++
- bfd/ieee.c | 2 +-
- 2 files changed, 7 insertions(+), 1 deletion(-)
-
-Index: git/bfd/ieee.c
-===================================================================
---- git.orig/bfd/ieee.c
-+++ git/bfd/ieee.c
-@@ -1875,7 +1875,7 @@ ieee_object_p (bfd *abfd)
- char *processor;
- unsigned int part;
- ieee_data_type *ieee;
-- unsigned char buffer[300];
-+ static unsigned char buffer[300];
- ieee_data_type *save = IEEE_DATA (abfd);
- bfd_size_type amt;
-
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,5 +1,9 @@
- 2017-06-15 Nick Clifton <nickc@redhat.com>
-
-+ PR binutils/21582
-+ * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
-+ bugs.
-+
- PR binutils/21581
- (ieee_archive_p): Likewise.
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch
deleted file mode 100644
index 3cc2afc91..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9749.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 08c7881b814c546efc3996fd1decdf0877f7a779 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 15 Jun 2017 11:52:02 +0100
-Subject: [PATCH] Prevent invalid array accesses when disassembling a corrupt
- bfin binary.
-
- PR binutils/21586
- * bfin-dis.c (gregs): Clip index to prevent overflow.
- (regs): Likewise.
- (regs_lo): Likewise.
- (regs_hi): Likewise.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9749
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- opcodes/ChangeLog | 8 ++++++++
- opcodes/bfin-dis.c | 8 ++++----
- 2 files changed, 12 insertions(+), 4 deletions(-)
-
-Index: git/opcodes/ChangeLog
-===================================================================
---- git.orig/opcodes/ChangeLog
-+++ git/opcodes/ChangeLog
-@@ -1,3 +1,11 @@
-+2017-06-15 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21586
-+ * bfin-dis.c (gregs): Clip index to prevent overflow.
-+ (regs): Likewise.
-+ (regs_lo): Likewise.
-+ (regs_hi): Likewise.
-+
- 2017-06-14 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21576
-Index: git/opcodes/bfin-dis.c
-===================================================================
---- git.orig/opcodes/bfin-dis.c
-+++ git/opcodes/bfin-dis.c
-@@ -350,7 +350,7 @@ static const enum machine_registers deco
- REG_P0, REG_P1, REG_P2, REG_P3, REG_P4, REG_P5, REG_SP, REG_FP,
- };
-
--#define gregs(x, i) REGNAME (decode_gregs[((i) << 3) | (x)])
-+#define gregs(x, i) REGNAME (decode_gregs[(((i) << 3) | (x)) & 15])
-
- /* [dregs pregs (iregs mregs) (bregs lregs)]. */
- static const enum machine_registers decode_regs[] =
-@@ -361,7 +361,7 @@ static const enum machine_registers deco
- REG_B0, REG_B1, REG_B2, REG_B3, REG_L0, REG_L1, REG_L2, REG_L3,
- };
-
--#define regs(x, i) REGNAME (decode_regs[((i) << 3) | (x)])
-+#define regs(x, i) REGNAME (decode_regs[(((i) << 3) | (x)) & 31])
-
- /* [dregs pregs (iregs mregs) (bregs lregs) Low Half]. */
- static const enum machine_registers decode_regs_lo[] =
-@@ -372,7 +372,7 @@ static const enum machine_registers deco
- REG_BL0, REG_BL1, REG_BL2, REG_BL3, REG_LL0, REG_LL1, REG_LL2, REG_LL3,
- };
-
--#define regs_lo(x, i) REGNAME (decode_regs_lo[((i) << 3) | (x)])
-+#define regs_lo(x, i) REGNAME (decode_regs_lo[(((i) << 3) | (x)) & 31])
-
- /* [dregs pregs (iregs mregs) (bregs lregs) High Half]. */
- static const enum machine_registers decode_regs_hi[] =
-@@ -383,7 +383,7 @@ static const enum machine_registers deco
- REG_BH0, REG_BH1, REG_BH2, REG_BH3, REG_LH0, REG_LH1, REG_LH2, REG_LH3,
- };
-
--#define regs_hi(x, i) REGNAME (decode_regs_hi[((i) << 3) | (x)])
-+#define regs_hi(x, i) REGNAME (decode_regs_hi[(((i) << 3) | (x)) & 31])
-
- static const enum machine_registers decode_statbits[] =
- {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9750.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9750.patch
deleted file mode 100644
index fe8fa6934..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9750.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-From db5fa770268baf8cc82cf9b141d69799fd485fe2 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Wed, 14 Jun 2017 13:35:06 +0100
-Subject: [PATCH] Fix address violation problems when disassembling a corrupt
- RX binary.
-
- PR binutils/21587
- * rx-decode.opc: Include libiberty.h
- (GET_SCALE): New macro - validates access to SCALE array.
- (GET_PSCALE): New macro - validates access to PSCALE array.
- (DIs, SIs, S2Is, rx_disp): Use new macros.
- * rx-decode.c: Regenerate.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9750
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- opcodes/ChangeLog | 9 +++++++++
- opcodes/rx-decode.c | 24 ++++++++++++++----------
- opcodes/rx-decode.opc | 24 ++++++++++++++----------
- 3 files changed, 37 insertions(+), 20 deletions(-)
-
-Index: git/opcodes/rx-decode.c
-===================================================================
---- git.orig/opcodes/rx-decode.c
-+++ git/opcodes/rx-decode.c
-@@ -27,6 +27,7 @@
- #include <string.h>
- #include "ansidecl.h"
- #include "opcode/rx.h"
-+#include "libiberty.h"
-
- #define RX_OPCODE_BIG_ENDIAN 0
-
-@@ -45,7 +46,7 @@ static int trace = 0;
- #define LSIZE 2
-
- /* These are for when the upper bits are "don't care" or "undefined". */
--static int bwl[] =
-+static int bwl[4] =
- {
- RX_Byte,
- RX_Word,
-@@ -53,7 +54,7 @@ static int bwl[] =
- RX_Bad_Size /* Bogus instructions can have a size field set to 3. */
- };
-
--static int sbwl[] =
-+static int sbwl[4] =
- {
- RX_SByte,
- RX_SWord,
-@@ -61,7 +62,7 @@ static int sbwl[] =
- RX_Bad_Size /* Bogus instructions can have a size field set to 3. */
- };
-
--static int ubw[] =
-+static int ubw[4] =
- {
- RX_UByte,
- RX_UWord,
-@@ -69,7 +70,7 @@ static int ubw[] =
- RX_Bad_Size /* Bogus instructions can have a size field set to 3. */
- };
-
--static int memex[] =
-+static int memex[4] =
- {
- RX_SByte,
- RX_SWord,
-@@ -89,6 +90,9 @@ static int SCALE[] = { 1, 2, 4, 0 };
- /* This is for the prefix size enum. */
- static int PSCALE[] = { 4, 1, 1, 1, 2, 2, 2, 3, 4 };
-
-+#define GET_SCALE(_indx) ((unsigned)(_indx) < ARRAY_SIZE (SCALE) ? SCALE[(_indx)] : 0)
-+#define GET_PSCALE(_indx) ((unsigned)(_indx) < ARRAY_SIZE (PSCALE) ? PSCALE[(_indx)] : 0)
-+
- static int flagmap[] = {0, 1, 2, 3, 0, 0, 0, 0,
- 16, 17, 0, 0, 0, 0, 0, 0 };
-
-@@ -107,7 +111,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4,
- #define DC(c) OP (0, RX_Operand_Immediate, 0, c)
- #define DR(r) OP (0, RX_Operand_Register, r, 0)
- #define DI(r,a) OP (0, RX_Operand_Indirect, r, a)
--#define DIs(r,a,s) OP (0, RX_Operand_Indirect, r, (a) * SCALE[s])
-+#define DIs(r,a,s) OP (0, RX_Operand_Indirect, r, (a) * GET_SCALE (s))
- #define DD(t,r,s) rx_disp (0, t, r, bwl[s], ld);
- #define DF(r) OP (0, RX_Operand_Flag, flagmap[r], 0)
-
-@@ -115,7 +119,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4,
- #define SR(r) OP (1, RX_Operand_Register, r, 0)
- #define SRR(r) OP (1, RX_Operand_TwoReg, r, 0)
- #define SI(r,a) OP (1, RX_Operand_Indirect, r, a)
--#define SIs(r,a,s) OP (1, RX_Operand_Indirect, r, (a) * SCALE[s])
-+#define SIs(r,a,s) OP (1, RX_Operand_Indirect, r, (a) * GET_SCALE (s))
- #define SD(t,r,s) rx_disp (1, t, r, bwl[s], ld);
- #define SP(t,r) rx_disp (1, t, r, (t!=3) ? RX_UByte : RX_Long, ld); P(t, 1);
- #define SPm(t,r,m) rx_disp (1, t, r, memex[m], ld); rx->op[1].size = memex[m];
-@@ -124,7 +128,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4,
- #define S2C(i) OP (2, RX_Operand_Immediate, 0, i)
- #define S2R(r) OP (2, RX_Operand_Register, r, 0)
- #define S2I(r,a) OP (2, RX_Operand_Indirect, r, a)
--#define S2Is(r,a,s) OP (2, RX_Operand_Indirect, r, (a) * SCALE[s])
-+#define S2Is(r,a,s) OP (2, RX_Operand_Indirect, r, (a) * GET_SCALE (s))
- #define S2D(t,r,s) rx_disp (2, t, r, bwl[s], ld);
- #define S2P(t,r) rx_disp (2, t, r, (t!=3) ? RX_UByte : RX_Long, ld); P(t, 2);
- #define S2Pm(t,r,m) rx_disp (2, t, r, memex[m], ld); rx->op[2].size = memex[m];
-@@ -211,7 +215,7 @@ immediate (int sfield, int ex, LocalData
- }
-
- static void
--rx_disp (int n, int type, int reg, int size, LocalData * ld)
-+rx_disp (int n, int type, int reg, unsigned int size, LocalData * ld)
- {
- int disp;
-
-@@ -228,7 +232,7 @@ rx_disp (int n, int type, int reg, int s
- case 1:
- ld->rx->op[n].type = RX_Operand_Indirect;
- disp = GETBYTE ();
-- ld->rx->op[n].addend = disp * PSCALE[size];
-+ ld->rx->op[n].addend = disp * GET_PSCALE (size);
- break;
- case 2:
- ld->rx->op[n].type = RX_Operand_Indirect;
-@@ -238,7 +242,7 @@ rx_disp (int n, int type, int reg, int s
- #else
- disp = disp + GETBYTE () * 256;
- #endif
-- ld->rx->op[n].addend = disp * PSCALE[size];
-+ ld->rx->op[n].addend = disp * GET_PSCALE (size);
- break;
- default:
- abort ();
-Index: git/opcodes/rx-decode.opc
-===================================================================
---- git.orig/opcodes/rx-decode.opc
-+++ git/opcodes/rx-decode.opc
-@@ -26,6 +26,7 @@
- #include <string.h>
- #include "ansidecl.h"
- #include "opcode/rx.h"
-+#include "libiberty.h"
-
- #define RX_OPCODE_BIG_ENDIAN 0
-
-@@ -44,7 +45,7 @@ static int trace = 0;
- #define LSIZE 2
-
- /* These are for when the upper bits are "don't care" or "undefined". */
--static int bwl[] =
-+static int bwl[4] =
- {
- RX_Byte,
- RX_Word,
-@@ -52,7 +53,7 @@ static int bwl[] =
- RX_Bad_Size /* Bogus instructions can have a size field set to 3. */
- };
-
--static int sbwl[] =
-+static int sbwl[4] =
- {
- RX_SByte,
- RX_SWord,
-@@ -60,7 +61,7 @@ static int sbwl[] =
- RX_Bad_Size /* Bogus instructions can have a size field set to 3. */
- };
-
--static int ubw[] =
-+static int ubw[4] =
- {
- RX_UByte,
- RX_UWord,
-@@ -68,7 +69,7 @@ static int ubw[] =
- RX_Bad_Size /* Bogus instructions can have a size field set to 3. */
- };
-
--static int memex[] =
-+static int memex[4] =
- {
- RX_SByte,
- RX_SWord,
-@@ -88,6 +89,9 @@ static int SCALE[] = { 1, 2, 4, 0 };
- /* This is for the prefix size enum. */
- static int PSCALE[] = { 4, 1, 1, 1, 2, 2, 2, 3, 4 };
-
-+#define GET_SCALE(_indx) ((unsigned)(_indx) < ARRAY_SIZE (SCALE) ? SCALE[(_indx)] : 0)
-+#define GET_PSCALE(_indx) ((unsigned)(_indx) < ARRAY_SIZE (PSCALE) ? PSCALE[(_indx)] : 0)
-+
- static int flagmap[] = {0, 1, 2, 3, 0, 0, 0, 0,
- 16, 17, 0, 0, 0, 0, 0, 0 };
-
-@@ -106,7 +110,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4,
- #define DC(c) OP (0, RX_Operand_Immediate, 0, c)
- #define DR(r) OP (0, RX_Operand_Register, r, 0)
- #define DI(r,a) OP (0, RX_Operand_Indirect, r, a)
--#define DIs(r,a,s) OP (0, RX_Operand_Indirect, r, (a) * SCALE[s])
-+#define DIs(r,a,s) OP (0, RX_Operand_Indirect, r, (a) * GET_SCALE (s))
- #define DD(t,r,s) rx_disp (0, t, r, bwl[s], ld);
- #define DF(r) OP (0, RX_Operand_Flag, flagmap[r], 0)
-
-@@ -114,7 +118,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4,
- #define SR(r) OP (1, RX_Operand_Register, r, 0)
- #define SRR(r) OP (1, RX_Operand_TwoReg, r, 0)
- #define SI(r,a) OP (1, RX_Operand_Indirect, r, a)
--#define SIs(r,a,s) OP (1, RX_Operand_Indirect, r, (a) * SCALE[s])
-+#define SIs(r,a,s) OP (1, RX_Operand_Indirect, r, (a) * GET_SCALE (s))
- #define SD(t,r,s) rx_disp (1, t, r, bwl[s], ld);
- #define SP(t,r) rx_disp (1, t, r, (t!=3) ? RX_UByte : RX_Long, ld); P(t, 1);
- #define SPm(t,r,m) rx_disp (1, t, r, memex[m], ld); rx->op[1].size = memex[m];
-@@ -123,7 +127,7 @@ static int dsp3map[] = { 8, 9, 10, 3, 4,
- #define S2C(i) OP (2, RX_Operand_Immediate, 0, i)
- #define S2R(r) OP (2, RX_Operand_Register, r, 0)
- #define S2I(r,a) OP (2, RX_Operand_Indirect, r, a)
--#define S2Is(r,a,s) OP (2, RX_Operand_Indirect, r, (a) * SCALE[s])
-+#define S2Is(r,a,s) OP (2, RX_Operand_Indirect, r, (a) * GET_SCALE (s))
- #define S2D(t,r,s) rx_disp (2, t, r, bwl[s], ld);
- #define S2P(t,r) rx_disp (2, t, r, (t!=3) ? RX_UByte : RX_Long, ld); P(t, 2);
- #define S2Pm(t,r,m) rx_disp (2, t, r, memex[m], ld); rx->op[2].size = memex[m];
-@@ -210,7 +214,7 @@ immediate (int sfield, int ex, LocalData
- }
-
- static void
--rx_disp (int n, int type, int reg, int size, LocalData * ld)
-+rx_disp (int n, int type, int reg, unsigned int size, LocalData * ld)
- {
- int disp;
-
-@@ -227,7 +231,7 @@ rx_disp (int n, int type, int reg, int s
- case 1:
- ld->rx->op[n].type = RX_Operand_Indirect;
- disp = GETBYTE ();
-- ld->rx->op[n].addend = disp * PSCALE[size];
-+ ld->rx->op[n].addend = disp * GET_PSCALE (size);
- break;
- case 2:
- ld->rx->op[n].type = RX_Operand_Indirect;
-@@ -237,7 +241,7 @@ rx_disp (int n, int type, int reg, int s
- #else
- disp = disp + GETBYTE () * 256;
- #endif
-- ld->rx->op[n].addend = disp * PSCALE[size];
-+ ld->rx->op[n].addend = disp * GET_PSCALE (size);
- break;
- default:
- abort ();
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch
deleted file mode 100644
index d7c18cf85..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9751.patch
+++ /dev/null
@@ -1,3748 +0,0 @@
-From 63323b5b23bd83fa7b04ea00dff593c933e9b0e3 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 15 Jun 2017 12:37:01 +0100
-Subject: [PATCH] Fix address violation when disassembling a corrupt RL78
- binary.
-
- PR binutils/21588
- * rl78-decode.opc (OP_BUF_LEN): Define.
- (GETBYTE): Check for the index exceeding OP_BUF_LEN.
- (rl78_decode_opcode): Use OP_BUF_LEN as the length of the op_buf
- array.
- * rl78-decode.c: Regenerate.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9751
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- opcodes/ChangeLog | 9 +
- opcodes/rl78-decode.c | 820 ++++++++++++++++++++++++------------------------
- opcodes/rl78-decode.opc | 6 +-
- 3 files changed, 424 insertions(+), 411 deletions(-)
-
-diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
-index 34b1844..c77f00a 100644
---- a/opcodes/ChangeLog
-+++ b/opcodes/ChangeLog
-@@ -1,5 +1,14 @@
- 2017-06-15 Nick Clifton <nickc@redhat.com>
-
-+ PR binutils/21588
-+ * rl78-decode.opc (OP_BUF_LEN): Define.
-+ (GETBYTE): Check for the index exceeding OP_BUF_LEN.
-+ (rl78_decode_opcode): Use OP_BUF_LEN as the length of the op_buf
-+ array.
-+ * rl78-decode.c: Regenerate.
-+
-+2017-06-15 Nick Clifton <nickc@redhat.com>
-+
- PR binutils/21586
- * bfin-dis.c (gregs): Clip index to prevent overflow.
- (regs): Likewise.
-diff --git a/opcodes/rl78-decode.c b/opcodes/rl78-decode.c
-index d0566ea..b2d4bd6 100644
---- a/opcodes/rl78-decode.c
-+++ b/opcodes/rl78-decode.c
-@@ -51,7 +51,9 @@ typedef struct
- #define W() rl78->size = RL78_Word
-
- #define AU ATTRIBUTE_UNUSED
--#define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr))
-+
-+#define OP_BUF_LEN 20
-+#define GETBYTE() (ld->rl78->n_bytes < (OP_BUF_LEN - 1) ? ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr): 0)
- #define B ((unsigned long) GETBYTE())
-
- #define SYNTAX(x) rl78->syntax = x
-@@ -169,7 +171,7 @@ rl78_decode_opcode (unsigned long pc AU,
- RL78_Dis_Isa isa)
- {
- LocalData lds, * ld = &lds;
-- unsigned char op_buf[20] = {0};
-+ unsigned char op_buf[OP_BUF_LEN] = {0};
- unsigned char *op = op_buf;
- int op0, op1;
-
-@@ -201,7 +203,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("nop");
--#line 911 "rl78-decode.opc"
-+#line 913 "rl78-decode.opc"
- ID(nop);
-
- /*----------------------------------------------------------------------*/
-@@ -214,7 +216,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x07:
- {
- /** 0000 0rw1 addw %0, %1 */
--#line 274 "rl78-decode.opc"
-+#line 276 "rl78-decode.opc"
- int rw AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -224,7 +226,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rw = 0x%x\n", rw);
- }
- SYNTAX("addw %0, %1");
--#line 274 "rl78-decode.opc"
-+#line 276 "rl78-decode.opc"
- ID(add); W(); DR(AX); SRW(rw); Fzac;
-
- }
-@@ -239,7 +241,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addw %0, %e!1");
--#line 265 "rl78-decode.opc"
-+#line 267 "rl78-decode.opc"
- ID(add); W(); DR(AX); SM(None, IMMU(2)); Fzac;
-
- }
-@@ -254,7 +256,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addw %0, #%1");
--#line 271 "rl78-decode.opc"
-+#line 273 "rl78-decode.opc"
- ID(add); W(); DR(AX); SC(IMMU(2)); Fzac;
-
- }
-@@ -269,7 +271,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addw %0, %1");
--#line 277 "rl78-decode.opc"
-+#line 279 "rl78-decode.opc"
- ID(add); W(); DR(AX); SM(None, SADDR); Fzac;
-
- }
-@@ -284,7 +286,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("xch a, x");
--#line 1234 "rl78-decode.opc"
-+#line 1236 "rl78-decode.opc"
- ID(xch); DR(A); SR(X);
-
- /*----------------------------------------------------------------------*/
-@@ -301,7 +303,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %e1");
--#line 678 "rl78-decode.opc"
-+#line 680 "rl78-decode.opc"
- ID(mov); DR(A); SM(B, IMMU(2));
-
- }
-@@ -316,7 +318,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("add %0, #%1");
--#line 228 "rl78-decode.opc"
-+#line 230 "rl78-decode.opc"
- ID(add); DM(None, SADDR); SC(IMMU(1)); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -333,7 +335,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("add %0, %1");
--#line 222 "rl78-decode.opc"
-+#line 224 "rl78-decode.opc"
- ID(add); DR(A); SM(None, SADDR); Fzac;
-
- }
-@@ -348,7 +350,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("add %0, #%1");
--#line 216 "rl78-decode.opc"
-+#line 218 "rl78-decode.opc"
- ID(add); DR(A); SC(IMMU(1)); Fzac;
-
- }
-@@ -363,7 +365,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("add %0, %e1");
--#line 204 "rl78-decode.opc"
-+#line 206 "rl78-decode.opc"
- ID(add); DR(A); SM(HL, 0); Fzac;
-
- }
-@@ -378,7 +380,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("add %0, %ea1");
--#line 210 "rl78-decode.opc"
-+#line 212 "rl78-decode.opc"
- ID(add); DR(A); SM(HL, IMMU(1)); Fzac;
-
- }
-@@ -393,7 +395,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("add %0, %e!1");
--#line 201 "rl78-decode.opc"
-+#line 203 "rl78-decode.opc"
- ID(add); DR(A); SM(None, IMMU(2)); Fzac;
-
- }
-@@ -408,7 +410,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addw %0, #%1");
--#line 280 "rl78-decode.opc"
-+#line 282 "rl78-decode.opc"
- ID(add); W(); DR(SP); SC(IMMU(1)); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -425,7 +427,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("es:");
--#line 193 "rl78-decode.opc"
-+#line 195 "rl78-decode.opc"
- DE(); SE();
- op ++;
- pc ++;
-@@ -440,7 +442,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x16:
- {
- /** 0001 0ra0 movw %0, %1 */
--#line 859 "rl78-decode.opc"
-+#line 861 "rl78-decode.opc"
- int ra AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -450,7 +452,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" ra = 0x%x\n", ra);
- }
- SYNTAX("movw %0, %1");
--#line 859 "rl78-decode.opc"
-+#line 861 "rl78-decode.opc"
- ID(mov); W(); DRW(ra); SR(AX);
-
- }
-@@ -460,7 +462,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x17:
- {
- /** 0001 0ra1 movw %0, %1 */
--#line 856 "rl78-decode.opc"
-+#line 858 "rl78-decode.opc"
- int ra AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -470,7 +472,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" ra = 0x%x\n", ra);
- }
- SYNTAX("movw %0, %1");
--#line 856 "rl78-decode.opc"
-+#line 858 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SRW(ra);
-
- }
-@@ -485,7 +487,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e0, %1");
--#line 729 "rl78-decode.opc"
-+#line 731 "rl78-decode.opc"
- ID(mov); DM(B, IMMU(2)); SR(A);
-
- }
-@@ -500,7 +502,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e0, #%1");
--#line 726 "rl78-decode.opc"
-+#line 728 "rl78-decode.opc"
- ID(mov); DM(B, IMMU(2)); SC(IMMU(1));
-
- }
-@@ -515,7 +517,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addc %0, #%1");
--#line 260 "rl78-decode.opc"
-+#line 262 "rl78-decode.opc"
- ID(addc); DM(None, SADDR); SC(IMMU(1)); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -532,7 +534,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addc %0, %1");
--#line 257 "rl78-decode.opc"
-+#line 259 "rl78-decode.opc"
- ID(addc); DR(A); SM(None, SADDR); Fzac;
-
- }
-@@ -547,7 +549,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addc %0, #%1");
--#line 248 "rl78-decode.opc"
-+#line 250 "rl78-decode.opc"
- ID(addc); DR(A); SC(IMMU(1)); Fzac;
-
- }
-@@ -562,7 +564,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addc %0, %e1");
--#line 236 "rl78-decode.opc"
-+#line 238 "rl78-decode.opc"
- ID(addc); DR(A); SM(HL, 0); Fzac;
-
- }
-@@ -577,7 +579,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addc %0, %ea1");
--#line 245 "rl78-decode.opc"
-+#line 247 "rl78-decode.opc"
- ID(addc); DR(A); SM(HL, IMMU(1)); Fzac;
-
- }
-@@ -592,7 +594,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("addc %0, %e!1");
--#line 233 "rl78-decode.opc"
-+#line 235 "rl78-decode.opc"
- ID(addc); DR(A); SM(None, IMMU(2)); Fzac;
-
- }
-@@ -607,7 +609,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subw %0, #%1");
--#line 1198 "rl78-decode.opc"
-+#line 1200 "rl78-decode.opc"
- ID(sub); W(); DR(SP); SC(IMMU(1)); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -620,7 +622,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x27:
- {
- /** 0010 0rw1 subw %0, %1 */
--#line 1192 "rl78-decode.opc"
-+#line 1194 "rl78-decode.opc"
- int rw AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -630,7 +632,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rw = 0x%x\n", rw);
- }
- SYNTAX("subw %0, %1");
--#line 1192 "rl78-decode.opc"
-+#line 1194 "rl78-decode.opc"
- ID(sub); W(); DR(AX); SRW(rw); Fzac;
-
- }
-@@ -645,7 +647,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subw %0, %e!1");
--#line 1183 "rl78-decode.opc"
-+#line 1185 "rl78-decode.opc"
- ID(sub); W(); DR(AX); SM(None, IMMU(2)); Fzac;
-
- }
-@@ -660,7 +662,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subw %0, #%1");
--#line 1189 "rl78-decode.opc"
-+#line 1191 "rl78-decode.opc"
- ID(sub); W(); DR(AX); SC(IMMU(2)); Fzac;
-
- }
-@@ -675,7 +677,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subw %0, %1");
--#line 1195 "rl78-decode.opc"
-+#line 1197 "rl78-decode.opc"
- ID(sub); W(); DR(AX); SM(None, SADDR); Fzac;
-
- }
-@@ -690,7 +692,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e0, %1");
--#line 741 "rl78-decode.opc"
-+#line 743 "rl78-decode.opc"
- ID(mov); DM(C, IMMU(2)); SR(A);
-
- }
-@@ -705,7 +707,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %e1");
--#line 684 "rl78-decode.opc"
-+#line 686 "rl78-decode.opc"
- ID(mov); DR(A); SM(C, IMMU(2));
-
- }
-@@ -720,7 +722,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("sub %0, #%1");
--#line 1146 "rl78-decode.opc"
-+#line 1148 "rl78-decode.opc"
- ID(sub); DM(None, SADDR); SC(IMMU(1)); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -737,7 +739,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("sub %0, %1");
--#line 1140 "rl78-decode.opc"
-+#line 1142 "rl78-decode.opc"
- ID(sub); DR(A); SM(None, SADDR); Fzac;
-
- }
-@@ -752,7 +754,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("sub %0, #%1");
--#line 1134 "rl78-decode.opc"
-+#line 1136 "rl78-decode.opc"
- ID(sub); DR(A); SC(IMMU(1)); Fzac;
-
- }
-@@ -767,7 +769,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("sub %0, %e1");
--#line 1122 "rl78-decode.opc"
-+#line 1124 "rl78-decode.opc"
- ID(sub); DR(A); SM(HL, 0); Fzac;
-
- }
-@@ -782,7 +784,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("sub %0, %ea1");
--#line 1128 "rl78-decode.opc"
-+#line 1130 "rl78-decode.opc"
- ID(sub); DR(A); SM(HL, IMMU(1)); Fzac;
-
- }
-@@ -797,7 +799,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("sub %0, %e!1");
--#line 1119 "rl78-decode.opc"
-+#line 1121 "rl78-decode.opc"
- ID(sub); DR(A); SM(None, IMMU(2)); Fzac;
-
- }
-@@ -808,7 +810,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x36:
- {
- /** 0011 0rg0 movw %0, #%1 */
--#line 853 "rl78-decode.opc"
-+#line 855 "rl78-decode.opc"
- int rg AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -818,7 +820,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rg = 0x%x\n", rg);
- }
- SYNTAX("movw %0, #%1");
--#line 853 "rl78-decode.opc"
-+#line 855 "rl78-decode.opc"
- ID(mov); W(); DRW(rg); SC(IMMU(2));
-
- }
-@@ -830,7 +832,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x00:
- {
- /** 0011 0001 0bit 0000 btclr %s1, $%a0 */
--#line 416 "rl78-decode.opc"
-+#line 418 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -840,7 +842,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("btclr %s1, $%a0");
--#line 416 "rl78-decode.opc"
-+#line 418 "rl78-decode.opc"
- ID(branch_cond_clear); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
-
- /*----------------------------------------------------------------------*/
-@@ -850,7 +852,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x01:
- {
- /** 0011 0001 0bit 0001 btclr %1, $%a0 */
--#line 410 "rl78-decode.opc"
-+#line 412 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -860,7 +862,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("btclr %1, $%a0");
--#line 410 "rl78-decode.opc"
-+#line 412 "rl78-decode.opc"
- ID(branch_cond_clear); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T);
-
- }
-@@ -868,7 +870,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x02:
- {
- /** 0011 0001 0bit 0010 bt %s1, $%a0 */
--#line 402 "rl78-decode.opc"
-+#line 404 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -878,7 +880,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("bt %s1, $%a0");
--#line 402 "rl78-decode.opc"
-+#line 404 "rl78-decode.opc"
- ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
-
- /*----------------------------------------------------------------------*/
-@@ -888,7 +890,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x03:
- {
- /** 0011 0001 0bit 0011 bt %1, $%a0 */
--#line 396 "rl78-decode.opc"
-+#line 398 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -898,7 +900,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("bt %1, $%a0");
--#line 396 "rl78-decode.opc"
-+#line 398 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(T);
-
- }
-@@ -906,7 +908,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x04:
- {
- /** 0011 0001 0bit 0100 bf %s1, $%a0 */
--#line 363 "rl78-decode.opc"
-+#line 365 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -916,7 +918,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("bf %s1, $%a0");
--#line 363 "rl78-decode.opc"
-+#line 365 "rl78-decode.opc"
- ID(branch_cond); SM(None, SADDR); SB(bit); DC(pc+IMMS(1)+4); COND(F);
-
- /*----------------------------------------------------------------------*/
-@@ -926,7 +928,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x05:
- {
- /** 0011 0001 0bit 0101 bf %1, $%a0 */
--#line 357 "rl78-decode.opc"
-+#line 359 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -936,7 +938,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("bf %1, $%a0");
--#line 357 "rl78-decode.opc"
-+#line 359 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+3); SR(A); SB(bit); COND(F);
-
- }
-@@ -944,7 +946,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x07:
- {
- /** 0011 0001 0cnt 0111 shl %0, %1 */
--#line 1075 "rl78-decode.opc"
-+#line 1077 "rl78-decode.opc"
- int cnt AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -954,7 +956,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" cnt = 0x%x\n", cnt);
- }
- SYNTAX("shl %0, %1");
--#line 1075 "rl78-decode.opc"
-+#line 1077 "rl78-decode.opc"
- ID(shl); DR(C); SC(cnt);
-
- }
-@@ -962,7 +964,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x08:
- {
- /** 0011 0001 0cnt 1000 shl %0, %1 */
--#line 1072 "rl78-decode.opc"
-+#line 1074 "rl78-decode.opc"
- int cnt AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -972,7 +974,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" cnt = 0x%x\n", cnt);
- }
- SYNTAX("shl %0, %1");
--#line 1072 "rl78-decode.opc"
-+#line 1074 "rl78-decode.opc"
- ID(shl); DR(B); SC(cnt);
-
- }
-@@ -980,7 +982,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x09:
- {
- /** 0011 0001 0cnt 1001 shl %0, %1 */
--#line 1069 "rl78-decode.opc"
-+#line 1071 "rl78-decode.opc"
- int cnt AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -990,7 +992,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" cnt = 0x%x\n", cnt);
- }
- SYNTAX("shl %0, %1");
--#line 1069 "rl78-decode.opc"
-+#line 1071 "rl78-decode.opc"
- ID(shl); DR(A); SC(cnt);
-
- }
-@@ -998,7 +1000,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x0a:
- {
- /** 0011 0001 0cnt 1010 shr %0, %1 */
--#line 1086 "rl78-decode.opc"
-+#line 1088 "rl78-decode.opc"
- int cnt AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -1008,7 +1010,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" cnt = 0x%x\n", cnt);
- }
- SYNTAX("shr %0, %1");
--#line 1086 "rl78-decode.opc"
-+#line 1088 "rl78-decode.opc"
- ID(shr); DR(A); SC(cnt);
-
- }
-@@ -1016,7 +1018,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x0b:
- {
- /** 0011 0001 0cnt 1011 sar %0, %1 */
--#line 1033 "rl78-decode.opc"
-+#line 1035 "rl78-decode.opc"
- int cnt AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -1026,7 +1028,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" cnt = 0x%x\n", cnt);
- }
- SYNTAX("sar %0, %1");
--#line 1033 "rl78-decode.opc"
-+#line 1035 "rl78-decode.opc"
- ID(sar); DR(A); SC(cnt);
-
- }
-@@ -1035,7 +1037,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x8c:
- {
- /** 0011 0001 wcnt 1100 shlw %0, %1 */
--#line 1081 "rl78-decode.opc"
-+#line 1083 "rl78-decode.opc"
- int wcnt AU = (op[1] >> 4) & 0x0f;
- if (trace)
- {
-@@ -1045,7 +1047,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" wcnt = 0x%x\n", wcnt);
- }
- SYNTAX("shlw %0, %1");
--#line 1081 "rl78-decode.opc"
-+#line 1083 "rl78-decode.opc"
- ID(shl); W(); DR(BC); SC(wcnt);
-
- /*----------------------------------------------------------------------*/
-@@ -1056,7 +1058,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x8d:
- {
- /** 0011 0001 wcnt 1101 shlw %0, %1 */
--#line 1078 "rl78-decode.opc"
-+#line 1080 "rl78-decode.opc"
- int wcnt AU = (op[1] >> 4) & 0x0f;
- if (trace)
- {
-@@ -1066,7 +1068,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" wcnt = 0x%x\n", wcnt);
- }
- SYNTAX("shlw %0, %1");
--#line 1078 "rl78-decode.opc"
-+#line 1080 "rl78-decode.opc"
- ID(shl); W(); DR(AX); SC(wcnt);
-
- }
-@@ -1075,7 +1077,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x8e:
- {
- /** 0011 0001 wcnt 1110 shrw %0, %1 */
--#line 1089 "rl78-decode.opc"
-+#line 1091 "rl78-decode.opc"
- int wcnt AU = (op[1] >> 4) & 0x0f;
- if (trace)
- {
-@@ -1085,7 +1087,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" wcnt = 0x%x\n", wcnt);
- }
- SYNTAX("shrw %0, %1");
--#line 1089 "rl78-decode.opc"
-+#line 1091 "rl78-decode.opc"
- ID(shr); W(); DR(AX); SC(wcnt);
-
- /*----------------------------------------------------------------------*/
-@@ -1096,7 +1098,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x8f:
- {
- /** 0011 0001 wcnt 1111 sarw %0, %1 */
--#line 1036 "rl78-decode.opc"
-+#line 1038 "rl78-decode.opc"
- int wcnt AU = (op[1] >> 4) & 0x0f;
- if (trace)
- {
-@@ -1106,7 +1108,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" wcnt = 0x%x\n", wcnt);
- }
- SYNTAX("sarw %0, %1");
--#line 1036 "rl78-decode.opc"
-+#line 1038 "rl78-decode.opc"
- ID(sar); W(); DR(AX); SC(wcnt);
-
- /*----------------------------------------------------------------------*/
-@@ -1116,7 +1118,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x80:
- {
- /** 0011 0001 1bit 0000 btclr %s1, $%a0 */
--#line 413 "rl78-decode.opc"
-+#line 415 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -1126,7 +1128,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("btclr %s1, $%a0");
--#line 413 "rl78-decode.opc"
-+#line 415 "rl78-decode.opc"
- ID(branch_cond_clear); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
-
- }
-@@ -1134,7 +1136,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x81:
- {
- /** 0011 0001 1bit 0001 btclr %e1, $%a0 */
--#line 407 "rl78-decode.opc"
-+#line 409 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -1144,7 +1146,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("btclr %e1, $%a0");
--#line 407 "rl78-decode.opc"
-+#line 409 "rl78-decode.opc"
- ID(branch_cond_clear); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T);
-
- }
-@@ -1152,7 +1154,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x82:
- {
- /** 0011 0001 1bit 0010 bt %s1, $%a0 */
--#line 399 "rl78-decode.opc"
-+#line 401 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -1162,7 +1164,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("bt %s1, $%a0");
--#line 399 "rl78-decode.opc"
-+#line 401 "rl78-decode.opc"
- ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(T);
-
- }
-@@ -1170,7 +1172,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x83:
- {
- /** 0011 0001 1bit 0011 bt %e1, $%a0 */
--#line 393 "rl78-decode.opc"
-+#line 395 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -1180,7 +1182,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("bt %e1, $%a0");
--#line 393 "rl78-decode.opc"
-+#line 395 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(T);
-
- }
-@@ -1188,7 +1190,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x84:
- {
- /** 0011 0001 1bit 0100 bf %s1, $%a0 */
--#line 360 "rl78-decode.opc"
-+#line 362 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -1198,7 +1200,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("bf %s1, $%a0");
--#line 360 "rl78-decode.opc"
-+#line 362 "rl78-decode.opc"
- ID(branch_cond); SM(None, SFR); SB(bit); DC(pc+IMMS(1)+4); COND(F);
-
- }
-@@ -1206,7 +1208,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x85:
- {
- /** 0011 0001 1bit 0101 bf %e1, $%a0 */
--#line 354 "rl78-decode.opc"
-+#line 356 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -1216,7 +1218,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("bf %e1, $%a0");
--#line 354 "rl78-decode.opc"
-+#line 356 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+3); SM(HL,0); SB(bit); COND(F);
-
- }
-@@ -1229,7 +1231,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x37:
- {
- /** 0011 0ra1 xchw %0, %1 */
--#line 1239 "rl78-decode.opc"
-+#line 1241 "rl78-decode.opc"
- int ra AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -1239,7 +1241,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" ra = 0x%x\n", ra);
- }
- SYNTAX("xchw %0, %1");
--#line 1239 "rl78-decode.opc"
-+#line 1241 "rl78-decode.opc"
- ID(xch); W(); DR(AX); SRW(ra);
-
- /*----------------------------------------------------------------------*/
-@@ -1256,7 +1258,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e0, #%1");
--#line 738 "rl78-decode.opc"
-+#line 740 "rl78-decode.opc"
- ID(mov); DM(C, IMMU(2)); SC(IMMU(1));
-
- }
-@@ -1271,7 +1273,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e0, #%1");
--#line 732 "rl78-decode.opc"
-+#line 734 "rl78-decode.opc"
- ID(mov); DM(BC, IMMU(2)); SC(IMMU(1));
-
- }
-@@ -1286,7 +1288,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subc %0, #%1");
--#line 1178 "rl78-decode.opc"
-+#line 1180 "rl78-decode.opc"
- ID(subc); DM(None, SADDR); SC(IMMU(1)); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -1303,7 +1305,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subc %0, %1");
--#line 1175 "rl78-decode.opc"
-+#line 1177 "rl78-decode.opc"
- ID(subc); DR(A); SM(None, SADDR); Fzac;
-
- }
-@@ -1318,7 +1320,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subc %0, #%1");
--#line 1166 "rl78-decode.opc"
-+#line 1168 "rl78-decode.opc"
- ID(subc); DR(A); SC(IMMU(1)); Fzac;
-
- }
-@@ -1333,7 +1335,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subc %0, %e1");
--#line 1154 "rl78-decode.opc"
-+#line 1156 "rl78-decode.opc"
- ID(subc); DR(A); SM(HL, 0); Fzac;
-
- }
-@@ -1348,7 +1350,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subc %0, %ea1");
--#line 1163 "rl78-decode.opc"
-+#line 1165 "rl78-decode.opc"
- ID(subc); DR(A); SM(HL, IMMU(1)); Fzac;
-
- }
-@@ -1363,7 +1365,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("subc %0, %e!1");
--#line 1151 "rl78-decode.opc"
-+#line 1153 "rl78-decode.opc"
- ID(subc); DR(A); SM(None, IMMU(2)); Fzac;
-
- }
-@@ -1378,7 +1380,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmp %e!0, #%1");
--#line 480 "rl78-decode.opc"
-+#line 482 "rl78-decode.opc"
- ID(cmp); DM(None, IMMU(2)); SC(IMMU(1)); Fzac;
-
- }
-@@ -1393,7 +1395,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, #%1");
--#line 717 "rl78-decode.opc"
-+#line 719 "rl78-decode.opc"
- ID(mov); DR(ES); SC(IMMU(1));
-
- }
-@@ -1408,7 +1410,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmpw %0, %e!1");
--#line 531 "rl78-decode.opc"
-+#line 533 "rl78-decode.opc"
- ID(cmp); W(); DR(AX); SM(None, IMMU(2)); Fzac;
-
- }
-@@ -1418,7 +1420,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x47:
- {
- /** 0100 0ra1 cmpw %0, %1 */
--#line 540 "rl78-decode.opc"
-+#line 542 "rl78-decode.opc"
- int ra AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -1428,7 +1430,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" ra = 0x%x\n", ra);
- }
- SYNTAX("cmpw %0, %1");
--#line 540 "rl78-decode.opc"
-+#line 542 "rl78-decode.opc"
- ID(cmp); W(); DR(AX); SRW(ra); Fzac;
-
- }
-@@ -1443,7 +1445,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmpw %0, #%1");
--#line 537 "rl78-decode.opc"
-+#line 539 "rl78-decode.opc"
- ID(cmp); W(); DR(AX); SC(IMMU(2)); Fzac;
-
- }
-@@ -1458,7 +1460,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmpw %0, %1");
--#line 543 "rl78-decode.opc"
-+#line 545 "rl78-decode.opc"
- ID(cmp); W(); DR(AX); SM(None, SADDR); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -1475,7 +1477,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e0, %1");
--#line 735 "rl78-decode.opc"
-+#line 737 "rl78-decode.opc"
- ID(mov); DM(BC, IMMU(2)); SR(A);
-
- }
-@@ -1490,7 +1492,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %e1");
--#line 681 "rl78-decode.opc"
-+#line 683 "rl78-decode.opc"
- ID(mov); DR(A); SM(BC, IMMU(2));
-
- }
-@@ -1505,7 +1507,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmp %0, #%1");
--#line 483 "rl78-decode.opc"
-+#line 485 "rl78-decode.opc"
- ID(cmp); DM(None, SADDR); SC(IMMU(1)); Fzac;
-
- }
-@@ -1520,7 +1522,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmp %0, %1");
--#line 510 "rl78-decode.opc"
-+#line 512 "rl78-decode.opc"
- ID(cmp); DR(A); SM(None, SADDR); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -1537,7 +1539,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmp %0, #%1");
--#line 501 "rl78-decode.opc"
-+#line 503 "rl78-decode.opc"
- ID(cmp); DR(A); SC(IMMU(1)); Fzac;
-
- }
-@@ -1552,7 +1554,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmp %0, %e1");
--#line 489 "rl78-decode.opc"
-+#line 491 "rl78-decode.opc"
- ID(cmp); DR(A); SM(HL, 0); Fzac;
-
- }
-@@ -1567,7 +1569,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmp %0, %ea1");
--#line 498 "rl78-decode.opc"
-+#line 500 "rl78-decode.opc"
- ID(cmp); DR(A); SM(HL, IMMU(1)); Fzac;
-
- }
-@@ -1582,7 +1584,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmp %0, %e!1");
--#line 486 "rl78-decode.opc"
-+#line 488 "rl78-decode.opc"
- ID(cmp); DR(A); SM(None, IMMU(2)); Fzac;
-
- }
-@@ -1597,7 +1599,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x57:
- {
- /** 0101 0reg mov %0, #%1 */
--#line 669 "rl78-decode.opc"
-+#line 671 "rl78-decode.opc"
- int reg AU = op[0] & 0x07;
- if (trace)
- {
-@@ -1607,7 +1609,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("mov %0, #%1");
--#line 669 "rl78-decode.opc"
-+#line 671 "rl78-decode.opc"
- ID(mov); DRB(reg); SC(IMMU(1));
-
- }
-@@ -1622,7 +1624,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %e0, %1");
--#line 871 "rl78-decode.opc"
-+#line 873 "rl78-decode.opc"
- ID(mov); W(); DM(B, IMMU(2)); SR(AX);
-
- }
-@@ -1637,7 +1639,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %e1");
--#line 862 "rl78-decode.opc"
-+#line 864 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(B, IMMU(2));
-
- }
-@@ -1652,7 +1654,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("and %0, #%1");
--#line 312 "rl78-decode.opc"
-+#line 314 "rl78-decode.opc"
- ID(and); DM(None, SADDR); SC(IMMU(1)); Fz;
-
- /*----------------------------------------------------------------------*/
-@@ -1669,7 +1671,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("and %0, %1");
--#line 309 "rl78-decode.opc"
-+#line 311 "rl78-decode.opc"
- ID(and); DR(A); SM(None, SADDR); Fz;
-
- }
-@@ -1684,7 +1686,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("and %0, #%1");
--#line 300 "rl78-decode.opc"
-+#line 302 "rl78-decode.opc"
- ID(and); DR(A); SC(IMMU(1)); Fz;
-
- }
-@@ -1699,7 +1701,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("and %0, %e1");
--#line 288 "rl78-decode.opc"
-+#line 290 "rl78-decode.opc"
- ID(and); DR(A); SM(HL, 0); Fz;
-
- }
-@@ -1714,7 +1716,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("and %0, %ea1");
--#line 294 "rl78-decode.opc"
-+#line 296 "rl78-decode.opc"
- ID(and); DR(A); SM(HL, IMMU(1)); Fz;
-
- }
-@@ -1729,7 +1731,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("and %0, %e!1");
--#line 285 "rl78-decode.opc"
-+#line 287 "rl78-decode.opc"
- ID(and); DR(A); SM(None, IMMU(2)); Fz;
-
- }
-@@ -1743,7 +1745,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x67:
- {
- /** 0110 0rba mov %0, %1 */
--#line 672 "rl78-decode.opc"
-+#line 674 "rl78-decode.opc"
- int rba AU = op[0] & 0x07;
- if (trace)
- {
-@@ -1753,7 +1755,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("mov %0, %1");
--#line 672 "rl78-decode.opc"
-+#line 674 "rl78-decode.opc"
- ID(mov); DR(A); SRB(rba);
-
- }
-@@ -1772,7 +1774,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x07:
- {
- /** 0110 0001 0000 0reg add %0, %1 */
--#line 225 "rl78-decode.opc"
-+#line 227 "rl78-decode.opc"
- int reg AU = op[1] & 0x07;
- if (trace)
- {
-@@ -1782,7 +1784,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("add %0, %1");
--#line 225 "rl78-decode.opc"
-+#line 227 "rl78-decode.opc"
- ID(add); DRB(reg); SR(A); Fzac;
-
- }
-@@ -1796,7 +1798,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x0f:
- {
- /** 0110 0001 0000 1rba add %0, %1 */
--#line 219 "rl78-decode.opc"
-+#line 221 "rl78-decode.opc"
- int rba AU = op[1] & 0x07;
- if (trace)
- {
-@@ -1806,7 +1808,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("add %0, %1");
--#line 219 "rl78-decode.opc"
-+#line 221 "rl78-decode.opc"
- ID(add); DR(A); SRB(rba); Fzac;
-
- }
-@@ -1821,7 +1823,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("addw %0, %ea1");
--#line 268 "rl78-decode.opc"
-+#line 270 "rl78-decode.opc"
- ID(add); W(); DR(AX); SM(HL, IMMU(1)); Fzac;
-
- }
-@@ -1836,7 +1838,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x17:
- {
- /** 0110 0001 0001 0reg addc %0, %1 */
--#line 254 "rl78-decode.opc"
-+#line 256 "rl78-decode.opc"
- int reg AU = op[1] & 0x07;
- if (trace)
- {
-@@ -1846,7 +1848,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("addc %0, %1");
--#line 254 "rl78-decode.opc"
-+#line 256 "rl78-decode.opc"
- ID(addc); DRB(reg); SR(A); Fzac;
-
- }
-@@ -1860,7 +1862,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x1f:
- {
- /** 0110 0001 0001 1rba addc %0, %1 */
--#line 251 "rl78-decode.opc"
-+#line 253 "rl78-decode.opc"
- int rba AU = op[1] & 0x07;
- if (trace)
- {
-@@ -1870,7 +1872,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("addc %0, %1");
--#line 251 "rl78-decode.opc"
-+#line 253 "rl78-decode.opc"
- ID(addc); DR(A); SRB(rba); Fzac;
-
- }
-@@ -1885,7 +1887,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x27:
- {
- /** 0110 0001 0010 0reg sub %0, %1 */
--#line 1143 "rl78-decode.opc"
-+#line 1145 "rl78-decode.opc"
- int reg AU = op[1] & 0x07;
- if (trace)
- {
-@@ -1895,7 +1897,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("sub %0, %1");
--#line 1143 "rl78-decode.opc"
-+#line 1145 "rl78-decode.opc"
- ID(sub); DRB(reg); SR(A); Fzac;
-
- }
-@@ -1909,7 +1911,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x2f:
- {
- /** 0110 0001 0010 1rba sub %0, %1 */
--#line 1137 "rl78-decode.opc"
-+#line 1139 "rl78-decode.opc"
- int rba AU = op[1] & 0x07;
- if (trace)
- {
-@@ -1919,7 +1921,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("sub %0, %1");
--#line 1137 "rl78-decode.opc"
-+#line 1139 "rl78-decode.opc"
- ID(sub); DR(A); SRB(rba); Fzac;
-
- }
-@@ -1934,7 +1936,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("subw %0, %ea1");
--#line 1186 "rl78-decode.opc"
-+#line 1188 "rl78-decode.opc"
- ID(sub); W(); DR(AX); SM(HL, IMMU(1)); Fzac;
-
- }
-@@ -1949,7 +1951,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x37:
- {
- /** 0110 0001 0011 0reg subc %0, %1 */
--#line 1172 "rl78-decode.opc"
-+#line 1174 "rl78-decode.opc"
- int reg AU = op[1] & 0x07;
- if (trace)
- {
-@@ -1959,7 +1961,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("subc %0, %1");
--#line 1172 "rl78-decode.opc"
-+#line 1174 "rl78-decode.opc"
- ID(subc); DRB(reg); SR(A); Fzac;
-
- }
-@@ -1973,7 +1975,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x3f:
- {
- /** 0110 0001 0011 1rba subc %0, %1 */
--#line 1169 "rl78-decode.opc"
-+#line 1171 "rl78-decode.opc"
- int rba AU = op[1] & 0x07;
- if (trace)
- {
-@@ -1983,7 +1985,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("subc %0, %1");
--#line 1169 "rl78-decode.opc"
-+#line 1171 "rl78-decode.opc"
- ID(subc); DR(A); SRB(rba); Fzac;
-
- }
-@@ -1998,7 +2000,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x47:
- {
- /** 0110 0001 0100 0reg cmp %0, %1 */
--#line 507 "rl78-decode.opc"
-+#line 509 "rl78-decode.opc"
- int reg AU = op[1] & 0x07;
- if (trace)
- {
-@@ -2008,7 +2010,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("cmp %0, %1");
--#line 507 "rl78-decode.opc"
-+#line 509 "rl78-decode.opc"
- ID(cmp); DRB(reg); SR(A); Fzac;
-
- }
-@@ -2022,7 +2024,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x4f:
- {
- /** 0110 0001 0100 1rba cmp %0, %1 */
--#line 504 "rl78-decode.opc"
-+#line 506 "rl78-decode.opc"
- int rba AU = op[1] & 0x07;
- if (trace)
- {
-@@ -2032,7 +2034,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("cmp %0, %1");
--#line 504 "rl78-decode.opc"
-+#line 506 "rl78-decode.opc"
- ID(cmp); DR(A); SRB(rba); Fzac;
-
- }
-@@ -2047,7 +2049,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("cmpw %0, %ea1");
--#line 534 "rl78-decode.opc"
-+#line 536 "rl78-decode.opc"
- ID(cmp); W(); DR(AX); SM(HL, IMMU(1)); Fzac;
-
- }
-@@ -2062,7 +2064,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x57:
- {
- /** 0110 0001 0101 0reg and %0, %1 */
--#line 306 "rl78-decode.opc"
-+#line 308 "rl78-decode.opc"
- int reg AU = op[1] & 0x07;
- if (trace)
- {
-@@ -2072,7 +2074,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("and %0, %1");
--#line 306 "rl78-decode.opc"
-+#line 308 "rl78-decode.opc"
- ID(and); DRB(reg); SR(A); Fz;
-
- }
-@@ -2086,7 +2088,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x5f:
- {
- /** 0110 0001 0101 1rba and %0, %1 */
--#line 303 "rl78-decode.opc"
-+#line 305 "rl78-decode.opc"
- int rba AU = op[1] & 0x07;
- if (trace)
- {
-@@ -2096,7 +2098,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("and %0, %1");
--#line 303 "rl78-decode.opc"
-+#line 305 "rl78-decode.opc"
- ID(and); DR(A); SRB(rba); Fz;
-
- }
-@@ -2111,7 +2113,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("inc %ea0");
--#line 584 "rl78-decode.opc"
-+#line 586 "rl78-decode.opc"
- ID(add); DM(HL, IMMU(1)); SC(1); Fza;
-
- }
-@@ -2126,7 +2128,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x67:
- {
- /** 0110 0001 0110 0reg or %0, %1 */
--#line 961 "rl78-decode.opc"
-+#line 963 "rl78-decode.opc"
- int reg AU = op[1] & 0x07;
- if (trace)
- {
-@@ -2136,7 +2138,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("or %0, %1");
--#line 961 "rl78-decode.opc"
-+#line 963 "rl78-decode.opc"
- ID(or); DRB(reg); SR(A); Fz;
-
- }
-@@ -2150,7 +2152,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x6f:
- {
- /** 0110 0001 0110 1rba or %0, %1 */
--#line 958 "rl78-decode.opc"
-+#line 960 "rl78-decode.opc"
- int rba AU = op[1] & 0x07;
- if (trace)
- {
-@@ -2160,7 +2162,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("or %0, %1");
--#line 958 "rl78-decode.opc"
-+#line 960 "rl78-decode.opc"
- ID(or); DR(A); SRB(rba); Fz;
-
- }
-@@ -2175,7 +2177,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("dec %ea0");
--#line 551 "rl78-decode.opc"
-+#line 553 "rl78-decode.opc"
- ID(sub); DM(HL, IMMU(1)); SC(1); Fza;
-
- }
-@@ -2190,7 +2192,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x77:
- {
- /** 0110 0001 0111 0reg xor %0, %1 */
--#line 1265 "rl78-decode.opc"
-+#line 1267 "rl78-decode.opc"
- int reg AU = op[1] & 0x07;
- if (trace)
- {
-@@ -2200,7 +2202,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("xor %0, %1");
--#line 1265 "rl78-decode.opc"
-+#line 1267 "rl78-decode.opc"
- ID(xor); DRB(reg); SR(A); Fz;
-
- }
-@@ -2214,7 +2216,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x7f:
- {
- /** 0110 0001 0111 1rba xor %0, %1 */
--#line 1262 "rl78-decode.opc"
-+#line 1264 "rl78-decode.opc"
- int rba AU = op[1] & 0x07;
- if (trace)
- {
-@@ -2224,7 +2226,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("xor %0, %1");
--#line 1262 "rl78-decode.opc"
-+#line 1264 "rl78-decode.opc"
- ID(xor); DR(A); SRB(rba); Fz;
-
- }
-@@ -2239,7 +2241,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("incw %ea0");
--#line 598 "rl78-decode.opc"
-+#line 600 "rl78-decode.opc"
- ID(add); W(); DM(HL, IMMU(1)); SC(1);
-
- }
-@@ -2255,7 +2257,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("add %0, %e1");
--#line 207 "rl78-decode.opc"
-+#line 209 "rl78-decode.opc"
- ID(add); DR(A); SM2(HL, B, 0); Fzac;
-
- }
-@@ -2270,7 +2272,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("add %0, %e1");
--#line 213 "rl78-decode.opc"
-+#line 215 "rl78-decode.opc"
- ID(add); DR(A); SM2(HL, C, 0); Fzac;
-
- }
-@@ -2309,9 +2311,9 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf7:
- {
- /** 0110 0001 1nnn 01mm callt [%x0] */
--#line 433 "rl78-decode.opc"
-+#line 435 "rl78-decode.opc"
- int nnn AU = (op[1] >> 4) & 0x07;
--#line 433 "rl78-decode.opc"
-+#line 435 "rl78-decode.opc"
- int mm AU = op[1] & 0x03;
- if (trace)
- {
-@@ -2322,7 +2324,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" mm = 0x%x\n", mm);
- }
- SYNTAX("callt [%x0]");
--#line 433 "rl78-decode.opc"
-+#line 435 "rl78-decode.opc"
- ID(call); DM(None, 0x80 + mm*16 + nnn*2);
-
- /*----------------------------------------------------------------------*/
-@@ -2338,7 +2340,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x8f:
- {
- /** 0110 0001 1000 1reg xch %0, %1 */
--#line 1224 "rl78-decode.opc"
-+#line 1226 "rl78-decode.opc"
- int reg AU = op[1] & 0x07;
- if (trace)
- {
-@@ -2348,7 +2350,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("xch %0, %1");
--#line 1224 "rl78-decode.opc"
-+#line 1226 "rl78-decode.opc"
- /* Note: DECW uses reg == X, so this must follow DECW */
- ID(xch); DR(A); SRB(reg);
-
-@@ -2364,7 +2366,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("decw %ea0");
--#line 565 "rl78-decode.opc"
-+#line 567 "rl78-decode.opc"
- ID(sub); W(); DM(HL, IMMU(1)); SC(1);
-
- }
-@@ -2379,7 +2381,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("addc %0, %e1");
--#line 239 "rl78-decode.opc"
-+#line 241 "rl78-decode.opc"
- ID(addc); DR(A); SM2(HL, B, 0); Fzac;
-
- }
-@@ -2394,7 +2396,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("addc %0, %e1");
--#line 242 "rl78-decode.opc"
-+#line 244 "rl78-decode.opc"
- ID(addc); DR(A); SM2(HL, C, 0); Fzac;
-
- }
-@@ -2410,7 +2412,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("sub %0, %e1");
--#line 1125 "rl78-decode.opc"
-+#line 1127 "rl78-decode.opc"
- ID(sub); DR(A); SM2(HL, B, 0); Fzac;
-
- }
-@@ -2425,7 +2427,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("sub %0, %e1");
--#line 1131 "rl78-decode.opc"
-+#line 1133 "rl78-decode.opc"
- ID(sub); DR(A); SM2(HL, C, 0); Fzac;
-
- }
-@@ -2440,7 +2442,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xch %0, %1");
--#line 1228 "rl78-decode.opc"
-+#line 1230 "rl78-decode.opc"
- ID(xch); DR(A); SM(None, SADDR);
-
- }
-@@ -2455,7 +2457,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xch %0, %e1");
--#line 1221 "rl78-decode.opc"
-+#line 1223 "rl78-decode.opc"
- ID(xch); DR(A); SM2(HL, C, 0);
-
- }
-@@ -2470,7 +2472,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xch %0, %e!1");
--#line 1203 "rl78-decode.opc"
-+#line 1205 "rl78-decode.opc"
- ID(xch); DR(A); SM(None, IMMU(2));
-
- }
-@@ -2485,7 +2487,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xch %0, %s1");
--#line 1231 "rl78-decode.opc"
-+#line 1233 "rl78-decode.opc"
- ID(xch); DR(A); SM(None, SFR);
-
- }
-@@ -2500,7 +2502,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xch %0, %e1");
--#line 1212 "rl78-decode.opc"
-+#line 1214 "rl78-decode.opc"
- ID(xch); DR(A); SM(HL, 0);
-
- }
-@@ -2515,7 +2517,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xch %0, %ea1");
--#line 1218 "rl78-decode.opc"
-+#line 1220 "rl78-decode.opc"
- ID(xch); DR(A); SM(HL, IMMU(1));
-
- }
-@@ -2530,7 +2532,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xch %0, %e1");
--#line 1206 "rl78-decode.opc"
-+#line 1208 "rl78-decode.opc"
- ID(xch); DR(A); SM(DE, 0);
-
- }
-@@ -2545,7 +2547,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xch %0, %ea1");
--#line 1209 "rl78-decode.opc"
-+#line 1211 "rl78-decode.opc"
- ID(xch); DR(A); SM(DE, IMMU(1));
-
- }
-@@ -2560,7 +2562,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("subc %0, %e1");
--#line 1157 "rl78-decode.opc"
-+#line 1159 "rl78-decode.opc"
- ID(subc); DR(A); SM2(HL, B, 0); Fzac;
-
- }
-@@ -2575,7 +2577,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("subc %0, %e1");
--#line 1160 "rl78-decode.opc"
-+#line 1162 "rl78-decode.opc"
- ID(subc); DR(A); SM2(HL, C, 0); Fzac;
-
- }
-@@ -2590,7 +2592,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("mov %0, %1");
--#line 723 "rl78-decode.opc"
-+#line 725 "rl78-decode.opc"
- ID(mov); DR(ES); SM(None, SADDR);
-
- }
-@@ -2605,7 +2607,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xch %0, %e1");
--#line 1215 "rl78-decode.opc"
-+#line 1217 "rl78-decode.opc"
- ID(xch); DR(A); SM2(HL, B, 0);
-
- }
-@@ -2620,7 +2622,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("cmp %0, %e1");
--#line 492 "rl78-decode.opc"
-+#line 494 "rl78-decode.opc"
- ID(cmp); DR(A); SM2(HL, B, 0); Fzac;
-
- }
-@@ -2635,7 +2637,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("cmp %0, %e1");
--#line 495 "rl78-decode.opc"
-+#line 497 "rl78-decode.opc"
- ID(cmp); DR(A); SM2(HL, C, 0); Fzac;
-
- }
-@@ -2650,7 +2652,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("bh $%a0");
--#line 340 "rl78-decode.opc"
-+#line 342 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(H);
-
- }
-@@ -2665,7 +2667,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("sk%c1");
--#line 1094 "rl78-decode.opc"
-+#line 1096 "rl78-decode.opc"
- ID(skip); COND(C);
-
- }
-@@ -2680,7 +2682,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("mov %0, %e1");
--#line 660 "rl78-decode.opc"
-+#line 662 "rl78-decode.opc"
- ID(mov); DR(A); SM2(HL, B, 0);
-
- }
-@@ -2691,7 +2693,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xfa:
- {
- /** 0110 0001 11rg 1010 call %0 */
--#line 430 "rl78-decode.opc"
-+#line 432 "rl78-decode.opc"
- int rg AU = (op[1] >> 4) & 0x03;
- if (trace)
- {
-@@ -2701,7 +2703,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rg = 0x%x\n", rg);
- }
- SYNTAX("call %0");
--#line 430 "rl78-decode.opc"
-+#line 432 "rl78-decode.opc"
- ID(call); DRW(rg);
-
- }
-@@ -2716,7 +2718,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("br ax");
--#line 380 "rl78-decode.opc"
-+#line 382 "rl78-decode.opc"
- ID(branch); DR(AX);
-
- /*----------------------------------------------------------------------*/
-@@ -2733,7 +2735,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("brk");
--#line 388 "rl78-decode.opc"
-+#line 390 "rl78-decode.opc"
- ID(break);
-
- /*----------------------------------------------------------------------*/
-@@ -2750,7 +2752,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("pop %s0");
--#line 989 "rl78-decode.opc"
-+#line 991 "rl78-decode.opc"
- ID(mov); W(); DR(PSW); SPOP();
-
- /*----------------------------------------------------------------------*/
-@@ -2767,7 +2769,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("movs %ea0, %1");
--#line 811 "rl78-decode.opc"
-+#line 813 "rl78-decode.opc"
- ID(mov); DM(HL, IMMU(1)); SR(X); Fzc;
-
- /*----------------------------------------------------------------------*/
-@@ -2780,7 +2782,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xff:
- {
- /** 0110 0001 11rb 1111 sel rb%1 */
--#line 1041 "rl78-decode.opc"
-+#line 1043 "rl78-decode.opc"
- int rb AU = (op[1] >> 4) & 0x03;
- if (trace)
- {
-@@ -2790,7 +2792,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rb = 0x%x\n", rb);
- }
- SYNTAX("sel rb%1");
--#line 1041 "rl78-decode.opc"
-+#line 1043 "rl78-decode.opc"
- ID(sel); SC(rb);
-
- /*----------------------------------------------------------------------*/
-@@ -2807,7 +2809,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("and %0, %e1");
--#line 291 "rl78-decode.opc"
-+#line 293 "rl78-decode.opc"
- ID(and); DR(A); SM2(HL, B, 0); Fz;
-
- }
-@@ -2822,7 +2824,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("and %0, %e1");
--#line 297 "rl78-decode.opc"
-+#line 299 "rl78-decode.opc"
- ID(and); DR(A); SM2(HL, C, 0); Fz;
-
- }
-@@ -2837,7 +2839,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("bnh $%a0");
--#line 343 "rl78-decode.opc"
-+#line 345 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+3); SR(None); COND(NH);
-
- }
-@@ -2852,7 +2854,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("sk%c1");
--#line 1100 "rl78-decode.opc"
-+#line 1102 "rl78-decode.opc"
- ID(skip); COND(NC);
-
- }
-@@ -2867,7 +2869,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("mov %e0, %1");
--#line 627 "rl78-decode.opc"
-+#line 629 "rl78-decode.opc"
- ID(mov); DM2(HL, B, 0); SR(A);
-
- }
-@@ -2882,7 +2884,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("ror %0, %1");
--#line 1022 "rl78-decode.opc"
-+#line 1024 "rl78-decode.opc"
- ID(ror); DR(A); SC(1);
-
- }
-@@ -2897,7 +2899,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("rolc %0, %1");
--#line 1016 "rl78-decode.opc"
-+#line 1018 "rl78-decode.opc"
- ID(rolc); DR(A); SC(1);
-
- }
-@@ -2912,7 +2914,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("push %s1");
--#line 997 "rl78-decode.opc"
-+#line 999 "rl78-decode.opc"
- ID(mov); W(); DPUSH(); SR(PSW);
-
- /*----------------------------------------------------------------------*/
-@@ -2929,7 +2931,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("cmps %0, %ea1");
--#line 526 "rl78-decode.opc"
-+#line 528 "rl78-decode.opc"
- ID(cmp); DR(X); SM(HL, IMMU(1)); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -2946,7 +2948,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("or %0, %e1");
--#line 946 "rl78-decode.opc"
-+#line 948 "rl78-decode.opc"
- ID(or); DR(A); SM2(HL, B, 0); Fz;
-
- }
-@@ -2961,7 +2963,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("or %0, %e1");
--#line 952 "rl78-decode.opc"
-+#line 954 "rl78-decode.opc"
- ID(or); DR(A); SM2(HL, C, 0); Fz;
-
- }
-@@ -2976,7 +2978,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("sk%c1");
--#line 1097 "rl78-decode.opc"
-+#line 1099 "rl78-decode.opc"
- ID(skip); COND(H);
-
- }
-@@ -2991,7 +2993,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("sk%c1");
--#line 1109 "rl78-decode.opc"
-+#line 1111 "rl78-decode.opc"
- ID(skip); COND(Z);
-
- /*----------------------------------------------------------------------*/
-@@ -3008,7 +3010,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("mov %0, %e1");
--#line 663 "rl78-decode.opc"
-+#line 665 "rl78-decode.opc"
- ID(mov); DR(A); SM2(HL, C, 0);
-
- }
-@@ -3023,7 +3025,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("rol %0, %1");
--#line 1013 "rl78-decode.opc"
-+#line 1015 "rl78-decode.opc"
- ID(rol); DR(A); SC(1);
-
- }
-@@ -3038,7 +3040,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("retb");
--#line 1008 "rl78-decode.opc"
-+#line 1010 "rl78-decode.opc"
- ID(reti);
-
- /*----------------------------------------------------------------------*/
-@@ -3055,7 +3057,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("halt");
--#line 576 "rl78-decode.opc"
-+#line 578 "rl78-decode.opc"
- ID(halt);
-
- /*----------------------------------------------------------------------*/
-@@ -3066,7 +3068,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xfe:
- {
- /** 0110 0001 111r 1110 rolwc %0, %1 */
--#line 1019 "rl78-decode.opc"
-+#line 1021 "rl78-decode.opc"
- int r AU = (op[1] >> 4) & 0x01;
- if (trace)
- {
-@@ -3076,7 +3078,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" r = 0x%x\n", r);
- }
- SYNTAX("rolwc %0, %1");
--#line 1019 "rl78-decode.opc"
-+#line 1021 "rl78-decode.opc"
- ID(rolc); W(); DRW(r); SC(1);
-
- }
-@@ -3091,7 +3093,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xor %0, %e1");
--#line 1250 "rl78-decode.opc"
-+#line 1252 "rl78-decode.opc"
- ID(xor); DR(A); SM2(HL, B, 0); Fz;
-
- }
-@@ -3106,7 +3108,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("xor %0, %e1");
--#line 1256 "rl78-decode.opc"
-+#line 1258 "rl78-decode.opc"
- ID(xor); DR(A); SM2(HL, C, 0); Fz;
-
- }
-@@ -3121,7 +3123,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("sk%c1");
--#line 1103 "rl78-decode.opc"
-+#line 1105 "rl78-decode.opc"
- ID(skip); COND(NH);
-
- }
-@@ -3136,7 +3138,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("sk%c1");
--#line 1106 "rl78-decode.opc"
-+#line 1108 "rl78-decode.opc"
- ID(skip); COND(NZ);
-
- }
-@@ -3151,7 +3153,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("mov %e0, %1");
--#line 636 "rl78-decode.opc"
-+#line 638 "rl78-decode.opc"
- ID(mov); DM2(HL, C, 0); SR(A);
-
- }
-@@ -3166,7 +3168,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("rorc %0, %1");
--#line 1025 "rl78-decode.opc"
-+#line 1027 "rl78-decode.opc"
- ID(rorc); DR(A); SC(1);
-
- /*----------------------------------------------------------------------*/
-@@ -3186,7 +3188,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("reti");
--#line 1005 "rl78-decode.opc"
-+#line 1007 "rl78-decode.opc"
- ID(reti);
-
- }
-@@ -3201,7 +3203,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("stop");
--#line 1114 "rl78-decode.opc"
-+#line 1116 "rl78-decode.opc"
- ID(stop);
-
- /*----------------------------------------------------------------------*/
-@@ -3221,7 +3223,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %e0, %1");
--#line 874 "rl78-decode.opc"
-+#line 876 "rl78-decode.opc"
- ID(mov); W(); DM(C, IMMU(2)); SR(AX);
-
- }
-@@ -3236,7 +3238,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %e1");
--#line 865 "rl78-decode.opc"
-+#line 867 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(C, IMMU(2));
-
- }
-@@ -3251,7 +3253,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("or %0, #%1");
--#line 967 "rl78-decode.opc"
-+#line 969 "rl78-decode.opc"
- ID(or); DM(None, SADDR); SC(IMMU(1)); Fz;
-
- /*----------------------------------------------------------------------*/
-@@ -3268,7 +3270,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("or %0, %1");
--#line 964 "rl78-decode.opc"
-+#line 966 "rl78-decode.opc"
- ID(or); DR(A); SM(None, SADDR); Fz;
-
- }
-@@ -3283,7 +3285,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("or %0, #%1");
--#line 955 "rl78-decode.opc"
-+#line 957 "rl78-decode.opc"
- ID(or); DR(A); SC(IMMU(1)); Fz;
-
- }
-@@ -3298,7 +3300,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("or %0, %e1");
--#line 943 "rl78-decode.opc"
-+#line 945 "rl78-decode.opc"
- ID(or); DR(A); SM(HL, 0); Fz;
-
- }
-@@ -3313,7 +3315,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("or %0, %ea1");
--#line 949 "rl78-decode.opc"
-+#line 951 "rl78-decode.opc"
- ID(or); DR(A); SM(HL, IMMU(1)); Fz;
-
- }
-@@ -3328,7 +3330,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("or %0, %e!1");
--#line 940 "rl78-decode.opc"
-+#line 942 "rl78-decode.opc"
- ID(or); DR(A); SM(None, IMMU(2)); Fz;
-
- }
-@@ -3342,7 +3344,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x77:
- {
- /** 0111 0rba mov %0, %1 */
--#line 696 "rl78-decode.opc"
-+#line 698 "rl78-decode.opc"
- int rba AU = op[0] & 0x07;
- if (trace)
- {
-@@ -3352,7 +3354,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rba = 0x%x\n", rba);
- }
- SYNTAX("mov %0, %1");
--#line 696 "rl78-decode.opc"
-+#line 698 "rl78-decode.opc"
- ID(mov); DRB(rba); SR(A);
-
- }
-@@ -3371,7 +3373,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x70:
- {
- /** 0111 0001 0bit 0000 set1 %e!0 */
--#line 1046 "rl78-decode.opc"
-+#line 1048 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3381,7 +3383,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("set1 %e!0");
--#line 1046 "rl78-decode.opc"
-+#line 1048 "rl78-decode.opc"
- ID(mov); DM(None, IMMU(2)); DB(bit); SC(1);
-
- }
-@@ -3396,7 +3398,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x71:
- {
- /** 0111 0001 0bit 0001 mov1 %0, cy */
--#line 803 "rl78-decode.opc"
-+#line 805 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3406,7 +3408,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("mov1 %0, cy");
--#line 803 "rl78-decode.opc"
-+#line 805 "rl78-decode.opc"
- ID(mov); DM(None, SADDR); DB(bit); SCY();
-
- }
-@@ -3421,7 +3423,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x72:
- {
- /** 0111 0001 0bit 0010 set1 %0 */
--#line 1064 "rl78-decode.opc"
-+#line 1066 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3431,7 +3433,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("set1 %0");
--#line 1064 "rl78-decode.opc"
-+#line 1066 "rl78-decode.opc"
- ID(mov); DM(None, SADDR); DB(bit); SC(1);
-
- /*----------------------------------------------------------------------*/
-@@ -3448,7 +3450,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x73:
- {
- /** 0111 0001 0bit 0011 clr1 %0 */
--#line 456 "rl78-decode.opc"
-+#line 458 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3458,7 +3460,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("clr1 %0");
--#line 456 "rl78-decode.opc"
-+#line 458 "rl78-decode.opc"
- ID(mov); DM(None, SADDR); DB(bit); SC(0);
-
- /*----------------------------------------------------------------------*/
-@@ -3475,7 +3477,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x74:
- {
- /** 0111 0001 0bit 0100 mov1 cy, %1 */
--#line 797 "rl78-decode.opc"
-+#line 799 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3485,7 +3487,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("mov1 cy, %1");
--#line 797 "rl78-decode.opc"
-+#line 799 "rl78-decode.opc"
- ID(mov); DCY(); SM(None, SADDR); SB(bit);
-
- }
-@@ -3500,7 +3502,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x75:
- {
- /** 0111 0001 0bit 0101 and1 cy, %s1 */
--#line 326 "rl78-decode.opc"
-+#line 328 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3510,7 +3512,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("and1 cy, %s1");
--#line 326 "rl78-decode.opc"
-+#line 328 "rl78-decode.opc"
- ID(and); DCY(); SM(None, SADDR); SB(bit);
-
- /*----------------------------------------------------------------------*/
-@@ -3530,7 +3532,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x76:
- {
- /** 0111 0001 0bit 0110 or1 cy, %s1 */
--#line 981 "rl78-decode.opc"
-+#line 983 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3540,7 +3542,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("or1 cy, %s1");
--#line 981 "rl78-decode.opc"
-+#line 983 "rl78-decode.opc"
- ID(or); DCY(); SM(None, SADDR); SB(bit);
-
- /*----------------------------------------------------------------------*/
-@@ -3557,7 +3559,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x77:
- {
- /** 0111 0001 0bit 0111 xor1 cy, %s1 */
--#line 1285 "rl78-decode.opc"
-+#line 1287 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3567,7 +3569,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("xor1 cy, %s1");
--#line 1285 "rl78-decode.opc"
-+#line 1287 "rl78-decode.opc"
- ID(xor); DCY(); SM(None, SADDR); SB(bit);
-
- /*----------------------------------------------------------------------*/
-@@ -3584,7 +3586,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x78:
- {
- /** 0111 0001 0bit 1000 clr1 %e!0 */
--#line 438 "rl78-decode.opc"
-+#line 440 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3594,7 +3596,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("clr1 %e!0");
--#line 438 "rl78-decode.opc"
-+#line 440 "rl78-decode.opc"
- ID(mov); DM(None, IMMU(2)); DB(bit); SC(0);
-
- }
-@@ -3609,7 +3611,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x79:
- {
- /** 0111 0001 0bit 1001 mov1 %s0, cy */
--#line 806 "rl78-decode.opc"
-+#line 808 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3619,7 +3621,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("mov1 %s0, cy");
--#line 806 "rl78-decode.opc"
-+#line 808 "rl78-decode.opc"
- ID(mov); DM(None, SFR); DB(bit); SCY();
-
- /*----------------------------------------------------------------------*/
-@@ -3636,7 +3638,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x7a:
- {
- /** 0111 0001 0bit 1010 set1 %s0 */
--#line 1058 "rl78-decode.opc"
-+#line 1060 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3646,7 +3648,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("set1 %s0");
--#line 1058 "rl78-decode.opc"
-+#line 1060 "rl78-decode.opc"
- op0 = SFR;
- ID(mov); DM(None, op0); DB(bit); SC(1);
- if (op0 == RL78_SFR_PSW && bit == 7)
-@@ -3664,7 +3666,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x7b:
- {
- /** 0111 0001 0bit 1011 clr1 %s0 */
--#line 450 "rl78-decode.opc"
-+#line 452 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3674,7 +3676,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("clr1 %s0");
--#line 450 "rl78-decode.opc"
-+#line 452 "rl78-decode.opc"
- op0 = SFR;
- ID(mov); DM(None, op0); DB(bit); SC(0);
- if (op0 == RL78_SFR_PSW && bit == 7)
-@@ -3692,7 +3694,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x7c:
- {
- /** 0111 0001 0bit 1100 mov1 cy, %s1 */
--#line 800 "rl78-decode.opc"
-+#line 802 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3702,7 +3704,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("mov1 cy, %s1");
--#line 800 "rl78-decode.opc"
-+#line 802 "rl78-decode.opc"
- ID(mov); DCY(); SM(None, SFR); SB(bit);
-
- }
-@@ -3717,7 +3719,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x7d:
- {
- /** 0111 0001 0bit 1101 and1 cy, %s1 */
--#line 323 "rl78-decode.opc"
-+#line 325 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3727,7 +3729,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("and1 cy, %s1");
--#line 323 "rl78-decode.opc"
-+#line 325 "rl78-decode.opc"
- ID(and); DCY(); SM(None, SFR); SB(bit);
-
- }
-@@ -3742,7 +3744,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x7e:
- {
- /** 0111 0001 0bit 1110 or1 cy, %s1 */
--#line 978 "rl78-decode.opc"
-+#line 980 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3752,7 +3754,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("or1 cy, %s1");
--#line 978 "rl78-decode.opc"
-+#line 980 "rl78-decode.opc"
- ID(or); DCY(); SM(None, SFR); SB(bit);
-
- }
-@@ -3767,7 +3769,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x7f:
- {
- /** 0111 0001 0bit 1111 xor1 cy, %s1 */
--#line 1282 "rl78-decode.opc"
-+#line 1284 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3777,7 +3779,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("xor1 cy, %s1");
--#line 1282 "rl78-decode.opc"
-+#line 1284 "rl78-decode.opc"
- ID(xor); DCY(); SM(None, SFR); SB(bit);
-
- }
-@@ -3792,7 +3794,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("set1 cy");
--#line 1055 "rl78-decode.opc"
-+#line 1057 "rl78-decode.opc"
- ID(mov); DCY(); SC(1);
-
- }
-@@ -3807,7 +3809,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf1:
- {
- /** 0111 0001 1bit 0001 mov1 %e0, cy */
--#line 785 "rl78-decode.opc"
-+#line 787 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3817,7 +3819,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("mov1 %e0, cy");
--#line 785 "rl78-decode.opc"
-+#line 787 "rl78-decode.opc"
- ID(mov); DM(HL, 0); DB(bit); SCY();
-
- }
-@@ -3832,7 +3834,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf2:
- {
- /** 0111 0001 1bit 0010 set1 %e0 */
--#line 1049 "rl78-decode.opc"
-+#line 1051 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3842,7 +3844,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("set1 %e0");
--#line 1049 "rl78-decode.opc"
-+#line 1051 "rl78-decode.opc"
- ID(mov); DM(HL, 0); DB(bit); SC(1);
-
- }
-@@ -3857,7 +3859,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf3:
- {
- /** 0111 0001 1bit 0011 clr1 %e0 */
--#line 441 "rl78-decode.opc"
-+#line 443 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3867,7 +3869,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("clr1 %e0");
--#line 441 "rl78-decode.opc"
-+#line 443 "rl78-decode.opc"
- ID(mov); DM(HL, 0); DB(bit); SC(0);
-
- }
-@@ -3882,7 +3884,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf4:
- {
- /** 0111 0001 1bit 0100 mov1 cy, %e1 */
--#line 791 "rl78-decode.opc"
-+#line 793 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3892,7 +3894,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("mov1 cy, %e1");
--#line 791 "rl78-decode.opc"
-+#line 793 "rl78-decode.opc"
- ID(mov); DCY(); SM(HL, 0); SB(bit);
-
- }
-@@ -3907,7 +3909,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf5:
- {
- /** 0111 0001 1bit 0101 and1 cy, %e1 */
--#line 317 "rl78-decode.opc"
-+#line 319 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3917,7 +3919,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("and1 cy, %e1");
--#line 317 "rl78-decode.opc"
-+#line 319 "rl78-decode.opc"
- ID(and); DCY(); SM(HL, 0); SB(bit);
-
- }
-@@ -3932,7 +3934,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf6:
- {
- /** 0111 0001 1bit 0110 or1 cy, %e1 */
--#line 972 "rl78-decode.opc"
-+#line 974 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3942,7 +3944,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("or1 cy, %e1");
--#line 972 "rl78-decode.opc"
-+#line 974 "rl78-decode.opc"
- ID(or); DCY(); SM(HL, 0); SB(bit);
-
- }
-@@ -3957,7 +3959,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf7:
- {
- /** 0111 0001 1bit 0111 xor1 cy, %e1 */
--#line 1276 "rl78-decode.opc"
-+#line 1278 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -3967,7 +3969,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("xor1 cy, %e1");
--#line 1276 "rl78-decode.opc"
-+#line 1278 "rl78-decode.opc"
- ID(xor); DCY(); SM(HL, 0); SB(bit);
-
- }
-@@ -3982,7 +3984,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("clr1 cy");
--#line 447 "rl78-decode.opc"
-+#line 449 "rl78-decode.opc"
- ID(mov); DCY(); SC(0);
-
- }
-@@ -3997,7 +3999,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf9:
- {
- /** 0111 0001 1bit 1001 mov1 %e0, cy */
--#line 788 "rl78-decode.opc"
-+#line 790 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -4007,7 +4009,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("mov1 %e0, cy");
--#line 788 "rl78-decode.opc"
-+#line 790 "rl78-decode.opc"
- ID(mov); DR(A); DB(bit); SCY();
-
- }
-@@ -4022,7 +4024,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xfa:
- {
- /** 0111 0001 1bit 1010 set1 %0 */
--#line 1052 "rl78-decode.opc"
-+#line 1054 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -4032,7 +4034,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("set1 %0");
--#line 1052 "rl78-decode.opc"
-+#line 1054 "rl78-decode.opc"
- ID(mov); DR(A); DB(bit); SC(1);
-
- }
-@@ -4047,7 +4049,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xfb:
- {
- /** 0111 0001 1bit 1011 clr1 %0 */
--#line 444 "rl78-decode.opc"
-+#line 446 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -4057,7 +4059,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("clr1 %0");
--#line 444 "rl78-decode.opc"
-+#line 446 "rl78-decode.opc"
- ID(mov); DR(A); DB(bit); SC(0);
-
- }
-@@ -4072,7 +4074,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xfc:
- {
- /** 0111 0001 1bit 1100 mov1 cy, %e1 */
--#line 794 "rl78-decode.opc"
-+#line 796 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -4082,7 +4084,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("mov1 cy, %e1");
--#line 794 "rl78-decode.opc"
-+#line 796 "rl78-decode.opc"
- ID(mov); DCY(); SR(A); SB(bit);
-
- }
-@@ -4097,7 +4099,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xfd:
- {
- /** 0111 0001 1bit 1101 and1 cy, %1 */
--#line 320 "rl78-decode.opc"
-+#line 322 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -4107,7 +4109,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("and1 cy, %1");
--#line 320 "rl78-decode.opc"
-+#line 322 "rl78-decode.opc"
- ID(and); DCY(); SR(A); SB(bit);
-
- }
-@@ -4122,7 +4124,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xfe:
- {
- /** 0111 0001 1bit 1110 or1 cy, %1 */
--#line 975 "rl78-decode.opc"
-+#line 977 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -4132,7 +4134,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("or1 cy, %1");
--#line 975 "rl78-decode.opc"
-+#line 977 "rl78-decode.opc"
- ID(or); DCY(); SR(A); SB(bit);
-
- }
-@@ -4147,7 +4149,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xff:
- {
- /** 0111 0001 1bit 1111 xor1 cy, %1 */
--#line 1279 "rl78-decode.opc"
-+#line 1281 "rl78-decode.opc"
- int bit AU = (op[1] >> 4) & 0x07;
- if (trace)
- {
-@@ -4157,7 +4159,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" bit = 0x%x\n", bit);
- }
- SYNTAX("xor1 cy, %1");
--#line 1279 "rl78-decode.opc"
-+#line 1281 "rl78-decode.opc"
- ID(xor); DCY(); SR(A); SB(bit);
-
- }
-@@ -4172,7 +4174,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0], op[1]);
- }
- SYNTAX("not1 cy");
--#line 916 "rl78-decode.opc"
-+#line 918 "rl78-decode.opc"
- ID(xor); DCY(); SC(1);
-
- /*----------------------------------------------------------------------*/
-@@ -4192,7 +4194,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %e0, %1");
--#line 877 "rl78-decode.opc"
-+#line 879 "rl78-decode.opc"
- ID(mov); W(); DM(BC, IMMU(2)); SR(AX);
-
- }
-@@ -4207,7 +4209,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %e1");
--#line 868 "rl78-decode.opc"
-+#line 870 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(BC, IMMU(2));
-
- }
-@@ -4222,7 +4224,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("xor %0, #%1");
--#line 1271 "rl78-decode.opc"
-+#line 1273 "rl78-decode.opc"
- ID(xor); DM(None, SADDR); SC(IMMU(1)); Fz;
-
- /*----------------------------------------------------------------------*/
-@@ -4239,7 +4241,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("xor %0, %1");
--#line 1268 "rl78-decode.opc"
-+#line 1270 "rl78-decode.opc"
- ID(xor); DR(A); SM(None, SADDR); Fz;
-
- }
-@@ -4254,7 +4256,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("xor %0, #%1");
--#line 1259 "rl78-decode.opc"
-+#line 1261 "rl78-decode.opc"
- ID(xor); DR(A); SC(IMMU(1)); Fz;
-
- }
-@@ -4269,7 +4271,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("xor %0, %e1");
--#line 1247 "rl78-decode.opc"
-+#line 1249 "rl78-decode.opc"
- ID(xor); DR(A); SM(HL, 0); Fz;
-
- }
-@@ -4284,7 +4286,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("xor %0, %ea1");
--#line 1253 "rl78-decode.opc"
-+#line 1255 "rl78-decode.opc"
- ID(xor); DR(A); SM(HL, IMMU(1)); Fz;
-
- }
-@@ -4299,7 +4301,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("xor %0, %e!1");
--#line 1244 "rl78-decode.opc"
-+#line 1246 "rl78-decode.opc"
- ID(xor); DR(A); SM(None, IMMU(2)); Fz;
-
- }
-@@ -4314,7 +4316,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x87:
- {
- /** 1000 0reg inc %0 */
--#line 587 "rl78-decode.opc"
-+#line 589 "rl78-decode.opc"
- int reg AU = op[0] & 0x07;
- if (trace)
- {
-@@ -4324,7 +4326,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("inc %0");
--#line 587 "rl78-decode.opc"
-+#line 589 "rl78-decode.opc"
- ID(add); DRB(reg); SC(1); Fza;
-
- }
-@@ -4339,7 +4341,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %ea1");
--#line 666 "rl78-decode.opc"
-+#line 668 "rl78-decode.opc"
- ID(mov); DR(A); SM(SP, IMMU(1));
-
- }
-@@ -4354,7 +4356,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %e1");
--#line 648 "rl78-decode.opc"
-+#line 650 "rl78-decode.opc"
- ID(mov); DR(A); SM(DE, 0);
-
- }
-@@ -4369,7 +4371,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %ea1");
--#line 651 "rl78-decode.opc"
-+#line 653 "rl78-decode.opc"
- ID(mov); DR(A); SM(DE, IMMU(1));
-
- }
-@@ -4384,7 +4386,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %e1");
--#line 654 "rl78-decode.opc"
-+#line 656 "rl78-decode.opc"
- ID(mov); DR(A); SM(HL, 0);
-
- }
-@@ -4399,7 +4401,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %ea1");
--#line 657 "rl78-decode.opc"
-+#line 659 "rl78-decode.opc"
- ID(mov); DR(A); SM(HL, IMMU(1));
-
- }
-@@ -4414,7 +4416,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %1");
--#line 690 "rl78-decode.opc"
-+#line 692 "rl78-decode.opc"
- ID(mov); DR(A); SM(None, SADDR);
-
- }
-@@ -4429,7 +4431,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %s1");
--#line 687 "rl78-decode.opc"
-+#line 689 "rl78-decode.opc"
- ID(mov); DR(A); SM(None, SFR);
-
- }
-@@ -4444,7 +4446,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %e!1");
--#line 645 "rl78-decode.opc"
-+#line 647 "rl78-decode.opc"
- ID(mov); DR(A); SM(None, IMMU(2));
-
- }
-@@ -4459,7 +4461,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0x97:
- {
- /** 1001 0reg dec %0 */
--#line 554 "rl78-decode.opc"
-+#line 556 "rl78-decode.opc"
- int reg AU = op[0] & 0x07;
- if (trace)
- {
-@@ -4469,7 +4471,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" reg = 0x%x\n", reg);
- }
- SYNTAX("dec %0");
--#line 554 "rl78-decode.opc"
-+#line 556 "rl78-decode.opc"
- ID(sub); DRB(reg); SC(1); Fza;
-
- }
-@@ -4484,7 +4486,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %a0, %1");
--#line 642 "rl78-decode.opc"
-+#line 644 "rl78-decode.opc"
- ID(mov); DM(SP, IMMU(1)); SR(A);
-
- }
-@@ -4499,7 +4501,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e0, %1");
--#line 615 "rl78-decode.opc"
-+#line 617 "rl78-decode.opc"
- ID(mov); DM(DE, 0); SR(A);
-
- }
-@@ -4514,7 +4516,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %ea0, %1");
--#line 621 "rl78-decode.opc"
-+#line 623 "rl78-decode.opc"
- ID(mov); DM(DE, IMMU(1)); SR(A);
-
- }
-@@ -4529,7 +4531,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e0, %1");
--#line 624 "rl78-decode.opc"
-+#line 626 "rl78-decode.opc"
- ID(mov); DM(HL, 0); SR(A);
-
- }
-@@ -4544,7 +4546,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %ea0, %1");
--#line 633 "rl78-decode.opc"
-+#line 635 "rl78-decode.opc"
- ID(mov); DM(HL, IMMU(1)); SR(A);
-
- }
-@@ -4559,7 +4561,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %1");
--#line 747 "rl78-decode.opc"
-+#line 749 "rl78-decode.opc"
- ID(mov); DM(None, SADDR); SR(A);
-
- }
-@@ -4574,7 +4576,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %s0, %1");
--#line 780 "rl78-decode.opc"
-+#line 782 "rl78-decode.opc"
- ID(mov); DM(None, SFR); SR(A);
-
- /*----------------------------------------------------------------------*/
-@@ -4591,7 +4593,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e!0, %1");
--#line 612 "rl78-decode.opc"
-+#line 614 "rl78-decode.opc"
- ID(mov); DM(None, IMMU(2)); SR(A);
-
- }
-@@ -4606,7 +4608,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("inc %e!0");
--#line 581 "rl78-decode.opc"
-+#line 583 "rl78-decode.opc"
- ID(add); DM(None, IMMU(2)); SC(1); Fza;
-
- }
-@@ -4617,7 +4619,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xa7:
- {
- /** 1010 0rg1 incw %0 */
--#line 601 "rl78-decode.opc"
-+#line 603 "rl78-decode.opc"
- int rg AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -4627,7 +4629,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rg = 0x%x\n", rg);
- }
- SYNTAX("incw %0");
--#line 601 "rl78-decode.opc"
-+#line 603 "rl78-decode.opc"
- ID(add); W(); DRW(rg); SC(1);
-
- }
-@@ -4642,7 +4644,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("incw %e!0");
--#line 595 "rl78-decode.opc"
-+#line 597 "rl78-decode.opc"
- ID(add); W(); DM(None, IMMU(2)); SC(1);
-
- }
-@@ -4657,7 +4659,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("inc %0");
--#line 590 "rl78-decode.opc"
-+#line 592 "rl78-decode.opc"
- ID(add); DM(None, SADDR); SC(1); Fza;
-
- /*----------------------------------------------------------------------*/
-@@ -4674,7 +4676,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("incw %0");
--#line 604 "rl78-decode.opc"
-+#line 606 "rl78-decode.opc"
- ID(add); W(); DM(None, SADDR); SC(1);
-
- /*----------------------------------------------------------------------*/
-@@ -4691,7 +4693,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %a1");
--#line 850 "rl78-decode.opc"
-+#line 852 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(SP, IMMU(1));
-
- }
-@@ -4706,7 +4708,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %e1");
--#line 838 "rl78-decode.opc"
-+#line 840 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(DE, 0);
-
- }
-@@ -4721,7 +4723,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %ea1");
--#line 841 "rl78-decode.opc"
-+#line 843 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(DE, IMMU(1));
-
- }
-@@ -4736,7 +4738,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %e1");
--#line 844 "rl78-decode.opc"
-+#line 846 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(HL, 0);
-
- }
-@@ -4751,7 +4753,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %ea1");
--#line 847 "rl78-decode.opc"
-+#line 849 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(HL, IMMU(1));
-
- }
-@@ -4766,7 +4768,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %1");
--#line 880 "rl78-decode.opc"
-+#line 882 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(None, SADDR);
-
- }
-@@ -4781,7 +4783,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %s1");
--#line 883 "rl78-decode.opc"
-+#line 885 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(None, SFR);
-
- }
-@@ -4796,7 +4798,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %e!1");
--#line 834 "rl78-decode.opc"
-+#line 836 "rl78-decode.opc"
- ID(mov); W(); DR(AX); SM(None, IMMU(2));
-
-
-@@ -4812,7 +4814,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("dec %e!0");
--#line 548 "rl78-decode.opc"
-+#line 550 "rl78-decode.opc"
- ID(sub); DM(None, IMMU(2)); SC(1); Fza;
-
- }
-@@ -4823,7 +4825,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xb7:
- {
- /** 1011 0rg1 decw %0 */
--#line 568 "rl78-decode.opc"
-+#line 570 "rl78-decode.opc"
- int rg AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -4833,7 +4835,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rg = 0x%x\n", rg);
- }
- SYNTAX("decw %0");
--#line 568 "rl78-decode.opc"
-+#line 570 "rl78-decode.opc"
- ID(sub); W(); DRW(rg); SC(1);
-
- }
-@@ -4848,7 +4850,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("decw %e!0");
--#line 562 "rl78-decode.opc"
-+#line 564 "rl78-decode.opc"
- ID(sub); W(); DM(None, IMMU(2)); SC(1);
-
- }
-@@ -4863,7 +4865,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("dec %0");
--#line 557 "rl78-decode.opc"
-+#line 559 "rl78-decode.opc"
- ID(sub); DM(None, SADDR); SC(1); Fza;
-
- /*----------------------------------------------------------------------*/
-@@ -4880,7 +4882,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("decw %0");
--#line 571 "rl78-decode.opc"
-+#line 573 "rl78-decode.opc"
- ID(sub); W(); DM(None, SADDR); SC(1);
-
- /*----------------------------------------------------------------------*/
-@@ -4897,7 +4899,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %a0, %1");
--#line 831 "rl78-decode.opc"
-+#line 833 "rl78-decode.opc"
- ID(mov); W(); DM(SP, IMMU(1)); SR(AX);
-
- }
-@@ -4912,7 +4914,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %e0, %1");
--#line 819 "rl78-decode.opc"
-+#line 821 "rl78-decode.opc"
- ID(mov); W(); DM(DE, 0); SR(AX);
-
- }
-@@ -4927,7 +4929,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %ea0, %1");
--#line 822 "rl78-decode.opc"
-+#line 824 "rl78-decode.opc"
- ID(mov); W(); DM(DE, IMMU(1)); SR(AX);
-
- }
-@@ -4942,7 +4944,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %e0, %1");
--#line 825 "rl78-decode.opc"
-+#line 827 "rl78-decode.opc"
- ID(mov); W(); DM(HL, 0); SR(AX);
-
- }
-@@ -4957,7 +4959,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %ea0, %1");
--#line 828 "rl78-decode.opc"
-+#line 830 "rl78-decode.opc"
- ID(mov); W(); DM(HL, IMMU(1)); SR(AX);
-
- }
-@@ -4972,7 +4974,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, %1");
--#line 895 "rl78-decode.opc"
-+#line 897 "rl78-decode.opc"
- ID(mov); W(); DM(None, SADDR); SR(AX);
-
- }
-@@ -4987,7 +4989,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %s0, %1");
--#line 901 "rl78-decode.opc"
-+#line 903 "rl78-decode.opc"
- ID(mov); W(); DM(None, SFR); SR(AX);
-
- /*----------------------------------------------------------------------*/
-@@ -5004,7 +5006,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %e!0, %1");
--#line 816 "rl78-decode.opc"
-+#line 818 "rl78-decode.opc"
- ID(mov); W(); DM(None, IMMU(2)); SR(AX);
-
- }
-@@ -5015,7 +5017,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xc6:
- {
- /** 1100 0rg0 pop %0 */
--#line 986 "rl78-decode.opc"
-+#line 988 "rl78-decode.opc"
- int rg AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -5025,7 +5027,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rg = 0x%x\n", rg);
- }
- SYNTAX("pop %0");
--#line 986 "rl78-decode.opc"
-+#line 988 "rl78-decode.opc"
- ID(mov); W(); DRW(rg); SPOP();
-
- }
-@@ -5036,7 +5038,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xc7:
- {
- /** 1100 0rg1 push %1 */
--#line 994 "rl78-decode.opc"
-+#line 996 "rl78-decode.opc"
- int rg AU = (op[0] >> 1) & 0x03;
- if (trace)
- {
-@@ -5046,7 +5048,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rg = 0x%x\n", rg);
- }
- SYNTAX("push %1");
--#line 994 "rl78-decode.opc"
-+#line 996 "rl78-decode.opc"
- ID(mov); W(); DPUSH(); SRW(rg);
-
- }
-@@ -5061,7 +5063,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %a0, #%1");
--#line 639 "rl78-decode.opc"
-+#line 641 "rl78-decode.opc"
- ID(mov); DM(SP, IMMU(1)); SC(IMMU(1));
-
- }
-@@ -5076,7 +5078,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %0, #%1");
--#line 892 "rl78-decode.opc"
-+#line 894 "rl78-decode.opc"
- ID(mov); W(); DM(None, SADDR); SC(IMMU(2));
-
- }
-@@ -5091,7 +5093,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %ea0, #%1");
--#line 618 "rl78-decode.opc"
-+#line 620 "rl78-decode.opc"
- ID(mov); DM(DE, IMMU(1)); SC(IMMU(1));
-
- }
-@@ -5106,7 +5108,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("movw %s0, #%1");
--#line 898 "rl78-decode.opc"
-+#line 900 "rl78-decode.opc"
- ID(mov); W(); DM(None, SFR); SC(IMMU(2));
-
- }
-@@ -5121,7 +5123,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %ea0, #%1");
--#line 630 "rl78-decode.opc"
-+#line 632 "rl78-decode.opc"
- ID(mov); DM(HL, IMMU(1)); SC(IMMU(1));
-
- }
-@@ -5136,7 +5138,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, #%1");
--#line 744 "rl78-decode.opc"
-+#line 746 "rl78-decode.opc"
- ID(mov); DM(None, SADDR); SC(IMMU(1));
-
- }
-@@ -5151,7 +5153,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %s0, #%1");
--#line 750 "rl78-decode.opc"
-+#line 752 "rl78-decode.opc"
- op0 = SFR;
- op1 = IMMU(1);
- ID(mov); DM(None, op0); SC(op1);
-@@ -5193,7 +5195,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %e!0, #%1");
--#line 609 "rl78-decode.opc"
-+#line 611 "rl78-decode.opc"
- ID(mov); DM(None, IMMU(2)); SC(IMMU(1));
-
- }
-@@ -5204,7 +5206,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xd3:
- {
- /** 1101 00rg cmp0 %0 */
--#line 518 "rl78-decode.opc"
-+#line 520 "rl78-decode.opc"
- int rg AU = op[0] & 0x03;
- if (trace)
- {
-@@ -5214,7 +5216,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rg = 0x%x\n", rg);
- }
- SYNTAX("cmp0 %0");
--#line 518 "rl78-decode.opc"
-+#line 520 "rl78-decode.opc"
- ID(cmp); DRB(rg); SC(0); Fzac;
-
- }
-@@ -5229,7 +5231,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmp0 %0");
--#line 521 "rl78-decode.opc"
-+#line 523 "rl78-decode.opc"
- ID(cmp); DM(None, SADDR); SC(0); Fzac;
-
- /*----------------------------------------------------------------------*/
-@@ -5246,7 +5248,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("cmp0 %e!0");
--#line 515 "rl78-decode.opc"
-+#line 517 "rl78-decode.opc"
- ID(cmp); DM(None, IMMU(2)); SC(0); Fzac;
-
- }
-@@ -5261,7 +5263,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mulu x");
--#line 906 "rl78-decode.opc"
-+#line 908 "rl78-decode.opc"
- ID(mulu);
-
- /*----------------------------------------------------------------------*/
-@@ -5278,7 +5280,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("ret");
--#line 1002 "rl78-decode.opc"
-+#line 1004 "rl78-decode.opc"
- ID(ret);
-
- }
-@@ -5293,7 +5295,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %1");
--#line 711 "rl78-decode.opc"
-+#line 713 "rl78-decode.opc"
- ID(mov); DR(X); SM(None, SADDR);
-
- }
-@@ -5308,7 +5310,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %e!1");
--#line 708 "rl78-decode.opc"
-+#line 710 "rl78-decode.opc"
- ID(mov); DR(X); SM(None, IMMU(2));
-
- }
-@@ -5318,7 +5320,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xfa:
- {
- /** 11ra 1010 movw %0, %1 */
--#line 889 "rl78-decode.opc"
-+#line 891 "rl78-decode.opc"
- int ra AU = (op[0] >> 4) & 0x03;
- if (trace)
- {
-@@ -5328,7 +5330,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" ra = 0x%x\n", ra);
- }
- SYNTAX("movw %0, %1");
--#line 889 "rl78-decode.opc"
-+#line 891 "rl78-decode.opc"
- ID(mov); W(); DRW(ra); SM(None, SADDR);
-
- }
-@@ -5338,7 +5340,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xfb:
- {
- /** 11ra 1011 movw %0, %es!1 */
--#line 886 "rl78-decode.opc"
-+#line 888 "rl78-decode.opc"
- int ra AU = (op[0] >> 4) & 0x03;
- if (trace)
- {
-@@ -5348,7 +5350,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" ra = 0x%x\n", ra);
- }
- SYNTAX("movw %0, %es!1");
--#line 886 "rl78-decode.opc"
-+#line 888 "rl78-decode.opc"
- ID(mov); W(); DRW(ra); SM(None, IMMU(2));
-
- }
-@@ -5363,7 +5365,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("bc $%a0");
--#line 334 "rl78-decode.opc"
-+#line 336 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(C);
-
- }
-@@ -5378,7 +5380,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("bz $%a0");
--#line 346 "rl78-decode.opc"
-+#line 348 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(Z);
-
- }
-@@ -5393,7 +5395,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("bnc $%a0");
--#line 337 "rl78-decode.opc"
-+#line 339 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NC);
-
- }
-@@ -5408,7 +5410,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("bnz $%a0");
--#line 349 "rl78-decode.opc"
-+#line 351 "rl78-decode.opc"
- ID(branch_cond); DC(pc+IMMS(1)+2); SR(None); COND(NZ);
-
- /*----------------------------------------------------------------------*/
-@@ -5421,7 +5423,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xe3:
- {
- /** 1110 00rg oneb %0 */
--#line 924 "rl78-decode.opc"
-+#line 926 "rl78-decode.opc"
- int rg AU = op[0] & 0x03;
- if (trace)
- {
-@@ -5431,7 +5433,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rg = 0x%x\n", rg);
- }
- SYNTAX("oneb %0");
--#line 924 "rl78-decode.opc"
-+#line 926 "rl78-decode.opc"
- ID(mov); DRB(rg); SC(1);
-
- }
-@@ -5446,7 +5448,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("oneb %0");
--#line 927 "rl78-decode.opc"
-+#line 929 "rl78-decode.opc"
- ID(mov); DM(None, SADDR); SC(1);
-
- /*----------------------------------------------------------------------*/
-@@ -5463,7 +5465,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("oneb %e!0");
--#line 921 "rl78-decode.opc"
-+#line 923 "rl78-decode.opc"
- ID(mov); DM(None, IMMU(2)); SC(1);
-
- }
-@@ -5478,7 +5480,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("onew %0");
--#line 932 "rl78-decode.opc"
-+#line 934 "rl78-decode.opc"
- ID(mov); DR(AX); SC(1);
-
- }
-@@ -5493,7 +5495,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("onew %0");
--#line 935 "rl78-decode.opc"
-+#line 937 "rl78-decode.opc"
- ID(mov); DR(BC); SC(1);
-
- /*----------------------------------------------------------------------*/
-@@ -5510,7 +5512,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %1");
--#line 699 "rl78-decode.opc"
-+#line 701 "rl78-decode.opc"
- ID(mov); DR(B); SM(None, SADDR);
-
- }
-@@ -5525,7 +5527,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %e!1");
--#line 693 "rl78-decode.opc"
-+#line 695 "rl78-decode.opc"
- ID(mov); DR(B); SM(None, IMMU(2));
-
- }
-@@ -5540,7 +5542,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("br !%!a0");
--#line 368 "rl78-decode.opc"
-+#line 370 "rl78-decode.opc"
- ID(branch); DC(IMMU(3));
-
- }
-@@ -5555,7 +5557,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("br %!a0");
--#line 371 "rl78-decode.opc"
-+#line 373 "rl78-decode.opc"
- ID(branch); DC(IMMU(2));
-
- }
-@@ -5570,7 +5572,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("br $%!a0");
--#line 374 "rl78-decode.opc"
-+#line 376 "rl78-decode.opc"
- ID(branch); DC(pc+IMMS(2)+3);
-
- }
-@@ -5585,7 +5587,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("br $%a0");
--#line 377 "rl78-decode.opc"
-+#line 379 "rl78-decode.opc"
- ID(branch); DC(pc+IMMS(1)+2);
-
- }
-@@ -5596,7 +5598,7 @@ rl78_decode_opcode (unsigned long pc AU,
- case 0xf3:
- {
- /** 1111 00rg clrb %0 */
--#line 464 "rl78-decode.opc"
-+#line 466 "rl78-decode.opc"
- int rg AU = op[0] & 0x03;
- if (trace)
- {
-@@ -5606,7 +5608,7 @@ rl78_decode_opcode (unsigned long pc AU,
- printf (" rg = 0x%x\n", rg);
- }
- SYNTAX("clrb %0");
--#line 464 "rl78-decode.opc"
-+#line 466 "rl78-decode.opc"
- ID(mov); DRB(rg); SC(0);
-
- }
-@@ -5621,7 +5623,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("clrb %0");
--#line 467 "rl78-decode.opc"
-+#line 469 "rl78-decode.opc"
- ID(mov); DM(None, SADDR); SC(0);
-
- /*----------------------------------------------------------------------*/
-@@ -5638,7 +5640,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("clrb %e!0");
--#line 461 "rl78-decode.opc"
-+#line 463 "rl78-decode.opc"
- ID(mov); DM(None, IMMU(2)); SC(0);
-
- }
-@@ -5653,7 +5655,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("clrw %0");
--#line 472 "rl78-decode.opc"
-+#line 474 "rl78-decode.opc"
- ID(mov); DR(AX); SC(0);
-
- }
-@@ -5668,7 +5670,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("clrw %0");
--#line 475 "rl78-decode.opc"
-+#line 477 "rl78-decode.opc"
- ID(mov); DR(BC); SC(0);
-
- /*----------------------------------------------------------------------*/
-@@ -5685,7 +5687,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %1");
--#line 705 "rl78-decode.opc"
-+#line 707 "rl78-decode.opc"
- ID(mov); DR(C); SM(None, SADDR);
-
- }
-@@ -5700,7 +5702,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("mov %0, %e!1");
--#line 702 "rl78-decode.opc"
-+#line 704 "rl78-decode.opc"
- ID(mov); DR(C); SM(None, IMMU(2));
-
- }
-@@ -5715,7 +5717,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("call !%!a0");
--#line 421 "rl78-decode.opc"
-+#line 423 "rl78-decode.opc"
- ID(call); DC(IMMU(3));
-
- }
-@@ -5730,7 +5732,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("call %!a0");
--#line 424 "rl78-decode.opc"
-+#line 426 "rl78-decode.opc"
- ID(call); DC(IMMU(2));
-
- }
-@@ -5745,7 +5747,7 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("call $%!a0");
--#line 427 "rl78-decode.opc"
-+#line 429 "rl78-decode.opc"
- ID(call); DC(pc+IMMS(2)+3);
-
- }
-@@ -5760,13 +5762,13 @@ rl78_decode_opcode (unsigned long pc AU,
- op[0]);
- }
- SYNTAX("brk1");
--#line 385 "rl78-decode.opc"
-+#line 387 "rl78-decode.opc"
- ID(break);
-
- }
- break;
- }
--#line 1290 "rl78-decode.opc"
-+#line 1292 "rl78-decode.opc"
-
- return rl78->n_bytes;
- }
-diff --git a/opcodes/rl78-decode.opc b/opcodes/rl78-decode.opc
-index 6212f08..b25e441 100644
---- a/opcodes/rl78-decode.opc
-+++ b/opcodes/rl78-decode.opc
-@@ -50,7 +50,9 @@ typedef struct
- #define W() rl78->size = RL78_Word
-
- #define AU ATTRIBUTE_UNUSED
--#define GETBYTE() (ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr))
-+
-+#define OP_BUF_LEN 20
-+#define GETBYTE() (ld->rl78->n_bytes < (OP_BUF_LEN - 1) ? ld->op [ld->rl78->n_bytes++] = ld->getbyte (ld->ptr): 0)
- #define B ((unsigned long) GETBYTE())
-
- #define SYNTAX(x) rl78->syntax = x
-@@ -168,7 +170,7 @@ rl78_decode_opcode (unsigned long pc AU,
- RL78_Dis_Isa isa)
- {
- LocalData lds, * ld = &lds;
-- unsigned char op_buf[20] = {0};
-+ unsigned char op_buf[OP_BUF_LEN] = {0};
- unsigned char *op = op_buf;
- int op0, op1;
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9752.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9752.patch
deleted file mode 100644
index f63a993b2..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9752.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-From c53d2e6d744da000aaafe0237bced090aab62818 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Wed, 14 Jun 2017 11:27:15 +0100
-Subject: [PATCH] Fix potential address violations when processing a corrupt
- Alpha VMA binary.
-
- PR binutils/21589
- * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
- maximum value for the ascic pointer. Check that name processing
- does not read beyond this value.
- (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
- end of etir record.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9752
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 9 +++++++++
- bfd/vms-alpha.c | 51 +++++++++++++++++++++++++++++++++++++++++----------
- 2 files changed, 50 insertions(+), 10 deletions(-)
-
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -9,6 +9,15 @@
-
- 2017-06-14 Nick Clifton <nickc@redhat.com>
-
-+ PR binutils/21589
-+ * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
-+ maximum value for the ascic pointer. Check that name processing
-+ does not read beyond this value.
-+ (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
-+ end of etir record.
-+
-+2017-06-14 Nick Clifton <nickc@redhat.com>
-+
- PR binutils/21578
- * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
- flag value.
-Index: git/bfd/vms-alpha.c
-===================================================================
---- git.orig/bfd/vms-alpha.c
-+++ git/bfd/vms-alpha.c
-@@ -1456,7 +1456,7 @@ dst_retrieve_location (bfd *abfd, unsign
- /* Write multiple bytes to section image. */
-
- static bfd_boolean
--image_write (bfd *abfd, unsigned char *ptr, int size)
-+image_write (bfd *abfd, unsigned char *ptr, unsigned int size)
- {
- #if VMS_DEBUG
- _bfd_vms_debug (8, "image_write from (%p, %d) to (%ld)\n", ptr, size,
-@@ -1603,14 +1603,16 @@ _bfd_vms_etir_name (int cmd)
- #define HIGHBIT(op) ((op & 0x80000000L) == 0x80000000L)
-
- static void
--_bfd_vms_get_value (bfd *abfd, const unsigned char *ascic,
-+_bfd_vms_get_value (bfd *abfd,
-+ const unsigned char *ascic,
-+ const unsigned char *max_ascic,
- struct bfd_link_info *info,
- bfd_vma *vma,
- struct alpha_vms_link_hash_entry **hp)
- {
- char name[257];
-- int len;
-- int i;
-+ unsigned int len;
-+ unsigned int i;
- struct alpha_vms_link_hash_entry *h;
-
- /* Not linking. Do not try to resolve the symbol. */
-@@ -1622,6 +1624,14 @@ _bfd_vms_get_value (bfd *abfd, const uns
- }
-
- len = *ascic;
-+ if (ascic + len >= max_ascic)
-+ {
-+ _bfd_error_handler (_("Corrupt vms value"));
-+ *vma = 0;
-+ *hp = NULL;
-+ return;
-+ }
-+
- for (i = 0; i < len; i++)
- name[i] = ascic[i + 1];
- name[i] = 0;
-@@ -1741,6 +1751,15 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- _bfd_hexdump (8, ptr, cmd_length - 4, 0);
- #endif
-
-+ /* PR 21589: Check for a corrupt ETIR record. */
-+ if (cmd_length < 4)
-+ {
-+ corrupt_etir:
-+ _bfd_error_handler (_("Corrupt ETIR record encountered"));
-+ bfd_set_error (bfd_error_bad_value);
-+ return FALSE;
-+ }
-+
- switch (cmd)
- {
- /* Stack global
-@@ -1748,7 +1767,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
-
- stack 32 bit value of symbol (high bits set to 0). */
- case ETIR__C_STA_GBL:
-- _bfd_vms_get_value (abfd, ptr, info, &op1, &h);
-+ _bfd_vms_get_value (abfd, ptr, maxptr, info, &op1, &h);
- _bfd_vms_push (abfd, op1, alpha_vms_sym_to_ctxt (h));
- break;
-
-@@ -1757,6 +1776,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
-
- stack 32 bit value, sign extend to 64 bit. */
- case ETIR__C_STA_LW:
-+ if (ptr + 4 >= maxptr)
-+ goto corrupt_etir;
- _bfd_vms_push (abfd, bfd_getl32 (ptr), RELC_NONE);
- break;
-
-@@ -1765,6 +1786,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
-
- stack 64 bit value of symbol. */
- case ETIR__C_STA_QW:
-+ if (ptr + 8 >= maxptr)
-+ goto corrupt_etir;
- _bfd_vms_push (abfd, bfd_getl64 (ptr), RELC_NONE);
- break;
-
-@@ -1778,6 +1801,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- {
- int psect;
-
-+ if (ptr + 12 >= maxptr)
-+ goto corrupt_etir;
- psect = bfd_getl32 (ptr);
- if ((unsigned int) psect >= PRIV (section_count))
- {
-@@ -1867,6 +1892,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- {
- int size;
-
-+ if (ptr + 4 >= maxptr)
-+ goto corrupt_etir;
- size = bfd_getl32 (ptr);
- _bfd_vms_pop (abfd, &op1, &rel1);
- if (rel1 != RELC_NONE)
-@@ -1879,7 +1906,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- /* Store global: write symbol value
- arg: cs global symbol name. */
- case ETIR__C_STO_GBL:
-- _bfd_vms_get_value (abfd, ptr, info, &op1, &h);
-+ _bfd_vms_get_value (abfd, ptr, maxptr, info, &op1, &h);
- if (h && h->sym)
- {
- if (h->sym->typ == EGSD__C_SYMG)
-@@ -1901,7 +1928,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- /* Store code address: write address of entry point
- arg: cs global symbol name (procedure). */
- case ETIR__C_STO_CA:
-- _bfd_vms_get_value (abfd, ptr, info, &op1, &h);
-+ _bfd_vms_get_value (abfd, ptr, maxptr, info, &op1, &h);
- if (h && h->sym)
- {
- if (h->sym->flags & EGSY__V_NORM)
-@@ -1946,8 +1973,10 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- da data. */
- case ETIR__C_STO_IMM:
- {
-- int size;
-+ unsigned int size;
-
-+ if (ptr + 4 >= maxptr)
-+ goto corrupt_etir;
- size = bfd_getl32 (ptr);
- image_write (abfd, ptr + 4, size);
- }
-@@ -1960,7 +1989,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- store global longword: store 32bit value of symbol
- arg: cs symbol name. */
- case ETIR__C_STO_GBL_LW:
-- _bfd_vms_get_value (abfd, ptr, info, &op1, &h);
-+ _bfd_vms_get_value (abfd, ptr, maxptr, info, &op1, &h);
- #if 0
- abort ();
- #endif
-@@ -2013,7 +2042,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- da signature. */
-
- case ETIR__C_STC_LP_PSB:
-- _bfd_vms_get_value (abfd, ptr + 4, info, &op1, &h);
-+ _bfd_vms_get_value (abfd, ptr + 4, maxptr, info, &op1, &h);
- if (h && h->sym)
- {
- if (h->sym->typ == EGSD__C_SYMG)
-@@ -2109,6 +2138,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct b
- /* Augment relocation base: increment image location counter by offset
- arg: lw offset value. */
- case ETIR__C_CTL_AUGRB:
-+ if (ptr + 4 >= maxptr)
-+ goto corrupt_etir;
- op1 = bfd_getl32 (ptr);
- image_inc_ptr (abfd, op1);
- break;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9753.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9753.patch
deleted file mode 100644
index 241142b57..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9753.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 04f963fd489cae724a60140e13984415c205f4ac Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Wed, 14 Jun 2017 10:35:16 +0100
-Subject: [PATCH] Fix seg-faults in objdump when disassembling a corrupt
- versados binary.
-
- PR binutils/21591
- * versados.c (versados_mkobject): Zero the allocated tdata structure.
- (process_otr): Check for an invalid offset in the otr structure.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9753
-CVE: CVE-2017-9754
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 6 ++++++
- bfd/versados.c | 12 ++++++++----
- 2 files changed, 14 insertions(+), 4 deletions(-)
-
-Index: git/bfd/versados.c
-===================================================================
---- git.orig/bfd/versados.c
-+++ git/bfd/versados.c
-@@ -149,7 +149,7 @@ versados_mkobject (bfd *abfd)
- if (abfd->tdata.versados_data == NULL)
- {
- bfd_size_type amt = sizeof (tdata_type);
-- tdata_type *tdata = bfd_alloc (abfd, amt);
-+ tdata_type *tdata = bfd_zalloc (abfd, amt);
-
- if (tdata == NULL)
- return FALSE;
-@@ -345,13 +345,13 @@ reloc_howto_type versados_howto_table[]
- };
-
- static int
--get_offset (int len, unsigned char *ptr)
-+get_offset (unsigned int len, unsigned char *ptr)
- {
- int val = 0;
-
- if (len)
- {
-- int i;
-+ unsigned int i;
-
- val = *ptr++;
- if (val & 0x80)
-@@ -394,9 +394,13 @@ process_otr (bfd *abfd, struct ext_otr *
- int flag = *srcp++;
- int esdids = (flag >> 5) & 0x7;
- int sizeinwords = ((flag >> 3) & 1) ? 2 : 1;
-- int offsetlen = flag & 0x7;
-+ unsigned int offsetlen = flag & 0x7;
- int j;
-
-+ /* PR 21591: Check for invalid lengths. */
-+ if (srcp + esdids + offsetlen >= endp)
-+ return;
-+
- if (esdids == 0)
- {
- /* A zero esdid means the new pc is the offset given. */
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -8,6 +8,10 @@
- (ieee_archive_p): Likewise.
-
- 2017-06-14 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21591
-+ * versados.c (versados_mkobject): Zero the allocated tdata structure.
-+ (process_otr): Check for an invalid offset in the otr structure.
-
- PR binutils/21589
- * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9755.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9755.patch
deleted file mode 100644
index 15dc9090d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9755.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 0d96e4df4812c3bad77c229dfef47a9bc115ac12 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Thu, 15 Jun 2017 06:40:17 -0700
-Subject: [PATCH] i386-dis: Check valid bnd register
-
-Since there are only 4 bnd registers, return "(bad)" for register
-number > 3.
-
- PR binutils/21594
- * i386-dis.c (OP_E_register): Check valid bnd register.
- (OP_G): Likewise.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9755
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- opcodes/ChangeLog | 6 ++++++
- opcodes/i386-dis.c | 10 ++++++++++
- 2 files changed, 16 insertions(+)
-
-Index: git/opcodes/ChangeLog
-===================================================================
---- git.orig/opcodes/ChangeLog
-+++ git/opcodes/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-06-15 H.J. Lu <hongjiu.lu@intel.com>
-+
-+ PR binutils/21594
-+ * i386-dis.c (OP_E_register): Check valid bnd register.
-+ (OP_G): Likewise.
-+
- 2017-06-15 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21588
-Index: git/opcodes/i386-dis.c
-===================================================================
---- git.orig/opcodes/i386-dis.c
-+++ git/opcodes/i386-dis.c
-@@ -14939,6 +14939,11 @@ OP_E_register (int bytemode, int sizefla
- names = address_mode == mode_64bit ? names64 : names32;
- break;
- case bnd_mode:
-+ if (reg > 0x3)
-+ {
-+ oappend ("(bad)");
-+ return;
-+ }
- names = names_bnd;
- break;
- case indir_v_mode:
-@@ -15483,6 +15488,11 @@ OP_G (int bytemode, int sizeflag)
- oappend (names64[modrm.reg + add]);
- break;
- case bnd_mode:
-+ if (modrm.reg > 0x3)
-+ {
-+ oappend ("(bad)");
-+ return;
-+ }
- oappend (names_bnd[modrm.reg]);
- break;
- case v_mode:
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch
deleted file mode 100644
index 191d0be19..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9756.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From cd3ea7c69acc5045eb28f9bf80d923116e15e4f5 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 15 Jun 2017 13:26:54 +0100
-Subject: [PATCH] Prevent address violation problem when disassembling corrupt
- aarch64 binary.
-
- PR binutils/21595
- * aarch64-dis.c (aarch64_ext_ldst_reglist): Check for an out of
- range value.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9756
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- opcodes/ChangeLog | 6 ++++++
- opcodes/aarch64-dis.c | 3 +++
- 2 files changed, 9 insertions(+)
-
-Index: git/opcodes/ChangeLog
-===================================================================
---- git.orig/opcodes/ChangeLog
-+++ git/opcodes/ChangeLog
-@@ -6,6 +6,12 @@
-
- 2017-06-15 Nick Clifton <nickc@redhat.com>
-
-+ PR binutils/21595
-+ * aarch64-dis.c (aarch64_ext_ldst_reglist): Check for an out of
-+ range value.
-+
-+2017-06-15 Nick Clifton <nickc@redhat.com>
-+
- PR binutils/21588
- * rl78-decode.opc (OP_BUF_LEN): Define.
- (GETBYTE): Check for the index exceeding OP_BUF_LEN.
-Index: git/opcodes/aarch64-dis.c
-===================================================================
---- git.orig/opcodes/aarch64-dis.c
-+++ git/opcodes/aarch64-dis.c
-@@ -409,6 +409,9 @@ aarch64_ext_ldst_reglist (const aarch64_
- info->reglist.first_regno = extract_field (FLD_Rt, code, 0);
- /* opcode */
- value = extract_field (FLD_opcode, code, 0);
-+ /* PR 21595: Check for a bogus value. */
-+ if (value >= ARRAY_SIZE (data))
-+ return 0;
- if (expected_num != data[value].num_elements || data[value].is_reserved)
- return 0;
- info->reglist.num_regs = data[value].num_regs;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch
deleted file mode 100644
index 8a9d7ebd9..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9954.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 04e15b4a9462cb1ae819e878a6009829aab8020b Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Mon, 26 Jun 2017 15:46:34 +0100
-Subject: [PATCH] Fix address violation parsing a corrupt texhex format file.
-
- PR binutils/21670
- * tekhex.c (getvalue): Check for the source pointer exceeding the
- end pointer before the first byte is read.
-
-Upstream-Status: Backport
-CVE: CVE_2017-9954
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 6 ++++++
- bfd/tekhex.c | 6 +++++-
- 2 files changed, 11 insertions(+), 1 deletion(-)
-
-Index: git/bfd/tekhex.c
-===================================================================
---- git.orig/bfd/tekhex.c
-+++ git/bfd/tekhex.c
-@@ -273,6 +273,9 @@ getvalue (char **srcp, bfd_vma *valuep,
- bfd_vma value = 0;
- unsigned int len;
-
-+ if (src >= endp)
-+ return FALSE;
-+
- if (!ISHEX (*src))
- return FALSE;
-
-@@ -514,9 +517,10 @@ pass_over (bfd *abfd, bfd_boolean (*func
- /* To the front of the file. */
- if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
- return FALSE;
-+
- while (! is_eof)
- {
-- char src[MAXCHUNK];
-+ static char src[MAXCHUNK];
- char type;
-
- /* Find first '%'. */
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-06-26 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21670
-+ * tekhex.c (getvalue): Check for the source pointer exceeding the
-+ end pointer before the first byte is read.
-+
- 2017-06-15 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21582
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_1.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_1.patch
deleted file mode 100644
index 774670fb0..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_1.patch
+++ /dev/null
@@ -1,168 +0,0 @@
-From cfd14a500e0485374596234de4db10e88ebc7618 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Mon, 26 Jun 2017 15:25:08 +0100
-Subject: [PATCH] Fix address violations when atempting to parse fuzzed
- binaries.
-
- PR binutils/21665
-bfd * opncls.c (get_build_id): Check that the section is beig enough
- to contain the whole note.
- * compress.c (bfd_get_full_section_contents): Check for and reject
- a section whoes size is greater than the size of the entire file.
- * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
- contain a notes section.
-
-binutils* objdump.c (disassemble_section): Skip any section that is bigger
- than the entire file.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9955 #1
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 10 ++++++++++
- bfd/compress.c | 6 ++++++
- bfd/elf32-v850.c | 4 +++-
- bfd/opncls.c | 18 ++++++++++++++++--
- binutils/ChangeLog | 6 ++++++
- binutils/objdump.c | 4 ++--
- 6 files changed, 43 insertions(+), 5 deletions(-)
-
-Index: git/bfd/compress.c
-===================================================================
---- git.orig/bfd/compress.c
-+++ git/bfd/compress.c
-@@ -239,6 +239,12 @@ bfd_get_full_section_contents (bfd *abfd
- *ptr = NULL;
- return TRUE;
- }
-+ else if (bfd_get_file_size (abfd) > 0
-+ && sz > (bfd_size_type) bfd_get_file_size (abfd))
-+ {
-+ *ptr = NULL;
-+ return FALSE;
-+ }
-
- switch (sec->compress_status)
- {
-Index: git/bfd/elf32-v850.c
-===================================================================
---- git.orig/bfd/elf32-v850.c
-+++ git/bfd/elf32-v850.c
-@@ -2450,7 +2450,9 @@ v850_elf_copy_notes (bfd *ibfd, bfd *obf
- BFD_ASSERT (bfd_malloc_and_get_section (ibfd, inotes, & icont));
-
- if ((ocont = elf_section_data (onotes)->this_hdr.contents) == NULL)
-- BFD_ASSERT (bfd_malloc_and_get_section (obfd, onotes, & ocont));
-+ /* If the output is being stripped then it is possible for
-+ the notes section to disappear. In this case do nothing. */
-+ return;
-
- /* Copy/overwrite notes from the input to the output. */
- memcpy (ocont, icont, bfd_section_size (obfd, onotes));
-Index: git/bfd/opncls.c
-===================================================================
---- git.orig/bfd/opncls.c
-+++ git/bfd/opncls.c
-@@ -1776,6 +1776,7 @@ get_build_id (bfd *abfd)
- Elf_External_Note *enote;
- bfd_byte *contents;
- asection *sect;
-+ bfd_size_type size;
-
- BFD_ASSERT (abfd);
-
-@@ -1790,8 +1791,9 @@ get_build_id (bfd *abfd)
- return NULL;
- }
-
-+ size = bfd_get_section_size (sect);
- /* FIXME: Should we support smaller build-id notes ? */
-- if (bfd_get_section_size (sect) < 0x24)
-+ if (size < 0x24)
- {
- bfd_set_error (bfd_error_invalid_operation);
- return NULL;
-@@ -1804,6 +1806,17 @@ get_build_id (bfd *abfd)
- return NULL;
- }
-
-+ /* FIXME: Paranoia - allow for compressed build-id sections.
-+ Maybe we should complain if this size is different from
-+ the one obtained above... */
-+ size = bfd_get_section_size (sect);
-+ if (size < sizeof (Elf_External_Note))
-+ {
-+ bfd_set_error (bfd_error_invalid_operation);
-+ free (contents);
-+ return NULL;
-+ }
-+
- enote = (Elf_External_Note *) contents;
- inote.type = H_GET_32 (abfd, enote->type);
- inote.namesz = H_GET_32 (abfd, enote->namesz);
-@@ -1815,7 +1828,8 @@ get_build_id (bfd *abfd)
- if (inote.descsz == 0
- || inote.type != NT_GNU_BUILD_ID
- || inote.namesz != 4 /* sizeof "GNU" */
-- || strcmp (inote.namedata, "GNU") != 0)
-+ || strncmp (inote.namedata, "GNU", 4) != 0
-+ || size < (12 + BFD_ALIGN (inote.namesz, 4) + inote.descsz))
- {
- free (contents);
- bfd_set_error (bfd_error_invalid_operation);
-Index: git/binutils/objdump.c
-===================================================================
---- git.orig/binutils/objdump.c
-+++ git/binutils/objdump.c
-@@ -2048,7 +2048,7 @@ disassemble_section (bfd *abfd, asection
- return;
-
- datasize = bfd_get_section_size (section);
-- if (datasize == 0)
-+ if (datasize == 0 || datasize >= (bfd_size_type) bfd_get_file_size (abfd))
- return;
-
- if (start_address == (bfd_vma) -1
-@@ -2912,7 +2912,7 @@ dump_target_specific (bfd *abfd)
- static void
- dump_section (bfd *abfd, asection *section, void *dummy ATTRIBUTE_UNUSED)
- {
-- bfd_byte *data = 0;
-+ bfd_byte *data = NULL;
- bfd_size_type datasize;
- bfd_vma addr_offset;
- bfd_vma start_offset;
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,4 +1,14 @@
- 2017-06-26 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21665
-+ * opncls.c (get_build_id): Check that the section is beig enough
-+ to contain the whole note.
-+ * compress.c (bfd_get_full_section_contents): Check for and reject
-+ a section whoes size is greater than the size of the entire file.
-+ * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
-+ contain a notes section.
-+
-+2017-06-26 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21670
- * tekhex.c (getvalue): Check for the source pointer exceeding the
-Index: git/binutils/ChangeLog
-===================================================================
---- git.orig/binutils/ChangeLog
-+++ git/binutils/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-06-26 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21665
-+ * objdump.c (disassemble_section): Skip any section that is bigger
-+ than the entire file.
-+
- 2017-04-03 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21345
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_2.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_2.patch
deleted file mode 100644
index f95295f18..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_2.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 0630b49c470ca2e3c3f74da4c7e4ff63440dd71f Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 26 Jun 2017 09:24:49 -0700
-Subject: [PATCH] Check file size before getting section contents
-
-Don't check the section size in bfd_get_full_section_contents since
-the size of a decompressed section may be larger than the file size.
-Instead, check file size in _bfd_generic_get_section_contents.
-
- PR binutils/21665
- * compress.c (bfd_get_full_section_contents): Don't check the
- file size here.
- * libbfd.c (_bfd_generic_get_section_contents): Check for and
- reject a section whoes size + offset is greater than the size
- of the entire file.
- (_bfd_generic_get_section_contents_in_window): Likewise.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9955 #2
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 10 +++++++++-
- bfd/compress.c | 8 +-------
- bfd/libbfd.c | 17 ++++++++++++++++-
- 3 files changed, 26 insertions(+), 9 deletions(-)
-
-Index: git/bfd/compress.c
-===================================================================
---- git.orig/bfd/compress.c
-+++ git/bfd/compress.c
-@@ -239,12 +239,6 @@ bfd_get_full_section_contents (bfd *abfd
- *ptr = NULL;
- return TRUE;
- }
-- else if (bfd_get_file_size (abfd) > 0
-- && sz > (bfd_size_type) bfd_get_file_size (abfd))
-- {
-- *ptr = NULL;
-- return FALSE;
-- }
-
- switch (sec->compress_status)
- {
-@@ -260,7 +254,7 @@ bfd_get_full_section_contents (bfd *abfd
- /* xgettext:c-format */
- (_("error: %B(%A) is too large (%#lx bytes)"),
- abfd, sec, (long) sz);
-- return FALSE;
-+ return FALSE;
- }
- }
-
-Index: git/bfd/libbfd.c
-===================================================================
---- git.orig/bfd/libbfd.c
-+++ git/bfd/libbfd.c
-@@ -780,6 +780,7 @@ _bfd_generic_get_section_contents (bfd *
- bfd_size_type count)
- {
- bfd_size_type sz;
-+ file_ptr filesz;
- if (count == 0)
- return TRUE;
-
-@@ -802,8 +803,15 @@ _bfd_generic_get_section_contents (bfd *
- sz = section->rawsize;
- else
- sz = section->size;
-+ filesz = bfd_get_file_size (abfd);
-+ if (filesz < 0)
-+ {
-+ /* This should never happen. */
-+ abort ();
-+ }
- if (offset + count < count
-- || offset + count > sz)
-+ || offset + count > sz
-+ || (section->filepos + offset + sz) > (bfd_size_type) filesz)
- {
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
-@@ -826,6 +834,7 @@ _bfd_generic_get_section_contents_in_win
- {
- #ifdef USE_MMAP
- bfd_size_type sz;
-+ file_ptr filesz;
-
- if (count == 0)
- return TRUE;
-@@ -858,7 +867,13 @@ _bfd_generic_get_section_contents_in_win
- sz = section->rawsize;
- else
- sz = section->size;
-+ filesz = bfd_get_file_size (abfd);
-+ {
-+ /* This should never happen. */
-+ abort ();
-+ }
- if (offset + count > sz
-+ || (section->filepos + offset + sz) > (bfd_size_type) filesz
- || ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
- TRUE))
- return FALSE;
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,13 @@
-+2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
-+
-+ PR binutils/21665
-+ * compress.c (bfd_get_full_section_contents): Don't check the
-+ file size here.
-+ * libbfd.c (_bfd_generic_get_section_contents): Check for and
-+ reject a section whoes size + offset is greater than the size
-+ of the entire file.
-+ (_bfd_generic_get_section_contents_in_window): Likewise.
-+
- 2017-06-26 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21665
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_3.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_3.patch
deleted file mode 100644
index 1b67c4e95..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_3.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 1f473e3d0ad285195934e6a077c7ed32afe66437 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Mon, 26 Jun 2017 15:47:16 -0700
-Subject: [PATCH] Add a missing line to
- _bfd_generic_get_section_contents_in_window
-
- PR binutils/21665
- * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
- a missing line.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9955 #3
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 6 ++++++
- bfd/libbfd.c | 1 +
- 2 files changed, 7 insertions(+)
-
-Index: git/bfd/libbfd.c
-===================================================================
---- git.orig/bfd/libbfd.c
-+++ git/bfd/libbfd.c
-@@ -868,6 +868,7 @@ _bfd_generic_get_section_contents_in_win
- else
- sz = section->size;
- filesz = bfd_get_file_size (abfd);
-+ if (filesz < 0)
- {
- /* This should never happen. */
- abort ();
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,6 +1,12 @@
- 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/21665
-+ * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
-+ a missing line.
-+
-+2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
-+
-+ PR binutils/21665
- * compress.c (bfd_get_full_section_contents): Don't check the
- file size here.
- * libbfd.c (_bfd_generic_get_section_contents): Check for and
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch
deleted file mode 100644
index 97d529a78..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_4.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From ab27f80c5dceaa23c4ba7f62c0d5d22a5d5dd7a1 Mon Sep 17 00:00:00 2001
-From: Pedro Alves <palves@redhat.com>
-Date: Tue, 27 Jun 2017 00:21:25 +0100
-Subject: [PATCH] Fix GDB regressions caused by previous
- bfd_get_section_contents changes
-
-Ref: https://sourceware.org/ml/binutils/2017-06/msg00343.html
-
-bfd/ChangeLog:
-2017-06-26 Pedro Alves <palves@redhat.com>
-
- PR binutils/21665
- * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
- "sz".
-
-Upstream-Status: Backport
-CVE: CVE-2017-9955 #4
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 6 ++++++
- bfd/libbfd.c | 2 +-
- 2 files changed, 7 insertions(+), 1 deletion(-)
-
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-06-26 Pedro Alves <palves@redhat.com>
-+
-+ PR binutils/21665
-+ * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
-+ "sz".
-+
- 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/21665
-Index: git/bfd/libbfd.c
-===================================================================
---- git.orig/bfd/libbfd.c
-+++ git/bfd/libbfd.c
-@@ -811,7 +811,7 @@ _bfd_generic_get_section_contents (bfd *
- }
- if (offset + count < count
- || offset + count > sz
-- || (section->filepos + offset + sz) > (bfd_size_type) filesz)
-+ || (section->filepos + offset + count) > (bfd_size_type) filesz)
- {
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_5.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_5.patch
deleted file mode 100644
index da3bd37e8..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_5.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 7211ae501eb0de1044983f2dfb00091a58fbd66c Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Tue, 27 Jun 2017 09:45:04 +0930
-Subject: [PATCH] More fixes for bfd_get_section_contents change
-
- PR binutils/21665
- * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
- Use unsigned file pointer type, and remove cast.
- * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
- Add "count", not "sz".
-
-Upstream-Status: Backport
-CVE: CVE-2017-9955 #5
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 8 ++++++++
- bfd/libbfd.c | 18 ++++--------------
- 2 files changed, 12 insertions(+), 14 deletions(-)
-
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,11 @@
-+2017-06-27 Alan Modra <amodra@gmail.com>
-+
-+ PR binutils/21665
-+ * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
-+ Use unsigned file pointer type, and remove cast.
-+ * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
-+ Add "count", not "sz".
-+
- 2017-06-26 Pedro Alves <palves@redhat.com>
-
- PR binutils/21665
-Index: git/bfd/libbfd.c
-===================================================================
---- git.orig/bfd/libbfd.c
-+++ git/bfd/libbfd.c
-@@ -780,7 +780,7 @@ _bfd_generic_get_section_contents (bfd *
- bfd_size_type count)
- {
- bfd_size_type sz;
-- file_ptr filesz;
-+ ufile_ptr filesz;
- if (count == 0)
- return TRUE;
-
-@@ -804,14 +804,9 @@ _bfd_generic_get_section_contents (bfd *
- else
- sz = section->size;
- filesz = bfd_get_file_size (abfd);
-- if (filesz < 0)
-- {
-- /* This should never happen. */
-- abort ();
-- }
- if (offset + count < count
- || offset + count > sz
-- || (section->filepos + offset + count) > (bfd_size_type) filesz)
-+ || section->filepos + offset + count > filesz)
- {
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
-@@ -834,7 +829,7 @@ _bfd_generic_get_section_contents_in_win
- {
- #ifdef USE_MMAP
- bfd_size_type sz;
-- file_ptr filesz;
-+ ufile_ptr filesz;
-
- if (count == 0)
- return TRUE;
-@@ -868,13 +863,8 @@ _bfd_generic_get_section_contents_in_win
- else
- sz = section->size;
- filesz = bfd_get_file_size (abfd);
-- if (filesz < 0)
-- {
-- /* This should never happen. */
-- abort ();
-- }
- if (offset + count > sz
-- || (section->filepos + offset + sz) > (bfd_size_type) filesz
-+ || section->filepos + offset + count > filesz
- || ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
- TRUE))
- return FALSE;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch
deleted file mode 100644
index e36429ad5..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From ea9aafc41a764e4e2dbb88a7b031e886b481b99a Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Tue, 27 Jun 2017 14:43:49 +0930
-Subject: [PATCH] Warning fix
-
- PR binutils/21665
- * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
- (_bfd_generic_get_section_contents_in_window): Likewise.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9955 #6
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 12 +++++++++---
- bfd/libbfd.c | 4 ++--
- 2 files changed, 11 insertions(+), 5 deletions(-)
-
-Index: git/bfd/libbfd.c
-===================================================================
---- git.orig/bfd/libbfd.c
-+++ git/bfd/libbfd.c
-@@ -806,7 +806,7 @@ _bfd_generic_get_section_contents (bfd *
- filesz = bfd_get_file_size (abfd);
- if (offset + count < count
- || offset + count > sz
-- || section->filepos + offset + count > filesz)
-+ || (ufile_ptr) section->filepos + offset + count > filesz)
- {
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
-@@ -864,7 +864,7 @@ _bfd_generic_get_section_contents_in_win
- sz = section->size;
- filesz = bfd_get_file_size (abfd);
- if (offset + count > sz
-- || section->filepos + offset + count > filesz
-+ || (ufile_ptr) section->filepos + offset + count > filesz
- || ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
- TRUE))
- return FALSE;
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,5 +1,11 @@
- 2017-06-27 Alan Modra <amodra@gmail.com>
-
-+ PR binutils/21665
-+ * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
-+ (_bfd_generic_get_section_contents_in_window): Likewise.
-+
-+2017-06-27 Alan Modra <amodra@gmail.com>
-+
- PR binutils/21665
- * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
- Use unsigned file pointer type, and remove cast.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_7.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_7.patch
deleted file mode 100644
index 2cae63b4f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_7.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 60a02042bacf8d25814430080adda61ed086bca6 Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc@redhat.com>
-Date: Fri, 30 Jun 2017 11:03:37 +0100
-Subject: [PATCH] Fix failures in MMIX linker tests introduced by fix for PR
- 21665.
-
- PR binutils/21665
- * objdump.c (disassemble_section): Move check for an overlarge
- section to just before the allocation of memory. Do not check
- section size against file size, but instead use an arbitrary 2Gb
- limit. Issue a warning message if the section is too big.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9955 #7
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- binutils/ChangeLog | 8 ++++++++
- binutils/objdump.c | 25 ++++++++++++++++++++++++-
- 2 files changed, 32 insertions(+), 1 deletion(-)
-
-Index: git/binutils/objdump.c
-===================================================================
---- git.orig/binutils/objdump.c
-+++ git/binutils/objdump.c
-@@ -2048,7 +2048,7 @@ disassemble_section (bfd *abfd, asection
- return;
-
- datasize = bfd_get_section_size (section);
-- if (datasize == 0 || datasize >= (bfd_size_type) bfd_get_file_size (abfd))
-+ if (datasize == 0)
- return;
-
- if (start_address == (bfd_vma) -1
-@@ -2112,6 +2112,29 @@ disassemble_section (bfd *abfd, asection
- }
- rel_ppend = rel_pp + rel_count;
-
-+ /* PR 21665: Check for overlarge datasizes.
-+ Note - we used to check for "datasize > bfd_get_file_size (abfd)" but
-+ this fails when using compressed sections or compressed file formats
-+ (eg MMO, tekhex).
-+
-+ The call to xmalloc below will fail if too much memory is requested,
-+ which will catch the problem in the normal use case. But if a memory
-+ checker is in use, eg valgrind or sanitize, then an exception will
-+ be still generated, so we try to catch the problem first.
-+
-+ Unfortunately there is no simple way to determine how much memory can
-+ be allocated by calling xmalloc. So instead we use a simple, arbitrary
-+ limit of 2Gb. Hopefully this should be enough for most users. If
-+ someone does start trying to disassemble sections larger then 2Gb in
-+ size they will doubtless complain and we can increase the limit. */
-+#define MAX_XMALLOC (1024 * 1024 * 1024 * 2UL) /* 2Gb */
-+ if (datasize > MAX_XMALLOC)
-+ {
-+ non_fatal (_("Reading section %s failed because it is too big (%#lx)"),
-+ section->name, (unsigned long) datasize);
-+ return;
-+ }
-+
- data = (bfd_byte *) xmalloc (datasize);
-
- bfd_get_section_contents (abfd, section, data, 0, datasize);
-Index: git/binutils/ChangeLog
-===================================================================
---- git.orig/binutils/ChangeLog
-+++ git/binutils/ChangeLog
-@@ -1,3 +1,11 @@
-+2017-06-30 Nick Clifton <nickc@redhat.com>
-+
-+ PR binutils/21665
-+ * objdump.c (disassemble_section): Move check for an overlarge
-+ section to just before the allocation of memory. Do not check
-+ section size against file size, but instead use an arbitrary 2Gb
-+ limit. Issue a warning message if the section is too big.
-+
- 2017-06-26 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21665
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_8.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_8.patch
deleted file mode 100644
index 45dd97467..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_8.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-From bae7501e87ab614115d9d3213b4dd18d96e604db Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Sat, 1 Jul 2017 21:58:10 +0930
-Subject: [PATCH] Use bfd_malloc_and_get_section
-
-It's nicer than xmalloc followed by bfd_get_section_contents, since
-xmalloc exits on failure and needs a check that its size_t arg doesn't
-lose high bits when converted from bfd_size_type.
-
- PR binutils/21665
- * objdump.c (strtab): Make var a bfd_byte*.
- (disassemble_section): Don't limit malloc size. Instead, use
- bfd_malloc_and_get_section.
- (read_section_stabs): Use bfd_malloc_and_get_section. Return
- bfd_byte*.
- (find_stabs_section): Remove now unnecessary cast.
- * objcopy.c (copy_object): Use bfd_malloc_and_get_section. Free
- contents on error return.
- * nlmconv.c (copy_sections): Use bfd_malloc_and_get_section.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9955 #8
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- binutils/ChangeLog | 13 +++++++++++++
- binutils/nlmconv.c | 6 ++----
- binutils/objcopy.c | 5 +++--
- binutils/objdump.c | 44 +++++++-------------------------------------
- 4 files changed, 25 insertions(+), 43 deletions(-)
-
-Index: git/binutils/ChangeLog
-===================================================================
---- git.orig/binutils/ChangeLog
-+++ git/binutils/ChangeLog
-@@ -1,3 +1,16 @@
-+2017-07-01 Alan Modra <amodra@gmail.com>
-+
-+ PR binutils/21665
-+ * objdump.c (strtab): Make var a bfd_byte*.
-+ (disassemble_section): Don't limit malloc size. Instead, use
-+ bfd_malloc_and_get_section.
-+ (read_section_stabs): Use bfd_malloc_and_get_section. Return
-+ bfd_byte*.
-+ (find_stabs_section): Remove now unnecessary cast.
-+ * objcopy.c (copy_object): Use bfd_malloc_and_get_section. Free
-+ contents on error return.
-+ * nlmconv.c (copy_sections): Use bfd_malloc_and_get_section.
-+
- 2017-06-30 Nick Clifton <nickc@redhat.com>
-
- PR binutils/21665
-Index: git/binutils/nlmconv.c
-===================================================================
---- git.orig/binutils/nlmconv.c
-+++ git/binutils/nlmconv.c
-@@ -1224,7 +1224,7 @@ copy_sections (bfd *inbfd, asection *ins
- const char *inname;
- asection *outsec;
- bfd_size_type size;
-- void *contents;
-+ bfd_byte *contents;
- long reloc_size;
- bfd_byte buf[4];
- bfd_size_type add;
-@@ -1240,9 +1240,7 @@ copy_sections (bfd *inbfd, asection *ins
- contents = NULL;
- else
- {
-- contents = xmalloc (size);
-- if (! bfd_get_section_contents (inbfd, insec, contents,
-- (file_ptr) 0, size))
-+ if (!bfd_malloc_and_get_section (inbfd, insec, &contents))
- bfd_fatal (bfd_get_filename (inbfd));
- }
-
-Index: git/binutils/objdump.c
-===================================================================
---- git.orig/binutils/objdump.c
-+++ git/binutils/objdump.c
-@@ -180,7 +180,7 @@ static long dynsymcount = 0;
- static bfd_byte *stabs;
- static bfd_size_type stab_size;
-
--static char *strtab;
-+static bfd_byte *strtab;
- static bfd_size_type stabstr_size;
-
- static bfd_boolean is_relocatable = FALSE;
-@@ -2112,29 +2112,6 @@ disassemble_section (bfd *abfd, asection
- }
- rel_ppend = rel_pp + rel_count;
-
-- /* PR 21665: Check for overlarge datasizes.
-- Note - we used to check for "datasize > bfd_get_file_size (abfd)" but
-- this fails when using compressed sections or compressed file formats
-- (eg MMO, tekhex).
--
-- The call to xmalloc below will fail if too much memory is requested,
-- which will catch the problem in the normal use case. But if a memory
-- checker is in use, eg valgrind or sanitize, then an exception will
-- be still generated, so we try to catch the problem first.
--
-- Unfortunately there is no simple way to determine how much memory can
-- be allocated by calling xmalloc. So instead we use a simple, arbitrary
-- limit of 2Gb. Hopefully this should be enough for most users. If
-- someone does start trying to disassemble sections larger then 2Gb in
-- size they will doubtless complain and we can increase the limit. */
--#define MAX_XMALLOC (1024 * 1024 * 1024 * 2UL) /* 2Gb */
-- if (datasize > MAX_XMALLOC)
-- {
-- non_fatal (_("Reading section %s failed because it is too big (%#lx)"),
-- section->name, (unsigned long) datasize);
-- return;
-- }
--
- data = (bfd_byte *) xmalloc (datasize);
-
- bfd_get_section_contents (abfd, section, data, 0, datasize);
-@@ -2652,12 +2629,11 @@ dump_dwarf (bfd *abfd)
- /* Read ABFD's stabs section STABSECT_NAME, and return a pointer to
- it. Return NULL on failure. */
-
--static char *
-+static bfd_byte *
- read_section_stabs (bfd *abfd, const char *sect_name, bfd_size_type *size_ptr)
- {
- asection *stabsect;
-- bfd_size_type size;
-- char *contents;
-+ bfd_byte *contents;
-
- stabsect = bfd_get_section_by_name (abfd, sect_name);
- if (stabsect == NULL)
-@@ -2666,10 +2642,7 @@ read_section_stabs (bfd *abfd, const cha
- return FALSE;
- }
-
-- size = bfd_section_size (abfd, stabsect);
-- contents = (char *) xmalloc (size);
--
-- if (! bfd_get_section_contents (abfd, stabsect, contents, 0, size))
-+ if (!bfd_malloc_and_get_section (abfd, stabsect, &contents))
- {
- non_fatal (_("reading %s section of %s failed: %s"),
- sect_name, bfd_get_filename (abfd),
-@@ -2679,7 +2652,7 @@ read_section_stabs (bfd *abfd, const cha
- return NULL;
- }
-
-- *size_ptr = size;
-+ *size_ptr = bfd_section_size (abfd, stabsect);
-
- return contents;
- }
-@@ -2806,8 +2779,7 @@ find_stabs_section (bfd *abfd, asection
-
- if (strtab)
- {
-- stabs = (bfd_byte *) read_section_stabs (abfd, section->name,
-- &stab_size);
-+ stabs = read_section_stabs (abfd, section->name, &stab_size);
- if (stabs)
- print_section_stabs (abfd, section->name, &sought->string_offset);
- }
-Index: git/binutils/objcopy.c
-===================================================================
---- git.orig/binutils/objcopy.c
-+++ git/binutils/objcopy.c
-@@ -2186,14 +2186,15 @@ copy_object (bfd *ibfd, bfd *obfd, const
- continue;
- }
-
-- bfd_byte * contents = xmalloc (size);
-- if (bfd_get_section_contents (ibfd, sec, contents, 0, size))
-+ bfd_byte *contents;
-+ if (bfd_malloc_and_get_section (ibfd, sec, &contents))
- {
- if (fwrite (contents, 1, size, f) != size)
- {
- non_fatal (_("error writing section contents to %s (error: %s)"),
- pdump->filename,
- strerror (errno));
-+ free (contents);
- return FALSE;
- }
- }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_9.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_9.patch
deleted file mode 100644
index c6353d8ce..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_9.patch
+++ /dev/null
@@ -1,361 +0,0 @@
-From 8e2f54bcee7e3e8315d4a39a302eaf8e4389e07d Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Tue, 30 May 2017 06:34:05 -0700
-Subject: [PATCH] Add bfd_get_file_size to get archive element size
-
-We can't use stat() to get archive element size. Add bfd_get_file_size
-to get size for both normal files and archive elements.
-
-bfd/
-
- PR binutils/21519
- * bfdio.c (bfd_get_file_size): New function.
- * bfd-in2.h: Regenerated.
-
-binutils/
-
- PR binutils/21519
- * objdump.c (dump_relocs_in_section): Replace get_file_size
- with bfd_get_file_size to get archive element size.
- * testsuite/binutils-all/objdump.exp (test_objdump_f): New
- proc.
- (test_objdump_h): Likewise.
- (test_objdump_t): Likewise.
- (test_objdump_r): Likewise.
- (test_objdump_s): Likewise.
- Add objdump tests on archive.
-
-Upstream-Status: Backport
-CVE: CVE-2017-9955
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- bfd/ChangeLog | 6 +
- bfd/bfd-in2.h | 2 +
- bfd/bfdio.c | 23 ++++
- binutils/ChangeLog | 13 ++
- binutils/objdump.c | 2 +-
- binutils/testsuite/binutils-all/objdump.exp | 178 +++++++++++++++++++---------
- 6 files changed, 170 insertions(+), 54 deletions(-)
-
-Index: git/bfd/bfd-in2.h
-===================================================================
---- git.orig/bfd/bfd-in2.h
-+++ git/bfd/bfd-in2.h
-@@ -1241,6 +1241,8 @@ long bfd_get_mtime (bfd *abfd);
-
- file_ptr bfd_get_size (bfd *abfd);
-
-+file_ptr bfd_get_file_size (bfd *abfd);
-+
- void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
- int prot, int flags, file_ptr offset,
- void **map_addr, bfd_size_type *map_len);
-Index: git/bfd/bfdio.c
-===================================================================
---- git.orig/bfd/bfdio.c
-+++ git/bfd/bfdio.c
-@@ -434,6 +434,29 @@ bfd_get_size (bfd *abfd)
- return buf.st_size;
- }
-
-+/*
-+FUNCTION
-+ bfd_get_file_size
-+
-+SYNOPSIS
-+ file_ptr bfd_get_file_size (bfd *abfd);
-+
-+DESCRIPTION
-+ Return the file size (as read from file system) for the file
-+ associated with BFD @var{abfd}. It supports both normal files
-+ and archive elements.
-+
-+*/
-+
-+file_ptr
-+bfd_get_file_size (bfd *abfd)
-+{
-+ if (abfd->my_archive != NULL
-+ && !bfd_is_thin_archive (abfd->my_archive))
-+ return arelt_size (abfd);
-+
-+ return bfd_get_size (abfd);
-+}
-
- /*
- FUNCTION
-Index: git/binutils/objdump.c
-===================================================================
---- git.orig/binutils/objdump.c
-+++ git/binutils/objdump.c
-@@ -3310,7 +3310,7 @@ dump_relocs_in_section (bfd *abfd,
- }
-
- if ((bfd_get_file_flags (abfd) & (BFD_IN_MEMORY | BFD_LINKER_CREATED)) == 0
-- && relsize > get_file_size (bfd_get_filename (abfd)))
-+ && relsize > bfd_get_file_size (abfd))
- {
- printf (" (too many: 0x%x)\n", section->reloc_count);
- bfd_set_error (bfd_error_file_truncated);
-Index: git/binutils/testsuite/binutils-all/objdump.exp
-===================================================================
---- git.orig/binutils/testsuite/binutils-all/objdump.exp
-+++ git/binutils/testsuite/binutils-all/objdump.exp
-@@ -64,96 +64,168 @@ if [regexp $want $got] then {
- if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then {
- return
- }
-+if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest2.o]} then {
-+ return
-+}
- if [is_remote host] {
- set testfile [remote_download host tmpdir/bintest.o]
-+ set testfile2 [remote_download host tmpdir/bintest2.o]
- } else {
- set testfile tmpdir/bintest.o
-+ set testfile2 tmpdir/bintest2.o
-+}
-+
-+if { ![istarget "alpha-*-*"] || [is_elf_format] } then {
-+ remote_file host file delete tmpdir/bintest.a
-+ set got [binutils_run $AR "rc tmpdir/bintest.a $testfile2"]
-+ if ![string match "" $got] then {
-+ fail "bintest.a"
-+ remote_file host delete tmpdir/bintest.a
-+ } else {
-+ if [is_remote host] {
-+ set testarchive [remote_download host tmpdir/bintest.a]
-+ } else {
-+ set testarchive tmpdir/bintest.a
-+ }
-+ }
-+ remote_file host delete tmpdir/bintest2.o
- }
-
- # Test objdump -f
-
--set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f $testfile"]
-+proc test_objdump_f { testfile dumpfile } {
-+ global OBJDUMP
-+ global OBJDUMPFLAGS
-+ global cpus_regex
-
--set want "$testfile:\[ \]*file format.*architecture:\[ \]*${cpus_regex}.*HAS_RELOC.*HAS_SYMS"
-+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f $testfile"]
-
--if ![regexp $want $got] then {
-- fail "objdump -f"
--} else {
-- pass "objdump -f"
-+ set want "$dumpfile:\[ \]*file format.*architecture:\[ \]*${cpus_regex}.*HAS_RELOC.*HAS_SYMS"
-+
-+ if ![regexp $want $got] then {
-+ fail "objdump -f ($testfile, $dumpfile)"
-+ } else {
-+ pass "objdump -f ($testfile, $dumpfile)"
-+ }
-+}
-+
-+test_objdump_f $testfile $testfile
-+if { [ remote_file host exists $testarchive ] } then {
-+ test_objdump_f $testarchive bintest2.o
- }
-
- # Test objdump -h
-
--set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -h $testfile"]
-+proc test_objdump_h { testfile dumpfile } {
-+ global OBJDUMP
-+ global OBJDUMPFLAGS
-
--set want "$testfile:\[ \]*file format.*Sections.*\[0-9\]+\[ \]+\[^ \]*(text|TEXT|P|\\\$CODE\\\$)\[^ \]*\[ \]*(\[0-9a-fA-F\]+).*\[0-9\]+\[ \]+\[^ \]*(\\.data|DATA|D_1)\[^ \]*\[ \]*(\[0-9a-fA-F\]+)"
-+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -h $testfile"]
-
--if ![regexp $want $got all text_name text_size data_name data_size] then {
-- fail "objdump -h"
--} else {
-- verbose "text name is $text_name size is $text_size"
-- verbose "data name is $data_name size is $data_size"
-- set ets 8
-- set eds 4
-- # The [ti]c4x target has the property sizeof(char)=sizeof(long)=1
-- if [istarget *c4x*-*-*] then {
-- set ets 2
-- set eds 1
-- }
-- # c54x section sizes are in bytes, not octets; adjust accordingly
-- if [istarget *c54x*-*-*] then {
-- set ets 4
-- set eds 2
-- }
-- if {[expr "0x$text_size"] < $ets || [expr "0x$data_size"] < $eds} then {
-- send_log "sizes too small\n"
-- fail "objdump -h"
-+ set want "$dumpfile:\[ \]*file format.*Sections.*\[0-9\]+\[ \]+\[^ \]*(text|TEXT|P|\\\$CODE\\\$)\[^ \]*\[ \]*(\[0-9a-fA-F\]+).*\[0-9\]+\[ \]+\[^ \]*(\\.data|DATA|D_1)\[^ \]*\[ \]*(\[0-9a-fA-F\]+)"
-+
-+ if ![regexp $want $got all text_name text_size data_name data_size] then {
-+ fail "objdump -h ($testfile, $dumpfile)"
- } else {
-- pass "objdump -h"
-+ verbose "text name is $text_name size is $text_size"
-+ verbose "data name is $data_name size is $data_size"
-+ set ets 8
-+ set eds 4
-+ # The [ti]c4x target has the property sizeof(char)=sizeof(long)=1
-+ if [istarget *c4x*-*-*] then {
-+ set ets 2
-+ set eds 1
-+ }
-+ # c54x section sizes are in bytes, not octets; adjust accordingly
-+ if [istarget *c54x*-*-*] then {
-+ set ets 4
-+ set eds 2
-+ }
-+ if {[expr "0x$text_size"] < $ets || [expr "0x$data_size"] < $eds} then {
-+ send_log "sizes too small\n"
-+ fail "objdump -h ($testfile, $dumpfile)"
-+ } else {
-+ pass "objdump -h ($testfile, $dumpfile)"
-+ }
- }
- }
-
-+test_objdump_h $testfile $testfile
-+if { [ remote_file host exists $testarchive ] } then {
-+ test_objdump_h $testarchive bintest2.o
-+}
-+
- # Test objdump -t
-
--set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -t $testfile"]
-+proc test_objdump_t { testfile} {
-+ global OBJDUMP
-+ global OBJDUMPFLAGS
-+
-+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -t $testfile"]
-+
-+ if [info exists vars] then { unset vars }
-+ while {[regexp "(\[a-z\]*_symbol)(.*)" $got all symbol rest]} {
-+ set vars($symbol) 1
-+ set got $rest
-+ }
-
--if [info exists vars] then { unset vars }
--while {[regexp "(\[a-z\]*_symbol)(.*)" $got all symbol rest]} {
-- set vars($symbol) 1
-- set got $rest
-+ if {![info exists vars(text_symbol)] \
-+ || ![info exists vars(data_symbol)] \
-+ || ![info exists vars(common_symbol)] \
-+ || ![info exists vars(external_symbol)]} then {
-+ fail "objdump -t ($testfile)"
-+ } else {
-+ pass "objdump -t ($testfile)"
-+ }
- }
-
--if {![info exists vars(text_symbol)] \
-- || ![info exists vars(data_symbol)] \
-- || ![info exists vars(common_symbol)] \
-- || ![info exists vars(external_symbol)]} then {
-- fail "objdump -t"
--} else {
-- pass "objdump -t"
-+test_objdump_t $testfile
-+if { [ remote_file host exists $testarchive ] } then {
-+ test_objdump_t $testarchive
- }
-
- # Test objdump -r
-
--set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r $testfile"]
-+proc test_objdump_r { testfile dumpfile } {
-+ global OBJDUMP
-+ global OBJDUMPFLAGS
-
--set want "$testfile:\[ \]*file format.*RELOCATION RECORDS FOR \\\[\[^\]\]*(text|TEXT|P|\\\$CODE\\\$)\[^\]\]*\\\].*external_symbol"
-+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r $testfile"]
-
--if [regexp $want $got] then {
-- pass "objdump -r"
--} else {
-- fail "objdump -r"
-+ set want "$dumpfile:\[ \]*file format.*RELOCATION RECORDS FOR \\\[\[^\]\]*(text|TEXT|P|\\\$CODE\\\$)\[^\]\]*\\\].*external_symbol"
-+
-+ if [regexp $want $got] then {
-+ pass "objdump -r ($testfile, $dumpfile)"
-+ } else {
-+ fail "objdump -r ($testfile, $dumpfile)"
-+ }
-+}
-+
-+test_objdump_r $testfile $testfile
-+if { [ remote_file host exists $testarchive ] } then {
-+ test_objdump_r $testarchive bintest2.o
- }
-
- # Test objdump -s
-
--set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -s $testfile"]
-+proc test_objdump_s { testfile dumpfile } {
-+ global OBJDUMP
-+ global OBJDUMPFLAGS
-
--set want "$testfile:\[ \]*file format.*Contents.*(text|TEXT|P|\\\$CODE\\\$)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000001|01000000|00000100).*Contents.*(data|DATA|D_1)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000002|02000000|00000200)"
-+ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -s $testfile"]
-
--if [regexp $want $got] then {
-- pass "objdump -s"
--} else {
-- fail "objdump -s"
-+ set want "$dumpfile:\[ \]*file format.*Contents.*(text|TEXT|P|\\\$CODE\\\$)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000001|01000000|00000100).*Contents.*(data|DATA|D_1)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000002|02000000|00000200)"
-+
-+ if [regexp $want $got] then {
-+ pass "objdump -s ($testfile, $dumpfile)"
-+ } else {
-+ fail "objdump -s ($testfile, $dumpfile)"
-+ }
-+}
-+
-+test_objdump_s $testfile $testfile
-+if { [ remote_file host exists $testarchive ] } then {
-+ test_objdump_s $testarchive bintest2.o
- }
-
- # Test objdump -s on a file that contains a compressed .debug section
-Index: git/bfd/ChangeLog
-===================================================================
---- git.orig/bfd/ChangeLog
-+++ git/bfd/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
-+
-+ PR binutils/21519
-+ * bfdio.c (bfd_get_file_size): New function.
-+ * bfd-in2.h: Regenerated.
-+
- 2017-06-27 Alan Modra <amodra@gmail.com>
-
- PR binutils/21665
-Index: git/binutils/ChangeLog
-===================================================================
---- git.orig/binutils/ChangeLog
-+++ git/binutils/ChangeLog
-@@ -1,3 +1,16 @@
-+2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
-+
-+ PR binutils/21519
-+ * objdump.c (dump_relocs_in_section): Replace get_file_size
-+ with bfd_get_file_size to get archive element size.
-+ * testsuite/binutils-all/objdump.exp (test_objdump_f): New
-+ proc.
-+ (test_objdump_h): Likewise.
-+ (test_objdump_t): Likewise.
-+ (test_objdump_r): Likewise.
-+ (test_objdump_s): Likewise.
-+ Add objdump tests on archive.
-+
- 2017-07-01 Alan Modra <amodra@gmail.com>
-
- PR binutils/21665
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb
index b51437bbc..51a974890 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.28.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.29.1.bb
@@ -42,4 +42,8 @@ do_install_class-native () {
rmdir ${D}/${libdir}64 || :
}
+# Split out libbfd-*.so so including perf doesn't include extra stuff
+PACKAGE_BEFORE_PN += "libbfd"
+FILES_libbfd = "${libdir}/libbfd-*.so"
+
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch
index 9543a56f1..1e86f5522 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bison/bison/0001-src-local.mk-fix-parallel-issue.patch
@@ -1,4 +1,4 @@
-From 3a15f7c9ace6c0294edc313a1848cafcc31b2a92 Mon Sep 17 00:00:00 2001
+From 5b9204eee4b06b48d54ecc3ef3a0b56fc5cc84f8 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Fri, 24 Apr 2015 00:38:32 -0700
Subject: [PATCH] src/local.mk: fix parallel issue
@@ -9,11 +9,12 @@ echo '#! /bin/sh' >src/yacc.tmp
/bin/bash: src/yacc.tmp: No such file or directory
Makefile:6670: recipe for target 'src/yacc' failed
-Upstream-Status: Pending
+Upstream-Status: Submitted [ http://lists.gnu.org/archive/html/bison-patches/2017-07/msg00000.html ]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
- src/local.mk | 1 +
+ src/local.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/local.mk b/src/local.mk
@@ -29,5 +30,5 @@ index 573ad00..28bfae4 100644
$(AM_V_at)echo "exec '$(bindir)/bison' -y "'"$$@"' >>$@.tmp
$(AM_V_at)chmod a+x $@.tmp
--
-1.7.9.5
+2.8.1
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 cffcd885a..7d066be0a 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
@@ -23,7 +23,6 @@ EXTRA_OECONF += "M4=m4"
SRC_URI[md5sum] = "c342201de104cc9ce0a21e0ad10d4021"
SRC_URI[sha256sum] = "a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1"
-LDFLAGS_prepend_libc-uclibc = " -lrt "
DEPENDS_class-native = "gettext-minimal-native"
inherit autotools gettext texinfo
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 4f01734bb..a3101351e 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
@@ -134,7 +134,7 @@ do_install () {
echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
# Use python 3 instead of python 2
- sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/pybootchartgui
+ sed -i -e '1s,#!.*python.*,#!${USRBINPATH}/env python3,' ${D}${bindir}/pybootchartgui
}
PACKAGES =+ "pybootchartgui"
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
new file mode 100644
index 000000000..a81900ee7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
@@ -0,0 +1,30 @@
+From e58369f6d36bc51eb59d6afa34c1cae3ff0810ef Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 7 Aug 2017 14:10:38 +0300
+Subject: [PATCH] Makefile: build mktables using native gcc
+
+It's a throwaway helper binary used during build, and so it needs to
+be native.
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ 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
+
+ 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
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.9.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
index a5e9e2278..c3cc89c2b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.9.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
@@ -14,8 +14,10 @@ DEPENDS = "util-linux attr e2fsprogs lzo acl"
DEPENDS_append_class-target = " udev"
RDEPENDS_${PN} = "libgcc"
-SRCREV = "96485c34ac0329fb0073476f16d2083c64701f29"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+SRCREV = "0607132c3200bcead1426e6dc685432008de95de"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
+ file://0001-Makefile-build-mktables-using-native-gcc.patch \
+ "
inherit autotools-brokensep pkgconfig manpages
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 c60c16410..84d04cfa0 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,6 +22,7 @@ SRC_URI = "git://github.com/openSUSE/build-compare.git \
SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
PE = "1"
PV = "2015.02.10+git${SRCPV}"
+UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch b/import-layers/yocto-poky/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch
index f96f104fa..3d303fbc6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/chrpath/chrpath/standarddoc.patch
@@ -1,14 +1,24 @@
-Upstream-Status: Pending
+From 285b5fbf1d6b25ff55d305c17edf4d327bf19dd3 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 5 Jul 2011 23:42:29 +0100
+Subject: [PATCH] chrpath: Ensure the package respects the docdir variable
-autoconf/automake set docdir automatically, use their value ensuring
+autoconf/automake set docdir automatically, use their value ensuring
doc files are placed into $datadir/doc, not $prefix/doc.
RP 5/7/2011
-Index: chrpath-0.13/Makefile.am
-===================================================================
---- chrpath-0.13.orig/Makefile.am 2011-07-05 23:40:14.769920254 +0100
-+++ chrpath-0.13/Makefile.am 2011-07-05 23:40:19.819920635 +0100
+Upstream-Status: Submitted [ http://lists.alioth.debian.org/pipermail/chrpath-devel/Week-of-Mon-20170710/000013.html ]
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b50ad21..5f7e861 100644
+--- a/Makefile.am
++++ b/Makefile.am
@@ -1,7 +1,5 @@
SUBDIRS = testsuite deb
@@ -17,3 +27,6 @@ Index: chrpath-0.13/Makefile.am
doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README
bin_PROGRAMS = chrpath
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb
index 7ad4345ef..e55e8b1cf 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.7.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.8.2.bb
@@ -18,6 +18,7 @@ CMAKE_EXTRACONF = "\
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
-DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
-DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
-DHAVE_SYS_ACL_H=0 \
"
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 6c8b36d18..6aeb25fdd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
@@ -6,7 +6,7 @@ HOMEPAGE = "http://www.cmake.org/"
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
SECTION = "console/utils"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=7a64bc564202bf7401d9a8ef33c9564d \
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=8d8c7bc32f8797d23f5cf605d9339d2d \
file://Source/cmake.h;beginline=1;endline=3;md5=4494dee184212fc89c469c3acd555a14"
CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
@@ -14,12 +14,11 @@ 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://avoid-gcc-warnings-with-Wstrict-prototypes.patch \
- file://0001-KWIML-tests-Remove-format-security-from-flags.patch \
+ file://0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch \
"
-SRC_URI[md5sum] = "79bd7e65cd81ea3aa2619484ad6ff25a"
-SRC_URI[sha256sum] = "dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0"
+SRC_URI[md5sum] = "b5dff61f6a7f1305271ab3f6ae261419"
+SRC_URI[sha256sum] = "da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d"
UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
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
new file mode 100644
index 000000000..9b820db00
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-FindCUDA-Use-find_program-if-find_host_program-is-no.patch
@@ -0,0 +1,40 @@
+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/0001-KWIML-tests-Remove-format-security-from-flags.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch
deleted file mode 100644
index 190133ba5..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-KWIML-tests-Remove-format-security-from-flags.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0941395b146804abcd87004589ff6e7a2953412d Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 16 Mar 2017 14:39:04 +0200
-Subject: [PATCH] KWIML tests: Remove format-security from flags
-
-For the tests where "format" is removed from flags, "format-security"
-should be removed as well. Otherwise building cmake with
-"-Wformat -Wformat-security" fails:
-
-| cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
-
-Upstream-Status: Backport [part of commit f77420cfc9]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- Utilities/KWIML/test/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Utilities/KWIML/test/CMakeLists.txt b/Utilities/KWIML/test/CMakeLists.txt
-index 4f6f37b..1bf93bb 100644
---- a/Utilities/KWIML/test/CMakeLists.txt
-+++ b/Utilities/KWIML/test/CMakeLists.txt
-@@ -10,7 +10,7 @@ endif()
- # Suppress printf/scanf format warnings; we test if the sizes match.
- foreach(lang C CXX)
- if(KWIML_LANGUAGE_${lang} AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU")
-- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format")
-+ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format -Wno-format-security")
- endif()
- endforeach()
-
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index 6518408c7..dc8477ea3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -1,7 +1,7 @@
set( CMAKE_SYSTEM_NAME Linux )
set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE )
-set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
+set( CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE )
set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} )
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch
deleted file mode 100644
index 8b8d4802e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/avoid-gcc-warnings-with-Wstrict-prototypes.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 4bc17345c01ea467099e28c7df30c23ace9e7811 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Fri, 14 Oct 2016 16:26:58 -0700
-Subject: [PATCH] CheckFunctionExists.c: avoid gcc warnings with
- -Wstrict-prototypes
-
-Avoid warnings (and therefore build failures etc) if a user happens
-to add -Wstrict-prototypes to CFLAGS.
-
- | $ gcc --version
- | gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
- |
- | $ gcc -Wstrict-prototypes -Werror -DCHECK_FUNCTION_EXISTS=pthread_create -o foo.o -c Modules/CheckFunctionExists.c
- | Modules/CheckFunctionExists.c:7:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
- | CHECK_FUNCTION_EXISTS();
- | ^
- | cc1: all warnings being treated as errors
- |
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- Modules/CheckFunctionExists.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c
-index 2304000..224e340 100644
---- a/Modules/CheckFunctionExists.c
-+++ b/Modules/CheckFunctionExists.c
-@@ -4,7 +4,7 @@
- extern "C"
- #endif
- char
-- CHECK_FUNCTION_EXISTS();
-+ CHECK_FUNCTION_EXISTS(void);
- #ifdef __CLASSIC_C__
- int main()
- {
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.7.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb
index f566a48cf..3f8fd7a99 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.7.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.8.2.bb
@@ -28,6 +28,7 @@ EXTRA_OECMAKE=" \
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
-DKWSYS_CHAR_IS_SIGNED=1 \
-DBUILD_CursesDialog=0 \
-DKWSYS_LFS_WORKS=1 \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch b/import-layers/yocto-poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
index 01271246a..cd72084ee 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
@@ -3,7 +3,7 @@ From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 2 Jan 2017 17:23:59 +0200
Subject: [PATCH] Correctly install the shared library
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/rpm-software-management/createrepo_c/pull/78]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
src/CMakeLists.txt | 3 ++-
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 1f906ee0a..7b70daa32 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
@@ -11,6 +11,7 @@ SRC_URI = "https://github.com/ikeydoherty/${BPN}/releases/download/v${PV}/${BP}.
file://0001-print-progress-in-percent-when-downloading-CVE-db.patch \
file://0001-curl-allow-overriding-default-CA-certificate-file.patch \
file://0001-update-Compare-computed-vs-expected-sha256-digit-str.patch \
+ file://0001-Fix-freeing-memory-allocated-by-sqlite.patch \
"
SRC_URI[md5sum] = "c5f4247140fc9be3bf41491d31a34155"
@@ -29,7 +30,7 @@ CFLAGS_append = " -Wno-error=pedantic"
do_populate_cve_db() {
if [ "${BB_NO_NETWORK}" = "1" ] ; then
- bberror "BB_NO_NETWORK is set; Can't update cve-check-tool database, CVEs won't be checked"
+ bbwarn "BB_NO_NETWORK is set; Can't update cve-check-tool database, new CVEs won't be detected"
return
fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch
new file mode 100644
index 000000000..4a82cf2dd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch
@@ -0,0 +1,50 @@
+From a3353429652f83bb8b0316500faa88fa2555542d Mon Sep 17 00:00:00 2001
+From: Peter Marko <peter.marko@siemens.com>
+Date: Thu, 13 Apr 2017 23:09:52 +0200
+Subject: [PATCH] Fix freeing memory allocated by sqlite
+
+Upstream-Status: Backport
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ src/core.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/core.c b/src/core.c
+index 6263031..6788f16 100644
+--- a/src/core.c
++++ b/src/core.c
+@@ -82,7 +82,7 @@ static bool ensure_table(CveDB *self)
+ rc = sqlite3_exec(self->db, query, NULL, NULL, &err);
+ if (rc != SQLITE_OK) {
+ fprintf(stderr, "ensure_table(): %s\n", err);
+- free(err);
++ sqlite3_free(err);
+ return false;
+ }
+
+@@ -91,7 +91,7 @@ static bool ensure_table(CveDB *self)
+ rc = sqlite3_exec(self->db, query, NULL, NULL, &err);
+ if (rc != SQLITE_OK) {
+ fprintf(stderr, "ensure_table(): %s\n", err);
+- free(err);
++ sqlite3_free(err);
+ return false;
+ }
+
+@@ -99,11 +99,11 @@ static bool ensure_table(CveDB *self)
+ rc = sqlite3_exec(self->db, query, NULL, NULL, &err);
+ if (rc != SQLITE_OK) {
+ fprintf(stderr, "ensure_table(): %s\n", err);
+- free(err);
++ sqlite3_free(err);
+ return false;
+ }
+ if (err) {
+- free(err);
++ sqlite3_free(err);
+ }
+
+ return true;
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch
index 0510e3ae0..8ea6f686e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch
@@ -38,7 +38,7 @@ index 06d4b30..0fe6d76 100644
+ if (dltotal && percent && percent->end >= percent->start) {
+ unsigned int diff = percent->end - percent->start;
+ if (diff) {
-+ fprintf(stderr,"completed: "CURL_FORMAT_OFF_T"%%\r", percent->start + (diff * dlnow / dltotal));
++ fprintf(stderr,"completed: %"CURL_FORMAT_CURL_OFF_T"%%\r", percent->start + (diff * dlnow / dltotal));
+ }
+ }
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb b/import-layers/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb
index 583b387e9..f8b7b06cf 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb
@@ -18,14 +18,9 @@ S = "${WORKDIR}/diffstat-${PV}"
inherit autotools gettext ptest
-LDFLAGS += "${TOOLCHAIN_OPTIONS}"
+EXTRA_AUTORECONF += "--exclude=aclocal"
-do_configure () {
- if [ ! -e ${S}/acinclude.m4 ]; then
- mv ${S}/aclocal.m4 ${S}/acinclude.m4
- fi
- autotools_do_configure
-}
+LDFLAGS += "${TOOLCHAIN_OPTIONS}"
do_install_ptest() {
cp -r ${S}/testing ${D}${PTEST_PATH}
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 ea3d7c10b..b6da65a58 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,6 +23,7 @@ SRC_URI = "git://github.com/distcc/distcc.git;branch=${PV} \
file://distcc.service"
SRCREV = "d8b18df3e9dcbe4f092bed565835d3975e99432c"
S = "${WORKDIR}/git"
+UPSTREAM_VERSION_UNKNOWN = "1"
inherit autotools pkgconfig update-rc.d useradd systemd
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.1.bb
index 109a9d2ee..f83281e23 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.1.bb
@@ -18,6 +18,6 @@ do_unpack_extra() {
}
addtask unpack_extra after do_unpack before do_patch
-SRC_URI[md5sum] = "281ee572d45c78eca73a14834c495ffd"
-SRC_URI[sha256sum] = "7ec35bb193729c1d593a1460b59d82d24b89102ab23fd0416e6cf4325d077e45"
+SRC_URI[md5sum] = "679c2c015c515aa6ca5f229aee49c102"
+SRC_URI[sha256sum] = "d766ce9b25548c59b1e7e930505b4cad9a7bb0b904a1a391fbb604d529781ac0"
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
new file mode 100644
index 000000000..05f314151
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf/0001-Check-conf.releasever-instead-of-releasever.patch
@@ -0,0 +1,31 @@
+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/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 61328e6ec..1abd880da 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
@@ -10,8 +10,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
bin/dnf-automatic.in | 2 +-
bin/dnf.in | 2 +-
- bin/yum.in | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
+ 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in
index 5b06aa26..9f6f703e 100755
@@ -33,16 +32,6 @@ index 645d0f06..ab141abd 100755
# The dnf executable script.
#
# Copyright (C) 2012-2016 Red Hat, Inc.
-diff --git a/bin/yum.in b/bin/yum.in
-index f1fee071..013dc8c5 100755
---- a/bin/yum.in
-+++ b/bin/yum.in
-@@ -1,4 +1,4 @@
--#!@PYTHON_EXECUTABLE@
-+#!/usr/bin/env python3
- # The dnf executable script.
- #
- # Copyright (C) 2016 Red Hat, Inc.
--
2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb
index 9f814fb21..3ed6a7457 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb
@@ -10,22 +10,25 @@ SRC_URI = "git://github.com/rpm-software-management/dnf.git \
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 \
"
-PV = "2.0.0+git${SRCPV}"
-SRCREV = "f0093d672d3069cfee8447973ae70ef615fd8886"
+SRCREV = "be2585183ec4485ee4d5e121f242d8669296f065"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
inherit cmake gettext bash-completion distutils3-base systemd
-DEPENDS += "libdnf librepo libcomps python3-pygpgme python3-iniparse"
+DEPENDS += "libdnf librepo libcomps python3-iniparse"
# manpages generation requires http://www.sphinx-doc.org/
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-pygpgme python3-rpm python3-iniparse python3-json python3-importlib python3-curses python3-argparse python3-misc"
+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
+RRECOMMENDS_${PN}_class-target += "gnupg"
# Create a symlink called 'dnf' as 'make install' does not do it, but
# .spec file in dnf source tree does (and then Fedora and dnf documentation
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch
new file mode 100644
index 000000000..50e689440
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch
@@ -0,0 +1,41 @@
+From a328c8bec0bf8071ae8f20fee4c7475205064ba1 Mon Sep 17 00:00:00 2001
+From: sweeaun <swee.aun.khor@intel.com>
+Date: Sun, 10 Sep 2017 00:14:15 -0700
+Subject: [PATCH] dpkg: Support muslx32 build
+
+Upstream-Status: Pending.
+Changes made on ostable and tupletable to enable muslx32 build.
+
+Signed-off-by: sweeaun <swee.aun.khor@intel.com>
+---
+ data/ostable | 1 +
+ data/tupletable | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/data/ostable b/data/ostable
+index be64342..87db273 100644
+--- a/data/ostable
++++ b/data/ostable
+@@ -19,6 +19,7 @@ base-uclibc-linux linux-uclibc linux[^-]*-uclibc
+ eabihf-musl-linux linux-musleabihf linux[^-]*-musleabihf
+ eabi-musl-linux linux-musleabi linux[^-]*-musleabi
+ base-musl-linux linux-musl linux[^-]*-musl
++x32-musl-linux linux-muslx32 linux[^-]*-muslx32
+ eabihf-gnu-linux linux-gnueabihf linux[^-]*-gnueabihf
+ eabi-gnu-linux linux-gnueabi linux[^-]*-gnueabi
+ abin32-gnu-linux linux-gnuabin32 linux[^-]*-gnuabin32
+diff --git a/data/tupletable b/data/tupletable
+index 28f00bf..748ffab 100644
+--- a/data/tupletable
++++ b/data/tupletable
+@@ -10,6 +10,7 @@ base-uclibc-linux-<cpu> uclibc-linux-<cpu>
+ eabihf-musl-linux-arm musl-linux-armhf
+ eabi-musl-linux-arm musl-linux-armel
+ base-musl-linux-<cpu> musl-linux-<cpu>
++x32-musl-linux-amd64 x32
+ ilp32-gnu-linux-arm64 arm64ilp32
+ eabihf-gnu-linux-arm armhf
+ eabi-gnu-linux-arm armel
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch
index 231a6a290..9fe0ca760 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch
@@ -13,13 +13,13 @@ Upstream-Status: Inappropriate [embedded specific]
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
-index 79b2908..7758aa5 100644
+index 453077fd9..f42ea2882 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
-@@ -235,14 +235,12 @@ parseversion(struct dpkg_version *rversion, const char *string,
-
- /* XXX: Would be faster to use something like cisversion and cisrevision. */
+@@ -243,14 +243,12 @@ parseversion(struct dpkg_version *rversion, const char *string,
ptr = rversion->version;
+ if (!*ptr)
+ return dpkg_put_error(err, _("version number is empty"));
- if (*ptr && !c_isdigit(*ptr++))
- return dpkg_put_warn(err, _("version number does not start with digit"));
for (; *ptr; ptr++) {
@@ -33,6 +33,6 @@ index 79b2908..7758aa5 100644
return dpkg_put_warn(err, _("invalid character in revision number"));
}
---
-2.1.4
+--
+2.11.0
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 a6b00880c..d929466b7 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
@@ -6,37 +6,36 @@ Subject: [PATCH] add musleabi to known target tripets
helps compiling dpkg for musl/arm-softfloat
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
---
-Upstream-Status: Pending
-
- ostable | 1 +
- triplettable | 1 +
+ data/ostable | 1 +
+ data/tupletable | 1 +
2 files changed, 2 insertions(+)
-diff --git a/ostable b/ostable
-index 3bb6819..d0ffdc7 100644
---- a/ostable
-+++ b/ostable
-@@ -15,6 +15,7 @@
- uclibceabi-linux linux-uclibceabi linux[^-]*-uclibceabi
- uclibc-linux linux-uclibc linux[^-]*-uclibc
- musleabihf-linux linux-musleabihf linux[^-]*-musleabihf
-+musleabi-linux linux-musleabi linux[^-]*-musleabi
- musl-linux linux-musl linux[^-]*-musl
- gnueabihf-linux linux-gnueabihf linux[^-]*-gnueabihf
- gnueabi-linux linux-gnueabi linux[^-]*-gnueabi
-diff --git a/triplettable b/triplettable
-index 1213584..70d24c1 100644
---- a/triplettable
-+++ b/triplettable
-@@ -6,6 +6,7 @@
- uclibceabi-linux-arm uclibc-linux-armel
- uclibc-linux-<cpu> uclibc-linux-<cpu>
- musleabihf-linux-arm musl-linux-armhf
-+musleabi-linux-arm musl-linux-armel
- musl-linux-<cpu> musl-linux-<cpu>
- gnueabihf-linux-arm armhf
- gnueabi-linux-arm armel
+diff --git a/data/ostable b/data/ostable
+index 99c1f889d..be6434271 100644
+--- a/data/ostable
++++ b/data/ostable
+@@ -17,6 +17,7 @@
+ eabi-uclibc-linux linux-uclibceabi linux[^-]*-uclibceabi
+ base-uclibc-linux linux-uclibc linux[^-]*-uclibc
+ eabihf-musl-linux linux-musleabihf linux[^-]*-musleabihf
++eabi-musl-linux linux-musleabi linux[^-]*-musleabi
+ base-musl-linux linux-musl linux[^-]*-musl
+ eabihf-gnu-linux linux-gnueabihf linux[^-]*-gnueabihf
+ eabi-gnu-linux linux-gnueabi linux[^-]*-gnueabi
+diff --git a/data/tupletable b/data/tupletable
+index 5f500f6ca..28f00bfe6 100644
+--- a/data/tupletable
++++ b/data/tupletable
+@@ -8,6 +8,7 @@
+ eabi-uclibc-linux-arm uclibc-linux-armel
+ base-uclibc-linux-<cpu> uclibc-linux-<cpu>
+ eabihf-musl-linux-arm musl-linux-armhf
++eabi-musl-linux-arm musl-linux-armel
+ base-musl-linux-<cpu> musl-linux-<cpu>
+ ilp32-gnu-linux-arm64 arm64ilp32
+ eabihf-gnu-linux-arm armhf
--
-2.6.4
+2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
index 8bfaad14d..1b985df0f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
@@ -23,18 +23,17 @@ Upstream-Status: Inappropriate [Configuration]
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
-index 655aa55..927f56f 100644
+index a92b58e..a3d1912 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
-@@ -447,7 +447,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
- snprintf(mtime, sizeof(mtime), "@%ld", timestamp);
+@@ -450,7 +450,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
- execlp(TAR, "tar", "-cf", "-", "--format=gnu",
-- "--mtime", mtime, "--clamp-mtime",
-+ "--mtime", mtime,
- "--null", "--no-unquote",
- "--no-recursion", "-T", "-", NULL);
- ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
+ command_init(&cmd, TAR, "tar -cf");
+ command_add_args(&cmd, "tar", "-cf", "-", "--format=gnu",
+- "--mtime", mtime, "--clamp-mtime", NULL);
++ "--mtime", mtime, NULL);
+ /* Mode might become a positional argument, pass it before -T. */
+ if (mode)
+ command_add_args(&cmd, "--mode", mode, NULL);
--
-2.1.4
-
+2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
index dc69eb2d1..d165616a1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
@@ -24,23 +24,25 @@ empty in configure script.
Upstream-Status: Pending
Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
+Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
---
- triplettable | 1 +
+ data/tupletable | 1 +
1 file changed, 1 insertion(+)
-diff --git a/triplettable b/triplettable
-index abe4726..1e9c247 100644
---- a/triplettable
-+++ b/triplettable
-@@ -11,6 +11,7 @@ gnueabihf-linux-arm armhf
- gnueabi-linux-arm armel
- gnuabin32-linux-mips64r6el mipsn32r6el
- gnuabin32-linux-mips64r6 mipsn32r6
-+gnueabi-linux-armeb armeb
- gnuabin32-linux-mips64el mipsn32el
- gnuabin32-linux-mips64 mipsn32
- gnuabi64-linux-mips64r6el mips64r6el
+diff --git a/data/tupletable b/data/tupletable
+index b7802bec3..5f500f6ca 100644
+--- a/data/tupletable
++++ b/data/tupletable
+@@ -12,6 +12,7 @@ base-musl-linux-<cpu> musl-linux-<cpu>
+ ilp32-gnu-linux-arm64 arm64ilp32
+ eabihf-gnu-linux-arm armhf
+ eabi-gnu-linux-arm armel
++eabi-gnu-linux-armeb armeb
+ abin32-gnu-linux-mips64r6el mipsn32r6el
+ abin32-gnu-linux-mips64r6 mipsn32r6
+ abin32-gnu-linux-mips64el mipsn32el
--
-2.1.4
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch
index cad4c0f0a..4e0d22acb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch
@@ -7,16 +7,23 @@ Upstream-Status: Pending
Signed-off-by: Joe Slater <jslater@windriver.com>
+---
+ scripts/Dpkg/Arch.pm | 3 ---
+ 1 file changed, 3 deletions(-)
+diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
+index 1720847b8..6345ce3b9 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
-@@ -233,9 +233,6 @@ sub read_triplettable()
- (my $dt = $debtriplet) =~ s/<cpu>/$_cpu/;
+@@ -323,9 +323,6 @@ sub _load_tupletable()
+ (my $dt = $debtuple) =~ s/<cpu>/$_cpu/;
(my $da = $debarch) =~ s/<cpu>/$_cpu/;
-- next if exists $debarch_to_debtriplet{$da}
-- or exists $debtriplet_to_debarch{$dt};
+- next if exists $debarch_to_debtuple{$da}
+- or exists $debtuple_to_debarch{$dt};
-
- $debarch_to_debtriplet{$da} = $dt;
- $debtriplet_to_debarch{$dt} = $da;
+ $debarch_to_debtuple{$da} = $dt;
+ $debtuple_to_debarch{$dt} = $da;
}
+--
+2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
index f0b0789e4..9a248ccb4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
@@ -8,7 +8,7 @@ Before=sysinit.target
Type=oneshot
EnvironmentFile=-@SYSCONFDIR@/default/postinst
ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/dpkg --configure -a > $LOGFILE 2>&1; else @BINDIR@/dpkg --configure -a; fi"
-ExecStartPost=@BASE_BINDIR@/systemctl disable dpkg-configure.service
+ExecStartPost=@BASE_BINDIR@/systemctl --no-reload disable dpkg-configure.service
StandardOutput=syslog
RemainAfterExit=No
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/noman.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/noman.patch
index d30c15018..a7f3cb8f4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/noman.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/noman.patch
@@ -1,14 +1,22 @@
Upstream-Status: Inappropriate [disable feature]
-diff -ruN dpkg-1.15.8.5-orig/Makefile.am dpkg-1.15.8.5/Makefile.am
---- dpkg-1.15.8.5-orig/Makefile.am 2010-10-08 12:27:15.042083703 +0800
-+++ dpkg-1.15.8.5/Makefile.am 2010-10-08 12:27:27.755148228 +0800
-@@ -12,8 +12,7 @@
- utils \
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 0da52cb16..a1f79e0a2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,8 +13,7 @@ SUBDIRS = \
$(MAYBE_DSELECT) \
scripts \
+ t-func \
- po \
- man
+ po
ACLOCAL_AMFLAGS = -I m4
+
+--
+2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
index 21385af87..c0c59f141 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.10.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
@@ -1,7 +1,7 @@
require dpkg.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160731T221931Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20170518T093838Z/pool/main/d/dpkg/dpkg_1.18.24.tar.xz \
file://noman.patch \
file://remove-tar-no-timestamp.patch \
file://arch_pm.patch \
@@ -13,8 +13,9 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160731T221931Z/pool/main/
file://0005-dpkg-compiler.m4-remove-Wvla.patch \
file://0006-add-musleabi-to-known-target-tripets.patch \
file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \
+ file://0001-dpkg-Support-muslx32-build.patch \
"
SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch "
-SRC_URI[md5sum] = "ccff17730c0964428fc186ded2f2f401"
-SRC_URI[sha256sum] = "025524da41ba18b183ff11e388eb8686f7cc58ee835ed7d48bd159c46a8b6dc5"
+SRC_URI[md5sum] = "02e8af8faf1e689228da806c3e8c6882"
+SRC_URI[sha256sum] = "d853081d3e06bfd46a227056e591f094e42e78fa8a5793b0093bad30b710d7b4"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch
deleted file mode 100644
index 1d1752025..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch
+++ /dev/null
@@ -1,255 +0,0 @@
-From bf9f3b6d5b10d19218b4ed904c12b22e36ec57dd Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Thu, 16 Feb 2017 22:02:35 -0500
-Subject: [PATCH] e2fsck: exit with exit status 0 if no errors were fixed
-
-Previously, e2fsck would exit with a status code of 1 even though the
-only changes that it made to the file system were various
-optimziations and not fixing file system corruption. Since the man
-page states that an exit status of 1 means "file system errors
-corrupted", fix e2fsck to return an exit status of 0.
-
-Upstream-Status: Backport
-
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
----
- e2fsck/e2fsck.conf.5.in | 7 +++++++
- e2fsck/journal.c | 1 +
- e2fsck/problem.c | 8 +++++---
- e2fsck/problemP.h | 1 +
- e2fsck/unix.c | 20 ++++++++++++++++----
- tests/f_collapse_extent_tree/expect.1 | 2 +-
- tests/f_compress_extent_tree_level/expect.1 | 2 +-
- tests/f_convert_bmap/expect.1 | 2 +-
- tests/f_convert_bmap_and_extent/expect.1 | 2 +-
- tests/f_extent_htree/expect.1 | 2 +-
- tests/f_jnl_errno/expect.1 | 2 +-
- tests/f_journal/expect.1 | 2 +-
- tests/f_orphan/expect.1 | 2 +-
- tests/f_orphan_extents_inode/expect.1 | 2 +-
- tests/f_rehash_dir/expect.1 | 2 +-
- tests/f_unsorted_EAs/expect.1 | 2 +-
- 16 files changed, 41 insertions(+), 18 deletions(-)
-
-diff --git a/e2fsck/e2fsck.conf.5.in b/e2fsck/e2fsck.conf.5.in
-index 1848bdb..0bfc76a 100644
---- a/e2fsck/e2fsck.conf.5.in
-+++ b/e2fsck/e2fsck.conf.5.in
-@@ -303,6 +303,13 @@ of 'should this problem be fixed?'. The
- option even overrides the
- .B -y
- option given on the command-line (just for the specific problem, of course).
-+.TP
-+.I not_a_fix
-+This boolean option, it set to true, marks the problem as
-+one where if the user gives permission to make the requested change,
-+it does not mean that the file system had a problem which has since
-+been fixed. This is used for requests to optimize the file system's
-+data structure, such as pruning an extent tree.
- @TDB_MAN_COMMENT@.SH THE [scratch_files] STANZA
- @TDB_MAN_COMMENT@The following relations are defined in the
- @TDB_MAN_COMMENT@.I [scratch_files]
-diff --git a/e2fsck/journal.c b/e2fsck/journal.c
-index 46fe7b4..c4f58f1 100644
---- a/e2fsck/journal.c
-+++ b/e2fsck/journal.c
-@@ -572,6 +572,7 @@ static void clear_v2_journal_fields(journal_t *journal)
- if (!fix_problem(ctx, PR_0_CLEAR_V2_JOURNAL, &pctx))
- return;
-
-+ ctx->flags |= E2F_FLAG_PROBLEMS_FIXED;
- memset(((char *) journal->j_superblock) + V1_SB_SIZE, 0,
- ctx->fs->blocksize-V1_SB_SIZE);
- mark_buffer_dirty(journal->j_sb_buffer);
-diff --git a/e2fsck/problem.c b/e2fsck/problem.c
-index 34a671e..4b25069 100644
---- a/e2fsck/problem.c
-+++ b/e2fsck/problem.c
-@@ -1276,12 +1276,12 @@ static struct e2fsck_problem problem_table[] = {
- /* Inode extent tree could be shorter */
- { PR_1E_CAN_COLLAPSE_EXTENT_TREE,
- N_("@i %i @x tree (at level %b) could be shorter. "),
-- PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK },
-+ PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK | PR_NOT_A_FIX },
-
- /* Inode extent tree could be narrower */
- { PR_1E_CAN_NARROW_EXTENT_TREE,
- N_("@i %i @x tree (at level %b) could be narrower. "),
-- PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK },
-+ PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK | PR_NOT_A_FIX },
-
- /* Pass 2 errors */
-
-@@ -2166,6 +2166,7 @@ int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx)
- reconfigure_bool(ctx, ptr, key, PR_NO_NOMSG, "no_nomsg");
- reconfigure_bool(ctx, ptr, key, PR_PREEN_NOHDR, "preen_noheader");
- reconfigure_bool(ctx, ptr, key, PR_FORCE_NO, "force_no");
-+ reconfigure_bool(ctx, ptr, key, PR_NOT_A_FIX, "not_a_fix");
- profile_get_integer(ctx->profile, "options",
- "max_count_problems", 0, 0,
- &ptr->max_count);
-@@ -2283,7 +2284,8 @@ int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx)
- if (ptr->flags & PR_AFTER_CODE)
- answer = fix_problem(ctx, ptr->second_code, pctx);
-
-- if (answer && (ptr->prompt != PROMPT_NONE))
-+ if (answer && (ptr->prompt != PROMPT_NONE) &&
-+ !(ptr->flags & PR_NOT_A_FIX))
- ctx->flags |= E2F_FLAG_PROBLEMS_FIXED;
-
- return answer;
-diff --git a/e2fsck/problemP.h b/e2fsck/problemP.h
-index 7944cd6..63bb8df 100644
---- a/e2fsck/problemP.h
-+++ b/e2fsck/problemP.h
-@@ -44,3 +44,4 @@ struct latch_descr {
- #define PR_CONFIG 0x080000 /* This problem has been customized
- from the config file */
- #define PR_FORCE_NO 0x100000 /* Force the answer to be no */
-+#define PR_NOT_A_FIX 0x200000 /* Yes doesn't mean a problem was fixed */
-diff --git a/e2fsck/unix.c b/e2fsck/unix.c
-index eb9f311..9e4d31a 100644
---- a/e2fsck/unix.c
-+++ b/e2fsck/unix.c
-@@ -1901,11 +1901,23 @@ no_journal:
- fix_problem(ctx, PR_6_IO_FLUSH, &pctx);
-
- if (was_changed) {
-- exit_value |= FSCK_NONDESTRUCT;
-- if (!(ctx->options & E2F_OPT_PREEN))
-- log_out(ctx, _("\n%s: ***** FILE SYSTEM WAS "
-- "MODIFIED *****\n"),
-+ int fs_fixed = (ctx->flags & E2F_FLAG_PROBLEMS_FIXED);
-+
-+ if (fs_fixed)
-+ exit_value |= FSCK_NONDESTRUCT;
-+ if (!(ctx->options & E2F_OPT_PREEN)) {
-+#if 0 /* Do this later; it breaks too many tests' golden outputs */
-+ log_out(ctx, fs_fixed ?
-+ _("\n%s: ***** FILE SYSTEM ERRORS "
-+ "CORRECTED *****\n") :
-+ _("%s: File system was modified.\n"),
- ctx->device_name);
-+#else
-+ log_out(ctx,
-+ _("\n%s: ***** FILE SYSTEM WAS MODIFIED *****\n"),
-+ ctx->device_name);
-+#endif
-+ }
- if (ctx->mount_flags & EXT2_MF_ISROOT) {
- log_out(ctx, _("%s: ***** REBOOT SYSTEM *****\n"),
- ctx->device_name);
-diff --git a/tests/f_collapse_extent_tree/expect.1 b/tests/f_collapse_extent_tree/expect.1
-index e2eb65e..8165a58 100644
---- a/tests/f_collapse_extent_tree/expect.1
-+++ b/tests/f_collapse_extent_tree/expect.1
-@@ -13,4 +13,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 12/128 files (0.0% non-contiguous), 19/512 blocks
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_compress_extent_tree_level/expect.1 b/tests/f_compress_extent_tree_level/expect.1
-index a359c99..dd33f63 100644
---- a/tests/f_compress_extent_tree_level/expect.1
-+++ b/tests/f_compress_extent_tree_level/expect.1
-@@ -20,4 +20,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 12/128 files (8.3% non-contiguous), 26/512 blocks
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_convert_bmap/expect.1 b/tests/f_convert_bmap/expect.1
-index 7d2ca86..c387962 100644
---- a/tests/f_convert_bmap/expect.1
-+++ b/tests/f_convert_bmap/expect.1
-@@ -23,4 +23,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 12/128 files (8.3% non-contiguous), 570/2048 blocks
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_convert_bmap_and_extent/expect.1 b/tests/f_convert_bmap_and_extent/expect.1
-index 7af91aa..c86c571 100644
---- a/tests/f_convert_bmap_and_extent/expect.1
-+++ b/tests/f_convert_bmap_and_extent/expect.1
-@@ -30,4 +30,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 13/128 files (15.4% non-contiguous), 574/2048 blocks
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_extent_htree/expect.1 b/tests/f_extent_htree/expect.1
-index 223ca69..ea48405 100644
---- a/tests/f_extent_htree/expect.1
-+++ b/tests/f_extent_htree/expect.1
-@@ -26,4 +26,4 @@ test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- 0 sockets
- ------------
- 343 files
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_jnl_errno/expect.1 b/tests/f_jnl_errno/expect.1
-index c572951..4134234 100644
---- a/tests/f_jnl_errno/expect.1
-+++ b/tests/f_jnl_errno/expect.1
-@@ -6,4 +6,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 11/2048 files (9.1% non-contiguous), 1330/8192 blocks
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_journal/expect.1 b/tests/f_journal/expect.1
-index a202c80..0a18654 100644
---- a/tests/f_journal/expect.1
-+++ b/tests/f_journal/expect.1
-@@ -59,4 +59,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 53/2048 files (1.9% non-contiguous), 1409/8192 blocks
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_orphan/expect.1 b/tests/f_orphan/expect.1
-index eddc1f8..087ebee 100644
---- a/tests/f_orphan/expect.1
-+++ b/tests/f_orphan/expect.1
-@@ -11,4 +11,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 12/2048 files (0.0% non-contiguous), 1303/8192 blocks
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_orphan_extents_inode/expect.1 b/tests/f_orphan_extents_inode/expect.1
-index 2eaab78..5d713b3 100644
---- a/tests/f_orphan_extents_inode/expect.1
-+++ b/tests/f_orphan_extents_inode/expect.1
-@@ -7,4 +7,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 12/16 files (0.0% non-contiguous), 21/100 blocks
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_rehash_dir/expect.1 b/tests/f_rehash_dir/expect.1
-index 6076765..c1449ba 100644
---- a/tests/f_rehash_dir/expect.1
-+++ b/tests/f_rehash_dir/expect.1
-@@ -7,4 +7,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 105/2048 files (2.9% non-contiguous), 336/512 blocks
--Exit status is 1
-+Exit status is 0
-diff --git a/tests/f_unsorted_EAs/expect.1 b/tests/f_unsorted_EAs/expect.1
-index 7d588d7..64b9045 100644
---- a/tests/f_unsorted_EAs/expect.1
-+++ b/tests/f_unsorted_EAs/expect.1
-@@ -8,4 +8,4 @@ Pass 5: Checking group summary information
-
- test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
- test_filesys: 12/2048 files (0.0% non-contiguous), 1294/2048 blocks
--Exit status is 1
-+Exit status is 0
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch
new file mode 100644
index 000000000..fc4a54098
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-misc-create_inode.c-set-dir-s-mode-correctly.patch
@@ -0,0 +1,41 @@
+From f6d188580c2c9599319076fee22f2424652c711c Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 13 Sep 2017 19:55:35 -0700
+Subject: [PATCH] misc/create_inode.c: set dir's mode correctly
+
+The dir's mode has been set by ext2fs_mkdir() with umask, so
+reset it to the source's mode in set_inode_extra().
+
+Fixed when source dir's mode is 521, but tarball would be 721, this was
+incorrect.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ misc/create_inode.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/misc/create_inode.c b/misc/create_inode.c
+index 8ce3faf..50fbaa8 100644
+--- a/misc/create_inode.c
++++ b/misc/create_inode.c
+@@ -116,7 +116,14 @@ static errcode_t set_inode_extra(ext2_filsys fs, ext2_ino_t ino,
+
+ inode.i_uid = st->st_uid;
+ inode.i_gid = st->st_gid;
+- inode.i_mode |= st->st_mode;
++ /*
++ * The dir's mode has been set by ext2fs_mkdir() with umask, so
++ * reset it to the source's mode
++ */
++ if S_ISDIR(st->st_mode)
++ inode.i_mode = LINUX_S_IFDIR | st->st_mode;
++ else
++ inode.i_mode |= st->st_mode;
+ inode.i_atime = st->st_atime;
+ inode.i_mtime = st->st_mtime;
+ inode.i_ctime = st->st_ctime;
+--
+2.10.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch
deleted file mode 100644
index abbf2bad2..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 30ef41f68703b6a16027cc8787118b87f1462dff Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Mon, 28 Mar 2016 20:31:33 -0400
-Subject: [PATCH e2fsprogs] include sys/sysmacros.h as needed
-
-The minor/major/makedev macros are not entirely standard. glibc has had
-the definitions in sys/sysmacros.h since the start, and wants to move away
-from always defining them implicitly via sys/types.h (as this pollutes the
-namespace in violation of POSIX). Other C libraries have already dropped
-them. Since the configure script already checks for this header, use that
-to pull in the header in files that use these macros.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
-Taken from gentoo portage.
-
-Upstream-Status: Pending
-
----
- debugfs/debugfs.c | 3 +++
- lib/blkid/devname.c | 3 +++
- lib/blkid/devno.c | 3 +++
- lib/ext2fs/finddev.c | 3 +++
- lib/ext2fs/ismounted.c | 3 +++
- misc/create_inode.c | 4 ++++
- misc/mk_hugefiles.c | 3 +++
- 7 files changed, 22 insertions(+)
-
-diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
-index ba8be40..7d481bc 100644
---- a/debugfs/debugfs.c
-+++ b/debugfs/debugfs.c
-@@ -26,6 +26,9 @@ extern char *optarg;
- #include <errno.h>
- #endif
- #include <fcntl.h>
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
-
- #include "debugfs.h"
- #include "uuid/uuid.h"
-diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c
-index 3e2efa9..671e781 100644
---- a/lib/blkid/devname.c
-+++ b/lib/blkid/devname.c
-@@ -36,6 +36,9 @@
- #if HAVE_SYS_MKDEV_H
- #include <sys/mkdev.h>
- #endif
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
- #include <time.h>
-
- #include "blkidP.h"
-diff --git a/lib/blkid/devno.c b/lib/blkid/devno.c
-index 479d977..61e6fc7 100644
---- a/lib/blkid/devno.c
-+++ b/lib/blkid/devno.c
-@@ -31,6 +31,9 @@
- #if HAVE_SYS_MKDEV_H
- #include <sys/mkdev.h>
- #endif
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
-
- #include "blkidP.h"
-
-diff --git a/lib/ext2fs/finddev.c b/lib/ext2fs/finddev.c
-index 311608d..62fa0db 100644
---- a/lib/ext2fs/finddev.c
-+++ b/lib/ext2fs/finddev.c
-@@ -31,6 +31,9 @@
- #if HAVE_SYS_MKDEV_H
- #include <sys/mkdev.h>
- #endif
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
-
- #include "ext2_fs.h"
- #include "ext2fs.h"
-diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c
-index e0f69dd..7404996 100644
---- a/lib/ext2fs/ismounted.c
-+++ b/lib/ext2fs/ismounted.c
-@@ -49,6 +49,9 @@
- #if HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
-
- #include "ext2_fs.h"
- #include "ext2fs.h"
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index 4dbd8e5..98aeb41 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -22,6 +22,10 @@
- #include <attr/xattr.h>
- #endif
- #include <sys/ioctl.h>
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
-+
- #include <ext2fs/ext2fs.h>
- #include <ext2fs/ext2_types.h>
- #include <ext2fs/fiemap.h>
-diff --git a/misc/mk_hugefiles.c b/misc/mk_hugefiles.c
-index 71a15c5..00e95cd 100644
---- a/misc/mk_hugefiles.c
-+++ b/misc/mk_hugefiles.c
-@@ -35,6 +35,9 @@ extern int optind;
- #include <sys/ioctl.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
- #include <libgen.h>
- #include <limits.h>
- #include <blkid/blkid.h>
---
-2.8.2
-
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 879d93625..7df096763 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,3 +1,5 @@
+Upstream-Status: Inappropriate
+
diff --git a/tests/Makefile.in b/tests/Makefile.in
index c130f4a..d2ade03 100644
--- a/tests/Makefile.in
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
new file mode 100644
index 000000000..8e5d1d341
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/reproducible-doc.patch
@@ -0,0 +1,21 @@
+
+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/run-ptest b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
index e02fc7f2b..ef10b08bc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
@@ -1,11 +1,10 @@
#!/bin/sh
cd ./test
-./test_script &>../test.log
-if [ $? -eq 0 ]
-then
- echo "PASS: e2fsprogs"
- rm ../test.log
-else
- echo "FAIL: e2fsprogs"
-fi
+./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /'
+rm -rf /var/volatile/tmp/*e2fsprogs*
+rm -f tmp-*
+rm -f *.tmp
+rm -f *.ok
+rm -f *.failed
+rm -f *.log
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
index 5216c7027..00093cc20 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
@@ -7,14 +7,14 @@ SRC_URI += "file://acinclude.m4 \
file://ptest.patch \
file://mkdir.patch \
file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
- file://e2fsprogs-1.43-sysmacros.patch \
file://mkdir_p.patch \
- file://0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch \
+ file://reproducible-doc.patch \
+ file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \
"
SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch"
-SRCREV = "3d66c4b20f09f923078c1e6eb9b549865b549674"
+SRCREV = "2a13c84b513aa094d1cda727e92d35a89dd777da"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
@@ -106,7 +106,12 @@ do_compile_ptest() {
}
do_install_ptest() {
- cp -a ${B}/tests ${D}${PTEST_PATH}/test
- cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
+ 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*
+
+ # Remove various files
+ find "${D}${PTEST_PATH}" -type f \
+ \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name '*.c' -o -name '*.h' \)\
+ -exec rm -f {} +
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
deleted file mode 100644
index 3754c1c36..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 668accf322fd7185e273bfd50b84320e71d9de5a Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Fri, 10 Apr 2015 00:29:18 +0200
-Subject: [PATCH] elf_getarsym: Silence -Werror=maybe-uninitialized false
- positive
-
-Upstream-Status: Pending
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- libelf/elf_getarsym.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c
-index d0bb28a..08954d2 100644
---- a/libelf/elf_getarsym.c
-+++ b/libelf/elf_getarsym.c
-@@ -165,8 +165,13 @@ elf_getarsym (elf, ptr)
- int w = index64_p ? 8 : 4;
-
- /* We have an archive. The first word in there is the number of
-- entries in the table. */
-- uint64_t n;
-+ entries in the table.
-+ Set to SIZE_MAX just to silence -Werror=maybe-uninitialized
-+ elf_getarsym.c:290:9: error: 'n' may be used uninitialized in this function
-+ The read_number_entries function doesn't initialize n only when returning
-+ -1 which in turn ensures to jump over usage of this uninitialized variable.
-+ */
-+ uint64_t n = SIZE_MAX;
- size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr);
- if (read_number_entries (&n, elf, &off, index64_p) < 0)
- {
---
-2.3.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch
deleted file mode 100644
index d88f4ebd0..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 93c51144c3f664d4e9709da75a1d0fa00ea0fe95 Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mark@klomp.org>
-Date: Sun, 12 Feb 2017 21:51:34 +0100
-Subject: [PATCH] libasm: Fix one GCC7 -Wformat-truncation=2 warning.
-
-Make sure that if we have really lots of labels the tempsym doesn't get
-truncated because it is too small to hold the whole name.
-
-This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed
-out by enabling this warning because there are currently some issues
-with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
-
-Signed-off-by: Mark Wielaard <mark@klomp.org>
-
-Upstream-Status: Backport (https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95)
-Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-
----
- libasm/ChangeLog | 6 +++++-
- libasm/asm_newsym.c | 6 ++++--
- 2 files changed, 9 insertions(+), 3 deletions(-)
-
-Index: elfutils-0.168/libasm/asm_newsym.c
-===================================================================
---- elfutils-0.168.orig/libasm/asm_newsym.c
-+++ elfutils-0.168/libasm/asm_newsym.c
-@@ -1,5 +1,5 @@
- /* Define new symbol for current position in given section.
-- Copyright (C) 2002, 2005, 2016 Red Hat, Inc.
-+ Copyright (C) 2002, 2005, 2016, 2017 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-@@ -44,7 +44,9 @@ AsmSym_t *
- asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size,
- int type, int binding)
- {
--#define TEMPSYMLEN 10
-+/* We don't really expect labels with many digits, but in theory it could
-+ be 10 digits (plus ".L" and a zero terminator). */
-+#define TEMPSYMLEN 13
- char tempsym[TEMPSYMLEN];
- AsmSym_t *result;
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch
deleted file mode 100644
index a4d568b08..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Backport [from debian]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
-Index: elfutils-0.165/tests/run-native-test.sh
-===================================================================
---- elfutils-0.165.orig/tests/run-native-test.sh
-+++ elfutils-0.165/tests/run-native-test.sh
-@@ -83,6 +83,9 @@ native_test()
- # "cannot attach to process: Function not implemented".
- [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
-
-+# hurd's /proc/$PID/maps does not give paths yet.
-+[ "$(uname)" = "GNU" ] && exit 77
-+
- native_test ${abs_builddir}/allregs
- native_test ${abs_builddir}/funcretval
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff
deleted file mode 100644
index 3570deca9..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Backport [from debian]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
---- elfutils-0.165.orig/tests/run-strip-strmerge.sh
-+++ elfutils-0.165/tests/run-strip-strmerge.sh
-@@ -30,7 +30,7 @@ remerged=remerged.elf
- tempfiles $merged $stripped $debugfile $remerged
-
- echo elflint $input
--testrun ${abs_top_builddir}/src/elflint --gnu $input
-+testrun_on_self_skip ${abs_top_builddir}/src/elflint --gnu $input
- echo elfstrmerge
- testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input
- echo elflint $merged
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch
deleted file mode 100644
index 49085d1c8..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Upstream-Status: Backport [from debian]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
-Index: b/tests/run-native-test.sh
-===================================================================
---- a/tests/run-native-test.sh
-+++ b/tests/run-native-test.sh
-@@ -77,6 +77,12 @@ native_test()
- test $native -eq 0 || testrun "$@" -p $native > /dev/null
- }
-
-+# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does
-+# not give absolute paths due to sbuild's bind mounts (bug #570805)
-+# therefore the next two test programs are expected to fail with
-+# "cannot attach to process: Function not implemented".
-+[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
-+
- native_test ${abs_builddir}/allregs
- native_test ${abs_builddir}/funcretval
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff
deleted file mode 100644
index 3df35768b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff
+++ /dev/null
@@ -1,42 +0,0 @@
-On many architectures this test fails because binaries/libs produced by
-binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.
-
-So we run the tests on all archs to see what breaks, but if it breaks we ignore
-the result (exitcode 77 means: this test was skipped).
-
-Upstream-Status: Backport [from debian]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
-Index: b/tests/run-elflint-self.sh
-===================================================================
---- a/tests/run-elflint-self.sh
-+++ b/tests/run-elflint-self.sh
-@@ -18,4 +18,4 @@
-
- . $srcdir/test-subr.sh
-
--testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
-+testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld
-Index: b/tests/test-subr.sh
-===================================================================
---- a/tests/test-subr.sh
-+++ b/tests/test-subr.sh
-@@ -152,3 +152,18 @@ testrun_on_self_quiet()
- # Only exit if something failed
- if test $exit_status != 0; then exit $exit_status; fi
- }
-+
-+# Same as testrun_on_self(), but skip on failure.
-+testrun_on_self_skip()
-+{
-+ exit_status=0
-+
-+ for file in $self_test_files; do
-+ testrun $* $file \
-+ || { echo "*** failure in $* $file"; exit_status=77; }
-+ done
-+
-+ # Only exit if something failed
-+ if test $exit_status != 0; then exit $exit_status; fi
-+}
-+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch
deleted file mode 100644
index d31961f94..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Fix control path where we have str as uninitialized string
-
-| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c: In function 'i386_disasm':
-| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5: error: 'str' may be used uninitialized in this function [-Werror=maybe-uninitialized]
-| memcpy (buf + bufcnt, _str, _len); \
-| ^
-| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17: note: 'str' was declared here
-| const char *str;
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: elfutils-0.164/libcpu/i386_disasm.c
-===================================================================
---- elfutils-0.164.orig/libcpu/i386_disasm.c
-+++ elfutils-0.164/libcpu/i386_disasm.c
-@@ -821,6 +821,7 @@ i386_disasm (const uint8_t **startp, con
- }
-
- default:
-+ str = "";
- assert (! "INVALID not handled");
- }
- }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch
deleted file mode 100644
index d0cd3ed6f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-
-# This patch makes the link to the dependencies of libdw explicit, as recent
-# ld no longer implicitly links them. See
-# http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html as
-# a similar example of the error message you can encounter without this patch,
-# and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and
-# https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for more
-# details.
-
---- elfutils-0.148.orig/src/Makefile.am
-+++ elfutils-0.148/src/Makefile.am
-@@ -86,7 +86,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l
- libelf = ../libelf/libelf.a
- else
- libasm = ../libasm/libasm.so
--libdw = ../libdw/libdw.so
-+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
- libelf = ../libelf/libelf.so
- endif
- libebl = ../libebl/libebl.a
---- elfutils-0.148.orig/tests/Makefile.am
-+++ elfutils-0.148/tests/Makefile.am
-@@ -172,7 +172,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l
- libelf = ../libelf/libelf.a
- libasm = ../libasm/libasm.a
- else
--libdw = ../libdw/libdw.so
-+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
- libelf = ../libelf/libelf.so
- libasm = ../libasm/libasm.so
- endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.168.bb b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
index b977ce0ea..3b81e287b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.168.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.170.bb
@@ -6,39 +6,34 @@ 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"
-SRC_URI[md5sum] = "52adfa40758d0d39e5d5c57689bf38d6"
-SRC_URI[sha256sum] = "b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276"
+SRC_URI[md5sum] = "03599aee98c9b726c7a732a2dd0245d5"
+SRC_URI[sha256sum] = "1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066"
SRC_URI += "\
- file://dso-link-change.patch \
- file://Fix_elf_cvt_gunhash.patch \
- file://fixheadercheck.patch \
- file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
- file://0001-remove-the-unneed-checking.patch \
- file://0001-fix-a-stack-usage-warning.patch \
- file://aarch64_uio.patch \
- file://Fix_one_GCC7_warning.patch \
- file://shadow.patch \
+ 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 the patch from debian
+# 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.diff \
- file://debian/testsuite-ignore-elflint.diff \
+ file://debian/mips_backend.patch \
file://debian/mips_readelf_w.patch \
- file://debian/kfreebsd_path.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://debian/hurd_path.patch \
- file://debian/ignore_strmerge.diff \
"
# Fix the patches from Debian with GCC7
-SRC_URI += "file://fallthrough.patch"
-SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch "
+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
@@ -48,7 +43,6 @@ inherit autotools gettext
EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
EXTRA_OECONF_append_class-native = " --without-bzlib"
-EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
do_install_append() {
if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
@@ -56,11 +50,6 @@ do_install_append() {
fi
}
-# we can not build complete elfutils when using uclibc
-# but some recipes e.g. gcc 4.5 depends on libelf so we
-# build only libelf for uclibc case
-
-EXTRA_OEMAKE_libc-uclibc = "-C libelf"
EXTRA_OEMAKE_class-native = ""
EXTRA_OEMAKE_class-nativesdk = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
new file mode 100644
index 000000000..28c57f236
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
@@ -0,0 +1,52 @@
+From 0a69a26c9f7487daca900db87cd1195857a4603f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:10:57 +0800
+Subject: [PATCH 1/7] dso link change
+
+Upstream-Status: Pending
+
+This patch makes the link to the dependencies of libdw explicit, as
+recent ld no longer implicitly links them. See
+http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html
+as a similar example of the error message you can encounter without this
+patch, and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and
+https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for
+more details.
+
+Rebase to 0.170
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/Makefile.am | 2 +-
+ tests/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 2b1c0dc..9305b84 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -44,7 +44,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.a -lz
+ else
+ libasm = ../libasm/libasm.so
+-libdw = ../libdw/libdw.so
++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.so
+ endif
+ libebl = ../libebl/libebl.a
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 3735084..528615d 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -400,7 +400,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.a -lz
+ libasm = ../libasm/libasm.a
+ else
+-libdw = ../libdw/libdw.so
++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.so
+ libasm = ../libasm/libasm.so
+ endif
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
new file mode 100644
index 000000000..fb0b060b4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
@@ -0,0 +1,39 @@
+From 7672e363468271b4c63ff58770c5aac15ab8f722 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 4 Oct 2017 22:30:46 -0700
+Subject: [PATCH] libasm may link with libbz2 if found
+
+This can fail to link binaries like objdump
+where indirect libraries may be not found by linker
+
+| /mnt/a/oe/build/tmp/work/riscv64-bec-linux/elfutils/0.170-r0/recipe-sysroot/usr/lib/libbz2.so.1: error adding symbols: DSO missing from command line
+| collect2: error: ld returned 1 exit status
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/Makefile.am | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index e03bc32..9b7e853 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -39,11 +39,11 @@ EXTRA_DIST += make-debug-archive.in
+ CLEANFILES += make-debug-archive
+
+ if BUILD_STATIC
+-libasm = ../libasm/libasm.a
++libasm = ../libasm/libasm.a $(zip_LIBS)
+ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.a -lz
+ else
+-libasm = ../libasm/libasm.so
++libasm = ../libasm/libasm.so $(zip_LIBS)
+ libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
+ libelf = ../libelf/libelf.so
+ endif
+--
+2.14.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
index f861e8990..2f718eb82 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
@@ -1,4 +1,7 @@
-Fix elf_cvt_gunhash if dest and src are same.
+From e98670f7c7b4c73fb65534949716fd8d043960d5 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:13:59 +0800
+Subject: [PATCH 2/7] Fix elf_cvt_gunhash if dest and src are same.
Upstream-Status: Pending
@@ -6,6 +9,13 @@ The 'dest' and 'src' can be same, we need to save the value of src32[2]
before swaping it.
Signed-off-by: Baoshan Pang <BaoShan.Pang@windriver.com>
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libelf/gnuhash_xlate.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h
index 6faf113..04d9ca1 100644
--- a/libelf/gnuhash_xlate.h
@@ -27,3 +37,6 @@ index 6faf113..04d9ca1 100644
/* Now the 64 bit words. */
Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4];
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
index 5de3b24c8..7c49fced1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
@@ -1,13 +1,27 @@
-For some binaries we can get a invalid section alignment, for example if
-sh_align = 1 and sh_addralign is 0. In the case of a zero size section like
-".note.GNU-stack", this is irrelavent as far as I can tell and we shouldn't
+From 565d5935abf5b58773f9c8385c00189221980d98 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:17:20 +0800
+Subject: [PATCH 3/7] fixheadercheck
+
+For some binaries we can get a invalid section alignment, for example if
+sh_align = 1 and sh_addralign is 0. In the case of a zero size section
+like
+".note.GNU-stack", this is irrelavent as far as I can tell and we
+shouldn't
error in this case.
RP 2014/6/11
Upstream-Status: Pending
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libelf/elf32_updatenull.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
+index d83c0b3..a51bf70 100644
--- a/libelf/elf32_updatenull.c
+++ b/libelf/elf32_updatenull.c
@@ -339,8 +339,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum)
@@ -21,3 +35,6 @@ diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
{
__libelf_seterrno (ELF_E_INVALID_ALIGN);
return -1;
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch
index 5be92d705..d893ad68f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch
@@ -1,4 +1,7 @@
-Disable the test to convert euc-jp
+From bb7ed11950101798aae82f7fda8b3dcb05f755c5 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:24:06 +0800
+Subject: [PATCH 4/7] Disable the test to convert euc-jp
Remove the test "Test against HP-UX 11.11 bug:
No converter from EUC-JP to UTF-8 is provided"
@@ -9,6 +12,9 @@ iconv support and will cause guild-native building fail.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
m4/iconv.m4 | 2 ++
1 file changed, 2 insertions(+)
@@ -34,5 +40,5 @@ index a503646..299f1eb 100644
}]])],
[am_cv_func_iconv_works=yes],
--
-2.0.1
+1.8.3.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch
index 6923bf705..22a01cfa7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch
@@ -1,17 +1,24 @@
-[PATCH] fix a stack-usage warning
+From dd6dbf6af396519380f48c0ef1ce6cf4dd77f6d7 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:25:16 +0800
+Subject: [PATCH 5/7] fix a stack-usage warning
Upstream-Status: Pending
-not use a variable to as a array size, otherwise the warning to error that
+not use a variable to as a array size, otherwise the warning to error
+that
stack usage might be unbounded [-Werror=stack-usage=] will happen
Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
backends/ppc_initreg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
-index 64f5379..52dde3e 100644
+index 69d623b..de41dec 100644
--- a/backends/ppc_initreg.c
+++ b/backends/ppc_initreg.c
@@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
@@ -24,5 +31,5 @@ index 64f5379..52dde3e 100644
dwarf_regs[gpr] = user_regs.r.gpr[gpr];
if (! setfunc (0, gprs, dwarf_regs, arg))
--
-1.9.1
+1.8.3.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch
index 38dc57bef..5f29a0375 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch
@@ -1,4 +1,7 @@
-Fix build on aarch64/musl
+From e57ad47fc8549353ca80c23b9b4f38f31fde13e5 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:27:30 +0800
+Subject: [PATCH 6/7] Fix build on aarch64/musl
Errors
@@ -10,20 +13,28 @@ error: redefinition
^
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: elfutils-0.163/backends/aarch64_initreg.c
-===================================================================
---- elfutils-0.163.orig/backends/aarch64_initreg.c
-+++ elfutils-0.163/backends/aarch64_initreg.c
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/aarch64_initreg.c | 4 ++--
+ backends/arm_initreg.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c
+index daf6f37..6445276 100644
+--- a/backends/aarch64_initreg.c
++++ b/backends/aarch64_initreg.c
@@ -33,7 +33,7 @@
#include "system.h"
#include <assert.h>
- #ifdef __aarch64__
+ #if defined(__aarch64__) && defined(__linux__)
-# include <linux/uio.h>
+# include <sys/uio.h>
# include <sys/user.h>
# include <sys/ptrace.h>
/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
-@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t
+@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
Dwarf_Word dwarf_fregs[32];
for (int r = 0; r < 32; r++)
@@ -32,11 +43,11 @@ Index: elfutils-0.163/backends/aarch64_initreg.c
if (! setfunc (64, 32, dwarf_fregs, arg))
return false;
-Index: elfutils-0.163/backends/arm_initreg.c
-===================================================================
---- elfutils-0.163.orig/backends/arm_initreg.c
-+++ elfutils-0.163/backends/arm_initreg.c
-@@ -37,7 +37,7 @@
+diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c
+index efcabaf..062bb9e 100644
+--- a/backends/arm_initreg.c
++++ b/backends/arm_initreg.c
+@@ -38,7 +38,7 @@
#endif
#ifdef __aarch64__
@@ -45,3 +56,6 @@ Index: elfutils-0.163/backends/arm_initreg.c
# include <sys/user.h>
# include <sys/ptrace.h>
/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch
new file mode 100644
index 000000000..224770478
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch
@@ -0,0 +1,45 @@
+From 1e91c1d4e37c05cf95058b4b3c3f352d72886f58 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:31:38 +0800
+Subject: [PATCH 7/7] Fix control path where we have str as uninitialized
+ string
+
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:
+In function 'i386_disasm':
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5:
+error: 'str' may be used uninitialized in this function
+[-Werror=maybe-uninitialized]
+| memcpy (buf + bufcnt, _str, _len); \
+| ^
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17:
+note: 'str' was declared here
+| const char *str;
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Rebase to 0.170
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libcpu/i386_disasm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
+index 831afbe..60fd6d4 100644
+--- a/libcpu/i386_disasm.c
++++ b/libcpu/i386_disasm.c
+@@ -821,6 +821,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
+ }
+ /* Fallthrough */
+ default:
++ str = "";
+ assert (! "INVALID not handled");
+ }
+ }
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-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 020ffa141..8864d4436 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/0001-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,18 +1,18 @@
-From 054fedda5ab9b84160d40d90cb967f2f5822b889 Mon Sep 17 00:00:00 2001
+From 010b0c57e748440eb1ceb3d977875f2488d2b4ce Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 06:35:34 +0000
+Date: Wed, 16 Aug 2017 10:06:26 +0800
Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
compiling it on musl
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Rebase to 0.68
+Rebase to 0.170
+
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
Makefile.am | 2 +-
lib/color.c | 3 ++-
- lib/crc32_file.c | 1 +
lib/fixedsizehash.h | 1 -
lib/system.h | 10 ++++++++++
lib/xmalloc.c | 2 +-
@@ -21,13 +21,13 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
libcpu/i386_gendis.c | 2 +-
libcpu/i386_lex.c | 2 +-
libcpu/i386_parse.c | 2 +-
- libdw/Makefile.am | 4 +++-
+ libdw/Makefile.am | 3 ++-
libdw/libdw_alloc.c | 2 +-
libdwfl/dwfl_build_id_find_elf.c | 3 ++-
libdwfl/dwfl_error.c | 4 +++-
libdwfl/dwfl_module_getdwarf.c | 1 +
libdwfl/find-debuginfo.c | 2 +-
- libdwfl/libdwfl_crc32_file.c | 10 ++++++++++
+ libdwfl/libdwfl_crc32_file.c | 9 +++++++++
libdwfl/linux-kernel-modules.c | 1 +
libebl/eblopenbackend.c | 2 +-
libelf/elf.h | 8 ++++++--
@@ -80,7 +80,7 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
tests/sectiondump.c | 2 +-
tests/varlocs.c | 2 +-
tests/vdsosyms.c | 2 +-
- 70 files changed, 98 insertions(+), 64 deletions(-)
+ 69 files changed, 95 insertions(+), 64 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 2ff444e..41f77df 100644
@@ -96,10 +96,10 @@ index 2ff444e..41f77df 100644
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/lib/color.c b/lib/color.c
-index fde2d9d..73292ac 100644
+index f62389d..a2a84b4 100644
--- a/lib/color.c
+++ b/lib/color.c
-@@ -32,12 +32,13 @@
+@@ -32,13 +32,14 @@
#endif
#include <argp.h>
@@ -110,22 +110,11 @@ index fde2d9d..73292ac 100644
#include <string.h>
#include <unistd.h>
#include "libeu.h"
+ #include "color.h"
+#include "system.h"
-
/* Prototype for option handler. */
-diff --git a/lib/crc32_file.c b/lib/crc32_file.c
-index a8434d4..57e4298 100644
---- a/lib/crc32_file.c
-+++ b/lib/crc32_file.c
-@@ -35,6 +35,7 @@
- #include <unistd.h>
- #include <sys/stat.h>
- #include <sys/mman.h>
-+#include "system.h"
-
- int
- crc32_file (int fd, uint32_t *resp)
+ 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
--- a/lib/fixedsizehash.h
@@ -139,10 +128,10 @@ index dac2a5f..43016fc 100644
#include <system.h>
diff --git a/lib/system.h b/lib/system.h
-index ccd99d6..0e93e60 100644
+index 9203335..1a60131 100644
--- a/lib/system.h
+++ b/lib/system.h
-@@ -55,6 +55,16 @@
+@@ -50,6 +50,16 @@
#else
# error "Unknown byte order"
#endif
@@ -173,7 +162,7 @@ index 0cde384..217b054 100644
#include <stddef.h>
#include <stdlib.h>
diff --git a/libasm/asm_end.c b/libasm/asm_end.c
-index 191a535..bf5ab06 100644
+index ced24f5..4ad918c 100644
--- a/libasm/asm_end.c
+++ b/libasm/asm_end.c
@@ -32,7 +32,7 @@
@@ -212,10 +201,10 @@ index aae5eae..6d76016 100644
#include <stdio.h>
#include <stdlib.h>
diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c
-index b670608..b842c25 100644
+index ba5f4aa..b1e4191 100644
--- a/libcpu/i386_lex.c
+++ b/libcpu/i386_lex.c
-@@ -592,7 +592,7 @@ char *i386_text;
+@@ -577,7 +577,7 @@ char *i386_text;
#endif
#include <ctype.h>
@@ -225,7 +214,7 @@ index b670608..b842c25 100644
#include <libeu.h>
diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c
-index 724addf..5b67802 100644
+index ef1ac35..48f2e64 100644
--- a/libcpu/i386_parse.c
+++ b/libcpu/i386_parse.c
@@ -107,7 +107,7 @@
@@ -238,27 +227,19 @@ index 724addf..5b67802 100644
#include <libintl.h>
#include <math.h>
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
-index 082d96c..51cbea0 100644
+index ff8c291..89e792a 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
-@@ -102,6 +102,8 @@ endif
- libdw_pic_a_SOURCES =
- am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
-
+@@ -105,7 +105,8 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
+ libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \
+ ../libdwfl/libdwfl_pic.a ../libebl/libebl.a
+ libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
+-libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS)
+fts_LDADD = -lfts
-+
++libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) $(fts_LDADD)
libdw_so_SOURCES =
- libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
- ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
-@@ -112,7 +114,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
- -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
- -Wl,--version-script,$<,--no-undefined \
- -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
-- -ldl -lz $(argp_LDADD) $(zip_LIBS)
-+ -ldl -lz $(argp_LDADD) $(zip_LIBS) $(fts_LDADD)
- @$(textrel_check)
- $(AM_V_at)ln -fs $@ $@.$(VERSION)
-
+ 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
--- a/libdw/libdw_alloc.c
@@ -273,18 +254,18 @@ index 28a8cf6..29aeb3f 100644
#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 903e193..b00d10c 100644
+index ee0c164..b06ab59 100644
--- a/libdwfl/dwfl_build_id_find_elf.c
+++ b/libdwfl/dwfl_build_id_find_elf.c
-@@ -27,6 +27,7 @@
- not, see <http://www.gnu.org/licenses/>. */
+@@ -31,6 +31,7 @@
+ #endif
#include "libdwflP.h"
+#include "system.h"
#include <inttypes.h>
#include <fcntl.h>
#include <unistd.h>
-@@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name,
+@@ -99,7 +100,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name,
{
if (*file_name != NULL)
free (*file_name);
@@ -316,22 +297,22 @@ index 7bcf61c..c345797 100644
return elf_errmsg (error & 0xffff);
case OTHER_ERROR (LIBDW):
diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
-index 0e8810b..82ad665 100644
+index 9775ace..511c4a6 100644
--- a/libdwfl/dwfl_module_getdwarf.c
+++ b/libdwfl/dwfl_module_getdwarf.c
-@@ -31,6 +31,7 @@
+@@ -35,6 +35,7 @@
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
+#include "system.h"
#include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
#include "../libelf/libelfP.h"
-
+ #include "system.h"
diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
-index 80515db..80b0148 100644
+index 6d5a42a..9267788 100644
--- a/libdwfl/find-debuginfo.c
+++ b/libdwfl/find-debuginfo.c
-@@ -385,7 +385,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
+@@ -389,7 +389,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
/* If FILE_NAME is a symlink, the debug file might be associated
with the symlink target name instead. */
@@ -341,32 +322,31 @@ index 80515db..80b0148 100644
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 6b6b7d3..debc4a4 100644
+index f849128..6f0aca1 100644
--- a/libdwfl/libdwfl_crc32_file.c
+++ b/libdwfl/libdwfl_crc32_file.c
-@@ -31,6 +31,16 @@
+@@ -29,6 +29,15 @@
+ # include <config.h>
+ #endif
- #define crc32_file attribute_hidden __libdwfl_crc32_file
- #define crc32 __libdwfl_crc32
-+
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) \
-+ (__extension__ \
-+ ({ long int __result; \
-+ do __result = (long int) (expression); \
-+ while (__result == -1L && errno == EINTR); \
++ (__extension__ \
++ ({ long int __result; \
++ do __result = (long int) (expression); \
++ while (__result == -1L && errno == EINTR); \
+ __result; }))
+#endif
+
- #define LIB_SYSTEM_H 1
+ #define crc32_file attribute_hidden __libdwfl_crc32_file
+ #define crc32 __libdwfl_crc32
#include <libdwflP.h>
- #include "../lib/crc32_file.c"
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
-index 9cd8ea9..4dbf4c5 100644
+index 9d0fef2..9fc09b8 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
-@@ -36,6 +36,7 @@
- #include <config.h>
+@@ -40,6 +40,7 @@
+ #include <system.h>
#include "libdwflP.h"
+#include "system.h"
@@ -374,7 +354,7 @@ index 9cd8ea9..4dbf4c5 100644
#include <errno.h>
#include <stdio.h>
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
-index 34d439a..56d2345 100644
+index 5371396..2e66dfd 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -32,7 +32,7 @@
@@ -387,7 +367,7 @@ index 34d439a..56d2345 100644
#include <dwarf.h>
#include <stdlib.h>
diff --git a/libelf/elf.h b/libelf/elf.h
-index 74654d6..81eee8b 100644
+index 5cf2b93..990b3af 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -21,7 +21,9 @@
@@ -401,7 +381,7 @@ index 74654d6..81eee8b 100644
/* Standard ELF types. */
-@@ -3704,6 +3706,8 @@ enum
+@@ -3705,6 +3707,8 @@ enum
#define R_BPF_NONE 0 /* No reloc */
#define R_BPF_MAP_FD 1 /* Map fd to pointer */
@@ -412,7 +392,7 @@ index 74654d6..81eee8b 100644
#endif /* elf.h */
diff --git a/libelf/libelf.h b/libelf/libelf.h
-index c0d6389..38a68fd 100644
+index 547c0f5..dd78799 100644
--- a/libelf/libelf.h
+++ b/libelf/libelf.h
@@ -29,6 +29,7 @@
@@ -424,10 +404,10 @@ index c0d6389..38a68fd 100644
#include <sys/types.h>
diff --git a/libelf/libelfP.h b/libelf/libelfP.h
-index 4459982..1296f20 100644
+index 7ee6625..5840899 100644
--- a/libelf/libelfP.h
+++ b/libelf/libelfP.h
-@@ -36,6 +36,7 @@
+@@ -32,6 +32,7 @@
#include <ar.h>
#include <gelf.h>
@@ -436,7 +416,7 @@ index 4459982..1296f20 100644
#include <errno.h>
#include <stdbool.h>
diff --git a/src/addr2line.c b/src/addr2line.c
-index 0222088..cd6a9a6 100644
+index ba414a7..04b7116 100644
--- a/src/addr2line.c
+++ b/src/addr2line.c
@@ -23,7 +23,7 @@
@@ -449,7 +429,7 @@ index 0222088..cd6a9a6 100644
#include <inttypes.h>
#include <libdwfl.h>
diff --git a/src/ar.c b/src/ar.c
-index f2f322b..6e70031 100644
+index ec32cee..4efd729 100644
--- a/src/ar.c
+++ b/src/ar.c
@@ -22,7 +22,7 @@
@@ -488,7 +468,7 @@ index 553fc57..46443d0 100644
#include <limits.h>
#include <string.h>
diff --git a/src/elfcmp.c b/src/elfcmp.c
-index 401ab31..873d253 100644
+index 5046420..cff183f 100644
--- a/src/elfcmp.c
+++ b/src/elfcmp.c
@@ -23,7 +23,7 @@
@@ -501,7 +481,7 @@ index 401ab31..873d253 100644
#include <locale.h>
#include <libintl.h>
diff --git a/src/elflint.c b/src/elflint.c
-index 7d3f227..074d21c 100644
+index 51e53c2..da0b0dc 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -24,7 +24,7 @@
@@ -514,7 +494,7 @@ index 7d3f227..074d21c 100644
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/findtextrel.c b/src/findtextrel.c
-index dc41502..325888c 100644
+index 8f1e239..71463af 100644
--- a/src/findtextrel.c
+++ b/src/findtextrel.c
@@ -23,7 +23,7 @@
@@ -527,7 +507,7 @@ index dc41502..325888c 100644
#include <gelf.h>
#include <libdw.h>
diff --git a/src/nm.c b/src/nm.c
-index c54e96f..9e031d9 100644
+index 969c6d3..3113c04 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -26,7 +26,7 @@
@@ -540,7 +520,7 @@ index c54e96f..9e031d9 100644
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/objdump.c b/src/objdump.c
-index fff4b81..4b1f966 100644
+index 860cfac..61e67bf 100644
--- a/src/objdump.c
+++ b/src/objdump.c
@@ -21,7 +21,7 @@
@@ -553,7 +533,7 @@ index fff4b81..4b1f966 100644
#include <inttypes.h>
#include <libintl.h>
diff --git a/src/ranlib.c b/src/ranlib.c
-index 41a3bcf..0c7da2c 100644
+index cc0ee23..ae851e4 100644
--- a/src/ranlib.c
+++ b/src/ranlib.c
@@ -24,7 +24,7 @@
@@ -566,7 +546,7 @@ index 41a3bcf..0c7da2c 100644
#include <gelf.h>
#include <libintl.h>
diff --git a/src/readelf.c b/src/readelf.c
-index d18a4b7..a6cfb35 100644
+index 346eccd..c831aa8 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -25,7 +25,7 @@
@@ -579,7 +559,7 @@ index d18a4b7..a6cfb35 100644
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/size.c b/src/size.c
-index de0d791..4639d42 100644
+index ad8dbcb..fd83be0 100644
--- a/src/size.c
+++ b/src/size.c
@@ -21,7 +21,7 @@
@@ -592,7 +572,7 @@ index de0d791..4639d42 100644
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/stack.c b/src/stack.c
-index a5a7beb..4c075bc 100644
+index 6f2ff69..6da0243 100644
--- a/src/stack.c
+++ b/src/stack.c
@@ -18,7 +18,7 @@
@@ -605,7 +585,7 @@ index a5a7beb..4c075bc 100644
#include <inttypes.h>
#include <stdio.h>
diff --git a/src/strings.c b/src/strings.c
-index 49aab8b..09d5b1c 100644
+index d214356..76cb26b 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -25,7 +25,7 @@
@@ -618,7 +598,7 @@ index 49aab8b..09d5b1c 100644
#include <gelf.h>
#include <inttypes.h>
diff --git a/src/strip.c b/src/strip.c
-index a875ddf..fd76f7f 100644
+index c7830ec..0d7f148 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -24,7 +24,7 @@
@@ -628,10 +608,10 @@ index a875ddf..fd76f7f 100644
-#include <error.h>
+#include <err.h>
#include <fcntl.h>
+ #include <fnmatch.h>
#include <gelf.h>
- #include <libelf.h>
diff --git a/src/unstrip.c b/src/unstrip.c
-index d838ae9..0108272 100644
+index 5074909..3d4f952 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -31,7 +31,7 @@
@@ -670,7 +650,7 @@ index 286f7e3..c9de089 100644
#include <argp.h>
#include <assert.h>
diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c
-index b7158da..354fa6a 100644
+index a387d8f..955c27d 100644
--- a/tests/backtrace-data.c
+++ b/tests/backtrace-data.c
@@ -27,7 +27,7 @@
@@ -683,7 +663,7 @@ index b7158da..354fa6a 100644
#include <dwarf.h>
#if defined(__x86_64__) && defined(__linux__)
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
-index a644c8a..b8cbe27 100644
+index 2dc8a9a..24ca7fb 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -22,7 +22,7 @@
@@ -693,10 +673,10 @@ index a644c8a..b8cbe27 100644
-#include <error.h>
+#include <err.h>
#include <unistd.h>
- #include <sys/ptrace.h>
#include <sys/types.h>
+ #include <sys/wait.h>
diff --git a/tests/backtrace.c b/tests/backtrace.c
-index 1ff6353..47e3f7b 100644
+index 21abe8a..d733248 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -24,7 +24,7 @@
@@ -1047,5 +1027,5 @@ index b876c10..afb2823 100644
#include <stdio.h>
#include <string.h>
--
-2.8.1
+1.8.3.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
index e0291b4cf..e0291b4cf 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
index b17498f5f..b17498f5f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch
index 2a5f8628d..2a5f8628d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff
index 50f4b059e..50f4b059e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch
index b2623f9d2..b2623f9d2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
index 44fda7f30..44fda7f30 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch
index a5e76dda4..2e0e54b0c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch
@@ -1,8 +1,60 @@
+From 46d0d0ca718093486eeeedf1b44134e9e29b56f7 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Aug 2017 09:18:59 +0800
+Subject: [PATCH] mips backends
+
Upstream-Status: Backport [from debian]
+
+Rebase to 0.170
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/Makefile.am | 8 +-
+ backends/mips_init.c | 59 +++++++++
+ backends/mips_regs.c | 104 ++++++++++++++++
+ backends/mips_reloc.def | 79 ++++++++++++
+ backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++
+ backends/mips_symbol.c | 52 ++++++++
+ libebl/eblopenbackend.c | 2 +
+ 7 files changed, 623 insertions(+), 2 deletions(-)
+ create mode 100644 backends/mips_init.c
+ create mode 100644 backends/mips_regs.c
+ create mode 100644 backends/mips_reloc.def
+ create mode 100644 backends/mips_retval.c
+ create mode 100644 backends/mips_symbol.c
-Index: b/backends/mips_init.c
-===================================================================
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index 7f1f5d4..91baf6e 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
+
+
+ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
+- tilegx m68k bpf parisc
++ tilegx m68k bpf parisc mips
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
+ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
+- libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a
++ libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a libebl_mips_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+
+@@ -128,6 +128,10 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
+ libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
+ am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+
++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
++libebl_mips_pic_a_SOURCES = $(mips_SRCS)
++am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
++
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu)
+ @rm -f $(@:.so=.map)
+ $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
+diff --git a/backends/mips_init.c b/backends/mips_init.c
+new file mode 100644
+index 0000000..975c04e
--- /dev/null
+++ b/backends/mips_init.c
@@ -0,0 +1,59 @@
@@ -65,8 +117,9 @@ Index: b/backends/mips_init.c
+
+ return MODVERSION;
+}
-Index: b/backends/mips_regs.c
-===================================================================
+diff --git a/backends/mips_regs.c b/backends/mips_regs.c
+new file mode 100644
+index 0000000..44f86cb
--- /dev/null
+++ b/backends/mips_regs.c
@@ -0,0 +1,104 @@
@@ -174,8 +227,9 @@ Index: b/backends/mips_regs.c
+ name[namelen++] = '\0';
+ return namelen;
+}
-Index: b/backends/mips_reloc.def
-===================================================================
+diff --git a/backends/mips_reloc.def b/backends/mips_reloc.def
+new file mode 100644
+index 0000000..4579970
--- /dev/null
+++ b/backends/mips_reloc.def
@@ -0,0 +1,79 @@
@@ -258,8 +312,9 @@ Index: b/backends/mips_reloc.def
+
+#define NO_COPY_RELOC 1
+#define NO_RELATIVE_RELOC 1
-Index: b/backends/mips_retval.c
-===================================================================
+diff --git a/backends/mips_retval.c b/backends/mips_retval.c
+new file mode 100644
+index 0000000..656cd1f
--- /dev/null
+++ b/backends/mips_retval.c
@@ -0,0 +1,321 @@
@@ -584,8 +639,9 @@ Index: b/backends/mips_retval.c
+ DWARF and might be valid. */
+ return -2;
+}
-Index: b/backends/mips_symbol.c
-===================================================================
+diff --git a/backends/mips_symbol.c b/backends/mips_symbol.c
+new file mode 100644
+index 0000000..ba465fe
--- /dev/null
+++ b/backends/mips_symbol.c
@@ -0,0 +1,52 @@
@@ -641,11 +697,11 @@ Index: b/backends/mips_symbol.c
+ return ELF_T_NUM;
+ }
+}
-Index: b/libebl/eblopenbackend.c
-===================================================================
+diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
+index 1f81477..5371396 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
-@@ -71,6 +71,8 @@ static const struct
+@@ -72,6 +72,8 @@ static const struct
{ "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
{ "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
{ "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
@@ -654,33 +710,6 @@ Index: b/libebl/eblopenbackend.c
{ "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
{ "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB },
-Index: b/backends/Makefile.am
-===================================================================
---- a/backends/Makefile.am
-+++ b/backends/Makefile.am
-@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
-
-
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
-- tilegx m68k bpf parisc
-+ tilegx m68k bpf parisc mips
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
- libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
- libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
- libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
-- libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a
-+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a libebl_mips_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
-
-@@ -132,6 +132,10 @@ parisc_SRCS = parisc_init.c parisc_symbo
- libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
- am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
-
-+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
-+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
-+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
-+
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- @rm -f $(@:.so=.map)
- $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch
index 790930cf3..790930cf3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch
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.bb
index 630f2e464..e2d24e8d8 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.bb
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
DEPENDS += "tcl"
RDEPENDS_${PN} = "tcl"
-inherit autotools
+inherit autotools update-alternatives
PR = "r1"
@@ -57,6 +57,11 @@ EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
"
EXTRA_OEMAKE_install = " 'SCRIPTS=' "
+ALTERNATIVE_${PN} = "mkpasswd"
+ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
+# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW)
+ALTERNATIVE_PRIORITY[mkpasswd] = "40"
+
FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
${includedir}/expect.h \
${includedir}/expect_tcl.h \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.3.bb
index d62a903a7..4d617e3e4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.3.bb
@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
DEPENDS = "util-linux popt ncurses"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz"
-SRC_URI[md5sum] = "d7f3d306b083123bcc6f5941efade586"
-SRC_URI[sha256sum] = "864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7"
+SRC_URI[md5sum] = "07b625a583b66c8c5840be5923f3e3fe"
+SRC_URI[sha256sum] = "89fd5aec35c409d610a36cb49c65b442058565ed84042f767bba614b8fc91b5c"
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/"
UPSTREAM_CHECK_REGEX = "/gptfdisk/(?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 1ef485e93..d31ac5914 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
@@ -1,19 +1,30 @@
-The awk pattern was checked *before* the Perl pattern, so the perl
-script with BEGIN{...} would be reported as awk, this patch fixes it.
+The awk pattern was checked *before* the Perl pattern, so the
+perl script with BEGIN{...} would be reported as awk, this patch fixes it.
Upstream-Status: Backport [debian]
Signed-off-by: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Rebase on 5.31
+
+Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
---
+ magic/Magdir/commands | 1 +
+ 1 file changed, 1 insertion(+)
+
diff --git a/magic/Magdir/commands b/magic/Magdir/commands
+index 1a46efd..255c04b 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 =^\\s{0,100}BEGIN\\s{0,100}[{] awk or perl script text
+ 0 regex/4096 =^[A-Za-z0-9_]{0,100}BEGIN[A-Za-z0-9_]{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.30.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb
index 0998fcfa8..1b1f50284 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.30.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.31.bb
@@ -19,7 +19,7 @@ SRC_URI = "git://github.com/file/file.git \
file://0001-Add-P-prompt-into-Usage-info.patch \
"
-SRCREV = "79814950aafb81ecd6a910c2a8a3b8ec12f3e4a6"
+SRCREV = "70c5f15060c7ad81150177de83a3e64500a54c9f"
S = "${WORKDIR}/git"
inherit autotools
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 ab35b09f9..a906fe8dc 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
@@ -55,7 +55,11 @@ do_install_ptest() {
cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
cp -r ${S}/tests/* ${D}${PTEST_PATH}
cp -r ${B}/tests/* ${D}${PTEST_PATH}
- sed -e 's/^Makefile:/_Makefile:/' \
+ sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 's/^Makefile:/_Makefile:/' \
-e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
-e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
-i ${D}${PTEST_PATH}/Makefile
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc
deleted file mode 100644
index b7696756a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc
+++ /dev/null
@@ -1,147 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "5.4.0"
-
-#SNAP = "5-20150405"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "5.4.0"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-5.4:${FILE_DIRNAME}/gcc-5.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 = "http://www.netgull.com/gcc/snapshots/${SNAP}/gcc-${SNAP}.tar.bz2"
-BASEURI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2"
-
-SRC_URI = "\
- ${BASEURI} \
- ${BACKPORTS} \
- file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
- file://0002-uclibc-conf.patch \
- file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
- file://0004-uclibc-locale.patch \
- file://0005-uclibc-locale-no__x.patch \
- file://0006-uclibc-locale-wchar_fix.patch \
- file://0007-uclibc-locale-update.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-libgcc-sjlj-check.patch \
- file://0020-cpp-honor-sysroot.patch \
- file://0021-MIPS64-Default-to-N64-ABI.patch \
- file://0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0023-gcc-Fix-argument-list-too-long-error.patch \
- file://0024-Disable-sdt.patch \
- file://0025-libtool.patch \
- file://0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
- file://0029-export-CPP.patch \
- file://0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
- file://0032-Ensure-target-gcc-headers-can-be-included.patch \
- file://0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
- file://0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
- file://0035-Dont-link-the-plugins-with-libgomp-explicitly.patch \
- file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
- file://0037-aarch64-Add-support-for-musl-ldso.patch \
- file://0038-fix-g-sysroot.patch \
- file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
- file://0040-handle-sysroot-support-for-nativesdk-gcc.patch \
- file://0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
- file://0042-Fix-various-_FOR_BUILD-and-related-variables.patch \
- file://0043-libstdc-Support-musl.patch \
- file://0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch \
- file://0045-Support-for-arm-linux-musl.patch \
- file://0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch \
- file://0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
- file://0048-ssp_nonshared.patch \
- file://0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch \
- file://0050-powerpc-pass-secure-plt-to-the-linker.patch \
- file://0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \
- file://0052-nios2-use-ret-with-r31.patch \
- file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \
- file://0054-support-ffile-prefix-map.patch \
- file://0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
- file://0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch \
- file://0057-unwind-fix-for-musl.patch \
- file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \
- file://0059-libgcc-use-ldflags.patch \
- file://CVE-2016-6131.patch \
-"
-
-BACKPORTS = ""
-
-SRC_URI[md5sum] = "4c626ac2a83ef30dfb9260e6f59c2b30"
-SRC_URI[sha256sum] = "608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a"
-
-UPSTREAM_CHECK_REGEX = "gcc-(?P<pver>5\.\d+\.\d+).tar"
-
-#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${SNAP}"
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-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_append_libc-uclibc = " --disable-decimal-float "
-
-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-5.4/0002-uclibc-conf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch
deleted file mode 100644
index 8d6aeb5e4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From b67c3a844bccec1766a7ec120e2d18cdcbc5f114 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:38:25 +0400
-Subject: [PATCH 02/46] uclibc-conf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- contrib/regression/objs-gcc.sh | 4 ++++
- libjava/classpath/ltconfig | 4 ++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
-index 60b0497..6dc7ead 100755
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
-diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
-index 743d951..ae4ea60 100755
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
deleted file mode 100644
index bd0326343..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 9bcb3a1848ff0f8990301ca09a25b15c2cf90c6f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:40:12 +0400
-Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
- libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++
- libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++
- 3 files changed, 23 insertions(+)
-
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
-index 6da5f22..2f85c2f 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.cc
-+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
-@@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
- #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
- #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
- extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
-+#ifdef __UCLIBC__
-+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
-+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
-+#else
- _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
-+#endif
- #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
-index ee3ef86..7fd5485 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -40,13 +40,22 @@
-
- #include <clocale>
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- #define _GLIBCXX_NUM_CATEGORIES 0
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
-+#ifdef __UCLIBC__
-+ typedef __ctype_touplow_t* __c_locale;
-+#else
- typedef int* __c_locale;
-+#endif
-
- // Convert numeric value of type double and long double to string and
- // return length of string. If vsnprintf is available use it, otherwise
-diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-index fd52b73..2627cf3 100644
---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-@@ -33,6 +33,11 @@
-
- // Information as gleaned from /usr/include/ctype.h
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- struct ctype_base
- {
- // Non-standard typedefs.
-+#ifdef __UCLIBC__
-+ typedef const __ctype_touplow_t* __to_type;
-+#else
- typedef const int* __to_type;
-+#endif
-
- // NB: Offsets into ctype<char>::_M_table force a particular size
- // on the mask type. Because of this, we don't use an enum.
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch
deleted file mode 100644
index 656265a28..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch
+++ /dev/null
@@ -1,2862 +0,0 @@
-From bd9dd472d162fc72522f96f70f6391c7c63d2bf7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:41:39 +0400
-Subject: [PATCH 04/46] uclibc-locale
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/acinclude.m4 | 37 ++
- .../config/locale/uclibc/c++locale_internal.h | 63 ++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++
- .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++
- .../config/locale/uclibc/collate_members.cc | 80 +++
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++
- .../config/locale/uclibc/messages_members.cc | 100 +++
- .../config/locale/uclibc/messages_members.h | 118 ++++
- .../config/locale/uclibc/monetary_members.cc | 692 +++++++++++++++++++++
- .../config/locale/uclibc/numeric_members.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++
- libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++
- libstdc++-v3/configure | 75 +++
- libstdc++-v3/include/c_compatibility/wchar.h | 2 +
- libstdc++-v3/include/c_std/cwchar | 2 +
- 16 files changed, 2688 insertions(+)
- create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
-
-diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
-index 826ef86..79cc716 100644
---- a/libstdc++-v3/acinclude.m4
-+++ b/libstdc++-v3/acinclude.m4
-@@ -2029,6 +2029,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -2213,6 +2216,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ AC_MSG_RESULT(uclibc)
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+ AC_SUBST(glibcxx_MOFILES)
-+ AC_SUBST(glibcxx_POFILES)
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-new file mode 100644
-index 0000000..2ae3e4a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -0,0 +1,63 @@
-+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-+
-+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+// Written by Jakub Jelinek <jakub@redhat.com>
-+
-+#include <bits/c++config.h>
-+#include <clocale>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning clean this up
-+#endif
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+
-+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
-+extern "C" __typeof(strcoll_l) __strcoll_l;
-+extern "C" __typeof(strftime_l) __strftime_l;
-+extern "C" __typeof(strtod_l) __strtod_l;
-+extern "C" __typeof(strtof_l) __strtof_l;
-+extern "C" __typeof(strtold_l) __strtold_l;
-+extern "C" __typeof(strxfrm_l) __strxfrm_l;
-+extern "C" __typeof(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+extern "C" __typeof(iswctype_l) __iswctype_l;
-+extern "C" __typeof(towlower_l) __towlower_l;
-+extern "C" __typeof(towupper_l) __towupper_l;
-+extern "C" __typeof(wcscoll_l) __wcscoll_l;
-+extern "C" __typeof(wcsftime_l) __wcsftime_l;
-+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
-+extern "C" __typeof(wctype_l) __wctype_l;
-+#endif
-+
-+#endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-new file mode 100644
-index 0000000..5081dc1
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -0,0 +1,160 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <cerrno> // For errno
-+#include <locale>
-+#include <stdexcept>
-+#include <langinfo.h>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
-+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
-+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
-+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
-+#define __strtof_l(S, E, L) strtof((S), (E))
-+#define __strtod_l(S, E, L) strtod((S), (E))
-+#define __strtold_l(S, E, L) strtold((S), (E))
-+#warning should dummy __newlocale check for C|POSIX ?
-+#define __newlocale(a, b, c) NULL
-+#define __freelocale(a) ((void)0)
-+#define __duplocale(a) __c_locale()
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ void
-+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
-+ __c_locale __old)
-+ {
-+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ if (!__cloc)
-+ {
-+ // This named locale is not supported by the underlying OS.
-+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
-+ "name not valid"));
-+ }
-+#endif
-+ }
-+
-+ void
-+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-+ {
-+ if (_S_get_c_locale() != __cloc)
-+ __freelocale(__cloc);
-+ }
-+
-+ __c_locale
-+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-+ { return __duplocale(__cloc); }
-+} // namespace std
-+
-+namespace __gnu_cxx
-+{
-+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-+ {
-+ "LC_CTYPE",
-+ "LC_NUMERIC",
-+ "LC_TIME",
-+ "LC_COLLATE",
-+ "LC_MONETARY",
-+ "LC_MESSAGES",
-+#if _GLIBCXX_NUM_CATEGORIES != 0
-+ "LC_PAPER",
-+ "LC_NAME",
-+ "LC_ADDRESS",
-+ "LC_TELEPHONE",
-+ "LC_MEASUREMENT",
-+ "LC_IDENTIFICATION"
-+#endif
-+ };
-+}
-+
-+namespace std
-+{
-+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-+} // namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-new file mode 100644
-index 0000000..da07c1f
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -0,0 +1,117 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifndef _C_LOCALE_H
-+#define _C_LOCALE_H 1
-+
-+#pragma GCC system_header
-+
-+#include <cstring> // get std::strlen
-+#include <cstdio> // get std::snprintf or std::sprintf
-+#include <clocale>
-+#include <langinfo.h> // For codecvt
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC_HAS_LOCALE__
-+#include <iconv.h> // For codecvt using iconv, iconv_t
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#include <libintl.h> // For messages
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning what is _GLIBCXX_C_LOCALE_GNU for
-+#endif
-+#define _GLIBCXX_C_LOCALE_GNU 1
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix categories
-+#endif
-+// #define _GLIBCXX_NUM_CATEGORIES 6
-+#define _GLIBCXX_NUM_CATEGORIES 0
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+namespace __gnu_cxx
-+{
-+ extern "C" __typeof(uselocale) __uselocale;
-+}
-+#endif
-+
-+namespace std
-+{
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ typedef __locale_t __c_locale;
-+#else
-+ typedef int* __c_locale;
-+#endif
-+
-+ // Convert numeric value of type _Tv to string and return length of
-+ // string. If snprintf is available use it, otherwise fall back to
-+ // the unsafe sprintf which, in general, can be dangerous and should
-+ // be avoided.
-+ template<typename _Tv>
-+ int
-+ __convert_from_v(char* __out,
-+ const int __size __attribute__ ((__unused__)),
-+ const char* __fmt,
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ _Tv __v, const __c_locale& __cloc, int __prec)
-+ {
-+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
-+#else
-+ _Tv __v, const __c_locale&, int __prec)
-+ {
-+# ifdef __UCLIBC_HAS_LOCALE__
-+ char* __old = std::setlocale(LC_ALL, NULL);
-+ char* __sav = new char[std::strlen(__old) + 1];
-+ std::strcpy(__sav, __old);
-+ std::setlocale(LC_ALL, "C");
-+# endif
-+#endif
-+
-+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ __gnu_cxx::__uselocale(__old);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ std::setlocale(LC_ALL, __sav);
-+ delete [] __sav;
-+#endif
-+ return __ret;
-+ }
-+}
-+
-+#endif
-diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-new file mode 100644
-index 0000000..64aa962
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-@@ -0,0 +1,308 @@
-+// std::codecvt implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <cstdlib> // For MB_CUR_MAX
-+#include <climits> // For MB_LEN_MAX
-+#include <bits/c++locale_internal.h>
-+
-+namespace std
-+{
-+ // Specializations.
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_out(state_type& __state, const intern_type* __from,
-+ const intern_type* __from_end, const intern_type*& __from_next,
-+ extern_type* __to, extern_type* __to_end,
-+ extern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
-+ // in case we fall back to wcrtomb and then continue, in a loop.
-+ // NB: wcsnrtombs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
-+ __from_end - __from_next);
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // wcrtomb.
-+ for (; __from < __from_next; ++__from)
-+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ extern_type __buf[MB_LEN_MAX];
-+ __tmp_state = __state;
-+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
-+ if (__conv > static_cast<size_t>(__to_end - __to_next))
-+ __ret = partial;
-+ else
-+ {
-+ memcpy(__to_next, __buf, __conv);
-+ __state = __tmp_state;
-+ __to_next += __conv;
-+ ++__from_next;
-+ }
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_in(state_type& __state, const extern_type* __from,
-+ const extern_type* __from_end, const extern_type*& __from_next,
-+ intern_type* __to, intern_type* __to_end,
-+ intern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we store a L'\0' and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
-+ __from_end
-+ - __from_next));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (;; ++__to_next, __from += __conv)
-+ {
-+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __from_next = __from;
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ // It is unclear what to return in this case (see DR 382).
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ if (__to_next < __to_end)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from_next;
-+ *__to_next++ = L'\0';
-+ }
-+ else
-+ __ret = partial;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_encoding() const throw()
-+ {
-+ // XXX This implementation assumes that the encoding is
-+ // stateless and is either single-byte or variable-width.
-+ int __ret = 0;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ if (MB_CUR_MAX == 1)
-+ __ret = 1;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_max_length() const throw()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ // XXX Probably wrong for stateful encodings.
-+ int __ret = MB_CUR_MAX;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_length(state_type& __state, const extern_type* __from,
-+ const extern_type* __end, size_t __max) const
-+ {
-+ int __ret = 0;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we advance past it and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+
-+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
-+ // its fourth parameter (it wouldn't with NULL as first parameter).
-+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
-+ * __max));
-+ while (__from < __end && __max)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
-+ __end
-+ - __from));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __end;
-+
-+ const extern_type* __tmp_from = __from;
-+ size_t __conv = mbsnrtowcs(__to, &__from,
-+ __from_chunk_end - __from,
-+ __max, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (__from = __tmp_from;; __from += __conv)
-+ {
-+ __conv = mbrtowc(NULL, __from, __end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __state = __tmp_state;
-+ __ret += __from - __tmp_from;
-+ break;
-+ }
-+ if (!__from)
-+ __from = __from_chunk_end;
-+
-+ __ret += __from - __tmp_from;
-+ __max -= __conv;
-+
-+ if (__from < __end && __max)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from;
-+ ++__ret;
-+ --__max;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-new file mode 100644
-index 0000000..c2664a7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -0,0 +1,80 @@
-+// std::collate implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+#endif
-+
-+namespace std
-+{
-+ // These are basically extensions to char_traits, and perhaps should
-+ // be put there instead of here.
-+ template<>
-+ int
-+ collate<char>::_M_compare(const char* __one, const char* __two) const
-+ {
-+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<char>::_M_transform(char* __to, const char* __from,
-+ size_t __n) const
-+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ int
-+ collate<wchar_t>::_M_compare(const wchar_t* __one,
-+ const wchar_t* __two) const
-+ {
-+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
-+ size_t __n) const
-+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-new file mode 100644
-index 0000000..7294e3a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -0,0 +1,300 @@
-+// std::ctype implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __wctype_l(S, L) wctype((S))
-+#define __towupper_l(C, L) towupper((C))
-+#define __towlower_l(C, L) towlower((C))
-+#define __iswctype_l(C, M, L) iswctype((C), (M))
-+#endif
-+
-+namespace std
-+{
-+ // NB: The other ctype<char> specializations are in src/locale.cc and
-+ // various /config/os/* files.
-+ template<>
-+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+ : ctype<char>(0, false, __refs)
-+ {
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
-+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
-+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
-+#endif
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ ctype<wchar_t>::__wmask_type
-+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
-+ {
-+ __wmask_type __ret;
-+ switch (__m)
-+ {
-+ case space:
-+ __ret = __wctype_l("space", _M_c_locale_ctype);
-+ break;
-+ case print:
-+ __ret = __wctype_l("print", _M_c_locale_ctype);
-+ break;
-+ case cntrl:
-+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
-+ break;
-+ case upper:
-+ __ret = __wctype_l("upper", _M_c_locale_ctype);
-+ break;
-+ case lower:
-+ __ret = __wctype_l("lower", _M_c_locale_ctype);
-+ break;
-+ case alpha:
-+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
-+ break;
-+ case digit:
-+ __ret = __wctype_l("digit", _M_c_locale_ctype);
-+ break;
-+ case punct:
-+ __ret = __wctype_l("punct", _M_c_locale_ctype);
-+ break;
-+ case xdigit:
-+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
-+ break;
-+ case alnum:
-+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
-+ break;
-+ case graph:
-+ __ret = __wctype_l("graph", _M_c_locale_ctype);
-+ break;
-+ default:
-+ __ret = __wmask_type();
-+ }
-+ return __ret;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_toupper(wchar_t __c) const
-+ { return __towupper_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_tolower(wchar_t __c) const
-+ { return __towlower_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ bool
-+ ctype<wchar_t>::
-+ do_is(mask __m, wchar_t __c) const
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ bool __ret = false;
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur]
-+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ return __ret;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
-+ {
-+ for (; __lo < __hi; ++__vec, ++__lo)
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ mask __m = 0;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ __m |= _M_bit[__bitcur];
-+ *__vec = __m;
-+ }
-+ return __hi;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi && !this->do_is(__m, *__lo))
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
-+ {
-+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::
-+ do_widen(char __c) const
-+ { return _M_widen[static_cast<unsigned char>(__c)]; }
-+
-+ const char*
-+ ctype<wchar_t>::
-+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
-+ ++__lo;
-+ ++__dest;
-+ }
-+ return __hi;
-+ }
-+
-+ char
-+ ctype<wchar_t>::
-+ do_narrow(wchar_t __wc, char __dfault) const
-+ {
-+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
-+ return _M_narrow[__wc];
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ const int __c = wctob(__wc);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
-+ char* __dest) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ if (_M_narrow_ok)
-+ while (__lo < __hi)
-+ {
-+ if (*__lo >= 0 && *__lo < 128)
-+ *__dest = _M_narrow[*__lo];
-+ else
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+ ++__lo;
-+ ++__dest;
-+ }
-+ else
-+ while (__lo < __hi)
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ ++__lo;
-+ ++__dest;
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __hi;
-+ }
-+
-+ void
-+ ctype<wchar_t>::_M_initialize_ctype()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ wint_t __i;
-+ for (__i = 0; __i < 128; ++__i)
-+ {
-+ const int __c = wctob(__i);
-+ if (__c == EOF)
-+ break;
-+ else
-+ _M_narrow[__i] = static_cast<char>(__c);
-+ }
-+ if (__i == 128)
-+ _M_narrow_ok = true;
-+ else
-+ _M_narrow_ok = false;
-+ for (size_t __j = 0;
-+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
-+ _M_widen[__j] = btowc(__j);
-+
-+ for (size_t __k = 0; __k <= 11; ++__k)
-+ {
-+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
-+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ }
-+#endif // _GLIBCXX_USE_WCHAR_T
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-new file mode 100644
-index 0000000..13594d9
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -0,0 +1,100 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix gettext stuff
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__dcgettext(const char *domainname,
-+ const char *msgid, int category);
-+#undef gettext
-+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#else
-+#undef gettext
-+#define gettext(msgid) (msgid)
-+#endif
-+
-+namespace std
-+{
-+ // Specializations.
-+ template<>
-+ string
-+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
-+ __uselocale(__old);
-+ return string(__msg);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ const char* __msg = gettext(__dfault.c_str());
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return string(__msg);
-+#else
-+ const char* __msg = gettext(__dfault.c_str());
-+ return string(__msg);
-+#endif
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ wstring
-+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
-+ {
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ __uselocale(__old);
-+ return _M_convert_from_char(__msg);
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return _M_convert_from_char(__msg);
-+# else
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ return _M_convert_from_char(__msg);
-+# endif
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-new file mode 100644
-index 0000000..1424078
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -0,0 +1,118 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix prototypes for *textdomain funcs
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__textdomain(const char *domainname);
-+extern "C" char *__bindtextdomain(const char *domainname,
-+ const char *dirname);
-+#else
-+#undef __textdomain
-+#undef __bindtextdomain
-+#define __textdomain(D) ((void)0)
-+#define __bindtextdomain(D,P) ((void)0)
-+#endif
-+
-+ // Non-virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::messages(size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
-+ _M_name_messages(_S_get_c_name())
-+ { }
-+
-+ template<typename _CharT>
-+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-+ _M_name_messages(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_messages = __tmp;
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
-+ const char* __dir) const
-+ {
-+ __bindtextdomain(__s.c_str(), __dir);
-+ return this->do_open(__s, __loc);
-+ }
-+
-+ // Virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::~messages()
-+ {
-+ if (_M_name_messages != _S_get_c_name())
-+ delete [] _M_name_messages;
-+ _S_destroy_c_locale(_M_c_locale_messages);
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::do_open(const basic_string<char>& __s,
-+ const locale&) const
-+ {
-+ // No error checking is done, assume the catalog exists and can
-+ // be used.
-+ __textdomain(__s.c_str());
-+ return 0;
-+ }
-+
-+ template<typename _CharT>
-+ void
-+ messages<_CharT>::do_close(catalog) const
-+ { }
-+
-+ // messages_byname
-+ template<typename _CharT>
-+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
-+ : messages<_CharT>(__refs)
-+ {
-+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
-+ delete [] this->_M_name_messages;
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ this->_M_name_messages = __tmp;
-+
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
-+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
-+ }
-+ }
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-new file mode 100644
-index 0000000..aa52731
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -0,0 +1,692 @@
-+// std::moneypunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning optimize this for uclibc
-+#warning tailor for stub locale support
-+#endif
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ // Construct and return valid pattern consisting of some combination of:
-+ // space none symbol sign value
-+ money_base::pattern
-+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
-+ {
-+ pattern __ret;
-+
-+ // This insanely complicated routine attempts to construct a valid
-+ // pattern for use with monyepunct. A couple of invariants:
-+
-+ // if (__precedes) symbol -> value
-+ // else value -> symbol
-+
-+ // if (__space) space
-+ // else none
-+
-+ // none == never first
-+ // space never first or last
-+
-+ // Any elegant implementations of this are welcome.
-+ switch (__posn)
-+ {
-+ case 0:
-+ case 1:
-+ // 1 The sign precedes the value and symbol.
-+ __ret.field[0] = sign;
-+ if (__space)
-+ {
-+ // Pattern starts with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[3] = symbol;
-+ }
-+ __ret.field[2] = space;
-+ }
-+ else
-+ {
-+ // Pattern starts with sign and ends with none.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 2:
-+ // 2 The sign follows the value and symbol.
-+ if (__space)
-+ {
-+ // Pattern either ends with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[1] = space;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ // Pattern ends with sign then none.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[1] = symbol;
-+ }
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 3:
-+ // 3 The sign immediately precedes the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = sign;
-+ __ret.field[1] = symbol;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = symbol;
-+ }
-+ else
-+ {
-+ __ret.field[1] = sign;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ case 4:
-+ // 4 The sign immediately follows the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = sign;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ default:
-+ ;
-+ }
-+ return __ret;
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == false
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<char, true>::~moneypunct()
-+ { delete _M_data; }
-+
-+ template<>
-+ moneypunct<char, false>::~moneypunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len;
-+ __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, true>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, false>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-new file mode 100644
-index 0000000..883ec1a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -0,0 +1,160 @@
-+// std::numpunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
-+ __cloc));
-+
-+ // Check for NULL, which implies no grouping.
-+ if (_M_data->_M_thousands_sep == '\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = "true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = "false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<char>::~numpunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<wchar_t>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+ // NB: In the GNU model wchar_t is always 32 bit wide.
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+
-+ if (_M_data->_M_thousands_sep == L'\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = L"true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = L"false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<wchar_t>::~numpunct()
-+ { delete _M_data; }
-+ #endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-new file mode 100644
-index 0000000..e0707d7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -0,0 +1,406 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __timepunct<char>::
-+ _M_put(char* __s, size_t __maxlen, const char* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = '\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = "%m/%d/%y";
-+ _M_data->_M_date_era_format = "%m/%d/%y";
-+ _M_data->_M_time_format = "%H:%M:%S";
-+ _M_data->_M_time_era_format = "%H:%M:%S";
-+ _M_data->_M_date_time_format = "";
-+ _M_data->_M_date_time_era_format = "";
-+ _M_data->_M_am = "AM";
-+ _M_data->_M_pm = "PM";
-+ _M_data->_M_am_pm_format = "";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = "Sunday";
-+ _M_data->_M_day2 = "Monday";
-+ _M_data->_M_day3 = "Tuesday";
-+ _M_data->_M_day4 = "Wednesday";
-+ _M_data->_M_day5 = "Thursday";
-+ _M_data->_M_day6 = "Friday";
-+ _M_data->_M_day7 = "Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = "Sun";
-+ _M_data->_M_aday2 = "Mon";
-+ _M_data->_M_aday3 = "Tue";
-+ _M_data->_M_aday4 = "Wed";
-+ _M_data->_M_aday5 = "Thu";
-+ _M_data->_M_aday6 = "Fri";
-+ _M_data->_M_aday7 = "Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = "January";
-+ _M_data->_M_month02 = "February";
-+ _M_data->_M_month03 = "March";
-+ _M_data->_M_month04 = "April";
-+ _M_data->_M_month05 = "May";
-+ _M_data->_M_month06 = "June";
-+ _M_data->_M_month07 = "July";
-+ _M_data->_M_month08 = "August";
-+ _M_data->_M_month09 = "September";
-+ _M_data->_M_month10 = "October";
-+ _M_data->_M_month11 = "November";
-+ _M_data->_M_month12 = "December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = "Jan";
-+ _M_data->_M_amonth02 = "Feb";
-+ _M_data->_M_amonth03 = "Mar";
-+ _M_data->_M_amonth04 = "Apr";
-+ _M_data->_M_amonth05 = "May";
-+ _M_data->_M_amonth06 = "Jun";
-+ _M_data->_M_amonth07 = "Jul";
-+ _M_data->_M_amonth08 = "Aug";
-+ _M_data->_M_amonth09 = "Sep";
-+ _M_data->_M_amonth10 = "Oct";
-+ _M_data->_M_amonth11 = "Nov";
-+ _M_data->_M_amonth12 = "Dec";
-+ }
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
-+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
-+ __cloc);
-+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
-+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
-+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
-+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
-+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
-+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
-+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
-+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
-+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
-+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
-+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
-+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
-+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
-+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
-+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
-+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
-+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
-+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
-+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
-+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
-+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
-+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
-+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
-+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
-+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
-+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
-+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
-+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
-+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
-+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
-+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
-+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
-+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
-+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
-+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
-+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
-+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ __timepunct<wchar_t>::
-+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
-+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = L'\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<wchar_t>;
-+
-+#warning wide time stuff
-+// if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = L"%m/%d/%y";
-+ _M_data->_M_date_era_format = L"%m/%d/%y";
-+ _M_data->_M_time_format = L"%H:%M:%S";
-+ _M_data->_M_time_era_format = L"%H:%M:%S";
-+ _M_data->_M_date_time_format = L"";
-+ _M_data->_M_date_time_era_format = L"";
-+ _M_data->_M_am = L"AM";
-+ _M_data->_M_pm = L"PM";
-+ _M_data->_M_am_pm_format = L"";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = L"Sunday";
-+ _M_data->_M_day2 = L"Monday";
-+ _M_data->_M_day3 = L"Tuesday";
-+ _M_data->_M_day4 = L"Wednesday";
-+ _M_data->_M_day5 = L"Thursday";
-+ _M_data->_M_day6 = L"Friday";
-+ _M_data->_M_day7 = L"Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = L"Sun";
-+ _M_data->_M_aday2 = L"Mon";
-+ _M_data->_M_aday3 = L"Tue";
-+ _M_data->_M_aday4 = L"Wed";
-+ _M_data->_M_aday5 = L"Thu";
-+ _M_data->_M_aday6 = L"Fri";
-+ _M_data->_M_aday7 = L"Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = L"January";
-+ _M_data->_M_month02 = L"February";
-+ _M_data->_M_month03 = L"March";
-+ _M_data->_M_month04 = L"April";
-+ _M_data->_M_month05 = L"May";
-+ _M_data->_M_month06 = L"June";
-+ _M_data->_M_month07 = L"July";
-+ _M_data->_M_month08 = L"August";
-+ _M_data->_M_month09 = L"September";
-+ _M_data->_M_month10 = L"October";
-+ _M_data->_M_month11 = L"November";
-+ _M_data->_M_month12 = L"December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = L"Jan";
-+ _M_data->_M_amonth02 = L"Feb";
-+ _M_data->_M_amonth03 = L"Mar";
-+ _M_data->_M_amonth04 = L"Apr";
-+ _M_data->_M_amonth05 = L"May";
-+ _M_data->_M_amonth06 = L"Jun";
-+ _M_data->_M_amonth07 = L"Jul";
-+ _M_data->_M_amonth08 = L"Aug";
-+ _M_data->_M_amonth09 = L"Sep";
-+ _M_data->_M_amonth10 = L"Oct";
-+ _M_data->_M_amonth11 = L"Nov";
-+ _M_data->_M_amonth12 = L"Dec";
-+ }
-+#if 0
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ union { char *__s; wchar_t *__w; } __u;
-+
-+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
-+ _M_data->_M_date_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
-+ _M_data->_M_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
-+ _M_data->_M_am = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
-+ _M_data->_M_pm = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
-+ _M_data->_M_am_pm_format = __u.__w;
-+
-+ // Day names, starting with "C"'s Sunday.
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
-+ _M_data->_M_day1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
-+ _M_data->_M_day2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
-+ _M_data->_M_day3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
-+ _M_data->_M_day4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
-+ _M_data->_M_day5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
-+ _M_data->_M_day6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
-+ _M_data->_M_day7 = __u.__w;
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
-+ _M_data->_M_aday1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
-+ _M_data->_M_aday2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
-+ _M_data->_M_aday3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
-+ _M_data->_M_aday4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
-+ _M_data->_M_aday5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
-+ _M_data->_M_aday6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
-+ _M_data->_M_aday7 = __u.__w;
-+
-+ // Month names, starting with "C"'s January.
-+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
-+ _M_data->_M_month01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
-+ _M_data->_M_month02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
-+ _M_data->_M_month03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
-+ _M_data->_M_month04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
-+ _M_data->_M_month05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
-+ _M_data->_M_month06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
-+ _M_data->_M_month07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
-+ _M_data->_M_month08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
-+ _M_data->_M_month09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
-+ _M_data->_M_month10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
-+ _M_data->_M_month11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
-+ _M_data->_M_month12 = __u.__w;
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
-+ _M_data->_M_amonth01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
-+ _M_data->_M_amonth02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
-+ _M_data->_M_amonth03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
-+ _M_data->_M_amonth04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
-+ _M_data->_M_amonth05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
-+ _M_data->_M_amonth06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
-+ _M_data->_M_amonth07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
-+ _M_data->_M_amonth08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
-+ _M_data->_M_amonth09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
-+ _M_data->_M_amonth10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
-+ _M_data->_M_amonth11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
-+ _M_data->_M_amonth12 = __u.__w;
-+ }
-+#endif // 0
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-new file mode 100644
-index 0000000..ba8e858
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -0,0 +1,68 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
-+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_timepunct = __tmp;
-+ _M_initialize_timepunct(__cloc);
-+ }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::~__timepunct()
-+ {
-+ if (_M_name_timepunct != _S_get_c_name())
-+ delete [] _M_name_timepunct;
-+ delete _M_data;
-+ _S_destroy_c_locale(_M_c_locale_timepunct);
-+ }
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 8cd4c76..217012e 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -15918,6 +15918,9 @@ fi
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -16196,6 +16199,78 @@ $as_echo "newlib" >&6; }
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5
-+$as_echo "uclibc" >&6; }
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_check_msgfmt+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$check_msgfmt"; then
-+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_check_msgfmt="yes"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
-+fi
-+fi
-+check_msgfmt=$ac_cv_prog_check_msgfmt
-+if test -n "$check_msgfmt"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5
-+$as_echo "$check_msgfmt" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+
-+
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
-index 06b5d47..7d3f835 100644
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -101,7 +101,9 @@ using std::wmemcmp;
- using std::wmemcpy;
- using std::wmemmove;
- using std::wmemset;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using std::wcsftime;
-+#endif
-
- #if _GLIBCXX_USE_C99
- using std::wcstold;
-diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
-index aa1b2fa..45c4617 100644
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- using ::wcscoll;
- using ::wcscpy;
- using ::wcscspn;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using ::wcsftime;
-+#endif
- using ::wcslen;
- using ::wcsncat;
- using ::wcsncmp;
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch
deleted file mode 100644
index 19a86a4e1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From 72a1a4af3c18627f59aa5ba1f753a89011b4e4f0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:42:36 +0400
-Subject: [PATCH 05/46] uclibc-locale-no__x
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 -------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 1 +
- .../config/locale/uclibc/collate_members.cc | 7 ----
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 ----
- .../config/locale/uclibc/messages_members.cc | 7 +---
- .../config/locale/uclibc/messages_members.h | 18 ++++-----
- .../config/locale/uclibc/monetary_members.cc | 4 --
- .../config/locale/uclibc/numeric_members.cc | 3 --
- libstdc++-v3/config/locale/uclibc/time_members.cc | 3 --
- 10 files changed, 55 insertions(+), 54 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index 2ae3e4a..e74fddf 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
- extern "C" __typeof(wctype_l) __wctype_l;
- #endif
-
-+# define __nl_langinfo_l nl_langinfo_l
-+# define __strcoll_l strcoll_l
-+# define __strftime_l strftime_l
-+# define __strtod_l strtod_l
-+# define __strtof_l strtof_l
-+# define __strtold_l strtold_l
-+# define __strxfrm_l strxfrm_l
-+# define __newlocale newlocale
-+# define __freelocale freelocale
-+# define __duplocale duplocale
-+# define __uselocale uselocale
-+
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l iswctype_l
-+# define __towlower_l towlower_l
-+# define __towupper_l towupper_l
-+# define __wcscoll_l wcscoll_l
-+# define __wcsftime_l wcsftime_l
-+# define __wcsxfrm_l wcsxfrm_l
-+# define __wctype_l wctype_l
-+# endif
-+
-+#else
-+# define __nl_langinfo_l(N, L) nl_langinfo((N))
-+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+# define __strtod_l(S, E, L) strtod((S), (E))
-+# define __strtof_l(S, E, L) strtof((S), (E))
-+# define __strtold_l(S, E, L) strtold((S), (E))
-+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+# warning should dummy __newlocale check for C|POSIX ?
-+# define __newlocale(a, b, c) NULL
-+# define __freelocale(a) ((void)0)
-+# define __duplocale(a) __c_locale()
-+//# define __uselocale ?
-+//
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l(C, M, L) iswctype((C), (M))
-+# define __towlower_l(C, L) towlower((C))
-+# define __towupper_l(C, L) towupper((C))
-+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
-+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+# define __wctype_l(S, L) wctype((S))
-+# endif
-+
- #endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 5081dc1..21430d0 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,20 +39,6 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
--#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
--#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
--#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
--#define __strtof_l(S, E, L) strtof((S), (E))
--#define __strtod_l(S, E, L) strtod((S), (E))
--#define __strtold_l(S, E, L) strtold((S), (E))
--#warning should dummy __newlocale check for C|POSIX ?
--#define __newlocale(a, b, c) NULL
--#define __freelocale(a) ((void)0)
--#define __duplocale(a) __c_locale()
--#endif
--
- namespace std
- {
- template<>
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index da07c1f..4bca5f1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -68,6 +68,7 @@ namespace __gnu_cxx
- {
- extern "C" __typeof(uselocale) __uselocale;
- }
-+#define __uselocale uselocale
- #endif
-
- namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-index c2664a7..ec5c329 100644
---- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -36,13 +36,6 @@
- #include <locale>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
--#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
--#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
--#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
--#endif
--
- namespace std
- {
- // These are basically extensions to char_traits, and perhaps should
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7294e3a..7b12861 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -38,13 +38,6 @@
- #undef _LIBC
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __wctype_l(S, L) wctype((S))
--#define __towupper_l(C, L) towupper((C))
--#define __towlower_l(C, L) towlower((C))
--#define __iswctype_l(C, M, L) iswctype((C), (M))
--#endif
--
- namespace std
- {
- // NB: The other ctype<char> specializations are in src/locale.cc and
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-index 13594d9..d7693b4 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -39,13 +39,10 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix gettext stuff
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__dcgettext(const char *domainname,
-- const char *msgid, int category);
- #undef gettext
--#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
- #else
--#undef gettext
- #define gettext(msgid) (msgid)
- #endif
-
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index 1424078..d89da33 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -36,15 +36,11 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix prototypes for *textdomain funcs
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__textdomain(const char *domainname);
--extern "C" char *__bindtextdomain(const char *domainname,
-- const char *dirname);
--#else
--#undef __textdomain
--#undef __bindtextdomain
--#define __textdomain(D) ((void)0)
--#define __bindtextdomain(D,P) ((void)0)
-+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#undef textdomain
-+#undef bindtextdomain
-+#define textdomain(D) ((void)0)
-+#define bindtextdomain(D,P) ((void)0)
- #endif
-
- // Non-virtual member functions.
-@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
- const char* __dir) const
- {
-- __bindtextdomain(__s.c_str(), __dir);
-+ bindtextdomain(__s.c_str(), __dir);
- return this->do_open(__s, __loc);
- }
-
-@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- {
- // No error checking is done, assume the catalog exists and can
- // be used.
-- __textdomain(__s.c_str());
-+ textdomain(__s.c_str());
- return 0;
- }
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index aa52731..2e6f80a 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -43,10 +43,6 @@
- #warning tailor for stub locale support
- #endif
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
--
- namespace std
- {
- // Construct and return valid pattern consisting of some combination of:
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 883ec1a..2c70642 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -41,9 +41,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index e0707d7..d848ed5 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -40,9 +40,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch
deleted file mode 100644
index d7dbe68bd..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From b1298344f0c221c382a95af689f7f3ecd864f531 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:45:57 +0400
-Subject: [PATCH 06/46] uclibc-locale-wchar_fix
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++--
- libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 2e6f80a..31ebb9f 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -401,7 +401,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-@@ -556,7 +556,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 2c70642..d5c8961 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -127,12 +127,25 @@ namespace std
- {
- // Named locale.
- // NB: In the GNU model wchar_t is always 32 bit wide.
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be numeric
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
- union { char *__s; wchar_t __w; } __u;
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
- _M_data->_M_decimal_point = __u.__w;
-
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
- _M_data->_M_thousands_sep = __u.__w;
-+#endif
-
- if (_M_data->_M_thousands_sep == L'\0')
- _M_data->_M_grouping = "";
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch
deleted file mode 100644
index cde749931..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch
+++ /dev/null
@@ -1,542 +0,0 @@
-From e9d7cb62741c22d667fe56e98d50753d89aefdc3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:46:58 +0400
-Subject: [PATCH 07/46] uclibc-locale-update
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 3 +
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 ++++++++++------------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++------
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 +++++++++++----
- .../config/locale/uclibc/messages_members.h | 12 ++--
- .../config/locale/uclibc/monetary_members.cc | 34 ++++++----
- .../config/locale/uclibc/numeric_members.cc | 5 ++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 18 ++++--
- libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++--
- 9 files changed, 158 insertions(+), 98 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index e74fddf..971a6b4 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -31,6 +31,9 @@
-
- #include <bits/c++config.h>
- #include <clocale>
-+#include <cstdlib>
-+#include <cstring>
-+#include <cstddef>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning clean this up
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 21430d0..1b9d8e1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,23 +39,20 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- template<>
- void
- __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- float __f = __strtof_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __f;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -63,16 +60,13 @@ namespace std
- __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- double __d = __strtod_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __d;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -80,16 +74,13 @@ namespace std
- __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- long double __ld = __strtold_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __ld;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- void
-@@ -110,17 +101,18 @@ namespace std
- void
- locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
- {
-- if (_S_get_c_locale() != __cloc)
-+ if (__cloc && _S_get_c_locale() != __cloc)
- __freelocale(__cloc);
- }
-
- __c_locale
- locale::facet::_S_clone_c_locale(__c_locale& __cloc)
- { return __duplocale(__cloc); }
--} // namespace std
-
--namespace __gnu_cxx
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-+
- const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
- {
- "LC_CTYPE",
-@@ -138,9 +130,11 @@ namespace __gnu_cxx
- "LC_IDENTIFICATION"
- #endif
- };
--}
-
--namespace std
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- const char* const* const locale::_S_categories = __gnu_cxx::category_names;
--} // namespace std
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index 4bca5f1..64a6d46 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -39,21 +39,23 @@
- #pragma GCC system_header
-
- #include <cstring> // get std::strlen
--#include <cstdio> // get std::snprintf or std::sprintf
-+#include <cstdio> // get std::vsnprintf or std::vsprintf
- #include <clocale>
- #include <langinfo.h> // For codecvt
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix this
- #endif
--#ifdef __UCLIBC_HAS_LOCALE__
-+#ifdef _GLIBCXX_USE_ICONV
- #include <iconv.h> // For codecvt using iconv, iconv_t
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--#include <libintl.h> // For messages
-+#ifdef HAVE_LIBINTL_H
-+#include <libintl.h> // For messages
- #endif
-+#include <cstdarg>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning what is _GLIBCXX_C_LOCALE_GNU for
-+// psm: used in os/gnu-linux/ctype_noninline.h
- #endif
- #define _GLIBCXX_C_LOCALE_GNU 1
-
-@@ -78,23 +80,25 @@ namespace std
- #else
- typedef int* __c_locale;
- #endif
--
-- // Convert numeric value of type _Tv to string and return length of
-- // string. If snprintf is available use it, otherwise fall back to
-- // the unsafe sprintf which, in general, can be dangerous and should
-+ // Convert numeric value of type double to string and return length of
-+ // string. If vsnprintf is available use it, otherwise fall back to
-+ // the unsafe vsprintf which, in general, can be dangerous and should
- // be avoided.
-- template<typename _Tv>
-- int
-- __convert_from_v(char* __out,
-- const int __size __attribute__ ((__unused__)),
-- const char* __fmt,
--#ifdef __UCLIBC_HAS_XCLOCALE__
-- _Tv __v, const __c_locale& __cloc, int __prec)
-+ inline int
-+ __convert_from_v(const __c_locale&
-+#ifndef __UCLIBC_HAS_XCLOCALE__
-+ __cloc __attribute__ ((__unused__))
-+#endif
-+ ,
-+ char* __out,
-+ const int __size,
-+ const char* __fmt, ...)
- {
-+ va_list __args;
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+
- __c_locale __old = __gnu_cxx::__uselocale(__cloc);
- #else
-- _Tv __v, const __c_locale&, int __prec)
-- {
- # ifdef __UCLIBC_HAS_LOCALE__
- char* __old = std::setlocale(LC_ALL, NULL);
- char* __sav = new char[std::strlen(__old) + 1];
-@@ -103,7 +107,9 @@ namespace std
- # endif
- #endif
-
-- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+ va_start(__args, __fmt);
-+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
-+ va_end(__args);
-
- #ifdef __UCLIBC_HAS_XCLOCALE__
- __gnu_cxx::__uselocale(__old);
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7b12861..13e011d 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -33,16 +33,20 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- // NB: The other ctype<char> specializations are in src/locale.cc and
- // various /config/os/* files.
-- template<>
- ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
- : ctype<char>(0, false, __refs)
- {
-@@ -57,6 +61,8 @@ namespace std
- #endif
- }
- }
-+ ctype_byname<char>::~ctype_byname()
-+ { }
-
- #ifdef _GLIBCXX_USE_WCHAR_T
- ctype<wchar_t>::__wmask_type
-@@ -138,17 +144,33 @@ namespace std
- ctype<wchar_t>::
- do_is(mask __m, wchar_t __c) const
- {
-- // Highest bitmask in ctype_base == 10, but extra in "C"
-- // library for blank.
-+ // The case of __m == ctype_base::space is particularly important,
-+ // due to its use in many istream functions. Therefore we deal with
-+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
-+ // is the mask corresponding to ctype_base::space. NB: an encoding
-+ // change would not affect correctness!
-+
- bool __ret = false;
-- const size_t __bitmasksize = 11;
-- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-- if (__m & _M_bit[__bitcur]
-- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-- {
-- __ret = true;
-- break;
-- }
-+ if (__m == _M_bit[5])
-+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
-+ else
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur])
-+ {
-+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ else if (__m == _M_bit[__bitcur])
-+ break;
-+ }
-+ }
-+
- return __ret;
- }
-
-@@ -290,4 +312,5 @@ namespace std
- #endif
- }
- #endif // _GLIBCXX_USE_WCHAR_T
--}
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index d89da33..067657a 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -53,12 +53,16 @@
- template<typename _CharT>
- messages<_CharT>::messages(__c_locale __cloc, const char* __s,
- size_t __refs)
-- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-- _M_name_messages(__s)
-+ : facet(__refs), _M_c_locale_messages(NULL),
-+ _M_name_messages(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_messages = __tmp;
-+
-+ // Last to avoid leaking memory if new throws.
-+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
- }
-
- template<typename _CharT>
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 31ebb9f..7679b9c 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -206,7 +211,7 @@ namespace std
- }
- break;
- default:
-- ;
-+ __ret = pattern();
- }
- return __ret;
- }
-@@ -390,7 +395,9 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
- setlocale(LC_ALL, __name);
- #endif
-
-@@ -477,8 +484,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -498,8 +505,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-@@ -545,8 +552,11 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-- setlocale(LC_ALL, __name);
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
-+ setlocale(LC_ALL, __name);
- #endif
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -633,8 +643,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -653,8 +663,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index d5c8961..8ae8969 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index d848ed5..f24d53e 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -53,11 +53,14 @@ namespace std
- const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = strftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-@@ -207,11 +210,14 @@ namespace std
- const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-index ba8e858..1665dde 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -50,12 +50,21 @@
- __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
- size_t __refs)
- : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-- _M_name_timepunct(__s)
-+ _M_name_timepunct(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_timepunct = __tmp;
-- _M_initialize_timepunct(__cloc);
-+
-+ try
-+ { _M_initialize_timepunct(__cloc); }
-+ catch(...)
-+ {
-+ delete [] _M_name_timepunct;
-+ __throw_exception_again;
-+ }
-+
- }
-
- template<typename _CharT>
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch
deleted file mode 100644
index 9f8793125..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 9b7442069eb68a42d2437181c1b2e710dd077e8b 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.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch
deleted file mode 100644
index 73741f83c..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From a13763f8a1d413a432e7b40835a062f86208f29a 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 | 8 +++++++-
- gcc/gcc.c | 1 +
- 4 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 4162566..453ec8e 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1543,6 +1543,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 6536d7e..f57a5d4 100644
---- a/gcc/cp/g++spec.c
-+++ b/gcc/cp/g++spec.c
-@@ -138,6 +138,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 c81b55b..6d3f68c 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -195,6 +195,7 @@ in the following sections.
- -fvisibility-inlines-hidden @gol
- -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
- -fvtv-counts -fvtv-debug @gol
-+-nostdlib++ @gol
- -fvisibility-ms-compat @gol
- -fext-numeric-literals @gol
- -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol
-@@ -488,7 +489,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}}
-
-@@ -11187,6 +11188,11 @@ These entries are usually resolved by entries in
- libc. These entry points should be supplied through some other
- mechanism when this option is specified.
-
-+@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}
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 675bcc1..a37ec8b 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -845,6 +845,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*} }}}}}}"
- #endif
-
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch
deleted file mode 100644
index 01a4d1fda..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 7b40212ed6c0c9fe4efe51f31bccd3d9f892f238 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:50 +0400
-Subject: [PATCH 19/46] libgcc-sjlj-check
-
-ac_fn_c_try_compile doesnt seem to keep the intermediate files
-which are needed for sjlj test to pass since it greps into the
-generated file. So we run the compiler command using AC_TRY_COMMAND
-which then generates the needed .s file
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libgcc/configure | 10 ++++++----
- libgcc/configure.ac | 10 ++++------
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/libgcc/configure b/libgcc/configure
-index 203d384..6aef3e7 100644
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -4570,17 +4570,19 @@ void foo ()
- }
-
- _ACEOF
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--if ac_fn_c_try_compile; then :
-+if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5'
-+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; }; then
- if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=yes
- elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=no
- fi
- fi
--CFLAGS=$CFLAGS_hold
- rm -f conftest*
-
- fi
-diff --git a/libgcc/configure.ac b/libgcc/configure.ac
-index a10a952..cc324f3 100644
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -255,16 +255,14 @@ void foo ()
- bar();
- }
- ])])
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--AS_IF([ac_fn_c_try_compile],
-- [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-+if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
-+ if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=yes
- elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=no
-- fi])
--CFLAGS=$CFLAGS_hold
-+ fi
-+fi
- rm -f conftest*
- ])
-
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
deleted file mode 100644
index 6ed589beb..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 5b0125a792842ae02df507bc55555661cb10f9a3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 8 Mar 2015 03:41:39 +0000
-Subject: [PATCH 35/46] Dont link the plugins with libgomp explicitly
-
-They are dlopened by libgomp anyway. This fixes
-the libtool relink issue which causes issues during
-cross compilation
-
-libtool: install: /usr/bin/install -c .libs/libgomp.lai
-/home/ubuntu/work/bleeding/build-qemux86-64mc/tmp/work/core2-64-rdk-linux/gcc-runtime/5.0-r0/image/usr/lib/../lib/libgomp.la
-libtool: install: error: cannot install `libgomp-plugin-host_nonshm.la'
-to a directory not ending in /usr/lib
-Makefile:517: recipe for target 'install-toolexeclibLTLIBRARIES' failed
-make[2]: *** [install-toolexeclibLTLIBRARIES] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libgomp/Makefile.in | 7 +++----
- libgomp/plugin/Makefrag.am | 3 +--
- 2 files changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
-index b61b108..71b2627 100644
---- a/libgomp/Makefile.in
-+++ b/libgomp/Makefile.in
-@@ -123,7 +123,7 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(infodir)" \
- "$(DESTDIR)$(fincludedir)" "$(DESTDIR)$(libsubincludedir)" \
- "$(DESTDIR)$(toolexeclibdir)"
- LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
--libgomp_plugin_host_nonshm_la_DEPENDENCIES = libgomp.la
-+libgomp_plugin_host_nonshm_la_LIBADD =
- am_libgomp_plugin_host_nonshm_la_OBJECTS = \
- libgomp_plugin_host_nonshm_la-plugin-host.lo
- libgomp_plugin_host_nonshm_la_OBJECTS = \
-@@ -133,7 +133,7 @@ libgomp_plugin_host_nonshm_la_LINK = $(LIBTOOL) --tag=CC \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(libgomp_plugin_host_nonshm_la_LDFLAGS) $(LDFLAGS) -o $@
- am__DEPENDENCIES_1 =
--@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES = libgomp.la \
-+@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES = \
- @PLUGIN_NVPTX_TRUE@ $(am__DEPENDENCIES_1)
- @PLUGIN_NVPTX_TRUE@am_libgomp_plugin_nvptx_la_OBJECTS = \
- @PLUGIN_NVPTX_TRUE@ libgomp_plugin_nvptx_la-plugin-nvptx.lo
-@@ -407,7 +407,7 @@ libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
- @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LDFLAGS = \
- @PLUGIN_NVPTX_TRUE@ $(libgomp_plugin_nvptx_version_info) \
- @PLUGIN_NVPTX_TRUE@ $(lt_host_flags) $(PLUGIN_NVPTX_LDFLAGS)
--@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS)
-+@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS)
- @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static
- libgomp_plugin_host_nonshm_version_info = -version-info $(libtool_VERSION)
- libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c
-@@ -415,7 +415,6 @@ libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN
- libgomp_plugin_host_nonshm_la_LDFLAGS = \
- $(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags)
-
--libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la
- libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static
- nodist_noinst_HEADERS = libgomp_f.h
- nodist_libsubinclude_HEADERS = omp.h openacc.h
-diff --git a/libgomp/plugin/Makefrag.am b/libgomp/plugin/Makefrag.am
-index 167485f..d2c5428 100644
---- a/libgomp/plugin/Makefrag.am
-+++ b/libgomp/plugin/Makefrag.am
-@@ -35,7 +35,7 @@ libgomp_plugin_nvptx_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_NVPTX_CPPFLAGS)
- libgomp_plugin_nvptx_la_LDFLAGS = $(libgomp_plugin_nvptx_version_info) \
- $(lt_host_flags)
- libgomp_plugin_nvptx_la_LDFLAGS += $(PLUGIN_NVPTX_LDFLAGS)
--libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS)
-+libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS)
- libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static
- endif
-
-@@ -45,5 +45,4 @@ libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c
- libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN
- libgomp_plugin_host_nonshm_la_LDFLAGS = \
- $(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags)
--libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la
- libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch
deleted file mode 100644
index 30dbe74ef..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 420ca64a86d560a77ee596a9774d672b08ca8278 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 37/46] aarch64: Add support for musl ldso
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/aarch64-linux.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index abeb948..f9e65fc 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -23,6 +23,8 @@
-
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
-+
- #undef ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
-
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch
deleted file mode 100644
index 9ba574a5c..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 8df3e7007a22c9d6be5d5ae4b9b169c5c8431917 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 27 May 2015 17:06:06 -0700
-Subject: [PATCH 38/46] fix g++ sysroot
-
-Portions of
-
-http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html
-
-are not upstreamed yet. So lets keep missing pieces.
-
-Upstream-Status: Pending
-
-Without this, compiling something simple like #include <limits> on target
-with c++ test.cpp fails unable to find the header. strace shows it looking in
-usr/include/xxxx rather than /usr/include/xxxx
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/configure | 4 +++-
- gcc/configure.ac | 4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 9b60aad..6df594c 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -3375,7 +3375,9 @@ gcc_gxx_include_dir_add_sysroot=0
- if test "${with_sysroot+set}" = set; then
- gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
- if test "${gcc_gxx_without_sysroot}"; then
-- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ if test x${with_sysroot} != x/; then
-+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ fi
- gcc_gxx_include_dir_add_sysroot=1
- fi
- fi
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index e1e54f2..3bb2173 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -152,7 +152,9 @@ gcc_gxx_include_dir_add_sysroot=0
- if test "${with_sysroot+set}" = set; then
- gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
- if test "${gcc_gxx_without_sysroot}"; then
-- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ if test x${with_sysroot} != x/; then
-+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ fi
- gcc_gxx_include_dir_add_sysroot=1
- fi
- fi
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch
deleted file mode 100644
index bad8402ef..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From df430b943a2df6b72054c808d4b93338a82562de Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Dec 2015 08:23:34 +0000
-Subject: [PATCH 43/46] libstdc++: Support musl
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libstdc++-v3/configure.host | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
-index 640199c..1756444 100644
---- a/libstdc++-v3/configure.host
-+++ b/libstdc++-v3/configure.host
-@@ -274,14 +274,24 @@ case "${host_os}" in
- os_include_dir="os/bsd/freebsd"
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
-+ # check for musl by target
-+ case "${host_os}" in
-+ *-musl*)
-+ os_include_dir="os/generic"
-+ ;;
-+ *)
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
- elif [ "$bionic" = "yes" ]; then
- os_include_dir="os/bionic"
-+ elif [ "$musl" = "yes" ]; then
-+ os_include_dir="os/generic"
- else
- os_include_dir="os/gnu-linux"
- fi
- ;;
-+ esac
-+ ;;
- hpux*)
- os_include_dir="os/hpux"
- ;;
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
deleted file mode 100644
index 26aa96cad..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
+++ /dev/null
@@ -1,270 +0,0 @@
-From 0b54799d80fb859c7b142467e4d42c99db59df50 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Dec 2015 08:30:35 +0000
-Subject: [PATCH 44/46] Adding -mmusl as a musl libc specifier, and the
- necessary hacks for it to know how to find musl's dynamic linker.
-
-Upstream-Status: Backport [partial]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config.gcc | 10 ++++-
- gcc/config/linux.h | 100 +++++++++++++++++++++++++++++++++++++-----
- gcc/config/linux.opt | 4 ++
- gcc/config/rs6000/secureplt.h | 1 +
- gcc/config/rs6000/sysv4.h | 5 +++
- gcc/ginclude/stddef.h | 3 ++
- 6 files changed, 110 insertions(+), 13 deletions(-)
-
-Index: gcc-5.4.0/gcc/config.gcc
-===================================================================
---- gcc-5.4.0.orig/gcc/config.gcc
-+++ gcc-5.4.0/gcc/config.gcc
-@@ -575,7 +575,7 @@ case ${target} in
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # 32-bit x86 processors supported by --with-arch=. Each processor
- # MUST be separated by exactly one space.
-@@ -720,6 +720,9 @@ case ${target} in
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-@@ -2420,6 +2423,11 @@ powerpc*-*-linux*)
- powerpc*-*-linux*paired*)
- tm_file="${tm_file} rs6000/750cl.h" ;;
- esac
-+ case ${target} in
-+ *-linux*-musl*)
-+ enable_secureplt=yes ;;
-+ esac
-+
- if test x${enable_secureplt} = xyes; then
- tm_file="rs6000/secureplt.h ${tm_file}"
- fi
-Index: gcc-5.4.0/gcc/config/linux.h
-===================================================================
---- gcc-5.4.0.orig/gcc/config/linux.h
-+++ gcc-5.4.0/gcc/config/linux.h
-@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -53,18 +55,21 @@ see the files COPYING3 and COPYING.RUNTI
- uClibc or Bionic is the default C library and whether
- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -84,16 +89,16 @@ see the files COPYING3 and COPYING.RUNTI
-
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
-
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
-@@ -123,3 +128,74 @@ see the files COPYING3 and COPYING.RUNTI
- # define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
-
- #endif
-+
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-Index: gcc-5.4.0/gcc/config/linux.opt
-===================================================================
---- gcc-5.4.0.orig/gcc/config/linux.opt
-+++ gcc-5.4.0/gcc/config/linux.opt
-@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l
- Use GNU C library
-
- muclibc
--Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
-+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic)
-+Use musl C library
-Index: gcc-5.4.0/gcc/config/rs6000/secureplt.h
-===================================================================
---- gcc-5.4.0.orig/gcc/config/rs6000/secureplt.h
-+++ gcc-5.4.0/gcc/config/rs6000/secureplt.h
-@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3.
- <http://www.gnu.org/licenses/>. */
-
- #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
-+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
-Index: gcc-5.4.0/gcc/config/rs6000/sysv4.h
-===================================================================
---- gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h
-+++ gcc-5.4.0/gcc/config/rs6000/sysv4.h
-@@ -538,6 +538,10 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
- #define CC1_SECURE_PLT_DEFAULT_SPEC ""
- #endif
-
-+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
-+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
-+#endif
-+
- /* Pass -G xxx to the compiler. */
- #undef CC1_SPEC
- #define CC1_SPEC "%{G*} %(cc1_cpu)" \
-@@ -889,6 +893,7 @@ ncrtn.o%s"
- { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
- { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
- { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
-+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \
- { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
- { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
- { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
-Index: gcc-5.4.0/gcc/ginclude/stddef.h
-===================================================================
---- gcc-5.4.0.orig/gcc/ginclude/stddef.h
-+++ gcc-5.4.0/gcc/ginclude/stddef.h
-@@ -184,6 +184,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 +201,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__)
-@@ -218,6 +220,7 @@ typedef __SIZE_TYPE__ size_t;
- typedef long ssize_t;
- #endif /* __BEOS__ */
- #endif /* !(defined (__GNUG__) && defined (size_t)) */
-+#endif /* __DEFINED_size_t */
- #endif /* __size_t */
- #endif /* _SIZET_ */
- #endif /* _GCC_SIZE_T */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch
deleted file mode 100644
index 3c1115aa8..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From a6c649571d49c972e6d207577780ada7e9b6bad5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Dec 2015 08:31:52 +0000
-Subject: [PATCH 45/57] Support for arm-linux-musl.
-
-Fix musl ldso for all arches
-
-Upstream-Status: backport [partial]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/aarch64-linux.h | 1 +
- gcc/config/arm/linux-eabi.h | 17 +++++++++++++++++
- gcc/config/i386/linux.h | 1 +
- gcc/config/i386/linux64.h | 5 +++++
- gcc/config/mips/linux.h | 8 +++++++-
- gcc/config/rs6000/linux64.h | 13 +++++++++----
- gcc/config/rs6000/sysv4.h | 10 +++++++---
- libitm/config/arm/hwcap.cc | 4 ++++
- libitm/config/linux/x86/tls.h | 8 ++++++--
- 9 files changed, 57 insertions(+), 10 deletions(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index f9e65fc..1b2d0c0 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -22,6 +22,7 @@
- #define GCC_AARCH64_LINUX_H
-
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
-
- #define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
-
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 048a062..adb9c44 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -81,6 +81,23 @@
- #undef TARGET_FIX_V4BX_SPEC
- #define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-
-+/* For ARM musl currently supports four dynamic linkers:
-+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
-+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
-+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
-+ musl does not support the legacy OABI mode.
-+ All the dynamic linkers live in /lib.
-+ We default to soft-float, EL. */
-+#undef MUSL_DYNAMIC_LINKER
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
-+#endif
-+#define MUSL_DYNAMIC_LINKER \
-+ SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-+
- /* 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
-diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index 21ba2b2..e2b81e5 100644
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -21,3 +21,4 @@ along with GCC; see the file COPYING3. If not see
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index 6185cce..5a3a977 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -30,3 +30,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #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"
-+
-+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1"
-+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1"
-+#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1"
-+
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index c306afb..b899388 100644
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -21,6 +21,12 @@ along with GCC; see the file COPYING3. If not see
- #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
-
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
-+#define MUSL_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
-+
- #define GLIBC_DYNAMIC_LINKER32 \
- "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
-@@ -40,4 +46,4 @@ along with GCC; see the file COPYING3. If not see
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-- BIONIC_DYNAMIC_LINKERN32)
-+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 31c4338..679da4b 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -365,17 +365,22 @@ extern int dot_symbols;
- #endif
- #define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-powerpc.so.1"
-+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-powerpc64.so.1"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER32 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
-
- #undef DEFAULT_ASM_ENDIAN
- #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index 7cd07e0..8794fa5 100644
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -763,15 +763,19 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
-
- #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc
-index a1c2cfd..dd4fad2 100644
---- a/libitm/config/arm/hwcap.cc
-+++ b/libitm/config/arm/hwcap.cc
-@@ -40,7 +40,11 @@ int GTM_hwcap HIDDEN = 0
-
- #ifdef __linux__
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <sys/fcntl.h>
-+#else
-+#include <fcntl.h>
-+#endif
- #include <elf.h>
-
- static void __attribute__((constructor))
-diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h
-index e731ab7..54ad8b6 100644
---- a/libitm/config/linux/x86/tls.h
-+++ b/libitm/config/linux/x86/tls.h
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct abi_dispatch *x)
-
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
-
- #endif // LIBITM_X86_TLS_H
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch
deleted file mode 100644
index ddb0fc4f4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 047116e8c9cbb340264f4f28db3f21a68ba57ff3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Dec 2015 08:32:24 +0000
-Subject: [PATCH 46/46] Get rid of ever-broken fixincludes on musl.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- fixincludes/mkfixinc.sh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
-index 6653fedb..0d96c8c 100755
---- a/fixincludes/mkfixinc.sh
-+++ b/fixincludes/mkfixinc.sh
-@@ -19,7 +19,8 @@ case $machine in
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
-- powerpcle-*-eabi* )
-+ powerpcle-*-eabi* | \
-+ *-musl* )
- # IF there is no include fixing,
- # THEN create a no-op fixer and exit
- (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch
deleted file mode 100644
index 0ea5143e0..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 553d8e3b9073ff3e0a9d2fac9b1823fb17ad247c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2016 21:00:18 -0800
-Subject: [PATCH 49/51] Disable the weak reference logic in gthr.h for
- os/generic
-
-It does not work unless work arounds are there in gthr-posix.h
-
-origin of patch
-http://port70.net/~nsz/musl/gcc-5.3.0/0004-gthr.patch
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libgfortran/acinclude.m4 | 2 +-
- libgfortran/configure | 2 +-
- libstdc++-v3/config/os/generic/os_defines.h | 5 +++++
- libstdc++-v3/configure.host | 3 +++
- 4 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4
-index ba890f9..30b8b1a6 100644
---- a/libgfortran/acinclude.m4
-+++ b/libgfortran/acinclude.m4
-@@ -100,7 +100,7 @@ void foo (void);
- [Define to 1 if the target supports #pragma weak])
- fi
- case "$host" in
-- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
- AC_DEFINE(GTHREAD_USE_WEAK, 0,
- [Define to 0 if the target shouldn't use #pragma weak])
- ;;
-diff --git a/libgfortran/configure b/libgfortran/configure
-index 5d47e65..cdf9695 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h
-
- fi
- case "$host" in
-- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
-
- $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
-
-diff --git a/libstdc++-v3/config/os/generic/os_defines.h b/libstdc++-v3/config/os/generic/os_defines.h
-index 45bf52a..103ec0e 100644
---- a/libstdc++-v3/config/os/generic/os_defines.h
-+++ b/libstdc++-v3/config/os/generic/os_defines.h
-@@ -33,4 +33,9 @@
- // System-specific #define, typedefs, corrections, etc, go here. This
- // file will come before all others.
-
-+// Disable the weak reference logic in gthr.h for os/generic because it
-+// is broken on every platform unless there is implementation specific
-+// workaround in gthr-posix.h and at link-time for static linking.
-+#define _GLIBCXX_GTHREAD_USE_WEAK 0
-+
- #endif
-diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
-index 1756444..2a87bb8 100644
---- a/libstdc++-v3/configure.host
-+++ b/libstdc++-v3/configure.host
-@@ -273,6 +273,9 @@ case "${host_os}" in
- freebsd*)
- os_include_dir="os/bsd/freebsd"
- ;;
-+ linux-musl*)
-+ os_include_dir="os/generic"
-+ ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
- # check for musl by target
- case "${host_os}" in
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch
deleted file mode 100644
index b2f2bbdf4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 4fa0cf03678f849917dcc3d149989b7fecdbe276 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2016 21:10:00 -0800
-Subject: [PATCH 50/51] powerpc pass --secure-plt to the linker
-
-Secure-plt when enabled does not pass right options to linker
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
- gcc/config/rs6000/linux64.h | 4 ++++
- gcc/config/rs6000/sysv4.h | 2 ++
- 2 files changed, 6 insertions(+)
-
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 679da4b..3ca7cd7 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -174,20 +174,24 @@ extern int dot_symbols;
- #undef ASM_DEFAULT_SPEC
- #undef ASM_SPEC
- #undef LINK_OS_LINUX_SPEC
-+#undef LINK_SECURE_PLT_SPEC
-
- #ifndef RS6000_BI_ARCH
- #define ASM_DEFAULT_SPEC "-mppc64"
- #define ASM_SPEC "%(asm_spec64) %(asm_spec_common)"
- #define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)"
-+#define LINK_SECURE_PLT_SPEC ""
- #else
- #if DEFAULT_ARCH64_P
- #define ASM_DEFAULT_SPEC "-mppc%{!m32:64}"
- #define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)"
- #define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}"
-+#define LINK_SECURE_PLT_SPEC "%{m32: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
- #else
- #define ASM_DEFAULT_SPEC "-mppc%{m64:64}"
- #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)"
- #define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}"
-+#define LINK_SECURE_PLT_SPEC "%{!m64: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
- #endif
- #endif
-
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index 8794fa5..0835551 100644
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -571,6 +571,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
- : %(link_start_default) }"
-
- #define LINK_START_DEFAULT_SPEC ""
-+#define LINK_SECURE_PLT_SPEC LINK_SECURE_PLT_DEFAULT_SPEC
-
- #undef LINK_SPEC
- #define LINK_SPEC "\
-@@ -578,6 +579,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
- %{R*} \
- %(link_shlib) \
- %{!T*: %(link_start) } \
-+%{!static: %{!mbss-plt: %(link_secure_plt_default)}} \
- %(link_os)"
-
- /* Shared libraries are not default. */
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
deleted file mode 100644
index e8f79b590..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 32593b38082ea65f4c82159254adf1e0dc2423be Mon Sep 17 00:00:00 2001
-From: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 16 Feb 2016 03:15:15 -0500
-Subject: [PATCH] Ignore -fdebug-prefix-map in producer string (by Daniel Kahn
- Gillmor)
-
-* dwarf2out.c (gen_producer_string): Ignore -fdebug-prefix-map.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231835 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/dwarf2out.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 3614c10..526f114 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -19670,6 +19670,7 @@ gen_producer_string (void)
- case OPT_fpreprocessed:
- case OPT_fltrans_output_list_:
- case OPT_fresolution_:
-+ case OPT_fdebug_prefix_map_:
- /* Ignore these. */
- continue;
- default:
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch
deleted file mode 100644
index f3cb47fd1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 1d67120d95c2c6e0ed4f7357d1cc62887eaba463 Mon Sep 17 00:00:00 2001
-From: sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 12 May 2015 15:57:22 +0000
-Subject: [PATCH] 2015-05-12 Chung-Lin Tang <cltang@codesourcery.com>
- Sandra Loosemore <sandra@codesourcery.com>
-
- gcc/
- * config/nios2/nios2.h (enum reg_class): Add IJMP_REGS enum
- value.
- (REG_CLASS_NAMES): Add "IJMP_REGS".
- (REG_CLASS_CONTENTS): Add new entry for IJMP_REGS.
- * config/nios2/nios2.md (indirect_jump,*tablejump): Adjust to
- use new "c" register constraint.
- * config/nios2/constraint.md (c): New register constraint
- corresponding to IJMP_REGS.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223082 138bc75d-0d04-0410-961f-82ee72b054a4
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport [ git://gcc.gnu.org/git/gcc.git 1d67120d95c2c6e0ed4f7357d1cc62887eaba463 ]
----
- gcc/ChangeLog | 12 ++++++++++++
- gcc/config/nios2/constraints.md | 3 +++
- gcc/config/nios2/nios2.h | 11 +++++++----
- gcc/config/nios2/nios2.md | 4 ++--
- 4 files changed, 24 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/config/nios2/constraints.md b/gcc/config/nios2/constraints.md
-index f4bd9f7..735f892 100644
---- a/gcc/config/nios2/constraints.md
-+++ b/gcc/config/nios2/constraints.md
-@@ -39,6 +39,9 @@
-
- ;; Register constraints
-
-+(define_register_constraint "c" "IJMP_REGS"
-+ "A register suitable for an indirect jump.")
-+
- (define_register_constraint "j" "SIB_REGS"
- "A register suitable for an indirect sibcall.")
-
-diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h
-index 510ab5f..ac33978 100644
---- a/gcc/config/nios2/nios2.h
-+++ b/gcc/config/nios2/nios2.h
-@@ -173,6 +173,7 @@ enum reg_class
- {
- NO_REGS,
- SIB_REGS,
-+ IJMP_REGS,
- GP_REGS,
- ALL_REGS,
- LIM_REG_CLASSES
-@@ -183,6 +184,7 @@ enum reg_class
- #define REG_CLASS_NAMES \
- { "NO_REGS", \
- "SIB_REGS", \
-+ "IJMP_REGS", \
- "GP_REGS", \
- "ALL_REGS" }
-
-@@ -190,10 +192,11 @@ enum reg_class
-
- #define REG_CLASS_CONTENTS \
- { \
-- /* NO_REGS */ { 0, 0}, \
-- /* SIB_REGS */ { 0xfe0c, 0}, \
-- /* GP_REGS */ {~0, 0}, \
-- /* ALL_REGS */ {~0,~0} \
-+ /* NO_REGS */ { 0, 0}, \
-+ /* SIB_REGS */ { 0xfe0c, 0}, \
-+ /* IJMP_REGS */ { 0x7fffffff, 0}, \
-+ /* GP_REGS */ {~0, 0}, \
-+ /* ALL_REGS */ {~0,~0} \
- }
-
-
-diff --git a/gcc/config/nios2/nios2.md b/gcc/config/nios2/nios2.md
-index 7b35d269..36ef101 100644
---- a/gcc/config/nios2/nios2.md
-+++ b/gcc/config/nios2/nios2.md
-@@ -697,7 +697,7 @@
- ; check or adjust for overflow.
-
- (define_insn "indirect_jump"
-- [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
-+ [(set (pc) (match_operand:SI 0 "register_operand" "c"))]
- ""
- "jmp\\t%0"
- [(set_attr "type" "control")])
-@@ -811,7 +811,7 @@
-
- (define_insn "*tablejump"
- [(set (pc)
-- (match_operand:SI 0 "register_operand" "r"))
-+ (match_operand:SI 0 "register_operand" "c"))
- (use (label_ref (match_operand 1 "" "")))]
- ""
- "jmp\\t%0"
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch
deleted file mode 100644
index c18f40e74..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch
+++ /dev/null
@@ -1,307 +0,0 @@
-From 536b8318974495cde2b42c3c2742748e2b271be0 Mon Sep 17 00:00:00 2001
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 27 May 2015 13:25:01 +0000
-Subject: [PATCH] PR target/65358 Avoid clobbering partial argument during
- sibcall
-
- PR target/65358
- * expr.c (memory_load_overlap): New function.
- (emit_push_insn): When pushing partial args to the stack would
- clobber the register part load the overlapping part into a pseudo
- and put it into the hard reg after pushing. Change return type
- to bool. Add bool argument.
- * expr.h (emit_push_insn): Change return type to bool.
- Add bool argument.
- * calls.c (expand_call): Cancel sibcall optimization when encountering
- partial argument on targets with ARGS_GROW_DOWNWARD and
- !STACK_GROWS_DOWNWARD.
- (emit_library_call_value_1): Update callsite of emit_push_insn.
- (store_one_arg): Likewise.
-
- PR target/65358
- * gcc.dg/pr65358.c: New test.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223753 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport from 6.0
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- gcc/calls.c | 17 ++++++--
- gcc/expr.c | 90 +++++++++++++++++++++++++++++++++++++-----
- gcc/expr.h | 4 +-
- gcc/testsuite/gcc.dg/pr65358.c | 33 ++++++++++++++++
- 4 files changed, 129 insertions(+), 15 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/pr65358.c
-
-diff --git a/gcc/calls.c b/gcc/calls.c
-index ee8ea5f..2334381 100644
---- a/gcc/calls.c
-+++ b/gcc/calls.c
-@@ -3236,6 +3236,14 @@ expand_call (tree exp, rtx target, int ignore)
- {
- rtx_insn *before_arg = get_last_insn ();
-
-+ /* On targets with weird calling conventions (e.g. PA) it's
-+ hard to ensure that all cases of argument overlap between
-+ stack and registers work. Play it safe and bail out. */
-+#if defined(ARGS_GROW_DOWNWARD) && !defined(STACK_GROWS_DOWNWARD)
-+ sibcall_failure = 1;
-+ break;
-+#endif
-+
- if (store_one_arg (&args[i], argblock, flags,
- adjusted_args_size.var != 0,
- reg_parm_stack_space)
-@@ -4279,7 +4287,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
- partial, reg, 0, argblock,
- GEN_INT (argvec[argnum].locate.offset.constant),
- reg_parm_stack_space,
-- ARGS_SIZE_RTX (argvec[argnum].locate.alignment_pad));
-+ ARGS_SIZE_RTX (argvec[argnum].locate.alignment_pad), false);
-
- /* Now mark the segment we just used. */
- if (ACCUMULATE_OUTGOING_ARGS)
-@@ -4886,10 +4894,11 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
-
- /* This isn't already where we want it on the stack, so put it there.
- This can either be done with push or copy insns. */
-- emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX,
-+ if (!emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX,
- parm_align, partial, reg, used - size, argblock,
- ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space,
-- ARGS_SIZE_RTX (arg->locate.alignment_pad));
-+ ARGS_SIZE_RTX (arg->locate.alignment_pad), true))
-+ sibcall_failure = 1;
-
- /* Unless this is a partially-in-register argument, the argument is now
- in the stack. */
-@@ -5001,7 +5010,7 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
- emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx,
- parm_align, partial, reg, excess, argblock,
- ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space,
-- ARGS_SIZE_RTX (arg->locate.alignment_pad));
-+ ARGS_SIZE_RTX (arg->locate.alignment_pad), false);
-
- /* Unless this is a partially-in-register argument, the argument is now
- in the stack.
-diff --git a/gcc/expr.c b/gcc/expr.c
-index 5c09550..24a6293 100644
---- a/gcc/expr.c
-+++ b/gcc/expr.c
-@@ -4121,12 +4121,35 @@ emit_single_push_insn (machine_mode mode, rtx x, tree type)
- }
- #endif
-
-+/* If reading SIZE bytes from X will end up reading from
-+ Y return the number of bytes that overlap. Return -1
-+ if there is no overlap or -2 if we can't determine
-+ (for example when X and Y have different base registers). */
-+
-+static int
-+memory_load_overlap (rtx x, rtx y, HOST_WIDE_INT size)
-+{
-+ rtx tmp = plus_constant (Pmode, x, size);
-+ rtx sub = simplify_gen_binary (MINUS, Pmode, tmp, y);
-+
-+ if (!CONST_INT_P (sub))
-+ return -2;
-+
-+ HOST_WIDE_INT val = INTVAL (sub);
-+
-+ return IN_RANGE (val, 1, size) ? val : -1;
-+}
-+
- /* Generate code to push X onto the stack, assuming it has mode MODE and
- type TYPE.
- MODE is redundant except when X is a CONST_INT (since they don't
- carry mode info).
- SIZE is an rtx for the size of data to be copied (in bytes),
- needed only if X is BLKmode.
-+ Return true if successful. May return false if asked to push a
-+ partial argument during a sibcall optimization (as specified by
-+ SIBCALL_P) and the incoming and outgoing pointers cannot be shown
-+ to not overlap.
-
- ALIGN (in bits) is maximum alignment we can assume.
-
-@@ -4152,11 +4175,11 @@ emit_single_push_insn (machine_mode mode, rtx x, tree type)
- for arguments passed in registers. If nonzero, it will be the number
- of bytes required. */
-
--void
-+bool
- emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- unsigned int align, int partial, rtx reg, int extra,
- rtx args_addr, rtx args_so_far, int reg_parm_stack_space,
-- rtx alignment_pad)
-+ rtx alignment_pad, bool sibcall_p)
- {
- rtx xinner;
- enum direction stack_direction
-@@ -4179,6 +4202,10 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
-
- xinner = x;
-
-+ int nregs = partial / UNITS_PER_WORD;
-+ rtx *tmp_regs = NULL;
-+ int overlapping = 0;
-+
- if (mode == BLKmode
- || (STRICT_ALIGNMENT && align < GET_MODE_ALIGNMENT (mode)))
- {
-@@ -4309,6 +4336,43 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- PARM_BOUNDARY. Assume the caller isn't lying. */
- set_mem_align (target, align);
-
-+ /* If part should go in registers and pushing to that part would
-+ overwrite some of the values that need to go into regs, load the
-+ overlapping values into temporary pseudos to be moved into the hard
-+ regs at the end after the stack pushing has completed.
-+ We cannot load them directly into the hard regs here because
-+ they can be clobbered by the block move expansions.
-+ See PR 65358. */
-+
-+ if (partial > 0 && reg != 0 && mode == BLKmode
-+ && GET_CODE (reg) != PARALLEL)
-+ {
-+ overlapping = memory_load_overlap (XEXP (x, 0), temp, partial);
-+ if (overlapping > 0)
-+ {
-+ gcc_assert (overlapping % UNITS_PER_WORD == 0);
-+ overlapping /= UNITS_PER_WORD;
-+
-+ tmp_regs = XALLOCAVEC (rtx, overlapping);
-+
-+ for (int i = 0; i < overlapping; i++)
-+ tmp_regs[i] = gen_reg_rtx (word_mode);
-+
-+ for (int i = 0; i < overlapping; i++)
-+ emit_move_insn (tmp_regs[i],
-+ operand_subword_force (target, i, mode));
-+ }
-+ else if (overlapping == -1)
-+ overlapping = 0;
-+ /* Could not determine whether there is overlap.
-+ Fail the sibcall. */
-+ else
-+ {
-+ overlapping = 0;
-+ if (sibcall_p)
-+ return false;
-+ }
-+ }
- emit_block_move (target, xinner, size, BLOCK_OP_CALL_PARM);
- }
- }
-@@ -4363,12 +4427,13 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- has a size a multiple of a word. */
- for (i = size - 1; i >= not_stack; i--)
- if (i >= not_stack + offset)
-- emit_push_insn (operand_subword_force (x, i, mode),
-+ if (!emit_push_insn (operand_subword_force (x, i, mode),
- word_mode, NULL_TREE, NULL_RTX, align, 0, NULL_RTX,
- 0, args_addr,
- GEN_INT (args_offset + ((i - not_stack + skip)
- * UNITS_PER_WORD)),
-- reg_parm_stack_space, alignment_pad);
-+ reg_parm_stack_space, alignment_pad, sibcall_p))
-+ return false;
- }
- else
- {
-@@ -4411,9 +4476,8 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- }
- }
-
-- /* If part should go in registers, copy that part
-- into the appropriate registers. Do this now, at the end,
-- since mem-to-mem copies above may do function calls. */
-+ /* Move the partial arguments into the registers and any overlapping
-+ values that we moved into the pseudos in tmp_regs. */
- if (partial > 0 && reg != 0)
- {
- /* Handle calls that pass values in multiple non-contiguous locations.
-@@ -4421,9 +4485,15 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
- if (GET_CODE (reg) == PARALLEL)
- emit_group_load (reg, x, type, -1);
- else
-- {
-+ {
- gcc_assert (partial % UNITS_PER_WORD == 0);
-- move_block_to_reg (REGNO (reg), x, partial / UNITS_PER_WORD, mode);
-+ move_block_to_reg (REGNO (reg), x, nregs - overlapping, mode);
-+
-+ for (int i = 0; i < overlapping; i++)
-+ emit_move_insn (gen_rtx_REG (word_mode, REGNO (reg)
-+ + nregs - overlapping + i),
-+ tmp_regs[i]);
-+
- }
- }
-
-@@ -4432,6 +4502,8 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
-
- if (alignment_pad && args_addr == 0)
- anti_adjust_stack (alignment_pad);
-+
-+ return true;
- }
-
- /* Return X if X can be used as a subtarget in a sequence of arithmetic
-diff --git a/gcc/expr.h b/gcc/expr.h
-index 867852e..5fcc13f 100644
---- a/gcc/expr.h
-+++ b/gcc/expr.h
-@@ -218,8 +218,8 @@ extern rtx emit_move_resolve_push (machine_mode, rtx);
- extern rtx push_block (rtx, int, int);
-
- /* Generate code to push something onto the stack, given its mode and type. */
--extern void emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int,
-- int, rtx, int, rtx, rtx, int, rtx);
-+extern bool emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int,
-+ int, rtx, int, rtx, rtx, int, rtx, bool);
-
- /* Expand an assignment that stores the value of FROM into TO. */
- extern void expand_assignment (tree, tree, bool);
-diff --git a/gcc/testsuite/gcc.dg/pr65358.c b/gcc/testsuite/gcc.dg/pr65358.c
-new file mode 100644
-index 0000000..ba89fd4
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr65358.c
-@@ -0,0 +1,33 @@
-+/* { dg-do run } */
-+/* { dg-options "-O2" } */
-+
-+struct pack
-+{
-+ int fine;
-+ int victim;
-+ int killer;
-+};
-+
-+int __attribute__ ((__noinline__, __noclone__))
-+bar (int a, int b, struct pack p)
-+{
-+ if (a != 20 || b != 30)
-+ __builtin_abort ();
-+ if (p.fine != 40 || p.victim != 50 || p.killer != 60)
-+ __builtin_abort ();
-+ return 0;
-+}
-+
-+int __attribute__ ((__noinline__, __noclone__))
-+foo (int arg1, int arg2, int arg3, struct pack p)
-+{
-+ return bar (arg2, arg3, p);
-+}
-+
-+int main (void)
-+{
-+ struct pack p = { 40, 50, 60 };
-+
-+ (void) foo (10, 20, 30, p);
-+ return 0;
-+}
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch
deleted file mode 100644
index 97913420e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 5c7bd853c8703f65904083778712ef625c3f3814 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 27 Mar 2016 20:31:50 -0700
-Subject: [PATCH 56/57] Enable libc provide ssp and
- gcc_cv_target_dl_iterate_phdr for musl
-
- * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
- (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.
- * configure: Regenerate.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Backport
-
- gcc/configure | 7 +++++++
- gcc/configure.ac | 7 +++++++
- 2 files changed, 14 insertions(+)
-
-diff --git a/gcc/configure b/gcc/configure
-index fcb05e7..81a449c 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27814,6 +27814,9 @@ if test "${gcc_cv_libc_provides_ssp+set}" = set; then :
- else
- gcc_cv_libc_provides_ssp=no
- case "$target" in
-+ *-*-musl*)
-+ # All versions of musl provide stack protector
-+ gcc_cv_libc_provides_ssp=yes;;
- *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
- # glibc 2.4 and later provides __stack_chk_fail and
- # either __stack_chk_guard, or TLS access to stack guard canary.
-@@ -27846,6 +27849,7 @@ fi
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
- # realistically usable GNU/Hurd configurations.
-+ # All supported versions of musl provide it as well
- gcc_cv_libc_provides_ssp=yes;;
- *-*-darwin* | *-*-freebsd*)
- ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
-@@ -27942,6 +27946,9 @@ case "$target" in
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 923bc9a..b08e3dc 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5291,6 +5291,9 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library,
- gcc_cv_libc_provides_ssp,
- [gcc_cv_libc_provides_ssp=no
- case "$target" in
-+ *-*-musl*)
-+ # All versions of musl provide stack protector
-+ gcc_cv_libc_provides_ssp=yes;;
- *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
- # glibc 2.4 and later provides __stack_chk_fail and
- # either __stack_chk_guard, or TLS access to stack guard canary.
-@@ -5317,6 +5320,7 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library,
- # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
- # simply assert that glibc does provide this, which is true for all
- # realistically usable GNU/Hurd configurations.
-+ # All supported versions of musl provide it as well
- gcc_cv_libc_provides_ssp=yes;;
- *-*-darwin* | *-*-freebsd*)
- AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
-@@ -5390,6 +5394,9 @@ case "$target" in
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
- GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch
deleted file mode 100644
index c193587bf..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From c5c33bf881a2aea355310dd90873ed39bc272b3c Mon Sep 17 00:00:00 2001
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 22 Apr 2015 14:20:01 +0000
-Subject: [PATCH 57/57] unwind fix for musl
-
-On behalf of szabolcs.nagy@arm.com
-
-2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
- Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on
- Linux if target provides dl_iterate_phdr.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Backport
-
- libgcc/unwind-dw2-fde-dip.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
-index e1e566b..137dced 100644
---- a/libgcc/unwind-dw2-fde-dip.c
-+++ b/libgcc/unwind-dw2-fde-dip.c
-@@ -59,6 +59,12 @@
-
- #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
- && defined(TARGET_DL_ITERATE_PHDR) \
-+ && defined(__linux__)
-+# define USE_PT_GNU_EH_FRAME
-+#endif
-+
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-+ && defined(TARGET_DL_ITERATE_PHDR) \
- && (defined(__DragonFly__) || defined(__FreeBSD__))
- # define ElfW __ElfN
- # define USE_PT_GNU_EH_FRAME
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch
deleted file mode 100644
index 325b72ab5..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Pending
-
---- gcc-5.3.0.orig/libgcc/config/t-slibgcc
-+++ gcc-5.3.0/libgcc/config/t-slibgcc
-@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_S
- $(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) && \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/CVE-2016-6131.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/CVE-2016-6131.patch
deleted file mode 100644
index 88524c342..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/CVE-2016-6131.patch
+++ /dev/null
@@ -1,251 +0,0 @@
-From b3f6b32165d3f437bd0ac6269c3c499b68ecf036 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(-)
-
-diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
-index 9859ad3..7939480 100644
---- a/libiberty/ChangeLog
-+++ b/libiberty/ChangeLog
-@@ -1,3 +1,20 @@
-+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.
-+
- 2016-06-03 Release Manager
-
- * GCC 5.4.0 released.
-diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
-index 7514e57..f21e630 100644
---- a/libiberty/cplus-dem.c
-+++ b/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_stuff *,
-
- 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_stuff *to, struct work_stuff *from)
- 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_stuff *work)
- /* 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 char **mangled, string *result)
-
- done = 0;
- success = 1;
-+ is_proctypevec = 0;
- while (success && !done)
- {
- int member;
-@@ -3616,8 +3636,15 @@ do_type (struct work_stuff *work, const char **mangled, string *result)
- 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 char **mangled, string *result)
- 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 char **mangled, string *result)
- }
-
- 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, const char **mangled,
- {
- 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);
-diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
-index 1d8b771..d690b23 100644
---- a/libiberty/testsuite/demangle-expected
-+++ b/libiberty/testsuite/demangle-expected
-@@ -4429,3 +4429,21 @@ __vt_90000000000cafebabe
-
- _Z80800000000000000000000
- _Z80800000000000000000000
-+#
-+# 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<>)
---
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3.inc
index 5c81a33af..e569e0220 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3.inc
@@ -32,12 +32,6 @@ BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2"
SRC_URI = "\
${BASEURI} \
file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
- file://0002-uclibc-conf.patch \
- file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
- file://0004-uclibc-locale.patch \
- file://0005-uclibc-locale-no__x.patch \
- file://0006-uclibc-locale-wchar_fix.patch \
- file://0007-uclibc-locale-update.patch \
file://0008-missing-execinfo_h.patch \
file://0009-c99-snprintf.patch \
file://0010-gcc-poison-system-directories.patch \
@@ -71,7 +65,7 @@ SRC_URI = "\
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://0041-ssp_nonshared.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 \
@@ -81,6 +75,7 @@ SRC_URI = "\
file://0048-sync-gcc-stddef.h-with-musl.patch \
file://0054_all_nopie-all-flags.patch \
file://0055-unwind_h-glibc26.patch \
+ file://0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch \
${BACKPORTS} \
"
BACKPORTS = "\
@@ -129,8 +124,6 @@ EXTRA_OECONF_INITIAL = "\
gcc_cv_libc_provides_ssp=yes \
"
-EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-
EXTRA_OECONF_PATHS = "\
--with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
--with-sysroot=/not/exist \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0002-uclibc-conf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0002-uclibc-conf.patch
deleted file mode 100644
index 4d284ef86..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0002-uclibc-conf.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 4efc5a258c812875743647d756f75c93c4d514a5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:38:25 +0400
-Subject: [PATCH 02/46] uclibc-conf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- contrib/regression/objs-gcc.sh | 4 ++++
- libjava/classpath/ltconfig | 4 ++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
-index 60b0497..6dc7ead 100755
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
-diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
-index d318957..df55950 100755
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch
deleted file mode 100644
index df07febee..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From ad5fd283fc7ef04f66c7fb003805364ea3bd34e9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:40:12 +0400
-Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
- libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++
- libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++
- 3 files changed, 23 insertions(+)
-
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
-index ef6ce8f..4740636 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.cc
-+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
-@@ -273,5 +273,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
- #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
- #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
- extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
-+#ifdef __UCLIBC__
-+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
-+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
-+#else
- _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
-+#endif
- #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
-index 794471e..d65f955 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -40,13 +40,22 @@
-
- #include <clocale>
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- #define _GLIBCXX_NUM_CATEGORIES 0
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
-+#ifdef __UCLIBC__
-+ typedef __ctype_touplow_t* __c_locale;
-+#else
- typedef int* __c_locale;
-+#endif
-
- // Convert numeric value of type double and long double to string and
- // return length of string. If vsnprintf is available use it, otherwise
-diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-index 591c793..55eb0e9 100644
---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-@@ -33,6 +33,11 @@
-
- // Information as gleaned from /usr/include/ctype.h
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- struct ctype_base
- {
- // Non-standard typedefs.
-+#ifdef __UCLIBC__
-+ typedef const __ctype_touplow_t* __to_type;
-+#else
- typedef const int* __to_type;
-+#endif
-
- // NB: Offsets into ctype<char>::_M_table force a particular size
- // on the mask type. Because of this, we don't use an enum.
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0004-uclibc-locale.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0004-uclibc-locale.patch
deleted file mode 100644
index ae2627c2e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0004-uclibc-locale.patch
+++ /dev/null
@@ -1,2862 +0,0 @@
-From 68bd083357e78678a9baac760beb2a31f00954a5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:41:39 +0400
-Subject: [PATCH 04/46] uclibc-locale
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/acinclude.m4 | 37 ++
- .../config/locale/uclibc/c++locale_internal.h | 63 ++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++
- .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++
- .../config/locale/uclibc/collate_members.cc | 80 +++
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++
- .../config/locale/uclibc/messages_members.cc | 100 +++
- .../config/locale/uclibc/messages_members.h | 118 ++++
- .../config/locale/uclibc/monetary_members.cc | 692 +++++++++++++++++++++
- .../config/locale/uclibc/numeric_members.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++
- libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++
- libstdc++-v3/configure | 75 +++
- libstdc++-v3/include/c_compatibility/wchar.h | 2 +
- libstdc++-v3/include/c_std/cwchar | 2 +
- 16 files changed, 2688 insertions(+)
- create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
-
-diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
-index b0f88cb..a0ee36b 100644
---- a/libstdc++-v3/acinclude.m4
-+++ b/libstdc++-v3/acinclude.m4
-@@ -2358,6 +2358,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -2542,6 +2545,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ AC_MSG_RESULT(uclibc)
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+ AC_SUBST(glibcxx_MOFILES)
-+ AC_SUBST(glibcxx_POFILES)
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-new file mode 100644
-index 0000000..2ae3e4a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -0,0 +1,63 @@
-+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-+
-+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+// Written by Jakub Jelinek <jakub@redhat.com>
-+
-+#include <bits/c++config.h>
-+#include <clocale>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning clean this up
-+#endif
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+
-+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
-+extern "C" __typeof(strcoll_l) __strcoll_l;
-+extern "C" __typeof(strftime_l) __strftime_l;
-+extern "C" __typeof(strtod_l) __strtod_l;
-+extern "C" __typeof(strtof_l) __strtof_l;
-+extern "C" __typeof(strtold_l) __strtold_l;
-+extern "C" __typeof(strxfrm_l) __strxfrm_l;
-+extern "C" __typeof(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+extern "C" __typeof(iswctype_l) __iswctype_l;
-+extern "C" __typeof(towlower_l) __towlower_l;
-+extern "C" __typeof(towupper_l) __towupper_l;
-+extern "C" __typeof(wcscoll_l) __wcscoll_l;
-+extern "C" __typeof(wcsftime_l) __wcsftime_l;
-+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
-+extern "C" __typeof(wctype_l) __wctype_l;
-+#endif
-+
-+#endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-new file mode 100644
-index 0000000..5081dc1
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -0,0 +1,160 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <cerrno> // For errno
-+#include <locale>
-+#include <stdexcept>
-+#include <langinfo.h>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
-+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
-+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
-+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
-+#define __strtof_l(S, E, L) strtof((S), (E))
-+#define __strtod_l(S, E, L) strtod((S), (E))
-+#define __strtold_l(S, E, L) strtold((S), (E))
-+#warning should dummy __newlocale check for C|POSIX ?
-+#define __newlocale(a, b, c) NULL
-+#define __freelocale(a) ((void)0)
-+#define __duplocale(a) __c_locale()
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ void
-+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
-+ __c_locale __old)
-+ {
-+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ if (!__cloc)
-+ {
-+ // This named locale is not supported by the underlying OS.
-+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
-+ "name not valid"));
-+ }
-+#endif
-+ }
-+
-+ void
-+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-+ {
-+ if (_S_get_c_locale() != __cloc)
-+ __freelocale(__cloc);
-+ }
-+
-+ __c_locale
-+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-+ { return __duplocale(__cloc); }
-+} // namespace std
-+
-+namespace __gnu_cxx
-+{
-+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-+ {
-+ "LC_CTYPE",
-+ "LC_NUMERIC",
-+ "LC_TIME",
-+ "LC_COLLATE",
-+ "LC_MONETARY",
-+ "LC_MESSAGES",
-+#if _GLIBCXX_NUM_CATEGORIES != 0
-+ "LC_PAPER",
-+ "LC_NAME",
-+ "LC_ADDRESS",
-+ "LC_TELEPHONE",
-+ "LC_MEASUREMENT",
-+ "LC_IDENTIFICATION"
-+#endif
-+ };
-+}
-+
-+namespace std
-+{
-+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-+} // namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-new file mode 100644
-index 0000000..da07c1f
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -0,0 +1,117 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifndef _C_LOCALE_H
-+#define _C_LOCALE_H 1
-+
-+#pragma GCC system_header
-+
-+#include <cstring> // get std::strlen
-+#include <cstdio> // get std::snprintf or std::sprintf
-+#include <clocale>
-+#include <langinfo.h> // For codecvt
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC_HAS_LOCALE__
-+#include <iconv.h> // For codecvt using iconv, iconv_t
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#include <libintl.h> // For messages
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning what is _GLIBCXX_C_LOCALE_GNU for
-+#endif
-+#define _GLIBCXX_C_LOCALE_GNU 1
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix categories
-+#endif
-+// #define _GLIBCXX_NUM_CATEGORIES 6
-+#define _GLIBCXX_NUM_CATEGORIES 0
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+namespace __gnu_cxx
-+{
-+ extern "C" __typeof(uselocale) __uselocale;
-+}
-+#endif
-+
-+namespace std
-+{
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ typedef __locale_t __c_locale;
-+#else
-+ typedef int* __c_locale;
-+#endif
-+
-+ // Convert numeric value of type _Tv to string and return length of
-+ // string. If snprintf is available use it, otherwise fall back to
-+ // the unsafe sprintf which, in general, can be dangerous and should
-+ // be avoided.
-+ template<typename _Tv>
-+ int
-+ __convert_from_v(char* __out,
-+ const int __size __attribute__ ((__unused__)),
-+ const char* __fmt,
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ _Tv __v, const __c_locale& __cloc, int __prec)
-+ {
-+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
-+#else
-+ _Tv __v, const __c_locale&, int __prec)
-+ {
-+# ifdef __UCLIBC_HAS_LOCALE__
-+ char* __old = std::setlocale(LC_ALL, NULL);
-+ char* __sav = new char[std::strlen(__old) + 1];
-+ std::strcpy(__sav, __old);
-+ std::setlocale(LC_ALL, "C");
-+# endif
-+#endif
-+
-+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ __gnu_cxx::__uselocale(__old);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ std::setlocale(LC_ALL, __sav);
-+ delete [] __sav;
-+#endif
-+ return __ret;
-+ }
-+}
-+
-+#endif
-diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-new file mode 100644
-index 0000000..64aa962
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-@@ -0,0 +1,308 @@
-+// std::codecvt implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <cstdlib> // For MB_CUR_MAX
-+#include <climits> // For MB_LEN_MAX
-+#include <bits/c++locale_internal.h>
-+
-+namespace std
-+{
-+ // Specializations.
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_out(state_type& __state, const intern_type* __from,
-+ const intern_type* __from_end, const intern_type*& __from_next,
-+ extern_type* __to, extern_type* __to_end,
-+ extern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
-+ // in case we fall back to wcrtomb and then continue, in a loop.
-+ // NB: wcsnrtombs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
-+ __from_end - __from_next);
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // wcrtomb.
-+ for (; __from < __from_next; ++__from)
-+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ extern_type __buf[MB_LEN_MAX];
-+ __tmp_state = __state;
-+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
-+ if (__conv > static_cast<size_t>(__to_end - __to_next))
-+ __ret = partial;
-+ else
-+ {
-+ memcpy(__to_next, __buf, __conv);
-+ __state = __tmp_state;
-+ __to_next += __conv;
-+ ++__from_next;
-+ }
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_in(state_type& __state, const extern_type* __from,
-+ const extern_type* __from_end, const extern_type*& __from_next,
-+ intern_type* __to, intern_type* __to_end,
-+ intern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we store a L'\0' and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
-+ __from_end
-+ - __from_next));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (;; ++__to_next, __from += __conv)
-+ {
-+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __from_next = __from;
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ // It is unclear what to return in this case (see DR 382).
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ if (__to_next < __to_end)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from_next;
-+ *__to_next++ = L'\0';
-+ }
-+ else
-+ __ret = partial;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_encoding() const throw()
-+ {
-+ // XXX This implementation assumes that the encoding is
-+ // stateless and is either single-byte or variable-width.
-+ int __ret = 0;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ if (MB_CUR_MAX == 1)
-+ __ret = 1;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_max_length() const throw()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ // XXX Probably wrong for stateful encodings.
-+ int __ret = MB_CUR_MAX;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_length(state_type& __state, const extern_type* __from,
-+ const extern_type* __end, size_t __max) const
-+ {
-+ int __ret = 0;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we advance past it and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+
-+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
-+ // its fourth parameter (it wouldn't with NULL as first parameter).
-+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
-+ * __max));
-+ while (__from < __end && __max)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
-+ __end
-+ - __from));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __end;
-+
-+ const extern_type* __tmp_from = __from;
-+ size_t __conv = mbsnrtowcs(__to, &__from,
-+ __from_chunk_end - __from,
-+ __max, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (__from = __tmp_from;; __from += __conv)
-+ {
-+ __conv = mbrtowc(NULL, __from, __end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __state = __tmp_state;
-+ __ret += __from - __tmp_from;
-+ break;
-+ }
-+ if (!__from)
-+ __from = __from_chunk_end;
-+
-+ __ret += __from - __tmp_from;
-+ __max -= __conv;
-+
-+ if (__from < __end && __max)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from;
-+ ++__ret;
-+ --__max;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-new file mode 100644
-index 0000000..c2664a7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -0,0 +1,80 @@
-+// std::collate implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+#endif
-+
-+namespace std
-+{
-+ // These are basically extensions to char_traits, and perhaps should
-+ // be put there instead of here.
-+ template<>
-+ int
-+ collate<char>::_M_compare(const char* __one, const char* __two) const
-+ {
-+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<char>::_M_transform(char* __to, const char* __from,
-+ size_t __n) const
-+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ int
-+ collate<wchar_t>::_M_compare(const wchar_t* __one,
-+ const wchar_t* __two) const
-+ {
-+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
-+ size_t __n) const
-+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-new file mode 100644
-index 0000000..7294e3a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -0,0 +1,300 @@
-+// std::ctype implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __wctype_l(S, L) wctype((S))
-+#define __towupper_l(C, L) towupper((C))
-+#define __towlower_l(C, L) towlower((C))
-+#define __iswctype_l(C, M, L) iswctype((C), (M))
-+#endif
-+
-+namespace std
-+{
-+ // NB: The other ctype<char> specializations are in src/locale.cc and
-+ // various /config/os/* files.
-+ template<>
-+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+ : ctype<char>(0, false, __refs)
-+ {
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
-+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
-+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
-+#endif
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ ctype<wchar_t>::__wmask_type
-+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
-+ {
-+ __wmask_type __ret;
-+ switch (__m)
-+ {
-+ case space:
-+ __ret = __wctype_l("space", _M_c_locale_ctype);
-+ break;
-+ case print:
-+ __ret = __wctype_l("print", _M_c_locale_ctype);
-+ break;
-+ case cntrl:
-+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
-+ break;
-+ case upper:
-+ __ret = __wctype_l("upper", _M_c_locale_ctype);
-+ break;
-+ case lower:
-+ __ret = __wctype_l("lower", _M_c_locale_ctype);
-+ break;
-+ case alpha:
-+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
-+ break;
-+ case digit:
-+ __ret = __wctype_l("digit", _M_c_locale_ctype);
-+ break;
-+ case punct:
-+ __ret = __wctype_l("punct", _M_c_locale_ctype);
-+ break;
-+ case xdigit:
-+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
-+ break;
-+ case alnum:
-+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
-+ break;
-+ case graph:
-+ __ret = __wctype_l("graph", _M_c_locale_ctype);
-+ break;
-+ default:
-+ __ret = __wmask_type();
-+ }
-+ return __ret;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_toupper(wchar_t __c) const
-+ { return __towupper_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_tolower(wchar_t __c) const
-+ { return __towlower_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ bool
-+ ctype<wchar_t>::
-+ do_is(mask __m, wchar_t __c) const
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ bool __ret = false;
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur]
-+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ return __ret;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
-+ {
-+ for (; __lo < __hi; ++__vec, ++__lo)
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ mask __m = 0;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ __m |= _M_bit[__bitcur];
-+ *__vec = __m;
-+ }
-+ return __hi;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi && !this->do_is(__m, *__lo))
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
-+ {
-+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::
-+ do_widen(char __c) const
-+ { return _M_widen[static_cast<unsigned char>(__c)]; }
-+
-+ const char*
-+ ctype<wchar_t>::
-+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
-+ ++__lo;
-+ ++__dest;
-+ }
-+ return __hi;
-+ }
-+
-+ char
-+ ctype<wchar_t>::
-+ do_narrow(wchar_t __wc, char __dfault) const
-+ {
-+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
-+ return _M_narrow[__wc];
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ const int __c = wctob(__wc);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
-+ char* __dest) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ if (_M_narrow_ok)
-+ while (__lo < __hi)
-+ {
-+ if (*__lo >= 0 && *__lo < 128)
-+ *__dest = _M_narrow[*__lo];
-+ else
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+ ++__lo;
-+ ++__dest;
-+ }
-+ else
-+ while (__lo < __hi)
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ ++__lo;
-+ ++__dest;
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __hi;
-+ }
-+
-+ void
-+ ctype<wchar_t>::_M_initialize_ctype()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ wint_t __i;
-+ for (__i = 0; __i < 128; ++__i)
-+ {
-+ const int __c = wctob(__i);
-+ if (__c == EOF)
-+ break;
-+ else
-+ _M_narrow[__i] = static_cast<char>(__c);
-+ }
-+ if (__i == 128)
-+ _M_narrow_ok = true;
-+ else
-+ _M_narrow_ok = false;
-+ for (size_t __j = 0;
-+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
-+ _M_widen[__j] = btowc(__j);
-+
-+ for (size_t __k = 0; __k <= 11; ++__k)
-+ {
-+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
-+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ }
-+#endif // _GLIBCXX_USE_WCHAR_T
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-new file mode 100644
-index 0000000..13594d9
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -0,0 +1,100 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix gettext stuff
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__dcgettext(const char *domainname,
-+ const char *msgid, int category);
-+#undef gettext
-+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#else
-+#undef gettext
-+#define gettext(msgid) (msgid)
-+#endif
-+
-+namespace std
-+{
-+ // Specializations.
-+ template<>
-+ string
-+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
-+ __uselocale(__old);
-+ return string(__msg);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ const char* __msg = gettext(__dfault.c_str());
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return string(__msg);
-+#else
-+ const char* __msg = gettext(__dfault.c_str());
-+ return string(__msg);
-+#endif
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ wstring
-+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
-+ {
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ __uselocale(__old);
-+ return _M_convert_from_char(__msg);
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return _M_convert_from_char(__msg);
-+# else
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ return _M_convert_from_char(__msg);
-+# endif
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-new file mode 100644
-index 0000000..1424078
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -0,0 +1,118 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix prototypes for *textdomain funcs
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__textdomain(const char *domainname);
-+extern "C" char *__bindtextdomain(const char *domainname,
-+ const char *dirname);
-+#else
-+#undef __textdomain
-+#undef __bindtextdomain
-+#define __textdomain(D) ((void)0)
-+#define __bindtextdomain(D,P) ((void)0)
-+#endif
-+
-+ // Non-virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::messages(size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
-+ _M_name_messages(_S_get_c_name())
-+ { }
-+
-+ template<typename _CharT>
-+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-+ _M_name_messages(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_messages = __tmp;
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
-+ const char* __dir) const
-+ {
-+ __bindtextdomain(__s.c_str(), __dir);
-+ return this->do_open(__s, __loc);
-+ }
-+
-+ // Virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::~messages()
-+ {
-+ if (_M_name_messages != _S_get_c_name())
-+ delete [] _M_name_messages;
-+ _S_destroy_c_locale(_M_c_locale_messages);
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::do_open(const basic_string<char>& __s,
-+ const locale&) const
-+ {
-+ // No error checking is done, assume the catalog exists and can
-+ // be used.
-+ __textdomain(__s.c_str());
-+ return 0;
-+ }
-+
-+ template<typename _CharT>
-+ void
-+ messages<_CharT>::do_close(catalog) const
-+ { }
-+
-+ // messages_byname
-+ template<typename _CharT>
-+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
-+ : messages<_CharT>(__refs)
-+ {
-+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
-+ delete [] this->_M_name_messages;
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ this->_M_name_messages = __tmp;
-+
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
-+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
-+ }
-+ }
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-new file mode 100644
-index 0000000..aa52731
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -0,0 +1,692 @@
-+// std::moneypunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning optimize this for uclibc
-+#warning tailor for stub locale support
-+#endif
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ // Construct and return valid pattern consisting of some combination of:
-+ // space none symbol sign value
-+ money_base::pattern
-+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
-+ {
-+ pattern __ret;
-+
-+ // This insanely complicated routine attempts to construct a valid
-+ // pattern for use with monyepunct. A couple of invariants:
-+
-+ // if (__precedes) symbol -> value
-+ // else value -> symbol
-+
-+ // if (__space) space
-+ // else none
-+
-+ // none == never first
-+ // space never first or last
-+
-+ // Any elegant implementations of this are welcome.
-+ switch (__posn)
-+ {
-+ case 0:
-+ case 1:
-+ // 1 The sign precedes the value and symbol.
-+ __ret.field[0] = sign;
-+ if (__space)
-+ {
-+ // Pattern starts with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[3] = symbol;
-+ }
-+ __ret.field[2] = space;
-+ }
-+ else
-+ {
-+ // Pattern starts with sign and ends with none.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 2:
-+ // 2 The sign follows the value and symbol.
-+ if (__space)
-+ {
-+ // Pattern either ends with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[1] = space;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ // Pattern ends with sign then none.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[1] = symbol;
-+ }
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 3:
-+ // 3 The sign immediately precedes the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = sign;
-+ __ret.field[1] = symbol;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = symbol;
-+ }
-+ else
-+ {
-+ __ret.field[1] = sign;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ case 4:
-+ // 4 The sign immediately follows the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = sign;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ default:
-+ ;
-+ }
-+ return __ret;
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == false
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<char, true>::~moneypunct()
-+ { delete _M_data; }
-+
-+ template<>
-+ moneypunct<char, false>::~moneypunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len;
-+ __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, true>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, false>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-new file mode 100644
-index 0000000..883ec1a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -0,0 +1,160 @@
-+// std::numpunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
-+ __cloc));
-+
-+ // Check for NULL, which implies no grouping.
-+ if (_M_data->_M_thousands_sep == '\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = "true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = "false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<char>::~numpunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<wchar_t>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+ // NB: In the GNU model wchar_t is always 32 bit wide.
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+
-+ if (_M_data->_M_thousands_sep == L'\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = L"true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = L"false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<wchar_t>::~numpunct()
-+ { delete _M_data; }
-+ #endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-new file mode 100644
-index 0000000..e0707d7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -0,0 +1,406 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __timepunct<char>::
-+ _M_put(char* __s, size_t __maxlen, const char* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = '\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = "%m/%d/%y";
-+ _M_data->_M_date_era_format = "%m/%d/%y";
-+ _M_data->_M_time_format = "%H:%M:%S";
-+ _M_data->_M_time_era_format = "%H:%M:%S";
-+ _M_data->_M_date_time_format = "";
-+ _M_data->_M_date_time_era_format = "";
-+ _M_data->_M_am = "AM";
-+ _M_data->_M_pm = "PM";
-+ _M_data->_M_am_pm_format = "";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = "Sunday";
-+ _M_data->_M_day2 = "Monday";
-+ _M_data->_M_day3 = "Tuesday";
-+ _M_data->_M_day4 = "Wednesday";
-+ _M_data->_M_day5 = "Thursday";
-+ _M_data->_M_day6 = "Friday";
-+ _M_data->_M_day7 = "Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = "Sun";
-+ _M_data->_M_aday2 = "Mon";
-+ _M_data->_M_aday3 = "Tue";
-+ _M_data->_M_aday4 = "Wed";
-+ _M_data->_M_aday5 = "Thu";
-+ _M_data->_M_aday6 = "Fri";
-+ _M_data->_M_aday7 = "Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = "January";
-+ _M_data->_M_month02 = "February";
-+ _M_data->_M_month03 = "March";
-+ _M_data->_M_month04 = "April";
-+ _M_data->_M_month05 = "May";
-+ _M_data->_M_month06 = "June";
-+ _M_data->_M_month07 = "July";
-+ _M_data->_M_month08 = "August";
-+ _M_data->_M_month09 = "September";
-+ _M_data->_M_month10 = "October";
-+ _M_data->_M_month11 = "November";
-+ _M_data->_M_month12 = "December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = "Jan";
-+ _M_data->_M_amonth02 = "Feb";
-+ _M_data->_M_amonth03 = "Mar";
-+ _M_data->_M_amonth04 = "Apr";
-+ _M_data->_M_amonth05 = "May";
-+ _M_data->_M_amonth06 = "Jun";
-+ _M_data->_M_amonth07 = "Jul";
-+ _M_data->_M_amonth08 = "Aug";
-+ _M_data->_M_amonth09 = "Sep";
-+ _M_data->_M_amonth10 = "Oct";
-+ _M_data->_M_amonth11 = "Nov";
-+ _M_data->_M_amonth12 = "Dec";
-+ }
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
-+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
-+ __cloc);
-+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
-+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
-+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
-+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
-+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
-+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
-+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
-+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
-+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
-+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
-+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
-+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
-+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
-+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
-+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
-+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
-+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
-+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
-+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
-+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
-+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
-+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
-+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
-+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
-+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
-+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
-+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
-+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
-+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
-+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
-+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
-+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
-+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
-+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
-+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
-+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
-+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ __timepunct<wchar_t>::
-+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
-+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = L'\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<wchar_t>;
-+
-+#warning wide time stuff
-+// if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = L"%m/%d/%y";
-+ _M_data->_M_date_era_format = L"%m/%d/%y";
-+ _M_data->_M_time_format = L"%H:%M:%S";
-+ _M_data->_M_time_era_format = L"%H:%M:%S";
-+ _M_data->_M_date_time_format = L"";
-+ _M_data->_M_date_time_era_format = L"";
-+ _M_data->_M_am = L"AM";
-+ _M_data->_M_pm = L"PM";
-+ _M_data->_M_am_pm_format = L"";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = L"Sunday";
-+ _M_data->_M_day2 = L"Monday";
-+ _M_data->_M_day3 = L"Tuesday";
-+ _M_data->_M_day4 = L"Wednesday";
-+ _M_data->_M_day5 = L"Thursday";
-+ _M_data->_M_day6 = L"Friday";
-+ _M_data->_M_day7 = L"Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = L"Sun";
-+ _M_data->_M_aday2 = L"Mon";
-+ _M_data->_M_aday3 = L"Tue";
-+ _M_data->_M_aday4 = L"Wed";
-+ _M_data->_M_aday5 = L"Thu";
-+ _M_data->_M_aday6 = L"Fri";
-+ _M_data->_M_aday7 = L"Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = L"January";
-+ _M_data->_M_month02 = L"February";
-+ _M_data->_M_month03 = L"March";
-+ _M_data->_M_month04 = L"April";
-+ _M_data->_M_month05 = L"May";
-+ _M_data->_M_month06 = L"June";
-+ _M_data->_M_month07 = L"July";
-+ _M_data->_M_month08 = L"August";
-+ _M_data->_M_month09 = L"September";
-+ _M_data->_M_month10 = L"October";
-+ _M_data->_M_month11 = L"November";
-+ _M_data->_M_month12 = L"December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = L"Jan";
-+ _M_data->_M_amonth02 = L"Feb";
-+ _M_data->_M_amonth03 = L"Mar";
-+ _M_data->_M_amonth04 = L"Apr";
-+ _M_data->_M_amonth05 = L"May";
-+ _M_data->_M_amonth06 = L"Jun";
-+ _M_data->_M_amonth07 = L"Jul";
-+ _M_data->_M_amonth08 = L"Aug";
-+ _M_data->_M_amonth09 = L"Sep";
-+ _M_data->_M_amonth10 = L"Oct";
-+ _M_data->_M_amonth11 = L"Nov";
-+ _M_data->_M_amonth12 = L"Dec";
-+ }
-+#if 0
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ union { char *__s; wchar_t *__w; } __u;
-+
-+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
-+ _M_data->_M_date_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
-+ _M_data->_M_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
-+ _M_data->_M_am = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
-+ _M_data->_M_pm = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
-+ _M_data->_M_am_pm_format = __u.__w;
-+
-+ // Day names, starting with "C"'s Sunday.
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
-+ _M_data->_M_day1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
-+ _M_data->_M_day2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
-+ _M_data->_M_day3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
-+ _M_data->_M_day4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
-+ _M_data->_M_day5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
-+ _M_data->_M_day6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
-+ _M_data->_M_day7 = __u.__w;
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
-+ _M_data->_M_aday1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
-+ _M_data->_M_aday2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
-+ _M_data->_M_aday3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
-+ _M_data->_M_aday4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
-+ _M_data->_M_aday5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
-+ _M_data->_M_aday6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
-+ _M_data->_M_aday7 = __u.__w;
-+
-+ // Month names, starting with "C"'s January.
-+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
-+ _M_data->_M_month01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
-+ _M_data->_M_month02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
-+ _M_data->_M_month03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
-+ _M_data->_M_month04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
-+ _M_data->_M_month05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
-+ _M_data->_M_month06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
-+ _M_data->_M_month07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
-+ _M_data->_M_month08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
-+ _M_data->_M_month09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
-+ _M_data->_M_month10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
-+ _M_data->_M_month11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
-+ _M_data->_M_month12 = __u.__w;
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
-+ _M_data->_M_amonth01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
-+ _M_data->_M_amonth02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
-+ _M_data->_M_amonth03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
-+ _M_data->_M_amonth04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
-+ _M_data->_M_amonth05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
-+ _M_data->_M_amonth06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
-+ _M_data->_M_amonth07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
-+ _M_data->_M_amonth08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
-+ _M_data->_M_amonth09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
-+ _M_data->_M_amonth10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
-+ _M_data->_M_amonth11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
-+ _M_data->_M_amonth12 = __u.__w;
-+ }
-+#endif // 0
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-new file mode 100644
-index 0000000..ba8e858
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -0,0 +1,68 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
-+// any later version.
-+
-+// This library 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 library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
-+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_timepunct = __tmp;
-+ _M_initialize_timepunct(__cloc);
-+ }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::~__timepunct()
-+ {
-+ if (_M_name_timepunct != _S_get_c_name())
-+ delete [] _M_name_timepunct;
-+ delete _M_data;
-+ _S_destroy_c_locale(_M_c_locale_timepunct);
-+ }
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 41797a9..8a5481c 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -15830,6 +15830,9 @@ fi
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -16108,6 +16111,78 @@ $as_echo "newlib" >&6; }
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5
-+$as_echo "uclibc" >&6; }
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_check_msgfmt+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$check_msgfmt"; then
-+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_check_msgfmt="yes"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
-+fi
-+fi
-+check_msgfmt=$ac_cv_prog_check_msgfmt
-+if test -n "$check_msgfmt"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5
-+$as_echo "$check_msgfmt" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+
-+
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
-index 55a0b52..7d8bb15 100644
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -101,7 +101,9 @@ using std::wmemcmp;
- using std::wmemcpy;
- using std::wmemmove;
- using std::wmemset;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using std::wcsftime;
-+#endif
-
- #if _GLIBCXX_USE_C99_WCHAR
- using std::wcstold;
-diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
-index dc4cef02..256d126 100644
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- using ::wcscoll;
- using ::wcscpy;
- using ::wcscspn;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using ::wcsftime;
-+#endif
- using ::wcslen;
- using ::wcsncat;
- using ::wcsncmp;
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0005-uclibc-locale-no__x.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0005-uclibc-locale-no__x.patch
deleted file mode 100644
index 3275016e7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0005-uclibc-locale-no__x.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From c01c14e8e9be382ecd4121ee70f5003b4cb0f904 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:42:36 +0400
-Subject: [PATCH 05/46] uclibc-locale-no__x
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 -------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 1 +
- .../config/locale/uclibc/collate_members.cc | 7 ----
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 ----
- .../config/locale/uclibc/messages_members.cc | 7 +---
- .../config/locale/uclibc/messages_members.h | 18 ++++-----
- .../config/locale/uclibc/monetary_members.cc | 4 --
- .../config/locale/uclibc/numeric_members.cc | 3 --
- libstdc++-v3/config/locale/uclibc/time_members.cc | 3 --
- 10 files changed, 55 insertions(+), 54 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index 2ae3e4a..e74fddf 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
- extern "C" __typeof(wctype_l) __wctype_l;
- #endif
-
-+# define __nl_langinfo_l nl_langinfo_l
-+# define __strcoll_l strcoll_l
-+# define __strftime_l strftime_l
-+# define __strtod_l strtod_l
-+# define __strtof_l strtof_l
-+# define __strtold_l strtold_l
-+# define __strxfrm_l strxfrm_l
-+# define __newlocale newlocale
-+# define __freelocale freelocale
-+# define __duplocale duplocale
-+# define __uselocale uselocale
-+
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l iswctype_l
-+# define __towlower_l towlower_l
-+# define __towupper_l towupper_l
-+# define __wcscoll_l wcscoll_l
-+# define __wcsftime_l wcsftime_l
-+# define __wcsxfrm_l wcsxfrm_l
-+# define __wctype_l wctype_l
-+# endif
-+
-+#else
-+# define __nl_langinfo_l(N, L) nl_langinfo((N))
-+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+# define __strtod_l(S, E, L) strtod((S), (E))
-+# define __strtof_l(S, E, L) strtof((S), (E))
-+# define __strtold_l(S, E, L) strtold((S), (E))
-+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+# warning should dummy __newlocale check for C|POSIX ?
-+# define __newlocale(a, b, c) NULL
-+# define __freelocale(a) ((void)0)
-+# define __duplocale(a) __c_locale()
-+//# define __uselocale ?
-+//
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l(C, M, L) iswctype((C), (M))
-+# define __towlower_l(C, L) towlower((C))
-+# define __towupper_l(C, L) towupper((C))
-+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
-+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+# define __wctype_l(S, L) wctype((S))
-+# endif
-+
- #endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 5081dc1..21430d0 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,20 +39,6 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
--#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
--#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
--#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
--#define __strtof_l(S, E, L) strtof((S), (E))
--#define __strtod_l(S, E, L) strtod((S), (E))
--#define __strtold_l(S, E, L) strtold((S), (E))
--#warning should dummy __newlocale check for C|POSIX ?
--#define __newlocale(a, b, c) NULL
--#define __freelocale(a) ((void)0)
--#define __duplocale(a) __c_locale()
--#endif
--
- namespace std
- {
- template<>
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index da07c1f..4bca5f1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -68,6 +68,7 @@ namespace __gnu_cxx
- {
- extern "C" __typeof(uselocale) __uselocale;
- }
-+#define __uselocale uselocale
- #endif
-
- namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-index c2664a7..ec5c329 100644
---- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -36,13 +36,6 @@
- #include <locale>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
--#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
--#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
--#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
--#endif
--
- namespace std
- {
- // These are basically extensions to char_traits, and perhaps should
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7294e3a..7b12861 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -38,13 +38,6 @@
- #undef _LIBC
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __wctype_l(S, L) wctype((S))
--#define __towupper_l(C, L) towupper((C))
--#define __towlower_l(C, L) towlower((C))
--#define __iswctype_l(C, M, L) iswctype((C), (M))
--#endif
--
- namespace std
- {
- // NB: The other ctype<char> specializations are in src/locale.cc and
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-index 13594d9..d7693b4 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -39,13 +39,10 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix gettext stuff
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__dcgettext(const char *domainname,
-- const char *msgid, int category);
- #undef gettext
--#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
- #else
--#undef gettext
- #define gettext(msgid) (msgid)
- #endif
-
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index 1424078..d89da33 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -36,15 +36,11 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix prototypes for *textdomain funcs
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__textdomain(const char *domainname);
--extern "C" char *__bindtextdomain(const char *domainname,
-- const char *dirname);
--#else
--#undef __textdomain
--#undef __bindtextdomain
--#define __textdomain(D) ((void)0)
--#define __bindtextdomain(D,P) ((void)0)
-+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#undef textdomain
-+#undef bindtextdomain
-+#define textdomain(D) ((void)0)
-+#define bindtextdomain(D,P) ((void)0)
- #endif
-
- // Non-virtual member functions.
-@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
- const char* __dir) const
- {
-- __bindtextdomain(__s.c_str(), __dir);
-+ bindtextdomain(__s.c_str(), __dir);
- return this->do_open(__s, __loc);
- }
-
-@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- {
- // No error checking is done, assume the catalog exists and can
- // be used.
-- __textdomain(__s.c_str());
-+ textdomain(__s.c_str());
- return 0;
- }
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index aa52731..2e6f80a 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -43,10 +43,6 @@
- #warning tailor for stub locale support
- #endif
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
--
- namespace std
- {
- // Construct and return valid pattern consisting of some combination of:
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 883ec1a..2c70642 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -41,9 +41,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index e0707d7..d848ed5 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -40,9 +40,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0006-uclibc-locale-wchar_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0006-uclibc-locale-wchar_fix.patch
deleted file mode 100644
index e45a482d5..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0006-uclibc-locale-wchar_fix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From e7a4760fb40008cae33e6fc7dc4cfef6c2fd5f93 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:45:57 +0400
-Subject: [PATCH 06/46] uclibc-locale-wchar_fix
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++--
- libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 2e6f80a..31ebb9f 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -401,7 +401,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-@@ -556,7 +556,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 2c70642..d5c8961 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -127,12 +127,25 @@ namespace std
- {
- // Named locale.
- // NB: In the GNU model wchar_t is always 32 bit wide.
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be numeric
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
- union { char *__s; wchar_t __w; } __u;
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
- _M_data->_M_decimal_point = __u.__w;
-
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
- _M_data->_M_thousands_sep = __u.__w;
-+#endif
-
- if (_M_data->_M_thousands_sep == L'\0')
- _M_data->_M_grouping = "";
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0007-uclibc-locale-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0007-uclibc-locale-update.patch
deleted file mode 100644
index b73e5914e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0007-uclibc-locale-update.patch
+++ /dev/null
@@ -1,542 +0,0 @@
-From 8d53a38a3038104e6830ecea5e4beadce54457c1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:46:58 +0400
-Subject: [PATCH 07/46] uclibc-locale-update
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 3 +
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 ++++++++++------------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++------
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 +++++++++++----
- .../config/locale/uclibc/messages_members.h | 12 ++--
- .../config/locale/uclibc/monetary_members.cc | 34 ++++++----
- .../config/locale/uclibc/numeric_members.cc | 5 ++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 18 ++++--
- libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++--
- 9 files changed, 158 insertions(+), 98 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index e74fddf..971a6b4 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -31,6 +31,9 @@
-
- #include <bits/c++config.h>
- #include <clocale>
-+#include <cstdlib>
-+#include <cstring>
-+#include <cstddef>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning clean this up
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 21430d0..1b9d8e1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,23 +39,20 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- template<>
- void
- __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- float __f = __strtof_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __f;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -63,16 +60,13 @@ namespace std
- __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- double __d = __strtod_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __d;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -80,16 +74,13 @@ namespace std
- __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- long double __ld = __strtold_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __ld;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- void
-@@ -110,17 +101,18 @@ namespace std
- void
- locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
- {
-- if (_S_get_c_locale() != __cloc)
-+ if (__cloc && _S_get_c_locale() != __cloc)
- __freelocale(__cloc);
- }
-
- __c_locale
- locale::facet::_S_clone_c_locale(__c_locale& __cloc)
- { return __duplocale(__cloc); }
--} // namespace std
-
--namespace __gnu_cxx
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-+
- const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
- {
- "LC_CTYPE",
-@@ -138,9 +130,11 @@ namespace __gnu_cxx
- "LC_IDENTIFICATION"
- #endif
- };
--}
-
--namespace std
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- const char* const* const locale::_S_categories = __gnu_cxx::category_names;
--} // namespace std
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index 4bca5f1..64a6d46 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -39,21 +39,23 @@
- #pragma GCC system_header
-
- #include <cstring> // get std::strlen
--#include <cstdio> // get std::snprintf or std::sprintf
-+#include <cstdio> // get std::vsnprintf or std::vsprintf
- #include <clocale>
- #include <langinfo.h> // For codecvt
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix this
- #endif
--#ifdef __UCLIBC_HAS_LOCALE__
-+#ifdef _GLIBCXX_USE_ICONV
- #include <iconv.h> // For codecvt using iconv, iconv_t
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--#include <libintl.h> // For messages
-+#ifdef HAVE_LIBINTL_H
-+#include <libintl.h> // For messages
- #endif
-+#include <cstdarg>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning what is _GLIBCXX_C_LOCALE_GNU for
-+// psm: used in os/gnu-linux/ctype_noninline.h
- #endif
- #define _GLIBCXX_C_LOCALE_GNU 1
-
-@@ -78,23 +80,25 @@ namespace std
- #else
- typedef int* __c_locale;
- #endif
--
-- // Convert numeric value of type _Tv to string and return length of
-- // string. If snprintf is available use it, otherwise fall back to
-- // the unsafe sprintf which, in general, can be dangerous and should
-+ // Convert numeric value of type double to string and return length of
-+ // string. If vsnprintf is available use it, otherwise fall back to
-+ // the unsafe vsprintf which, in general, can be dangerous and should
- // be avoided.
-- template<typename _Tv>
-- int
-- __convert_from_v(char* __out,
-- const int __size __attribute__ ((__unused__)),
-- const char* __fmt,
--#ifdef __UCLIBC_HAS_XCLOCALE__
-- _Tv __v, const __c_locale& __cloc, int __prec)
-+ inline int
-+ __convert_from_v(const __c_locale&
-+#ifndef __UCLIBC_HAS_XCLOCALE__
-+ __cloc __attribute__ ((__unused__))
-+#endif
-+ ,
-+ char* __out,
-+ const int __size,
-+ const char* __fmt, ...)
- {
-+ va_list __args;
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+
- __c_locale __old = __gnu_cxx::__uselocale(__cloc);
- #else
-- _Tv __v, const __c_locale&, int __prec)
-- {
- # ifdef __UCLIBC_HAS_LOCALE__
- char* __old = std::setlocale(LC_ALL, NULL);
- char* __sav = new char[std::strlen(__old) + 1];
-@@ -103,7 +107,9 @@ namespace std
- # endif
- #endif
-
-- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+ va_start(__args, __fmt);
-+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
-+ va_end(__args);
-
- #ifdef __UCLIBC_HAS_XCLOCALE__
- __gnu_cxx::__uselocale(__old);
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7b12861..13e011d 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -33,16 +33,20 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- // NB: The other ctype<char> specializations are in src/locale.cc and
- // various /config/os/* files.
-- template<>
- ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
- : ctype<char>(0, false, __refs)
- {
-@@ -57,6 +61,8 @@ namespace std
- #endif
- }
- }
-+ ctype_byname<char>::~ctype_byname()
-+ { }
-
- #ifdef _GLIBCXX_USE_WCHAR_T
- ctype<wchar_t>::__wmask_type
-@@ -138,17 +144,33 @@ namespace std
- ctype<wchar_t>::
- do_is(mask __m, wchar_t __c) const
- {
-- // Highest bitmask in ctype_base == 10, but extra in "C"
-- // library for blank.
-+ // The case of __m == ctype_base::space is particularly important,
-+ // due to its use in many istream functions. Therefore we deal with
-+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
-+ // is the mask corresponding to ctype_base::space. NB: an encoding
-+ // change would not affect correctness!
-+
- bool __ret = false;
-- const size_t __bitmasksize = 11;
-- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-- if (__m & _M_bit[__bitcur]
-- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-- {
-- __ret = true;
-- break;
-- }
-+ if (__m == _M_bit[5])
-+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
-+ else
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur])
-+ {
-+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ else if (__m == _M_bit[__bitcur])
-+ break;
-+ }
-+ }
-+
- return __ret;
- }
-
-@@ -290,4 +312,5 @@ namespace std
- #endif
- }
- #endif // _GLIBCXX_USE_WCHAR_T
--}
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index d89da33..067657a 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -53,12 +53,16 @@
- template<typename _CharT>
- messages<_CharT>::messages(__c_locale __cloc, const char* __s,
- size_t __refs)
-- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-- _M_name_messages(__s)
-+ : facet(__refs), _M_c_locale_messages(NULL),
-+ _M_name_messages(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_messages = __tmp;
-+
-+ // Last to avoid leaking memory if new throws.
-+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
- }
-
- template<typename _CharT>
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 31ebb9f..7679b9c 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -206,7 +211,7 @@ namespace std
- }
- break;
- default:
-- ;
-+ __ret = pattern();
- }
- return __ret;
- }
-@@ -390,7 +395,9 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
- setlocale(LC_ALL, __name);
- #endif
-
-@@ -477,8 +484,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -498,8 +505,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-@@ -545,8 +552,11 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-- setlocale(LC_ALL, __name);
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
-+ setlocale(LC_ALL, __name);
- #endif
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -633,8 +643,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -653,8 +663,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index d5c8961..8ae8969 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index d848ed5..f24d53e 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -53,11 +53,14 @@ namespace std
- const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = strftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-@@ -207,11 +210,14 @@ namespace std
- const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-index ba8e858..1665dde 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -50,12 +50,21 @@
- __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
- size_t __refs)
- : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-- _M_name_timepunct(__s)
-+ _M_name_timepunct(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_timepunct = __tmp;
-- _M_initialize_timepunct(__cloc);
-+
-+ try
-+ { _M_initialize_timepunct(__cloc); }
-+ catch(...)
-+ {
-+ delete [] _M_name_timepunct;
-+ __throw_exception_again;
-+ }
-+
- }
-
- template<typename _CharT>
---
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-ssp_nonshared.patch
index 5ddd40a4a..074452974 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-ssp_nonshared.patch
@@ -1,20 +1,19 @@
-From 3cb6013cf287ed9b1247ea37541e64b9810a121d Mon Sep 17 00:00:00 2001
+From 551a5db7acb56e085a101f1c222d51b2c1b039a4 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 7 Nov 2015 14:58:40 +0000
-Subject: [PATCH 48/48] ssp_nonshared
+Subject: [PATCH 41/46] ssp_nonshared
---
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
+Upstream-Status: Inappropriate [OE Configuration]
gcc/gcc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 8f53aea..3ddc658 100644
+index 2812819..9de96ee 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -732,7 +732,8 @@ proper position among the other output files. */
+@@ -863,7 +863,8 @@ proper position among the other output files. */
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
@@ -25,5 +24,5 @@ index 8f53aea..3ddc658 100644
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit" \
--
-2.7.0
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
index ed6cd6905..6b5da0254 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
@@ -31,7 +31,7 @@ gcc/Changelog:
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
-Upstream-Status: Rejected
+Upstream-Status: Denied
gcc/config/i386/i386.c | 4 ++--
libgcc/config/i386/cpuinfo.c | 6 +++---
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch
new file mode 100644
index 000000000..231f14761
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch
@@ -0,0 +1,51 @@
+From a582b0a53d1dc8604a201348b99ca8de48784e7e Mon Sep 17 00:00:00 2001
+From: jiwang <jiwang@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 12 May 2016 17:00:52 +0000
+Subject: [PATCH] [LRA] PR70904, relax the restriction on subreg reload for
+ wide mode
+
+2016-05-12 Jiong Wang <jiong.wang@arm.com>
+
+gcc/
+ PR rtl-optimization/70904
+ * lra-constraint.c (process_addr_reg): Relax the restriction on
+ subreg reload for wide mode.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236181 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ gcc/lra-constraints.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
+index f96fd458e23..73fb72a2ea5 100644
+--- a/gcc/lra-constraints.c
++++ b/gcc/lra-constraints.c
+@@ -1326,7 +1326,21 @@ process_addr_reg (rtx *loc, bool check_only_p, rtx_insn **before, rtx_insn **aft
+
+ subreg_p = GET_CODE (*loc) == SUBREG;
+ if (subreg_p)
+- loc = &SUBREG_REG (*loc);
++ {
++ reg = SUBREG_REG (*loc);
++ mode = GET_MODE (reg);
++
++ /* For mode with size bigger than ptr_mode, there unlikely to be "mov"
++ between two registers with different classes, but there normally will
++ be "mov" which transfers element of vector register into the general
++ register, and this normally will be a subreg which should be reloaded
++ as a whole. This is particularly likely to be triggered when
++ -fno-split-wide-types specified. */
++ if (in_class_p (reg, cl, &new_class)
++ || GET_MODE_SIZE (mode) <= GET_MODE_SIZE (ptr_mode))
++ loc = &SUBREG_REG (*loc);
++ }
++
+ reg = *loc;
+ mode = GET_MODE (reg);
+ if (! REG_P (reg))
+--
+2.14.2
+
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
new file mode 100644
index 000000000..20738283c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -0,0 +1,128 @@
+require gcc-common.inc
+
+# Third digit in PV should be incremented after a minor release
+
+PV = "7.3.0"
+
+# BINV should be incremented to a revision after a minor gcc release
+
+BINV = "7.3.0"
+
+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"
+
+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 \
+"
+
+#RELEASE = "7-20170504"
+BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz"
+#SRCREV = "f7cf798b73fd1a07098f9a490deec1e2a36e0bed"
+#BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git"
+#BASEURI ?= "http://mirrors.concertpass.com/gcc/snapshots/${RELEASE}/gcc-${RELEASE}.tar.bz2"
+
+SRC_URI = "\
+ ${BASEURI} \
+ file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
+ file://0008-c99-snprintf.patch \
+ file://0009-gcc-poison-system-directories.patch \
+ file://0010-gcc-poison-dir-extend.patch \
+ file://0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://0012-64-bit-multilib-hack.patch \
+ file://0013-optional-libstdc.patch \
+ file://0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+ file://0015-COLLECT_GCC_OPTIONS.patch \
+ file://0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+ file://0017-fortran-cross-compile-hack.patch \
+ file://0018-cpp-honor-sysroot.patch \
+ file://0019-MIPS64-Default-to-N64-ABI.patch \
+ file://0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+ file://0021-gcc-Fix-argument-list-too-long-error.patch \
+ file://0022-Disable-sdt.patch \
+ file://0023-libtool.patch \
+ file://0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+ file://0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+ file://0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
+ file://0027-export-CPP.patch \
+ file://0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
+ file://0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
+ file://0030-Ensure-target-gcc-headers-can-be-included.patch \
+ file://0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
+ file://0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
+ file://0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
+ file://0034-aarch64-Add-support-for-musl-ldso.patch \
+ file://0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
+ file://0036-handle-sysroot-support-for-nativesdk-gcc.patch \
+ file://0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
+ file://0038-Fix-various-_FOR_BUILD-and-related-variables.patch \
+ file://0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
+ file://0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
+ file://0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch \
+ file://0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
+ file://0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \
+ file://0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
+ file://0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
+ 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 \
+ ${BACKPORTS} \
+"
+BACKPORTS = "\
+"
+
+SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2"
+SRC_URI[sha256sum] = "832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c"
+
+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-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
index 1aead9691..1af1c74e6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -1,7 +1,7 @@
-From 6029bb338305a5d1403ee23427ed8d58eae1ff53 Mon Sep 17 00:00:00 2001
+From 2fcf1e23ef4b2a5c93526f12212aa892595261f6 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
+Subject: [PATCH 01/47] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
Signed-off-by: Khem Raj <raj.khem@gmail.com>
@@ -12,10 +12,10 @@ Upstream-Status: Inappropriate [embedded specific]
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
-index a3f66ba..1cba3a9 100755
+index 32a38633ad8..b4760952085 100755
--- a/configure
+++ b/configure
-@@ -7464,7 +7464,7 @@ fi
+@@ -7472,7 +7472,7 @@ fi
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache ${target_configargs}"
@@ -25,10 +25,10 @@ index a3f66ba..1cba3a9 100755
*" newlib "*)
case " $target_configargs " in
diff --git a/configure.ac b/configure.ac
-index 987dfab..d3adb95 100644
+index 12377499295..176ebb921ed 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -3104,7 +3104,7 @@ fi
+@@ -3065,7 +3065,7 @@ fi
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache ${target_configargs}"
@@ -38,5 +38,5 @@ index 987dfab..d3adb95 100644
*" newlib "*)
case " $target_configargs " in
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch
index 6b236c62c..ebd562b63 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch
@@ -1,7 +1,7 @@
-From fde97f80d2d931ed3fa4a86294799366b2359331 Mon Sep 17 00:00:00 2001
+From 732f10eead61830a8aee1bf38cce892da25c35b1 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
+Subject: [PATCH 08/47] c99-snprintf
Signed-off-by: Khem Raj <raj.khem@gmail.com>
@@ -11,18 +11,18 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
-index 37f01ca..f00c06d 100644
+index 43969892aa2..12148457909 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
-+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+-#if _GLIBCXX_USE_C99_STDIO
++#if _GLIBCXX_USE_C99_STDIO || defined(__UCLIBC__)
#undef snprintf
#undef vfscanf
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch
index 2da887767..fe13ed6e2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch
@@ -1,7 +1,7 @@
-From 7a90e62d557c78ae52006dff30c99006e10d9357 Mon Sep 17 00:00:00 2001
+From 4791a0a0f4595d0a18974f4e85a759a0789943db 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
+Subject: [PATCH 09/47] gcc: poison-system-directories
Signed-off-by: Khem Raj <raj.khem@gmail.com>
@@ -17,10 +17,10 @@ Upstream-Status: Inappropriate [distribution: codesourcery]
7 files changed, 66 insertions(+)
diff --git a/gcc/common.opt b/gcc/common.opt
-index 1218a71..bfba114 100644
+index a5c3aeaa336..f02fe66367e 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
-@@ -623,6 +623,10 @@ Wreturn-local-addr
+@@ -662,6 +662,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.
@@ -30,12 +30,12 @@ index 1218a71..bfba114 100644
+
Wshadow
Common Var(warn_shadow) Warning
- Warn when one local variable shadows another
+ Warn when one variable shadows another. Same as -Wshadow=global.
diff --git a/gcc/config.in b/gcc/config.in
-index 5335258..f079826 100644
+index bf2aa7b2e7d..b1203987e15 100644
--- a/gcc/config.in
+++ b/gcc/config.in
-@@ -168,6 +168,12 @@
+@@ -194,6 +194,12 @@
#endif
@@ -49,10 +49,10 @@ index 5335258..f079826 100644
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 3c92795..34371a3 100755
+index c823ffe6290..4898f04fa6b 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -933,6 +933,7 @@ with_system_zlib
+@@ -949,6 +949,7 @@ with_system_zlib
enable_maintainer_mode
enable_link_mutex
enable_version_specific_runtime_libs
@@ -60,7 +60,7 @@ index 3c92795..34371a3 100755
enable_plugin
enable_host_shared
enable_libquadmath_support
-@@ -1670,6 +1671,8 @@ Optional Features:
+@@ -1691,6 +1692,8 @@ Optional Features:
--enable-version-specific-runtime-libs
specify that runtime libraries should be installed
in a compiler-specific directory
@@ -69,7 +69,7 @@ index 3c92795..34371a3 100755
--enable-plugin enable plugin support
--enable-host-shared build host code as shared libraries
--disable-libquadmath-support
-@@ -28211,6 +28214,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+@@ -29347,6 +29350,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
fi
@@ -90,10 +90,10 @@ index 3c92795..34371a3 100755
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index d414081..240d322 100644
+index acfe9797389..9dc1dc7fc96 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -5654,6 +5654,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+@@ -6101,6 +6101,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[specify that runtime libraries should be
installed in a compiler-specific directory])])
@@ -111,18 +111,18 @@ index d414081..240d322 100644
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index d3be589..c81b55b 100644
+index 68a558e9992..060cd7169c6 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
-@@ -269,6 +269,7 @@ Objective-C and Objective-C++ Dialects}.
- -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
- -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
- -Wpointer-arith -Wno-pointer-to-int-cast @gol
+@@ -298,6 +298,7 @@ Objective-C and Objective-C++ Dialects}.
+ -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
+ -Wparentheses -Wno-pedantic-ms-format @gol
+ -Wplacement-new -Wplacement-new=@var{n} @gol
+-Wno-poison-system-directories @gol
- -Wredundant-decls -Wno-return-local-addr @gol
+ -Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol
+ -Wno-pragmas -Wredundant-decls -Wrestrict -Wno-return-local-addr @gol
-Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol
- -Wshift-count-negative -Wshift-count-overflow @gol
-@@ -4433,6 +4434,14 @@ made up of data only and thus requires no special treatment. But, for
+@@ -5395,6 +5396,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.
@@ -138,23 +138,23 @@ index d3be589..c81b55b 100644
@opindex Wfloat-equal
@opindex Wno-float-equal
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index d956c36..675bcc1 100644
+index c48178f..f63d53d 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -835,6 +835,8 @@ proper position among the other output files. */
+@@ -1029,6 +1029,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}} " VTABLE_VERIFICATION_SPEC " \
-+ %{Wno-poison-system-directories:--no-poison-system-directories}\
-+ %{Werror=poison-system-directories:--error-poison-system-directories}\
- %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
- " CHKP_SPEC " \
- %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
+ %{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|no-pie:} %{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 6c54ca6..cc0c921 100644
+index 98fe5ec9ab3..f90e74dbd73 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
-@@ -28,6 +28,7 @@
+@@ -26,6 +26,7 @@
#include "intl.h"
#include "incpath.h"
#include "cppdefault.h"
@@ -162,7 +162,7 @@ index 6c54ca6..cc0c921 100644
/* Microsoft Windows does not natively support inodes.
VMS has non-numeric inodes. */
-@@ -383,6 +384,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
+@@ -382,6 +383,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
}
fprintf (stderr, _("End of search list.\n"));
}
@@ -188,5 +188,5 @@ index 6c54ca6..cc0c921 100644
/* Use given -I paths for #include "..." but not #include <...>, and
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch
index 511e69481..4e06aa2f6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch
@@ -1,7 +1,7 @@
-From db406054de6b0967cd76cbb998f05b0c5af0bd94 Mon Sep 17 00:00:00 2001
+From e74ef84ad609b3b6a5c37d207ffc3c6e70d1f025 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
+Subject: [PATCH 10/47] 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
@@ -20,10 +20,10 @@ Upstream-Status: Pending
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gcc/incpath.c b/gcc/incpath.c
-index cc0c921..0bc1f67 100644
+index f90e74dbd73..c583ee5061d 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
-@@ -394,7 +394,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
+@@ -393,7 +393,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))
@@ -35,5 +35,5 @@ index cc0c921..0bc1f67 100644
"include location \"%s\" is unsafe for "
"cross-compilation",
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
index 750bbc823..b39ff1ec2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -1,7 +1,7 @@
-From 278d293c4cee9482a23aa3443741861ff2f67212 Mon Sep 17 00:00:00 2001
+From a41d3a53a4e313c20802330d6b5c75358a4ed882 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
+Subject: [PATCH 11/47] 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.
@@ -26,10 +26,10 @@ Upstream-Status: Pending
1 file changed, 32 insertions(+)
diff --git a/configure b/configure
-index 1cba3a9..9cae8da 100755
+index b4760952085..72a8ba94c4e 100755
--- a/configure
+++ b/configure
-@@ -6733,6 +6733,38 @@ fi
+@@ -6736,6 +6736,38 @@ fi
@@ -69,5 +69,5 @@ index 1cba3a9..9cae8da 100755
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch
index 45aaf4cc2..f3b39120b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch
@@ -1,7 +1,7 @@
-From bdde4f5efa3c89ac7ee0bc05f322f27e3dabeab9 Mon Sep 17 00:00:00 2001
+From 3af9fbbd14e83242ac2acb54bbb4bb726845fd34 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.
+Subject: [PATCH 12/47] 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
@@ -32,7 +32,7 @@ Upstream-Status: Pending
3 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index f6dbb78..d770da5 100644
+index e422c442dae..cc885e24457 100644
--- a/gcc/config/i386/t-linux64
+++ b/gcc/config/i386/t-linux64
@@ -32,7 +32,5 @@
@@ -46,7 +46,7 @@ index f6dbb78..d770da5 100644
+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 7e96406..b72dcb0 100644
+index 100f9da5e14..601cdf08d05 100644
--- a/gcc/config/mips/t-linux64
+++ b/gcc/config/mips/t-linux64
@@ -17,10 +17,6 @@
@@ -64,7 +64,7 @@ index 7e96406..b72dcb0 100644
+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 b6b351d..1d5b37a 100644
+index 2830ed0d861..d057facd2fd 100644
--- a/gcc/config/rs6000/t-linux64
+++ b/gcc/config/rs6000/t-linux64
@@ -26,10 +26,9 @@
@@ -81,5 +81,5 @@ index b6b351d..1d5b37a 100644
rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
$(COMPILE) $<
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch
new file mode 100644
index 000000000..3439bf67d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch
@@ -0,0 +1,125 @@
+From 26a58d05844274915d011edbf9330c6151687b22 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 13/47] 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 9ad2f6e1fcc..c4ef7796282 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -1848,6 +1848,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 ffcc87c79c9..28d8a9cf530 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 060cd7169c6..8e2adc25644 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -211,6 +211,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
+@@ -496,7 +499,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}}
+
+@@ -11606,6 +11609,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 6315aa0dd16..a5fafbe5107 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1046,6 +1046,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.12.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
index 1b62ef806..f92b5fbaa 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
@@ -1,7 +1,7 @@
-From 4bd21a1d63cfb14e261d90adc0c5d4f9462dc555 Mon Sep 17 00:00:00 2001
+From 716de5db6859fd1ea21078c94a41fac7a885b7e9 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
+Subject: [PATCH 14/47] 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"
@@ -19,10 +19,10 @@ Upstream-Status: Inappropriate [configuration]
2 files changed, 14 deletions(-)
diff --git a/gcc/configure b/gcc/configure
-index 34371a3..8caecdc 100755
+index 4898f04fa6b..640e4643805 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -26479,13 +26479,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
+@@ -27303,13 +27303,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
rm -f conftest.*
fi
fi
@@ -37,10 +37,10 @@ index 34371a3..8caecdc 100755
$as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 240d322..57819ff 100644
+index 9dc1dc7fc96..9a2dae55ba2 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -4384,13 +4384,6 @@ x:
+@@ -4641,13 +4641,6 @@ x:
rm -f conftest.*
fi
fi
@@ -55,5 +55,5 @@ index 240d322..57819ff 100644
AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch
index e6ae262e4..6e62945e5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch
@@ -1,7 +1,7 @@
-From 92427ebb94dc66f8e64ebf3ffbcd6dd5ce0935c1 Mon Sep 17 00:00:00 2001
+From 04a7a672301bb07caea6a7cad8378f63f1fe3200 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
+Subject: [PATCH 15/47] COLLECT_GCC_OPTIONS
This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
invoke collect2.
@@ -14,10 +14,10 @@ Upstream-Status: Pending
1 file changed, 9 insertions(+)
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index a37ec8b..87b47c5 100644
+index a5fafbe5107..05896e19926 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -4352,6 +4352,15 @@ set_collect_gcc_options (void)
+@@ -4654,6 +4654,15 @@ set_collect_gcc_options (void)
sizeof ("COLLECT_GCC_OPTIONS=") - 1);
first_time = TRUE;
@@ -34,5 +34,5 @@ index a37ec8b..87b47c5 100644
{
const char *const *args;
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.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-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
index b89a27919..1991251c2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.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-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -1,7 +1,7 @@
-From b1f3118e439459c26a3e19c617b7b0c93745e77a Mon Sep 17 00:00:00 2001
+From 47071cbd4f13ff5a4974f71f359a04afcfb125da 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
+Subject: [PATCH 16/47] 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
@@ -27,10 +27,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 07c6f0a..e1e63e8 100644
+index 2411671cea3..7b590c9bbd3 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -502,7 +502,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+@@ -532,7 +532,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
xmake_file=@xmake_file@
@@ -40,10 +40,10 @@ index 07c6f0a..e1e63e8 100644
TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
diff --git a/gcc/configure b/gcc/configure
-index 8caecdc..8ec3d40 100755
+index 640e4643805..b5ac1552541 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -11850,8 +11850,8 @@ for f in $tm_file; do
+@@ -12150,8 +12150,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -55,10 +55,10 @@ index 8caecdc..8ec3d40 100755
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 57819ff..643a47e 100644
+index 9a2dae55ba2..cb1479d1ef4 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -1832,8 +1832,8 @@ for f in $tm_file; do
+@@ -1922,8 +1922,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -70,7 +70,7 @@ index 57819ff..643a47e 100644
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index c32f087..6803ab9 100644
+index 9fc7b5ca734..04abecfe648 100644
--- a/gcc/mkconfig.sh
+++ b/gcc/mkconfig.sh
@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
@@ -92,5 +92,5 @@ index c32f087..6803ab9 100644
# Add multiple inclusion protection guard, part two.
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch
index e8ba32558..e2830c59d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch
@@ -1,7 +1,7 @@
-From d11c73c1295565ff3766ae04e2a410a89fc84dd5 Mon Sep 17 00:00:00 2001
+From 4fc35a2bb7666a7de35568eb5d47f0ce6acebe62 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.
+Subject: [PATCH 17/47] 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
@@ -16,10 +16,10 @@ Upstream-Status: Inappropriate [embedded specific]
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgfortran/configure b/libgfortran/configure
-index bb3107b..5d47e65 100755
+index 81238fcb79c..7ded7abd456 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
-@@ -12747,7 +12747,7 @@ esac
+@@ -12792,7 +12792,7 @@ esac
# We need gfortran to compile parts of the library
#AC_PROG_FC(gfortran)
@@ -29,10 +29,10 @@ index bb3107b..5d47e65 100755
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 adafb3f..b4ade28 100644
+index 37b12d2998f..63a4166ef62 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
-@@ -240,7 +240,7 @@ AC_SUBST(enable_static)
+@@ -243,7 +243,7 @@ AC_SUBST(enable_static)
# We need gfortran to compile parts of the library
#AC_PROG_FC(gfortran)
@@ -42,5 +42,5 @@ index adafb3f..b4ade28 100644
# extra LD Flags which are required for targets
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch
index 13f66d413..555907417 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch
@@ -1,7 +1,7 @@
-From 5f9759a85fff3d78e3f71ae01c970b10d326c406 Mon Sep 17 00:00:00 2001
+From 1c8a332469ca4bfefb10df70720e0dc83ff9a756 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 20/46] cpp: honor sysroot.
+Subject: [PATCH 18/47] 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
@@ -26,10 +26,10 @@ Upstream-Status: Pending
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index b0728f0..e69ee7d 100644
+index 6b383e1d86d..c7c7d6a56ec 100644
--- a/gcc/cp/lang-specs.h
+++ b/gcc/cp/lang-specs.h
-@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3. If not see
+@@ -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:\
@@ -37,11 +37,11 @@ index b0728f0..e69ee7d 100644
+ 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 87b47c5..e6efae7 100644
+index 05896e19926..c73d4023987 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -1142,7 +1142,7 @@ static const struct compiler default_compilers[] =
- %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
+@@ -1351,7 +1351,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},
@@ -50,5 +50,5 @@ index 87b47c5..e6efae7 100644
{"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch
index c7cffe417..742a4012a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch
@@ -1,7 +1,7 @@
-From 34d22ab6cfd2dfe6dd171c8d0b31cafcdeb86298 Mon Sep 17 00:00:00 2001
+From 0a3b3cc45ea7ba83b46df7464b41c377e3966d88 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 21/46] MIPS64: Default to N64 ABI
+Subject: [PATCH 19/47] MIPS64: Default to N64 ABI
MIPS64 defaults to n32 ABI, this patch makes it
so that it defaults to N64 ABI
@@ -14,10 +14,10 @@ Upstream-Status: Inappropriate [OE config specific]
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/config.gcc b/gcc/config.gcc
-index c835734..dd0739d 100644
+index b8bb4d65825..5e45f4b5199 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -2017,29 +2017,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
+@@ -2084,29 +2084,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
default_mips_arch=mips32
;;
mips64el-st-linux-gnu)
@@ -53,5 +53,5 @@ index c835734..dd0739d 100644
;;
esac
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index 620835132..de7b4df57 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -1,7 +1,7 @@
-From f6b41b62ea62a0f1447d9fc235f7fd2bbf3fe7c2 Mon Sep 17 00:00:00 2001
+From d6c983b685ee03e9cf21189108d31ed9f760ff3f 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 22/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+Subject: [PATCH 20/47] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
relative to SYSTEMLIBS_DIR
This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
@@ -23,14 +23,14 @@ Upstream-Status: Inappropriate [OE configuration]
gcc/config/i386/linux64.h | 6 +++---
gcc/config/linux.h | 8 ++++----
gcc/config/mips/linux.h | 12 ++++++------
- gcc/config/rs6000/linux64.h | 10 +++++-----
+ 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, 28 insertions(+), 28 deletions(-)
+ 11 files changed, 29 insertions(+), 33 deletions(-)
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index 2c70a2f..dd048db 100644
+index 2c39fbe601c..6d88e21abe2 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
@@ -45,10 +45,10 @@ index 2c70a2f..dd048db 100644
#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 e9d65dc..cfdf3f0 100644
+index a08cfb34377..fbac9a9d994 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -68,8 +68,8 @@
+@@ -62,8 +62,8 @@
GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
#undef GLIBC_DYNAMIC_LINKER
@@ -60,10 +60,10 @@ index e9d65dc..cfdf3f0 100644
#define GLIBC_DYNAMIC_LINKER \
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index 49ad954..a5ab559 100644
+index 3d62367ae68..e8a16191849 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
-@@ -62,7 +62,7 @@
+@@ -60,7 +60,7 @@
#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
@@ -73,20 +73,23 @@ index 49ad954..a5ab559 100644
#define LINUX_TARGET_LINK_SPEC "%{h*} \
%{static:-Bstatic} \
diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index a100963..21ba2b2 100644
+index 59132124d6b..336d158629c 100644
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
-@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3. If not see
+@@ -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 a27d3be..6185cce 100644
+index e65c404ff91..c34ded98481 100644
--- a/gcc/config/i386/linux64.h
+++ b/gcc/config/i386/linux64.h
-@@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -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"
@@ -96,11 +99,14 @@ index a27d3be..6185cce 100644
+#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 857389a..22b9be5 100644
+index b3a9e85e77f..2e683d0c430 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
-@@ -73,10 +73,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -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. */
@@ -116,7 +122,7 @@ index 857389a..22b9be5 100644
#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 91df261..c306afb 100644
+index 44132b8e44d..80505ad9f48 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
@@ -144,47 +150,59 @@ index 91df261..c306afb 100644
- "%{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}"
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
+ #undef MUSL_DYNAMIC_LINKER32
+ #define MUSL_DYNAMIC_LINKER32 \
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 0879e7e..31c4338 100644
+index 71e35b709ad..3b00ec0fcf0 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
-@@ -357,14 +357,14 @@ extern int dot_symbols;
+@@ -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 "/lib/ld.so.1"
+-#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:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
+-#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:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
+-#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) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
+ #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 0f5d614..168416c 100644
+index c30083423f2..196b82725f8 100644
--- a/gcc/config/sh/linux.h
+++ b/gcc/config/sh/linux.h
-@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see
-
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+@@ -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 "_linux"
+ #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 56def4b..00b564c 100644
+index ce084656fca..bed6300cb2a 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);
@@ -197,7 +215,7 @@ index 56def4b..00b564c 100644
#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 fa805fd..0eb4acd 100644
+index 573ce8a9a4c..6749f6b5d9c 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
@@ -212,5 +230,5 @@ index fa805fd..0eb4acd 100644
#ifdef SPARC_BI_ARCH
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch
index be91c9e63..4e562144e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch
@@ -1,7 +1,7 @@
-From 9701f596bbe5bf51bbf48661bc515b45d4b6f4d2 Mon Sep 17 00:00:00 2001
+From 80c24247fed52c1269791088090bc0fa85280983 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 23/46] gcc: Fix argument list too long error.
+Subject: [PATCH 21/47] 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:
@@ -23,10 +23,10 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index e1e63e8..7b49f88 100644
+index 7b590c9bbd3..23cca7f0d5a 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -3262,7 +3262,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+@@ -3459,7 +3459,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)
@@ -36,5 +36,5 @@ index e1e63e8..7b49f88 100644
for file in $$headers; do \
if [ -f $$file ] ; then \
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch
index b23ce9756..871f195c9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch
@@ -1,7 +1,7 @@
-From 946e047614103e1f2982613c7aa5f76587500c0e Mon Sep 17 00:00:00 2001
+From 3021fec485f44478a3d5fffb4adac13d831fcdc1 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 24/46] Disable sdt.
+Subject: [PATCH 22/47] 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
@@ -25,10 +25,10 @@ Upstream-Status: Inappropriate [hack]
4 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/gcc/configure b/gcc/configure
-index 8ec3d40..eaa3b07 100755
+index b5ac1552541..08b2f63c7fa 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -27857,12 +27857,12 @@ fi
+@@ -28967,12 +28967,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
@@ -48,11 +48,11 @@ index 8ec3d40..eaa3b07 100755
$as_echo "$have_sys_sdt_h" >&6; }
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 643a47e..9f6cacb 100644
+index cb1479d1ef4..0581fe963dc 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -5315,15 +5315,15 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
- fi
+@@ -5754,15 +5754,15 @@ fi
+ AC_SUBST([enable_default_ssp])
# Test for <sys/sdt.h> on the target.
-GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
@@ -77,10 +77,10 @@ index 643a47e..9f6cacb 100644
# 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 217012e..81240b9 100755
+index fb7e126c0b0..a18057feb88 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
-@@ -20964,11 +20964,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -21856,11 +21856,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
@@ -96,7 +96,7 @@ index 217012e..81240b9 100755
$as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 580fb8b..5a41083 100644
+index 8e973503be0..a46d25e740d 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
@@ -109,5 +109,5 @@ index 580fb8b..5a41083 100644
# Check for available headers.
AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch
index 8d5eb973b..27dfb1fdd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch
@@ -1,7 +1,7 @@
-From f68c5b78751660505b22b46dad99240db0df3456 Mon Sep 17 00:00:00 2001
+From e79a4f8169e836c8deabca5a45884cfe11d07847 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 25/46] libtool
+Subject: [PATCH 23/47] libtool
libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
when running on am x86_64 build host.
@@ -23,7 +23,7 @@ Upstream-Status: Pending
1 file changed, 4 insertions(+)
diff --git a/ltmain.sh b/ltmain.sh
-index 9503ec8..0121fba 100644
+index 9503ec85d70..0121fba707f 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -6359,6 +6359,10 @@ func_mode_link ()
@@ -38,5 +38,5 @@ index 9503ec8..0121fba 100644
oldlibs=
if test -z "$rpath"; then
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
index a22d95f72..aa1e1bb8b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -1,7 +1,7 @@
-From 4c75e349aa7abd1e285720328b23690636bea242 Mon Sep 17 00:00:00 2001
+From 74d8dc48cb185e304c60067b4d8b50447ec328ec 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 26/46] gcc: armv4: pass fix-v4bx to linker to support EABI.
+Subject: [PATCH 24/47] 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
@@ -19,12 +19,12 @@ Upstream-Status: Pending
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index cfdf3f0..048a062 100644
+index fbac9a9d994..5a51a8a7095 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -77,10 +77,14 @@
- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+@@ -88,10 +88,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
@@ -39,5 +39,5 @@ index cfdf3f0..048a062 100644
LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch
index 46815d156..b23413231 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch
@@ -1,7 +1,7 @@
-From 8217dd7fb318f9abc6564f67b424c433d8398d61 Mon Sep 17 00:00:00 2001
+From ac50dc3010a66220ad483c09efe270bb3f4c9424 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 27/46] Use the multilib config files from ${B} instead of
+Subject: [PATCH 25/47] 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}
@@ -18,10 +18,10 @@ Upstream-Status: Inappropriate [configuration]
2 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/gcc/configure b/gcc/configure
-index eaa3b07..9b60aad 100755
+index 08b2f63c7fa..6ba391ed068 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -11830,10 +11830,20 @@ done
+@@ -12130,10 +12130,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
@@ -46,7 +46,7 @@ index eaa3b07..9b60aad 100755
done
tmake_file="${tmake_file_}"
-@@ -11844,6 +11854,10 @@ tm_file_list="options.h"
+@@ -12144,6 +12154,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h"
for f in $tm_file; do
case $f in
@@ -58,10 +58,10 @@ index eaa3b07..9b60aad 100755
f=`echo $f | sed 's/^..//'`
tm_file_list="${tm_file_list} $f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 9f6cacb..e1e54f2 100644
+index 0581fe963dc..8551a412df3 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -1812,10 +1812,20 @@ done
+@@ -1902,10 +1902,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
@@ -86,7 +86,7 @@ index 9f6cacb..e1e54f2 100644
done
tmake_file="${tmake_file_}"
-@@ -1826,6 +1836,10 @@ tm_file_list="options.h"
+@@ -1916,6 +1926,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h"
for f in $tm_file; do
case $f in
@@ -98,5 +98,5 @@ index 9f6cacb..e1e54f2 100644
f=`echo $f | sed 's/^..//'`
tm_file_list="${tm_file_list} $f"
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
index 60ddd9cee..fe2471347 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
@@ -1,7 +1,7 @@
-From 08a0e45b308fc97d06f5c3ef77a257e7a6bd1a48 Mon Sep 17 00:00:00 2001
+From 9fab47d8662986ad887d9eddc39fcbe25e576383 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 28/46] Avoid using libdir from .la which usually points to a
+Subject: [PATCH 26/47] Avoid using libdir from .la which usually points to a
host path
Upstream-Status: Inappropriate [embedded specific]
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 3 insertions(+)
diff --git a/ltmain.sh b/ltmain.sh
-index 0121fba..52bdbdb 100644
+index 0121fba707f..52bdbdb5f9c 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -5628,6 +5628,9 @@ func_mode_link ()
@@ -27,5 +27,5 @@ index 0121fba..52bdbdb 100644
absdir="$libdir"
fi
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch
index 62195aa87..4f9e1f0b2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch
@@ -1,7 +1,7 @@
-From 95f494d1544857ad38949a7da37e2d7264475233 Mon Sep 17 00:00:00 2001
+From fa6a46fdf73de7eacd289c084bbde6643b23f73b 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 29/46] export CPP
+Subject: [PATCH 27/47] 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
@@ -37,7 +37,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/Makefile.in b/Makefile.in
-index 36b4008..a783e1e 100644
+index b824e0a0ca1..e34e9555388 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
@@ -49,5 +49,5 @@ index 36b4008..a783e1e 100644
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CXX="$(CXX_FOR_BUILD)"; export CXX; \
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
index 57051871b..b903349d5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
@@ -1,7 +1,7 @@
-From 4ed8c1fd9dc05f7a9db9298a55396c8f0ff549a7 Mon Sep 17 00:00:00 2001
+From 2c05b4072f982df8002d61327837e18a724e934f 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 30/46] Enable SPE & AltiVec generation on powepc*linux target
+Subject: [PATCH 28/47] 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).
@@ -16,14 +16,15 @@ Upstream-Status: Inappropriate [configuration]
Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
---
- gcc/config.gcc | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
+ gcc/config.gcc | 9 ++++++++-
+ gcc/config/rs6000/linuxspe.h | 3 ---
+ 2 files changed, 8 insertions(+), 4 deletions(-)
-Index: gcc-5.3.0/gcc/config.gcc
-===================================================================
---- gcc-5.3.0.orig/gcc/config.gcc
-+++ gcc-5.3.0/gcc/config.gcc
-@@ -2346,7 +2346,14 @@ powerpc-*-rtems*)
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 5e45f4b5199..9b381dfd9af 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2415,7 +2415,14 @@ powerpc-*-rtems*)
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
;;
powerpc*-*-linux*)
@@ -39,10 +40,10 @@ Index: gcc-5.3.0/gcc/config.gcc
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
extra_objs="$extra_objs rs6000-linux.o"
-Index: gcc-5.3.0/gcc/config/rs6000/linuxspe.h
-===================================================================
---- gcc-5.3.0.orig/gcc/config/rs6000/linuxspe.h
-+++ gcc-5.3.0/gcc/config/rs6000/linuxspe.h
+diff --git a/gcc/config/rs6000/linuxspe.h b/gcc/config/rs6000/linuxspe.h
+index 92efabfe664..6d486451a7e 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
@@ -50,3 +51,6 @@ Index: gcc-5.3.0/gcc/config/rs6000/linuxspe.h
-
-#undef ASM_DEFAULT_SPEC
-#define ASM_DEFAULT_SPEC "-mppc -mspe -me500"
+--
+2.12.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
index f2bc66432..7306a282b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
@@ -1,7 +1,7 @@
-From bb6fea821483aa3259b34e101a39c993edd01411 Mon Sep 17 00:00:00 2001
+From ec0f843b86c0f76bc5ebb20fafbc4aae1be4db61 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 31/46] Disable the MULTILIB_OSDIRNAMES and other multilib
+Subject: [PATCH 29/47] Disable the MULTILIB_OSDIRNAMES and other multilib
options.
Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
@@ -21,7 +21,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
-index c296376..3bb59bf 100644
+index ab064ab6f22..f4b1f98b216 100644
--- a/gcc/config/aarch64/t-aarch64-linux
+++ b/gcc/config/aarch64/t-aarch64-linux
@@ -21,8 +21,8 @@
@@ -38,5 +38,5 @@ index c296376..3bb59bf 100644
-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch
index 89503ff60..568ba95ea 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch
@@ -1,7 +1,7 @@
-From bb26f90f5e0accc3539f62b6fec663682959dd36 Mon Sep 17 00:00:00 2001
+From bf5836989e0ffc1c1df1369df06877e96c08df41 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 32/46] Ensure target gcc headers can be included
+Subject: [PATCH 30/47] 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
@@ -23,10 +23,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 7b49f88..cd5bc4a 100644
+index 23cca7f0d5a..95d21effad3 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -582,6 +582,7 @@ libexecdir = @libexecdir@
+@@ -608,6 +608,7 @@ libexecdir = @libexecdir@
# Directory in which the compiler finds libraries etc.
libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
@@ -34,7 +34,7 @@ index 7b49f88..cd5bc4a 100644
# 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
-@@ -2610,6 +2611,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
+@@ -2791,6 +2792,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
PREPROCESSOR_DEFINES = \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
@@ -43,7 +43,7 @@ index 7b49f88..cd5bc4a 100644
-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 580c1ba..03a0287 100644
+index 10b96eca0a7..c8da0884872 100644
--- a/gcc/cppdefault.c
+++ b/gcc/cppdefault.c
@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
@@ -58,12 +58,12 @@ index 580c1ba..03a0287 100644
/* /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 1d54798..983d45e 100644
+index 7ad92d920f8..39848cc9c0e 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
-@@ -1361,4 +1361,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-
- #endif /* GCC_INSN_FLAGS_H */
+@@ -1475,4 +1475,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. */
+
@@ -76,10 +76,10 @@ index 1d54798..983d45e 100644
+
#endif /* ! GCC_DEFAULTS_H */
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index e6efae7..3ca27b9 100644
+index c73d4023987..b27245dbf77 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -1263,13 +1263,6 @@ static const char *gcc_libexec_prefix;
+@@ -1472,13 +1472,6 @@ static const char *gcc_libexec_prefix;
/* Default prefixes to attach to command names. */
@@ -94,5 +94,5 @@ index e6efae7..3ca27b9 100644
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
index 19d480f3d..0184010f0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
@@ -1,7 +1,7 @@
-From 629fcc7d0075c9b4261da6435e122429fb028ec0 Mon Sep 17 00:00:00 2001
+From c7b4d957edda955fbe405fd5295846614529f517 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 33/46] gcc 4.8+ won't build with --disable-dependency-tracking
+Subject: [PATCH 31/47] gcc 4.8+ won't build with --disable-dependency-tracking
since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
@@ -22,7 +22,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index 3d8ab62..23dff7e 100644
+index d731406fdbd..2fafc72d2e7 100644
--- a/libatomic/Makefile.am
+++ b/libatomic/Makefile.am
@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT))
@@ -36,10 +36,10 @@ index 3d8ab62..23dff7e 100644
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 9288652..3720256 100644
+index f6eeab312ea..3f06a894058 100644
--- a/libatomic/Makefile.in
+++ b/libatomic/Makefile.in
-@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
+@@ -331,7 +331,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))
@@ -50,5 +50,5 @@ index 9288652..3720256 100644
M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
M_FILE = $(PAT_BASE)_n.c
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch
index a453fa6b3..e8905f525 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch
@@ -1,7 +1,7 @@
-From a4efc9ca85734c283d4da09b628121e1c1f49c4e Mon Sep 17 00:00:00 2001
+From 3be6b766a5881b0b187c3c3c68250a9e4f7c0fa3 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 34/46] Don't search host directory during "relink" if
+Subject: [PATCH 32/47] Don't search host directory during "relink" if
$inst_prefix is provided
http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ltmain.sh b/ltmain.sh
-index 52bdbdb..82bcec3 100644
+index 52bdbdb5f9c..82bcec39f05 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -6004,12 +6004,13 @@ func_mode_link ()
@@ -34,5 +34,5 @@ index 52bdbdb..82bcec3 100644
esac
fi
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
index 41c0294da..c0b8df3e7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
@@ -1,16 +1,18 @@
-From b0b0688176a9482777e9b2e98408bfc4505d31af Mon Sep 17 00:00:00 2001
+From 6edcab9046b862cbb9b46892fc390ce69976539c 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 36/46] Use SYSTEMLIBS_DIR replacement instead of hardcoding
+Subject: [PATCH 33/47] Use SYSTEMLIBS_DIR replacement instead of hardcoding
base_libdir
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Inappropriate [OE-Specific]
+
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 257acf0..abeb948 100644
+index c45fc1d35d1..a7afe197266 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -21,7 +21,7 @@
@@ -20,8 +22,8 @@ index 257acf0..abeb948 100644
-#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 ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch
new file mode 100644
index 000000000..7d866d906
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch
@@ -0,0 +1,28 @@
+From b140d6839cfba9cac892bc736d984540552d6a56 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 34/47] aarch64: Add support for musl ldso
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate [OE-Specific]
+
+ 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 a7afe197266..580c2c7ea15 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.12.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch
index 2e0df968b..e2c1956d1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -1,7 +1,7 @@
-From 1eede9e4a10d3532db826a6eeced695df3ad5b89 Mon Sep 17 00:00:00 2001
+From 63617f2da153db10fa2fe938cce31bee01d47fe8 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 39/46] libcc1: fix libcc1's install path and rpath
+Subject: [PATCH 35/47] libcc1: fix libcc1's install path and rpath
* Install libcc1.so and libcc1plugin.so into
$(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
@@ -20,10 +20,10 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
-index 7a274b3..db69bea 100644
+index 5e61a92a26b..e8b627f9cec 100644
--- a/libcc1/Makefile.am
+++ b/libcc1/Makefile.am
-@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+@@ -37,8 +37,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
$(Wc)$(libiberty_normal)))
libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
@@ -33,12 +33,12 @@ index 7a274b3..db69bea 100644
+plugindir = $(cc1libdir)
if ENABLE_PLUGIN
- plugin_LTLIBRARIES = libcc1plugin.la
+ plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
-index 1916134..c8995d2 100644
+index 54babb02a49..e51d87ffdce 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
-@@ -262,8 +262,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+@@ -303,8 +303,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
$(Wc)$(libiberty_normal)))
libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
@@ -46,9 +46,9 @@ index 1916134..c8995d2 100644
-cc1libdir = $(libdir)/$(libsuffix)
+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+plugindir = $(cc1libdir)
- @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
+ @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
@ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
- BUILT_SOURCES = compiler-name.h
+ BUILT_SOURCES = c-compiler-name.h cp-compiler-name.h
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch
index 11e1310f1..aa0b10827 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch
@@ -1,7 +1,7 @@
-From b41674d357c4ba320b9860e0f313d2f5a332f27d Mon Sep 17 00:00:00 2001
+From ca14820ae834a62ef2b80b283e8f900714636272 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 40/46] handle sysroot support for nativesdk-gcc
+Subject: [PATCH 36/47] 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
@@ -31,7 +31,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 53 insertions(+), 20 deletions(-)
diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 03a0287..f44c1d8 100644
+index c8da0884872..43dc597a0c3 100644
--- a/gcc/cppdefault.c
+++ b/gcc/cppdefault.c
@@ -35,6 +35,30 @@
@@ -135,7 +135,7 @@ index 03a0287..f44c1d8 100644
{ 0, 0, 0, 0, 0, 0 }
};
diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
-index c98644f..4198669 100644
+index 17bbb0eaef7..a937ec1d187 100644
--- a/gcc/cppdefault.h
+++ b/gcc/cppdefault.h
@@ -33,7 +33,8 @@
@@ -149,19 +149,19 @@ index c98644f..4198669 100644
(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 3ca27b9..2b7756e 100644
+index b27245dbf77..e015c77f15f 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -120,6 +120,8 @@ static const char *target_system_root = TARGET_SYSTEM_ROOT;
- #else
- static const char *target_system_root = 0;
+@@ -247,6 +247,8 @@ FILE *report_times_to_file = NULL;
#endif
-+
-+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
+ 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. */
-@@ -390,6 +392,7 @@ or with constant text in a single argument.
+ static int target_system_root_changed;
+@@ -518,6 +520,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.
@@ -169,7 +169,7 @@ index 3ca27b9..2b7756e 100644
%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.
-@@ -1286,10 +1289,10 @@ static const char *gcc_libexec_prefix;
+@@ -1495,10 +1498,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. */
@@ -184,7 +184,7 @@ index 3ca27b9..2b7756e 100644
/* For native compilers, these are well-known paths containing
components that may be provided by the system. For cross
-@@ -1297,9 +1300,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+@@ -1506,9 +1509,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;
@@ -196,7 +196,7 @@ index 3ca27b9..2b7756e 100644
= STANDARD_STARTFILE_PREFIX_2;
/* A relative path to be used in finding the location of tools
-@@ -5523,6 +5526,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
+@@ -5826,6 +5829,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
}
break;
@@ -209,5 +209,5 @@ index 3ca27b9..2b7756e 100644
value = do_spec_1 (startfile_spec, 0, NULL);
if (value != 0)
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch
index 5a504a1f2..6c85a03f4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch
@@ -1,7 +1,7 @@
-From 99cadb4d8415dd5a275d7d6410f20db33d0f8433 Mon Sep 17 00:00:00 2001
+From 16a326bcd126b395b29019072905bae7a5d47500 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 41/46] Search target sysroot gcc version specific dirs with
+Subject: [PATCH 37/47] Search target sysroot gcc version specific dirs with
multilib.
We install the gcc libraries (such as crtbegin.p) into
@@ -51,10 +51,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 2b7756e..8f53aea 100644
+index e015c77f15f..84af5d5a2e1 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -2305,7 +2305,7 @@ for_each_path (const struct path_prefix *paths,
+@@ -2533,7 +2533,7 @@ for_each_path (const struct path_prefix *paths,
if (path == NULL)
{
len = paths->max_len + extra_space + 1;
@@ -63,7 +63,7 @@ index 2b7756e..8f53aea 100644
path = XNEWVEC (char, len);
}
-@@ -2317,6 +2317,33 @@ for_each_path (const struct path_prefix *paths,
+@@ -2545,6 +2545,33 @@ for_each_path (const struct path_prefix *paths,
/* Look first in MACHINE/VERSION subdirectory. */
if (!skip_multi_dir)
{
@@ -98,5 +98,5 @@ index 2b7756e..8f53aea 100644
ret = callback (path, callback_info);
if (ret)
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch
index 5af764b7c..a226d10d0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch
@@ -1,7 +1,7 @@
-From 78e77206902349c9256f06c3dd179197a39af2e1 Mon Sep 17 00:00:00 2001
+From 6e7f526e71a76aac3d49ba8f1742fe1b359c1060 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 42/46] Fix various _FOR_BUILD and related variables
+Subject: [PATCH 38/47] 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
@@ -26,7 +26,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
5 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
-index a783e1e..8b6d3d2 100644
+index e34e9555388..a03740f3f9d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
@@ -36,8 +36,8 @@ index a783e1e..8b6d3d2 100644
+ 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 = \
+ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+@@ -169,6 +170,9 @@ BUILD_EXPORTS = \
# built for the build system to override those in BASE_FLAGS_TO_PASS.
EXTRA_BUILD_FLAGS = \
CFLAGS="$(CFLAGS_FOR_BUILD)" \
@@ -47,7 +47,7 @@ index a783e1e..8b6d3d2 100644
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
# This is the list of directories to built for the host system.
-@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@
+@@ -186,6 +190,7 @@ HOST_SUBDIR = @host_subdir@
HOST_EXPORTS = \
$(BASE_EXPORTS) \
CC="$(CC)"; export CC; \
@@ -55,7 +55,7 @@ index a783e1e..8b6d3d2 100644
ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-@@ -710,6 +715,7 @@ BASE_FLAGS_TO_PASS = \
+@@ -734,6 +739,7 @@ BASE_FLAGS_TO_PASS = \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
@@ -64,7 +64,7 @@ index a783e1e..8b6d3d2 100644
"FLEX=$(FLEX)" \
"INSTALL=$(INSTALL)" \
diff --git a/Makefile.tpl b/Makefile.tpl
-index 1ea1954..78a59c3 100644
+index d0fa07005be..953376c658d 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
@@ -74,8 +74,8 @@ index 1ea1954..78a59c3 100644
+ 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 = \
+ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+@@ -171,6 +172,9 @@ BUILD_EXPORTS = \
# built for the build system to override those in BASE_FLAGS_TO_PASS.
EXTRA_BUILD_FLAGS = \
CFLAGS="$(CFLAGS_FOR_BUILD)" \
@@ -85,7 +85,7 @@ index 1ea1954..78a59c3 100644
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
# This is the list of directories to built for the host system.
-@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@
+@@ -188,6 +192,7 @@ HOST_SUBDIR = @host_subdir@
HOST_EXPORTS = \
$(BASE_EXPORTS) \
CC="$(CC)"; export CC; \
@@ -94,12 +94,12 @@ index 1ea1954..78a59c3 100644
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index cd5bc4a..98ae4f4 100644
+index 95d21effad3..dbe2bacde50 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -762,7 +762,7 @@ BUILD_LINKERFLAGS = $(BUILD_CXXFLAGS)
- # Native linker and preprocessor flags. For x-fragment overrides.
- BUILD_LDFLAGS=@BUILD_LDFLAGS@
+@@ -795,7 +795,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)
@@ -107,10 +107,10 @@ index cd5bc4a..98ae4f4 100644
# 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 6df594c..fcb05e7 100755
+index 6ba391ed068..72ca6e5c535 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -11521,7 +11521,7 @@ else
+@@ -11789,7 +11789,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}" \
@@ -120,10 +120,10 @@ index 6df594c..fcb05e7 100755
--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 3bb2173..923bc9a 100644
+index 8551a412df3..6eefb61dc2b 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -1633,7 +1633,7 @@ else
+@@ -1708,7 +1708,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}" \
@@ -133,5 +133,5 @@ index 3bb2173..923bc9a 100644
--enable-languages=${enable_languages-all} \
--target=$target_alias --host=$build_alias --build=$build_alias
--
-2.6.3
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch
index a1cfb9c7a..a7aeccdf0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch
@@ -1,18 +1,18 @@
-From f5ca07132b9292d2045ca7204e9cbfde2e59d0bf Mon Sep 17 00:00:00 2001
+From 6d03ddfb7a092942be6b58b1830f6986d012d5e3 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 47/48] nios2: Define MUSL_DYNAMIC_LINKER
+Subject: [PATCH 39/47] 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
+Upstream-Status: Inappropriate [OE-Specific]
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 f43f655..5587ab3 100644
+index 5177fa641a4..1b8accda6ee 100644
--- a/gcc/config/nios2/linux.h
+++ b/gcc/config/nios2/linux.h
@@ -30,6 +30,7 @@
@@ -24,5 +24,5 @@ index f43f655..5587ab3 100644
#undef LINK_SPEC
#define LINK_SPEC LINK_SPEC_ENDIAN \
--
-2.7.0
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
index 29b7ce72d..29b7ce72d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.3/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch
index da1687913..5260e363d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch
@@ -1,7 +1,7 @@
-From ef7c2bda6b4c88f8007ed663b1108cd4651598c8 Mon Sep 17 00:00:00 2001
+From 4eadc99bdd0974761bf48f0fd32994dd9a3ffcfe 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] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
+Subject: [PATCH 41/47] 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
@@ -12,7 +12,7 @@ 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 | 6 ++++
+ gcc/c-family/c-opts.c | 13 +++++++
gcc/c-family/c.opt | 4 +++
gcc/dwarf2out.c | 1 +
gcc/gimplify.c | 2 ++
@@ -20,23 +20,30 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
libcpp/file-map.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++
libcpp/include/file-map.h | 30 ++++++++++++++++
libcpp/macro.c | 2 ++
- 8 files changed, 142 insertions(+), 5 deletions(-)
+ 8 files changed, 149 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 718a052..3f93c56 100644
+index ea0e01b101c..a741c75a78f 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
-@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -39,6 +39,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,
-@@ -510,6 +511,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
++#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
+@@ -517,6 +525,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
cpp_opts->narrow_charset = arg;
break;
@@ -49,12 +56,12 @@ index 718a052..3f93c56 100644
cpp_opts->wide_charset = arg;
break;
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 453ec8e..30ad053 100644
+index c4ef7796282..73333dfd57c 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
-@@ -1117,6 +1117,10 @@ fexec-charset=
+@@ -1372,6 +1372,10 @@ fexec-charset=
C ObjC C++ ObjC++ Joined RejectNegative
- -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
+ -fexec-charset=<cset> Convert all strings and character constants to character set <cset>.
+ffile-prefix-map=
+C ObjC C++ ObjC++ Joined RejectNegative
@@ -62,12 +69,12 @@ index 453ec8e..30ad053 100644
+
fextended-identifiers
C ObjC C++ ObjC++
- Permit universal character names (\\u and \\U) in identifiers
+ Permit universal character names (\\u and \\U) in identifiers.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 526f114..438a475 100644
+index 98c51576ec2..762f69ae88e 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
-@@ -19671,6 +19671,7 @@ gen_producer_string (void)
+@@ -23421,6 +23421,7 @@ gen_producer_string (void)
case OPT_fltrans_output_list_:
case OPT_fresolution_:
case OPT_fdebug_prefix_map_:
@@ -76,27 +83,20 @@ index 526f114..438a475 100644
continue;
default:
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
-index c85f83a..1ffe1e1 100644
+index fd27eb1523f..5542b379f28 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
-@@ -87,6 +87,7 @@ along with GCC; see the file COPYING3. If not see
- #include "gimple-low.h"
- #include "cilk.h"
+@@ -58,6 +58,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 "tree-pass.h" /* FIXME: only for PROP_gimple_any */
-@@ -2370,6 +2371,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;
- }
+ #include "builtins.h"
+ #include "asan.h"
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
-index ad35563..c210ff9 100644
+index 0bd3787c25e..d3b52956b52 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
@@ -127,7 +127,7 @@ index ad35563..c210ff9 100644
cd $(srcdir) && etags $(TAGS_SOURCES)
diff --git a/libcpp/file-map.c b/libcpp/file-map.c
new file mode 100644
-index 0000000..04e851b
+index 00000000000..18035ef6a72
--- /dev/null
+++ b/libcpp/file-map.c
@@ -0,0 +1,92 @@
@@ -225,7 +225,7 @@ index 0000000..04e851b
+
diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
new file mode 100644
-index 0000000..e6f8cbf
+index 00000000000..87503152d27
--- /dev/null
+++ b/libcpp/include/file-map.h
@@ -0,0 +1,30 @@
@@ -260,7 +260,7 @@ index 0000000..e6f8cbf
+
+#endif /* !LIBCPP_FILE_MAP_H */
diff --git a/libcpp/macro.c b/libcpp/macro.c
-index 1e0a0b5..c3d330c 100644
+index de18c2210cf..2748c70d520 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see
@@ -271,7 +271,7 @@ index 1e0a0b5..c3d330c 100644
typedef struct macro_arg macro_arg;
/* This structure represents the tokens of a macro argument. These
-@@ -297,6 +298,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
+@@ -301,6 +302,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node,
if (!name)
abort ();
}
@@ -280,5 +280,5 @@ index 1e0a0b5..c3d330c 100644
buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
result = buf;
--
-1.9.1
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
index c7caed8c8..524716790 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
@@ -1,7 +1,7 @@
-From 14b79641ff6b0008aef7fbf7aa300daec11d1e78 Mon Sep 17 00:00:00 2001
+From ddddc7335539fb8a6d30beba21781762df159186 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] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
+Subject: [PATCH 42/47] 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.
@@ -17,18 +17,18 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
1 file changed, 4 insertions(+)
diff --git a/gcc/opts-global.c b/gcc/opts-global.c
-index b61bdcf..51bb177 100644
+index 50bad77c347..32b1d286721 100644
--- a/gcc/opts-global.c
+++ b/gcc/opts-global.c
-@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
- #include "rtl.h"
+@@ -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 "hash-map.h"
- #include "plugin-api.h"
- #include "ipa-ref.h"
-@@ -378,6 +379,9 @@ handle_common_deferred_options (void)
+ #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);
@@ -39,5 +39,5 @@ index b61bdcf..51bb177 100644
case OPT_fdump_:
--
-1.9.1
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
index 0b91fdbbc..74a5c8644 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
@@ -1,8 +1,8 @@
-From 289ad2969a5966c603bf6928ce442db74c4cbb25 Mon Sep 17 00:00:00 2001
+From 5bc97be388485a5f8dd85db34372a1299bffd263 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] gcc/final.c: -fdebug-prefix-map support to remap sources with
- relative path
+Subject: [PATCH 43/47] 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
@@ -13,11 +13,14 @@ 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..c3594c2 100644
+index 820162b2d28..d74cb901abd 100644
--- a/gcc/final.c
+++ b/gcc/final.c
-@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
+@@ -1559,16 +1559,25 @@ remap_debug_filename (const char *filename)
const char *name;
size_t name_len;
@@ -47,5 +50,5 @@ index 55cf509..c3594c2 100644
}
--
-2.7.4
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
new file mode 100644
index 000000000..e39af9b1a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
@@ -0,0 +1,124 @@
+From 847aec764540636ec654fd7a012e271afa8d4e0f 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 44/47] 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 a1a392de88d..2fe6889a342 100644
+--- a/libgcc/Makefile.in
++++ b/libgcc/Makefile.in
+@@ -48,6 +48,7 @@ unwind_header = @unwind_header@
+ md_unwind_header = @md_unwind_header@
+ sfp_machine_header = @sfp_machine_header@
+ thread_header = @thread_header@
++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 4f6d4c4a4d2..c50dd94a2da 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 45c459788c3..e2d19b144b8
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -618,6 +618,7 @@ build_vendor
+ build_cpu
+ build
+ with_aix_soname
++with_ldbl128
+ enable_vtable_verify
+ enable_shared
+ libgcc_topdir
+@@ -667,6 +668,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
+@@ -1324,6 +1326,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
+@@ -2208,6 +2211,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 af151473709..dada52416da 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.12.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
new file mode 100644
index 000000000..3aa038c91
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
@@ -0,0 +1,29 @@
+From 92beb883ab57a23a35ba76c496bc1f4cabb1690e 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 45/47] 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 76be7710960..a1ee2ee26ed 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.12.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch
new file mode 100644
index 000000000..65d22f169
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch
@@ -0,0 +1,91 @@
+From 9b951c8f6b0aaff7c16dc4db72b5e56ec73810bb 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 47/47] 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: Inappropriate [OE-Specific]
+
+ gcc/ginclude/stddef.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
+index 872f451cac9..7e90938387c 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.12.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch
new file mode 100644
index 000000000..a96e91339
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch
@@ -0,0 +1,46 @@
+From 44ef80688b56beea85c0070840dea1e2a4e34aed Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 13 Jun 2017 12:12:52 -0700
+Subject: [PATCH 49/49] gcc: Enable static PIE
+
+Static PIE support in GCC
+see
+https://gcc.gnu.org/ml/gcc/2015-06/msg00008.html
+
+startfiles before patch:
+ -static -> crt1.o crti.o crtbeginT.o
+ -static -PIE -> crt1.o crti.o crtbeginT.o
+
+after patch:
+ -static -> crt1.o crti.o crtbeginT.o
+ -static -PIE -> rcrt1.o crti.o crtbeginS.o
+
+Upstream-Status: Pending
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+---
+ gcc/config/gnu-user.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
+index de605b0..b035bbe 100644
+--- a/gcc/config/gnu-user.h
++++ b/gcc/config/gnu-user.h
+@@ -52,11 +52,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define GNU_USER_TARGET_STARTFILE_SPEC \
+ "%{shared:; \
+ pg|p|profile:gcrt1.o%s; \
+- static:crt1.o%s; \
++ static: %{" PIE_SPEC ": rcrt1.o%s; :crt1.o%s}; \
+ " PIE_SPEC ":Scrt1.o%s; \
+ :crt1.o%s} \
+ crti.o%s \
+- %{static:crtbeginT.o%s; \
++ %{static: %{" PIE_SPEC ": crtbeginS.o%s; :crtbeginT.o%s}; \
+ shared|" PIE_SPEC ":crtbeginS.o%s; \
+ :crtbegin.o%s} \
+ %{fvtable-verify=none:%s; \
+
+2.13.1
+
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
new file mode 100644
index 000000000..5a14d04b6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
@@ -0,0 +1,51 @@
+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-7.3/fix-segmentation-fault-precompiled-hdr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch
new file mode 100644
index 000000000..c0adef6f2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch
@@ -0,0 +1,49 @@
+
+Prevent a segmentation fault which occurs when using incorrect
+structure trying to access name of some named operators, such as
+CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in
+those cases, as is may not be initialized at all.
+
+
+[YOCTO #11738]
+
+Upstream-Status: Pending
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+diff --git a/libcpp/lex.c b/libcpp/lex.c
+--- a/libcpp/lex.c
++++ b/libcpp/lex.c
+@@ -3229,11 +3229,27 @@
+ spell_ident:
+ case SPELL_IDENT:
+ if (forstring)
+- {
+- memcpy (buffer, NODE_NAME (token->val.node.spelling),
+- NODE_LEN (token->val.node.spelling));
+- buffer += NODE_LEN (token->val.node.spelling);
+- }
++ {
++ if (token->type == CPP_NAME)
++ {
++ memcpy (buffer, NODE_NAME (token->val.node.spelling),
++ NODE_LEN (token->val.node.spelling));
++ buffer += NODE_LEN (token->val.node.spelling);
++ break;
++ }
++ /* NAMED_OP, cannot use node.spelling */
++ if (token->flags & NAMED_OP)
++ {
++ const char *str = cpp_named_operator2name (token->type);
++ if (str)
++ {
++ size_t len = strlen(str);
++ memcpy(buffer, str, len);
++ buffer += len;
++ }
++ break;
++ }
++ }
+ else
+ buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node);
+ break;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc
index 857aa8f50..aa3b53e64 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc
@@ -43,7 +43,7 @@ def get_gcc_ppc_plt_settings(bb, d):
return ""
def get_long_double_setting(bb, d):
- if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC') in [ 'uclibc', 'glibc' ]:
+ if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC') in [ 'glibc' ]:
return "--with-long-double-128"
else:
return "--without-long-double-128"
@@ -105,6 +105,7 @@ gcclibdir = "${libdir}/gcc"
BINV = "${PV}"
#S = "${WORKDIR}/gcc-${PV}"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+
B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
target_includedir ?= "${includedir}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 00ef89ec5..e2ce234aa 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -22,6 +22,8 @@ EXTRA_OECONF_INITIAL ?= ""
GCCMULTILIB ?= "--disable-multilib"
GCCTHREADS ?= "posix"
+GCCPIE ??= ""
+
EXTRA_OECONF = "\
${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \
--with-gnu-ld \
@@ -29,6 +31,7 @@ EXTRA_OECONF = "\
--enable-languages=${LANGUAGES} \
--enable-threads=${GCCTHREADS} \
${GCCMULTILIB} \
+ ${GCCPIE} \
--enable-c99 \
--enable-long-long \
--enable-symvers=gnu \
@@ -53,9 +56,7 @@ export gcc_cv_collect2_libs = 'none required'
# in the config.log files (which might not get generated until do_compile
# hence being missed by the insane do_configure check).
-# Build uclibc compilers without cxa_atexit support
EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
-EXTRA_OECONF_append_libc-uclibc = " --enable-__cxa_atexit"
EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
@@ -66,14 +67,6 @@ EXTRA_OECONF_append_mipsisa32r6 = " --with-abi=32 --with-arch=mips32r6"
EXTRA_OECONF_append_mipsisa64r6el = " --with-abi=64 --with-arch-64=mips64r6"
EXTRA_OECONF_append_mipsisa64r6 = " --with-abi=64 --with-arch-64=mips64r6"
-# ARMv6+ adds atomic instructions that affect the ABI in libraries built
-# with TUNE_CCARGS in gcc-runtime. Make the compiler default to a
-# compatible architecture. armv6 and armv7a cover the minimum tune
-# features used in OE.
-EXTRA_OECONF_append_armv6 = " --with-arch=armv6"
-EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a"
-EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"
-
EXTRA_OECONF_GCC_FLOAT ??= ""
CPPFLAGS = ""
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 ec1d28180..6d77620df 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
@@ -60,6 +60,7 @@ do_configure () {
do_compile () {
oe_runmake all-host configure-target-libgcc
+ (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
}
# Having anything auto depending on gcc-cross-sdk is a really bad idea...
@@ -80,7 +81,7 @@ FILES_${PN} = "\
${includedir}/c++/${BINV} \
${prefix}/${TARGET_SYS}/bin/* \
${prefix}/${TARGET_SYS}/lib/* \
- ${prefix}/${TARGET_SYS}/usr/include/* \
+ ${prefix}/${TARGET_SYS}${target_includedir}/* \
"
INSANE_SKIP_${PN} += "dev-so"
@@ -96,7 +97,7 @@ EXEEXT = ""
BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
do_install () {
- ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h )
+ ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h )
oe_runmake 'DESTDIR=${D}' install-host
# Cleanup some of the ${libdir}{,exec}/gcc stuff ...
@@ -153,7 +154,7 @@ ELFUTILS = "nativesdk-elfutils"
DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib"
RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}"
-SYSTEMHEADERS = "/usr/include"
+SYSTEMHEADERS = "${target_includedir}/"
SYSTEMLIBS = "${target_base_libdir}/"
SYSTEMLIBS1 = "${target_libdir}/"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb
index bf53c5cd7..bf53c5cd7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 9502c2b1a..892b1dbf2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -35,10 +35,11 @@ EXTRA_OECONF += "--with-native-system-header-dir=${SYSTEMHEADERS}"
do_compile () {
oe_runmake all-gcc configure-target-libgcc
+ (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
}
do_install () {
- ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h )
+ ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h)
oe_runmake 'DESTDIR=${D}' install-gcc
# We don't really need this (here shares/ contains man/, info/, locale/).
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb
index 4c73e5ce6..4c73e5ce6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc
index 45985c384..1e184a60d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -57,6 +57,7 @@ do_compile () {
export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
oe_runmake all-host configure-target-libgcc
+ (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
# now generate script to drive testing
echo "#!/usr/bin/env sh" >${B}/${TARGET_PREFIX}testgcc
set >> ${B}/${TARGET_PREFIX}testgcc
@@ -155,22 +156,24 @@ INHIBIT_PACKAGE_STRIP = "1"
BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
do_install () {
- ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h )
+ ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h )
oe_runmake 'DESTDIR=${D}' install-host
install -d ${D}${target_base_libdir}
install -d ${D}${target_libdir}
-
+
# Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
# gfortran is fully backwards compatible. This is a safe and practical solution.
- ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
+ if [ -n "${@d.getVar('FORTRAN')}" ]; then
+ ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
+ fortsymlinks="g77 gfortran"
+ fi
-
# Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
# found. These need to be relative paths so they work in different locations.
dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
install -d $dest
- for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
+ for t in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip gcc cpp $fortsymlinks; do
ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t
done
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_7.3.bb
index b43cca0c5..b43cca0c5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_7.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb
index fd90e1140..fd90e1140 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb
index 40a6c4fef..40a6c4fef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb
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 0dc405c59..ee08529a5 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,7 +34,6 @@ RUNTIMETARGET_remove_libc-musl = "libmpx"
do_configure () {
export CXX="${CXX} -nostdinc++ -nostdlib++"
-
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/${TARGET_SYS}/$d/
@@ -43,6 +42,9 @@ do_configure () {
chmod a+x ${S}/$d/configure
relpath=${@os.path.relpath("${S}/$d", "${B}/${TARGET_SYS}/$d")}
$relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+ if [ "$d" = "libgcc" ]; then
+ (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
+ fi
done
}
EXTRACONFFUNCS += "extract_stashed_builddir"
@@ -99,8 +101,8 @@ do_install_append_class-target () {
if [ "${TCLIBC}" != "glibc" ]; then
case "${TARGET_OS}" in
- "linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";;
- "linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";;
+ "linux-musl" | "linux-*spe") extra_target_os="linux";;
+ "linux-musleabi") extra_target_os="linux-gnueabi";;
*) extra_target_os="linux";;
esac
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb
index 8f31e7792..8f31e7792 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb
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 f97885b37..3183b29de 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
@@ -97,6 +97,7 @@ FILES_libtsan += "${libdir}/libtsan.so.*"
FILES_libtsan-dev += "\
${libdir}/libtsan.so \
${libdir}/libtsan.la \
+ ${libdir}/libtsan_*.o \
"
FILES_libtsan-staticdev += "${libdir}/libtsan.a"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb
index 601f66602..601f66602 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_7.3.bb
index b890fa33e..b890fa33e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_7.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc
index eef4434db..b6e31f5d9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc
@@ -9,6 +9,14 @@ EXTRA_OECONF_PATHS = "\
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
+# ARMv6+ adds atomic instructions that affect the ABI in libraries built
+# with TUNE_CCARGS in gcc-runtime. Make the compiler default to a
+# compatible architecture. armv6 and armv7a cover the minimum tune
+# features used in OE.
+EXTRA_OECONF_append_armv6 = " --with-arch=armv6"
+EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a"
+EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"
+
# libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is
# set in subdir gcc, so subdir libcc1 can't use it, export it here to
# fix the problem.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_7.3.bb
index 2c618dfb9..ab208e702 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_7.3.bb
@@ -1,9 +1,10 @@
require recipes-devtools/gcc/gcc-${PV}.inc
require gcc-target.inc
-# Building with thumb enabled on armv4t fails with
+# Building with thumb enabled on armv4t armv5t 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"
+ARM_INSTRUCTION_SET_armv5 = "arm"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_7.3.bb
index 19f253fce..19f253fce 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_7.3.bb
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 38d1643a9..1500fb5ac 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
@@ -5,8 +5,8 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
do_install_append_class-target () {
if [ "${TCLIBC}" != "glibc" ]; then
case "${TARGET_OS}" in
- "linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";;
- "linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";;
+ "linux-musl" | "linux-*spe") extra_target_os="linux";;
+ "linux-musleabi") extra_target_os="linux-gnueabi";;
*) extra_target_os="linux";;
esac
ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_7.3.bb
index a5152f28e..a5152f28e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_7.3.bb
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 4846decbb..5f5d4af75 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
@@ -37,7 +37,7 @@ do_install () {
}
INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS = "gcc-runtime"
+DEPENDS = "gcc-runtime gcc-cross-${TARGET_ARCH}"
BBCLASSEXTEND = "nativesdk"
@@ -54,6 +54,7 @@ FILES_${PN}-dev = "\
${libdir}/libgfortran.la \
${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \
"
FILES_${PN}-staticdev = "${libdir}/libgfortran.a"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_7.3.bb
index 71dd8b4bd..71dd8b4bd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_7.3.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.12.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc
index 634756ce4..fba32ce12 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.12.1.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-8.0.inc
@@ -17,6 +17,6 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0010-resolve-restrict-keyword-conflict.patch \
file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \
"
-SRC_URI[md5sum] = "193453347ddced7acb6b1cd2ee8f2e4b"
-SRC_URI[sha256sum] = "4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186"
+SRC_URI[md5sum] = "c3d35cd949084be53b92cc1e03485f88"
+SRC_URI[sha256sum] = "f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee"
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 239b37586..9164a2bba 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,7 +5,6 @@ DEPENDS = "expat zlib ncurses virtual/libiconv ${LTTNGUST}"
LTTNGUST = "lttng-ust"
LTTNGUST_aarch64 = ""
-LTTNGUST_libc-uclibc = ""
LTTNGUST_mipsarch = ""
LTTNGUST_sh4 = ""
LTTNGUST_libc-musl = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb
index 301035940..301035940 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_8.0.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb
index 50cf159fd..50cf159fd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.12.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_8.0.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
index fc6c92f18..4f06d46d7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
@@ -1,4 +1,4 @@
-From 2c81e17216b4e471a1ce0bddb50f374b0722a2ce Mon Sep 17 00:00:00 2001
+From 91da0458b333249eb9c2f4c1f1e53fa4bc085cc9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 19 Jan 2016 18:18:52 -0800
Subject: [PATCH 01/10] include sys/types.h for mode_t
@@ -14,7 +14,7 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+)
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
-index 4c14c204bb..bdab18f7f7 100644
+index 3cc2bc4bab..e6b19b06b9 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -28,6 +28,7 @@
@@ -26,5 +26,5 @@ index 4c14c204bb..bdab18f7f7 100644
struct emit_ops;
struct buffer;
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
index 9a9201b39..83c4dded3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
@@ -1,4 +1,4 @@
-From f316d604b312bead78594f02e1355633eda9507b Mon Sep 17 00:00:00 2001
+From 9ce61f97b7758794f06894e934fbb256ff62163e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 02:27:55 +0000
Subject: [PATCH 02/10] make man install relative to DESTDIR
@@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
-index a05f50767a..8d0fa64ea8 100644
+index 3944956b5d..aa355e8347 100644
--- a/sim/common/Makefile.in
+++ b/sim/common/Makefile.in
@@ -35,7 +35,7 @@ tooldir = $(libdir)/$(target_alias)
@@ -24,5 +24,5 @@ index a05f50767a..8d0fa64ea8 100644
includedir = @includedir@
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
index 74c00063e..6f7955be1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
@@ -1,4 +1,4 @@
-From f2912b1d2e5c854a112176682903b696da33e003 Mon Sep 17 00:00:00 2001
+From ca0ef06b7320912df350e730e63f9bafdaa6ea70 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 23 Mar 2016 06:30:09 +0000
Subject: [PATCH 03/10] mips-linux-nat: Define _ABIO32 if not defined
@@ -17,10 +17,10 @@ Upstream-Status: Pending
1 file changed, 5 insertions(+)
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index 0f20f16814..722532bb6c 100644
+index 8041d84be7..f2df1b9907 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
-@@ -46,6 +46,11 @@
+@@ -47,6 +47,11 @@
#define PTRACE_GET_THREAD_AREA 25
#endif
@@ -33,5 +33,5 @@ index 0f20f16814..722532bb6c 100644
we'll clear this and use PTRACE_PEEKUSER instead. */
static int have_ptrace_regsets = 1;
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
index 847f24f7f..357db25ec 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
@@ -1,6 +1,6 @@
-From 7ef7b709885378279c424eab0510b93233400b24 Mon Sep 17 00:00:00 2001
+From 0f6d71118ca914002fcad78d2c8a518223d06bfb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 6 Aug 2016 17:32:50 -0700
+Date: Sat, 30 Apr 2016 18:32:14 -0700
Subject: [PATCH 04/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
systems
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 12 insertions(+)
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
-index 1d013f185f..68098b3db9 100644
+index 33a9feb12c..1a9141faef 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -21,7 +21,13 @@
@@ -31,7 +31,7 @@ index 1d013f185f..68098b3db9 100644
#include "nat/ppc-linux.h"
#include "linux-ppc-tdesc.h"
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
-index 85fbcd84bb..cbec9c53b2 100644
+index 5837ea1767..7233929192 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,13 @@
@@ -49,5 +49,5 @@ index 85fbcd84bb..cbec9c53b2 100644
/* This sometimes isn't defined. */
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
index d0c15f628..cb1b7abd0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
@@ -1,4 +1,4 @@
-From 6649e2cccfb11dec076abb02eae0afab95614829 Mon Sep 17 00:00:00 2001
+From 60ac68f601885ea6480229a5c8a89a0257da376c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 02:31:12 +0000
Subject: [PATCH 05/10] Add support for Renesas SH (sh4) architecture.
@@ -13,7 +13,7 @@ Bug-Debian: http://bugs.debian.org/576242
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- gdb/Makefile.in | 1 +
+ gdb/Makefile.in | 2 +
gdb/configure.host | 1 +
gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++++++++++
gdb/sh-tdep.c | 54 ++--
@@ -24,25 +24,26 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
gdb/testsuite/gdb.base/annota3.c | 4 +
gdb/testsuite/gdb.base/sigall.c | 3 +
gdb/testsuite/gdb.base/signals.c | 4 +
- 11 files changed, 617 insertions(+), 29 deletions(-)
+ 11 files changed, 618 insertions(+), 29 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
-index 7b2df86878..10f1266fe3 100644
+index 8be73ba423..e287ff6a2e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
-@@ -1750,6 +1750,7 @@ ALLDEPFILES = \
- score-tdep.c \
- ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
- sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
-+ sh-linux-tdep.c sh-linux-nat.c \
+@@ -2638,6 +2638,8 @@ ALLDEPFILES = \
+ sh-nbsd-tdep.c \
+ sh-tdep.c \
+ sh64-tdep.c \
++ sh-linux-tdep.c \
++ sh-linux-nat.c \
sol2-tdep.c \
- solib-svr4.c \
- sparc-linux-nat.c sparc-linux-tdep.c \
+ solib-aix.c \
+ solib-spu.c \
diff --git a/gdb/configure.host b/gdb/configure.host
-index ef265ebe29..322a1e2c67 100644
+index d74fd04934..be12de1446 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
-@@ -149,6 +149,7 @@ powerpc*-*-linux*) gdb_host=linux ;;
+@@ -150,6 +150,7 @@ powerpc*-*-linux*) gdb_host=linux ;;
s390*-*-linux*) gdb_host=linux ;;
@@ -51,7 +52,7 @@ index ef265ebe29..322a1e2c67 100644
gdb_host=nbsd ;;
sh*-*-openbsd*) gdb_host=nbsd ;;
diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c
-index 2418d25010..ac8ea9e2a4 100644
+index c5c745d218..84e539aad3 100644
--- a/gdb/sh-linux-tdep.c
+++ b/gdb/sh-linux-tdep.c
@@ -18,14 +18,37 @@
@@ -599,7 +600,7 @@ index 2418d25010..ac8ea9e2a4 100644
/* GNU/Linux uses SVR4-style shared libraries. */
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
-index 694f5f742d..8d54df7a1a 100644
+index 2c2b26847d..14f5281ed4 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -21,6 +21,9 @@
@@ -620,7 +621,7 @@ index 694f5f742d..8d54df7a1a 100644
#include "doublest.h"
#include "osabi.h"
#include "reggroups.h"
-@@ -67,23 +71,6 @@ static const char *const sh_cc_enum[] = {
+@@ -68,23 +72,6 @@ static const char *const sh_cc_enum[] = {
static const char *sh_active_calling_convention = sh_cc_gcc;
@@ -644,7 +645,7 @@ index 694f5f742d..8d54df7a1a 100644
static int
sh_is_renesas_calling_convention (struct type *func_type)
{
-@@ -1043,7 +1030,7 @@ sh_treat_as_flt_p (struct type *type)
+@@ -1052,7 +1039,7 @@ sh_treat_as_flt_p (struct type *type)
return 0;
/* Otherwise if the type of that member is float, the whole type is
treated as float. */
@@ -653,7 +654,7 @@ index 694f5f742d..8d54df7a1a 100644
return 1;
/* Otherwise it's not treated as float. */
return 0;
-@@ -1093,7 +1080,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
+@@ -1102,7 +1089,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
in four registers available. Loop thru args from first to last. */
for (argnum = 0; argnum < nargs; argnum++)
{
@@ -662,7 +663,7 @@ index 694f5f742d..8d54df7a1a 100644
len = TYPE_LENGTH (type);
val = sh_justify_value_in_reg (gdbarch, args[argnum], len);
-@@ -1819,7 +1806,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
+@@ -1828,7 +1815,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
reg->how = DWARF2_FRAME_REG_UNDEFINED;
}
@@ -671,7 +672,7 @@ index 694f5f742d..8d54df7a1a 100644
sh_alloc_frame_cache (void)
{
struct sh_frame_cache *cache;
-@@ -1846,7 +1833,7 @@ sh_alloc_frame_cache (void)
+@@ -1855,7 +1842,7 @@ sh_alloc_frame_cache (void)
return cache;
}
@@ -680,7 +681,7 @@ index 694f5f742d..8d54df7a1a 100644
sh_frame_cache (struct frame_info *this_frame, void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
-@@ -1913,9 +1900,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
+@@ -1922,9 +1909,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
return cache;
}
@@ -693,7 +694,7 @@ index 694f5f742d..8d54df7a1a 100644
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
-@@ -1929,7 +1916,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
+@@ -1938,7 +1925,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
the current frame. Frob regnum so that we pull the value from
the correct place. */
if (regnum == gdbarch_pc_regnum (gdbarch))
@@ -702,7 +703,7 @@ index 694f5f742d..8d54df7a1a 100644
if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
return frame_unwind_got_memory (this_frame, regnum,
-@@ -2238,8 +2225,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
+@@ -2247,8 +2234,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
static struct gdbarch *
sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -712,7 +713,7 @@ index 694f5f742d..8d54df7a1a 100644
/* SH5 is handled entirely in sh64-tdep.c. */
if (info.bfd_arch_info->mach == bfd_mach_sh5)
-@@ -2255,6 +2242,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+@@ -2264,6 +2251,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = XCNEW (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
@@ -731,7 +732,7 @@ index 694f5f742d..8d54df7a1a 100644
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
-@@ -2405,10 +2404,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+@@ -2418,10 +2417,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
break;
}
@@ -745,7 +746,7 @@ index 694f5f742d..8d54df7a1a 100644
frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind);
diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
-index 666968f787..62c65b55ea 100644
+index d15ef050e0..c4642cefa4 100644
--- a/gdb/sh-tdep.h
+++ b/gdb/sh-tdep.h
@@ -21,6 +21,12 @@
@@ -828,7 +829,7 @@ index 666968f787..62c65b55ea 100644
where each general-purpose register is stored inside the associated
core file section. */
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
-index 6d9aef81bb..5b66b429d1 100644
+index e07e5543f2..f5e60e1002 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -116,6 +116,11 @@ switch -glob -- [istarget] {
@@ -917,5 +918,5 @@ index 756606880f..1205a9bc9c 100644
static int count = 0;
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
index 5ed8e81e4..8b1395810 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
@@ -1,4 +1,4 @@
-From 2a6e28ad5c0cad189a3697d96de031e4713052b8 Mon Sep 17 00:00:00 2001
+From 5c92ebd5e117e4cf118c984171e0703dfcfb8cd8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 15:25:03 -0700
Subject: [PATCH 06/10] Dont disable libreadline.a when using --disable-static
@@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile.def b/Makefile.def
-index ea8453e851..0fc66c694b 100644
+index 0d13f037d0..8bcd86e13f 100644
--- a/Makefile.def
+++ b/Makefile.def
-@@ -104,7 +104,8 @@ host_modules= { module= libiconv;
+@@ -105,7 +105,8 @@ host_modules= { module= libiconv;
missing= install-html;
missing= install-info; };
host_modules= { module= m4; };
@@ -33,10 +33,10 @@ index ea8453e851..0fc66c694b 100644
host_modules= { module= sim; };
host_modules= { module= texinfo; no_install= true; };
diff --git a/Makefile.in b/Makefile.in
-index cb0136e8f8..55f9085c16 100644
+index 3acb83b8de..e348907128 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -25385,7 +25385,7 @@ configure-readline:
+@@ -25470,7 +25470,7 @@ configure-readline:
$$s/$$module_srcdir/configure \
--srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
@@ -46,5 +46,5 @@ index cb0136e8f8..55f9085c16 100644
@endif readline
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
index a42c9fd2a..33b4c30ee 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
@@ -1,4 +1,4 @@
-From d7543b44255da4ae71447d4e4d63e0b6aa4ed909 Mon Sep 17 00:00:00 2001
+From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <amccurdy@gmail.com>
Date: Sat, 30 Apr 2016 15:29:06 -0700
Subject: [PATCH 07/10] use <asm/sgidefs.h>
@@ -19,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index 722532bb6c..51d8fc8f66 100644
+index f2df1b9907..d24664cb56 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -31,7 +31,7 @@
@@ -30,7 +30,7 @@ index 722532bb6c..51d8fc8f66 100644
+#include <asm/sgidefs.h>
#include "nat/gdb_ptrace.h"
#include <asm/ptrace.h>
-
+ #include "inf-ptrace.h"
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
index ae9cb8c0e..4f64dea25 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
@@ -1,4 +1,4 @@
-From aacd77184da1328908da41c9fdb55ad881fa0e99 Mon Sep 17 00:00:00 2001
+From d3f240b38eed7cd08f6c50ea896572f1327b437a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 15:31:40 -0700
Subject: [PATCH 08/10] Use exorted definitions of SIGRTMIN
@@ -20,10 +20,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
-index 5d5efa0af4..e3420b49a0 100644
+index 8b29245c3d..f424ae9711 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
-@@ -5022,6 +5022,6 @@ lin_thread_get_thread_signals (sigset_t *set)
+@@ -5021,6 +5021,6 @@ lin_thread_get_thread_signals (sigset_t *set)
/* NPTL reserves the first two RT signals, but does not provide any
way for the debugger to query the signal numbers - fortunately
they don't change. */
@@ -33,12 +33,12 @@ index 5d5efa0af4..e3420b49a0 100644
+ sigaddset (set, SIGRTMIN + 1);
}
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
-index 2b485db141..d058afcde8 100644
+index 7dd18fefff..35137ab34f 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
-@@ -85,4 +85,8 @@ extern enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp);
+@@ -90,4 +90,8 @@ extern void linux_stop_lwp (struct lwp_info *lwp);
- extern void linux_stop_lwp (struct lwp_info *lwp);
+ extern int lwp_is_stepping (struct lwp_info *lwp);
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
@@ -46,5 +46,5 @@ index 2b485db141..d058afcde8 100644
+
#endif /* LINUX_NAT_H */
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
index ed6e0aeb7..0c103ef3f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
@@ -1,4 +1,4 @@
-From 8c35d5d1825ed017cc58ea91011412e54c002eeb Mon Sep 17 00:00:00 2001
+From 3f54036b891054072b3e43ea8daaa57aa367b2e0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Apr 2016 15:35:39 -0700
Subject: [PATCH 09/10] Change order of CFLAGS
@@ -9,26 +9,22 @@ Upstream-Status: Inappropriate
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- gdb/gdbserver/Makefile.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ gdb/gdbserver/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
-index f844ab8853..3f88db52e3 100644
+index 01dfdc0b89..f6aebef464 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
-@@ -138,10 +138,10 @@ CXXFLAGS = @CXXFLAGS@
- CPPFLAGS = @CPPFLAGS@
-
- # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
--INTERNAL_CFLAGS_BASE = ${COMPILER_CFLAGS} ${GLOBAL_CFLAGS} \
-+INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \
+@@ -140,7 +140,7 @@ CPPFLAGS = @CPPFLAGS@
+ INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
- INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
--INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
-+INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER
+ INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
+-INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
++INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER
# LDFLAGS is specifically reserved for setting from the command line
# when running make.
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
index 1938beb56..c9507109b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
@@ -1,4 +1,4 @@
-From 7816d3497266e55c1c921d7cc1c8bf81c8ed0b4a Mon Sep 17 00:00:00 2001
+From 3ead0dd143521b0ba69c9e753bc4a236f9445ad9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 10 May 2016 08:47:05 -0700
Subject: [PATCH 10/10] resolve restrict keyword conflict
@@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/gnulib/import/sys_time.in.h b/gdb/gnulib/import/sys_time.in.h
-index c556c5db23..2a6107fcf8 100644
+index d535a6a48b..7c34d5a1aa 100644
--- a/gdb/gnulib/import/sys_time.in.h
+++ b/gdb/gnulib/import/sys_time.in.h
@@ -93,20 +93,20 @@ struct timeval
@@ -42,7 +42,7 @@ index c556c5db23..2a6107fcf8 100644
+ (struct timeval *__restrict, void *__restrict));
# endif
_GL_CXXALIASWARN (gettimeofday);
- #elif defined GNULIB_POSIXCHECK
+ # if defined __cplusplus && defined GNULIB_NAMESPACE
--
-2.11.0
+2.13.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.12.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.bb
index ea8fef122..ea8fef122 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.12.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_8.0.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 5c12ca8d4..9b4c1284d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
@@ -107,7 +107,6 @@ PERLTOOLS = " \
${libexecdir}/git-core/git-cvsserver \
${bindir}/git-cvsserver \
${libexecdir}/git-core/git-difftool \
- ${libexecdir}/git-core/git-relink \
${libexecdir}/git-core/git-send-email \
${libexecdir}/git-core/git-svn \
${libexecdir}/git-core/git-instaweb \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.11.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.11.1.bb
deleted file mode 100644
index f2f072c52..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.11.1.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] = "6a7a73db076bb0514b602720669d685c"
-SRC_URI[tarball.sha256sum] = "a1cdd7c820f92c44abb5003b36dc8cb7201ba38e8744802399f59c97285ca043"
-SRC_URI[manpages.md5sum] = "e4268a6b514ccdb624b6450ff55881a3"
-SRC_URI[manpages.sha256sum] = "ee567e7b0f95333816793714bb31c54e288cf8041f77a0092b85e62c9c2974f9"
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
new file mode 100644
index 000000000..b3e388731
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.13.3.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] = "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/gnu-config/gnu-config/config-guess-uclibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
deleted file mode 100644
index 2094116f0..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-Upstream-Status: Pending
-
-Patch courtesy gentoo-portage/sys-devel/gnuconfig/files/automake-1.8.5-config-guess-uclibc.patch.
-
-updated to 20050516 by Marcin 'Hrw' Juszkiewicz (by hand)
-updated to 20080123 by Nitin A Kamble (by hand)
-updated to 20111001 by Saul Wold (by hand)
-updated to 20120818 by Marcin 'Hrw' Juszkiewicz (by hand)
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
----
- config.guess | 67 +++++++++++++++++++++++++++++++++++------------------------
- 1 file changed, 40 insertions(+), 27 deletions(-)
-
---- git.orig/config.guess
-+++ git/config.guess
-@@ -138,6 +138,19 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
- UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
- UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-+# Detect uclibc systems.
-+
-+LIBC="gnu"
-+if [ -f /usr/include/bits/uClibc_config.h ]
-+then
-+ LIBC=uclibc
-+ if [ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]
-+ then
-+ UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h`
-+ LIBC=$LIBC$UCLIBC_SUBVER
-+ fi
-+fi
-+
- # Note: order is significant - the case branches are not exclusive.
-
- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-@@ -886,15 +899,15 @@ EOF
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
-- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-+ if test "$?" = 0 ; then LIBC="gnulibc1" ; else LIBC="" ; fi
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
-@@ -906,19 +919,19 @@ EOF
- fi
- exit ;;
- avr32*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- cris:Linux:*:*)
-- echo ${UNAME_MACHINE}-axis-linux-gnu
-+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
- crisv32:Linux:*:*)
-- echo ${UNAME_MACHINE}-axis-linux-gnu
-+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
- frv:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- hexagon:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
-@@ -932,13 +945,13 @@ EOF
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
- ia64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- m32r*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- m68*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
-@@ -957,54 +970,54 @@ EOF
- #endif
- EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
- ;;
- or32:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- padre:Linux:*:*)
-- echo sparc-unknown-linux-gnu
-+ echo sparc-unknown-linux-${LIBC}
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
-- echo hppa64-unknown-linux-gnu
-+ echo hppa64-unknown-linux-${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-- PA7*) echo hppa1.1-unknown-linux-gnu ;;
-- PA8*) echo hppa2.0-unknown-linux-gnu ;;
-- *) echo hppa-unknown-linux-gnu ;;
-+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-+ *) echo hppa-unknown-linux-${LIBC} ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
-- echo powerpc64-unknown-linux-gnu
-+ echo powerpc64-unknown-linux-${LIBC}
- exit ;;
- ppc:Linux:*:*)
-- echo powerpc-unknown-linux-gnu
-+ echo powerpc-unknown-linux-${LIBC}
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- sh*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- tile*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- vax:Linux:*:*)
-- echo ${UNAME_MACHINE}-dec-linux-gnu
-+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
- exit ;;
- x86_64:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- xtensa*:Linux:*:*)
-- echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch
deleted file mode 100644
index 75fe10082..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Pending
-
---- config.sub.orig 2004-05-14 19:38:36.000000000 -0500
-+++ config.sub 2004-05-14 19:39:17.000000000 -0500
-@@ -118,7 +118,7 @@
- # Here we must recognize all the valid KERNEL-OS combinations.
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
-- nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
-+ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
-@@ -1135,7 +1135,8 @@
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-+ | -mingw32* | -linux-gnu* | -linux-uclibc* \
-+ | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
index 0d05e79fd..3d428b9b7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
@@ -10,7 +10,6 @@ INHIBIT_DEFAULT_DEPS = "1"
SRC_URI = "http://downloads.yoctoproject.org/releases/gnu-config/gnu-config-${PV}.tar.bz2 \
- file://config-guess-uclibc.patch \
file://musl-support.patch \
file://gnu-configize.in"
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 f1c77884e..4fded60f1 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
@@ -13,8 +13,8 @@ PV = "20150728+git${SRCPV}"
SRC_URI = "git://git.savannah.gnu.org/config.git \
file://gnu-configize.in"
-
S = "${WORKDIR}/git"
+UPSTREAM_VERSION_UNKNOWN = "1"
CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4.inc
deleted file mode 100644
index 2f500f32b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-require go-common.inc
-
-PV = "1.4.3"
-GO_BASEVERSION = "1.4"
-FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
-
-SRC_URI += "\
- file://016-armhf-elf-header.patch \
- file://go-cross-backport-cmd-link-support-new-386-amd64-rel.patch \
- file://syslog.patch \
- file://0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch \
-"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81"
-SRC_URI[md5sum] = "dfb604511115dd402a77a553a5923a04"
-SRC_URI[sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch
deleted file mode 100644
index f2adc200b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 855145d5c03c4b4faf60736c38d7a299c682af4a Mon Sep 17 00:00:00 2001
-From: Shenghou Ma <minux@golang.org>
-Date: Sat, 7 Feb 2015 14:06:02 -0500
-Subject: [PATCH] cmd/ld: set alignment for the .rel.plt section on 32-bit
- architectures
-
-Fixes #9802.
-
-Change-Id: I22c52a37bdb23a14cc4615c9519431bb14ca81ca
-Reviewed-on: https://go-review.googlesource.com/4170
-Reviewed-by: Ian Lance Taylor <iant@golang.org>
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- src/cmd/ld/elf.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/cmd/ld/elf.c b/src/cmd/ld/elf.c
-index 12ced98..97ed4bd 100644
---- a/src/cmd/ld/elf.c
-+++ b/src/cmd/ld/elf.c
-@@ -1363,6 +1363,7 @@ asmbelf(vlong symo)
- sh->type = SHT_REL;
- sh->flags = SHF_ALLOC;
- sh->entsize = ELF32RELSIZE;
-+ sh->addralign = 4;
- sh->link = elfshname(".dynsym")->shnum;
- shsym(sh, linklookup(ctxt, ".rel.plt", 0));
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch
deleted file mode 100644
index e6e414e52..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Description: Use correct ELF header for armhf binaries.
-Author: Adam Conrad <adconrad@ubuntu.com>
-Last-Update: 2013-07-08
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: go/src/cmd/ld/elf.c
-===================================================================
---- go.orig/src/cmd/ld/elf.c 2015-02-20 10:49:58.763451586 -0800
-+++ go/src/cmd/ld/elf.c 2015-02-20 10:49:27.895478521 -0800
-@@ -57,7 +57,11 @@
- case '5':
- // we use EABI on both linux/arm and freebsd/arm.
- if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd)
-- hdr.flags = 0x5000002; // has entry point, Version5 EABI
-+#ifdef __ARM_PCS_VFP
-+ hdr.flags = 0x5000402; // has entry point, Version5 EABI, hard-float ABI
-+#else
-+ hdr.flags = 0x5000202; // has entry point, Version5 EABI, soft-float ABI
-+#endif
- // fallthrough
- default:
- hdr.phoff = ELF32HDRSIZE; /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch
deleted file mode 100644
index 95ca9d3aa..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch
+++ /dev/null
@@ -1,225 +0,0 @@
-From d6eefad445831c161fca130f9bdf7b3848aac23c Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Tue, 29 Mar 2016 21:14:33 -0400
-Subject: [PATCH] go-cross: backport "cmd/link: support new 386/amd64
- relocations"
-
-Newer binutils won't support building older go-1.4.3 as per:
-
-https://github.com/golang/go/issues/13114
-
-Upstream commit 914db9f060b1fd3eb1f74d48f3bd46a73d4ae9c7 (see subj)
-was identified as the fix and nominated for 1.4.4 but that release
-never happened. The paths in 1.4.3 aren't the same as go1.6beta1~662
-where this commit appeared, but the NetBSD folks indicated what a
-1.4.3 backport would look like here: https://gnats.netbsd.org/50777
-
-This is based on that, but without the BSD wrapper infrastructure
-layer that makes things look like patches of patches.
-
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-Upstream-Status: Backport [ Partial ]
-
-diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c
-index 18b5aa311981..2e9d339aef87 100644
---- a/src/cmd/6l/asm.c
-+++ b/src/cmd/6l/asm.c
-@@ -118,6 +118,8 @@ adddynrel(LSym *s, Reloc *r)
- return;
-
- case 256 + R_X86_64_GOTPCREL:
-+ case 256 + R_X86_64_GOTPCRELX:
-+ case 256 + R_X86_64_REX_GOTPCRELX:
- if(targ->type != SDYNIMPORT) {
- // have symbol
- if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
-diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c
-index 98c04240374f..cff29488e8af 100644
---- a/src/cmd/8l/asm.c
-+++ b/src/cmd/8l/asm.c
-@@ -115,6 +115,7 @@ adddynrel(LSym *s, Reloc *r)
- return;
-
- case 256 + R_386_GOT32:
-+ case 256 + R_386_GOT32X:
- if(targ->type != SDYNIMPORT) {
- // have symbol
- if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
-diff --git a/src/cmd/ld/elf.h b/src/cmd/ld/elf.h
-index e84d996f2596..bbf2cfaa3cc0 100644
---- a/src/cmd/ld/elf.h
-+++ b/src/cmd/ld/elf.h
-@@ -478,32 +478,47 @@ typedef struct {
- * Relocation types.
- */
-
--#define R_X86_64_NONE 0 /* No relocation. */
--#define R_X86_64_64 1 /* Add 64 bit symbol value. */
--#define R_X86_64_PC32 2 /* PC-relative 32 bit signed sym value. */
--#define R_X86_64_GOT32 3 /* PC-relative 32 bit GOT offset. */
--#define R_X86_64_PLT32 4 /* PC-relative 32 bit PLT offset. */
--#define R_X86_64_COPY 5 /* Copy data from shared object. */
--#define R_X86_64_GLOB_DAT 6 /* Set GOT entry to data address. */
--#define R_X86_64_JMP_SLOT 7 /* Set GOT entry to code address. */
--#define R_X86_64_RELATIVE 8 /* Add load address of shared object. */
--#define R_X86_64_GOTPCREL 9 /* Add 32 bit signed pcrel offset to GOT. */
--#define R_X86_64_32 10 /* Add 32 bit zero extended symbol value */
--#define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */
--#define R_X86_64_16 12 /* Add 16 bit zero extended symbol value */
--#define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */
--#define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */
--#define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */
--#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */
--#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */
--#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */
--#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */
--#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */
--#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */
--#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */
--#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */
--
--#define R_X86_64_COUNT 24 /* Count of defined relocation types. */
-+#define R_X86_64_NONE 0
-+#define R_X86_64_64 1
-+#define R_X86_64_PC32 2
-+#define R_X86_64_GOT32 3
-+#define R_X86_64_PLT32 4
-+#define R_X86_64_COPY 5
-+#define R_X86_64_GLOB_DAT 6
-+#define R_X86_64_JMP_SLOT 7
-+#define R_X86_64_RELATIVE 8
-+#define R_X86_64_GOTPCREL 9
-+#define R_X86_64_32 10
-+#define R_X86_64_32S 11
-+#define R_X86_64_16 12
-+#define R_X86_64_PC16 13
-+#define R_X86_64_8 14
-+#define R_X86_64_PC8 15
-+#define R_X86_64_DTPMOD64 16
-+#define R_X86_64_DTPOFF64 17
-+#define R_X86_64_TPOFF64 18
-+#define R_X86_64_TLSGD 19
-+#define R_X86_64_TLSLD 20
-+#define R_X86_64_DTPOFF32 21
-+#define R_X86_64_GOTTPOFF 22
-+#define R_X86_64_TPOFF32 23
-+#define R_X86_64_PC64 24
-+#define R_X86_64_GOTOFF64 25
-+#define R_X86_64_GOTPC32 26
-+#define R_X86_64_GOT64 27
-+#define R_X86_64_GOTPCREL64 28
-+#define R_X86_64_GOTPC64 29
-+#define R_X86_64_GOTPLT64 30
-+#define R_X86_64_PLTOFF64 31
-+#define R_X86_64_SIZE32 32
-+#define R_X86_64_SIZE64 33
-+#define R_X86_64_GOTPC32_TLSDEC 34
-+#define R_X86_64_TLSDESC_CALL 35
-+#define R_X86_64_TLSDESC 36
-+#define R_X86_64_IRELATIVE 37
-+#define R_X86_64_PC32_BND 40
-+#define R_X86_64_GOTPCRELX 41
-+#define R_X86_64_REX_GOTPCRELX 42
-
-
- #define R_ALPHA_NONE 0 /* No reloc */
-@@ -581,39 +596,42 @@ typedef struct {
- #define R_ARM_COUNT 38 /* Count of defined relocation types. */
-
-
--#define R_386_NONE 0 /* No relocation. */
--#define R_386_32 1 /* Add symbol value. */
--#define R_386_PC32 2 /* Add PC-relative symbol value. */
--#define R_386_GOT32 3 /* Add PC-relative GOT offset. */
--#define R_386_PLT32 4 /* Add PC-relative PLT offset. */
--#define R_386_COPY 5 /* Copy data from shared object. */
--#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */
--#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */
--#define R_386_RELATIVE 8 /* Add load address of shared object. */
--#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */
--#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */
--#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */
--#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */
--#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */
--#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */
--#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */
--#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */
--#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */
--#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */
--#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */
--#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */
--#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */
--#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */
--#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */
--#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */
--#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */
--#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */
--#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */
--#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */
--#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */
--#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */
--
--#define R_386_COUNT 38 /* Count of defined relocation types. */
-+#define R_386_NONE 0
-+#define R_386_32 1
-+#define R_386_PC32 2
-+#define R_386_GOT32 3
-+#define R_386_PLT32 4
-+#define R_386_COPY 5
-+#define R_386_GLOB_DAT 6
-+#define R_386_JMP_SLOT 7
-+#define R_386_RELATIVE 8
-+#define R_386_GOTOFF 9
-+#define R_386_GOTPC 10
-+#define R_386_TLS_TPOFF 14
-+#define R_386_TLS_IE 15
-+#define R_386_TLS_GOTIE 16
-+#define R_386_TLS_LE 17
-+#define R_386_TLS_GD 18
-+#define R_386_TLS_LDM 19
-+#define R_386_TLS_GD_32 24
-+#define R_386_TLS_GD_PUSH 25
-+#define R_386_TLS_GD_CALL 26
-+#define R_386_TLS_GD_POP 27
-+#define R_386_TLS_LDM_32 28
-+#define R_386_TLS_LDM_PUSH 29
-+#define R_386_TLS_LDM_CALL 30
-+#define R_386_TLS_LDM_POP 31
-+#define R_386_TLS_LDO_32 32
-+#define R_386_TLS_IE_32 33
-+#define R_386_TLS_LE_32 34
-+#define R_386_TLS_DTPMOD32 35
-+#define R_386_TLS_DTPOFF32 36
-+#define R_386_TLS_TPOFF32 37
-+#define R_386_TLS_GOTDESC 39
-+#define R_386_TLS_DESC_CALL 40
-+#define R_386_TLS_DESC 41
-+#define R_386_IRELATIVE 42
-+#define R_386_GOT32X 43
-
- #define R_PPC_NONE 0 /* No relocation. */
- #define R_PPC_ADDR32 1
-diff --git a/src/cmd/ld/ldelf.c b/src/cmd/ld/ldelf.c
-index dd5fa0d2a839..2e2fbd17377f 100644
---- a/src/cmd/ld/ldelf.c
-+++ b/src/cmd/ld/ldelf.c
-@@ -888,12 +888,15 @@ reltype(char *pn, int elftype, uchar *siz)
- case R('6', R_X86_64_PC32):
- case R('6', R_X86_64_PLT32):
- case R('6', R_X86_64_GOTPCREL):
-+ case R('6', R_X86_64_GOTPCRELX):
-+ case R('6', R_X86_64_REX_GOTPCRELX):
- case R('8', R_386_32):
- case R('8', R_386_PC32):
- case R('8', R_386_GOT32):
- case R('8', R_386_PLT32):
- case R('8', R_386_GOTOFF):
- case R('8', R_386_GOTPC):
-+ case R('8', R_386_GOT32X):
- *siz = 4;
- break;
- case R('6', R_X86_64_64):
---
-2.7.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/syslog.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/syslog.patch
deleted file mode 100644
index 29be06f1b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.4/syslog.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Add timeouts to logger
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
---- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700
-@@ -33,6 +33,9 @@
- const severityMask = 0x07
- const facilityMask = 0xf8
-
-+var writeTimeout = 1 * time.Second
-+var connectTimeout = 1 * time.Second
-+
- const (
- // Severity.
-
-@@ -100,6 +103,7 @@
- type serverConn interface {
- writeString(p Priority, hostname, tag, s, nl string) error
- close() error
-+ setWriteDeadline(t time.Time) error
- }
-
- type netConn struct {
-@@ -273,7 +277,11 @@
- nl = "\n"
- }
-
-- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
-+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
-+ if err != nil {
-+ return 0, err
-+ }
-+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
- if err != nil {
- return 0, err
- }
-@@ -305,6 +313,10 @@
- return n.conn.Close()
- }
-
-+func (n *netConn) setWriteDeadline(t time.Time) error {
-+ return n.conn.SetWriteDeadline(t)
-+}
-+
- // NewLogger creates a log.Logger whose output is written to
- // the system log service with the specified priority. The logFlag
- // argument is the flag set passed through to log.New to create
-diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
---- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700
-@@ -19,7 +19,7 @@
- logPaths := []string{"/dev/log", "/var/run/syslog"}
- for _, network := range logTypes {
- for _, path := range logPaths {
-- conn, err := net.Dial(network, path)
-+ conn, err := net.DialTimeout(network, path, connectTimeout)
- if err != nil {
- continue
- } else {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6.inc
deleted file mode 100644
index 769c1d8f2..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-require go-common.inc
-
-PV = "1.6.3"
-GO_BASEVERSION = "1.6"
-FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81"
-
-SRC_URI += "\
- file://armhf-elf-header.patch \
- file://syslog.patch \
- file://fix-target-cc-for-build.patch \
- file://fix-cc-handling.patch \
- file://split-host-and-target-build.patch \
- file://gotooldir.patch \
-"
-SRC_URI[md5sum] = "bf3fce6ccaadd310159c9e874220e2a2"
-SRC_URI[sha256sum] = "6326aeed5f86cf18f16d6dc831405614f855e2d416a91fd3fdc334f772345b00"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch
deleted file mode 100644
index 1e3a16b31..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Encode arm EABI ( hard/soft ) calling convention in ELF header
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/cmd/link/internal/ld/elf.go
-===================================================================
---- go.orig/src/cmd/link/internal/ld/elf.go
-+++ go/src/cmd/link/internal/ld/elf.go
-@@ -827,7 +827,13 @@
- // 32-bit architectures
- case '5':
- // we use EABI on both linux/arm and freebsd/arm.
-- if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd {
-+ if HEADTYPE == obj.Hlinux {
-+ if Ctxt.Goarm == 7 {
-+ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float
-+ } else {
-+ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float
-+ }
-+ } else if HEADTYPE == obj.Hfreebsd {
- // We set a value here that makes no indication of which
- // float ABI the object uses, because this is information
- // used by the dynamic linker to compare executables and
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch
deleted file mode 100644
index 983323ace..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Accept CC with multiple words in its name
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go 2015-07-29 14:48:40.323185807 -0700
-+++ go/src/cmd/go/build.go 2015-07-30 07:37:40.529818586 -0700
-@@ -2805,12 +2805,24 @@
- return b.ccompilerCmd("CC", defaultCC, objdir)
- }
-
-+// gccCmd returns a gcc command line prefix
-+// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gccCmdForReal() []string {
-+ return envList("CC", defaultCC)
-+}
-+
- // gxxCmd returns a g++ command line prefix
- // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
- func (b *builder) gxxCmd(objdir string) []string {
- return b.ccompilerCmd("CXX", defaultCXX, objdir)
- }
-
-+// gxxCmd returns a g++ command line prefix
-+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gxxCmdForReal() []string {
-+ return envList("CXX", defaultCXX)
-+}
-+
- // ccompilerCmd returns a command line prefix for the given environment
- // variable and using the default command when the variable is empty.
- func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string {
-Index: go/src/cmd/go/env.go
-===================================================================
---- go.orig/src/cmd/go/env.go 2015-07-29 14:48:40.323185807 -0700
-+++ go/src/cmd/go/env.go 2015-07-30 07:40:54.461655721 -0700
-@@ -52,10 +52,9 @@
-
- if goos != "plan9" {
- cmd := b.gccCmd(".")
-- env = append(env, envVar{"CC", cmd[0]})
-+ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")})
- env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
-- cmd = b.gxxCmd(".")
-- env = append(env, envVar{"CXX", cmd[0]})
-+ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")})
- }
-
- if buildContext.CgoEnabled {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch
deleted file mode 100644
index 2f6156ecd..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700
-+++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700
-@@ -158,7 +158,7 @@
- fi
-
- echo "##### Building packages and commands for $GOOS/$GOARCH."
--CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
-+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
- echo
-
- rm -f "$GOTOOLDIR"/go_bootstrap
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/gotooldir.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/gotooldir.patch
deleted file mode 100644
index 94670259f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/gotooldir.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Define tooldir in relation to GOTOOLDIR env var
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/go/build/build.go
-===================================================================
---- go.orig/src/go/build/build.go
-+++ go/src/go/build/build.go
-@@ -1388,7 +1388,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".
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go
-+++ go/src/cmd/go/build.go
-@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
- }
-
- cgoExe := tool("cgo")
-- if a.cgo != nil && a.cgo.target != "" {
-+ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
- cgoExe = a.cgo.target
- }
- outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/syslog.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/syslog.patch
deleted file mode 100644
index 29be06f1b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/syslog.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Add timeouts to logger
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
---- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700
-@@ -33,6 +33,9 @@
- const severityMask = 0x07
- const facilityMask = 0xf8
-
-+var writeTimeout = 1 * time.Second
-+var connectTimeout = 1 * time.Second
-+
- const (
- // Severity.
-
-@@ -100,6 +103,7 @@
- type serverConn interface {
- writeString(p Priority, hostname, tag, s, nl string) error
- close() error
-+ setWriteDeadline(t time.Time) error
- }
-
- type netConn struct {
-@@ -273,7 +277,11 @@
- nl = "\n"
- }
-
-- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
-+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
-+ if err != nil {
-+ return 0, err
-+ }
-+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
- if err != nil {
- return 0, err
- }
-@@ -305,6 +313,10 @@
- return n.conn.Close()
- }
-
-+func (n *netConn) setWriteDeadline(t time.Time) error {
-+ return n.conn.SetWriteDeadline(t)
-+}
-+
- // NewLogger creates a log.Logger whose output is written to
- // the system log service with the specified priority. The logFlag
- // argument is the flag set passed through to log.New to create
-diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
---- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700
-@@ -19,7 +19,7 @@
- logPaths := []string{"/dev/log", "/var/run/syslog"}
- for _, network := range logTypes {
- for _, path := range logPaths {
-- conn, err := net.Dial(network, path)
-+ conn, err := net.DialTimeout(network, path, connectTimeout)
- if err != nil {
- continue
- } else {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7.inc
deleted file mode 100644
index 5c3004e87..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-require go-common.inc
-
-PV = "1.7.4"
-GO_BASEVERSION = "1.7"
-FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
-
-SRC_URI += "\
- file://armhf-elf-header.patch \
- file://syslog.patch \
- file://fix-target-cc-for-build.patch \
- file://fix-cc-handling.patch \
- file://split-host-and-target-build.patch \
- file://gotooldir.patch \
-"
-SRC_URI[md5sum] = "49c1076428a5d3b5ad7ac65233fcca2f"
-SRC_URI[sha256sum] = "4c189111e9ba651a2bb3ee868aa881fab36b2f2da3409e80885ca758a6b614cc"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch
deleted file mode 100644
index 1e3a16b31..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Encode arm EABI ( hard/soft ) calling convention in ELF header
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/cmd/link/internal/ld/elf.go
-===================================================================
---- go.orig/src/cmd/link/internal/ld/elf.go
-+++ go/src/cmd/link/internal/ld/elf.go
-@@ -827,7 +827,13 @@
- // 32-bit architectures
- case '5':
- // we use EABI on both linux/arm and freebsd/arm.
-- if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd {
-+ if HEADTYPE == obj.Hlinux {
-+ if Ctxt.Goarm == 7 {
-+ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float
-+ } else {
-+ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float
-+ }
-+ } else if HEADTYPE == obj.Hfreebsd {
- // We set a value here that makes no indication of which
- // float ABI the object uses, because this is information
- // used by the dynamic linker to compare executables and
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch
deleted file mode 100644
index a67caf41a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Accept CC with multiple words in its name
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go
-+++ go/src/cmd/go/build.go
-@@ -2991,12 +2991,24 @@ func (b *builder) gccCmd(objdir string)
- return b.ccompilerCmd("CC", defaultCC, objdir)
- }
-
-+// gccCmd returns a gcc command line prefix
-+// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gccCmdForReal() []string {
-+ return envList("CC", defaultCC)
-+}
-+
- // gxxCmd returns a g++ command line prefix
- // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
- func (b *builder) gxxCmd(objdir string) []string {
- return b.ccompilerCmd("CXX", defaultCXX, objdir)
- }
-
-+// gxxCmd returns a g++ command line prefix
-+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gxxCmdForReal() []string {
-+ return envList("CXX", defaultCXX)
-+}
-+
- // gfortranCmd returns a gfortran command line prefix.
- func (b *builder) gfortranCmd(objdir string) []string {
- return b.ccompilerCmd("FC", "gfortran", objdir)
-Index: go/src/cmd/go/env.go
-===================================================================
---- go.orig/src/cmd/go/env.go
-+++ go/src/cmd/go/env.go
-@@ -51,10 +51,9 @@ func mkEnv() []envVar {
-
- if goos != "plan9" {
- cmd := b.gccCmd(".")
-- env = append(env, envVar{"CC", cmd[0]})
-+ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")})
- env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
-- cmd = b.gxxCmd(".")
-- env = append(env, envVar{"CXX", cmd[0]})
-+ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")})
- }
-
- if buildContext.CgoEnabled {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch
deleted file mode 100644
index 2f6156ecd..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700
-+++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700
-@@ -158,7 +158,7 @@
- fi
-
- echo "##### Building packages and commands for $GOOS/$GOARCH."
--CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
-+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
- echo
-
- rm -f "$GOTOOLDIR"/go_bootstrap
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/gotooldir.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/gotooldir.patch
deleted file mode 100644
index 94670259f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/gotooldir.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Define tooldir in relation to GOTOOLDIR env var
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/go/build/build.go
-===================================================================
---- go.orig/src/go/build/build.go
-+++ go/src/go/build/build.go
-@@ -1388,7 +1388,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".
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go
-+++ go/src/cmd/go/build.go
-@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
- }
-
- cgoExe := tool("cgo")
-- if a.cgo != nil && a.cgo.target != "" {
-+ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
- cgoExe = a.cgo.target
- }
- outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch
deleted file mode 100644
index b0dd95bbe..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Add new option --target-only to build target components
-Separates the host and target pieces of build
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash
-+++ go/src/make.bash
-@@ -154,13 +154,22 @@ if [ "$1" = "--no-clean" ]; then
- buildall=""
- shift
- fi
--./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
-+do_host_build="yes"
-+do_target_build="yes"
-+if [ "$1" = "--target-only" ]; then
-+ do_host_build="no"
-+ shift
-+elif [ "$1" = "--host-only" ]; then
-+ do_target_build="no"
-+ shift
-+fi
-
--# Delay move of dist tool to now, because bootstrap may clear tool directory.
--mv cmd/dist/dist "$GOTOOLDIR"/dist
--echo
-+if [ "$do_host_build" = "yes" ]; then
-+ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
-+ # Delay move of dist tool to now, because bootstrap may clear tool directory.
-+ mv cmd/dist/dist "$GOTOOLDIR"/dist
-+ echo
-
--if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
- echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
- # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
- # use the host compiler, CC, from `cmd/dist/dist env` instead.
-@@ -169,11 +178,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
- echo
- fi
-
--echo "##### Building packages and commands for $GOOS/$GOARCH."
--CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
--echo
-+if [ "$do_target_build" = "yes" ]; then
-+ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}"
-+ echo "##### Building packages and commands for $GOOS/$GOARCH."
-+ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then
-+ rm -rf ./host-tools
-+ mkdir ./host-tools
-+ mv "$GOTOOLDIR"/* ./host-tools
-+ GOTOOLDIR="$PWD/host-tools"
-+ fi
-+ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL}
-+ echo
-
--rm -f "$GOTOOLDIR"/go_bootstrap
-+ rm -f "$GOTOOLDIR"/go_bootstrap
-+fi
-
- if [ "$1" != "--no-banner" ]; then
- "$GOTOOLDIR"/dist banner
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/syslog.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/syslog.patch
deleted file mode 100644
index 29be06f1b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.7/syslog.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Add timeouts to logger
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
---- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700
-@@ -33,6 +33,9 @@
- const severityMask = 0x07
- const facilityMask = 0xf8
-
-+var writeTimeout = 1 * time.Second
-+var connectTimeout = 1 * time.Second
-+
- const (
- // Severity.
-
-@@ -100,6 +103,7 @@
- type serverConn interface {
- writeString(p Priority, hostname, tag, s, nl string) error
- close() error
-+ setWriteDeadline(t time.Time) error
- }
-
- type netConn struct {
-@@ -273,7 +277,11 @@
- nl = "\n"
- }
-
-- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
-+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
-+ if err != nil {
-+ return 0, err
-+ }
-+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
- if err != nil {
- return 0, err
- }
-@@ -305,6 +313,10 @@
- return n.conn.Close()
- }
-
-+func (n *netConn) setWriteDeadline(t time.Time) error {
-+ return n.conn.SetWriteDeadline(t)
-+}
-+
- // NewLogger creates a log.Logger whose output is written to
- // the system log service with the specified priority. The logFlag
- // argument is the flag set passed through to log.New to create
-diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
---- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700
-@@ -19,7 +19,7 @@
- logPaths := []string{"/dev/log", "/var/run/syslog"}
- for _, network := range logTypes {
- for _, path := range logPaths {
-- conn, err := net.Dial(network, path)
-+ conn, err := net.DialTimeout(network, path, connectTimeout)
- if err != nil {
- continue
- } else {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8.inc
deleted file mode 100644
index 5c376a2eb..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-require go-common.inc
-
-GOMINOR = ""
-GO_BASEVERSION = "1.8"
-PV .= "${GOMINOR}"
-FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
-
-SRC_URI += "\
- file://armhf-elf-header.patch \
- file://syslog.patch \
- file://fix-target-cc-for-build.patch \
- file://fix-cc-handling.patch \
- file://split-host-and-target-build.patch \
- file://gotooldir.patch \
-"
-SRC_URI[md5sum] = "7743960c968760437b6e39093cfe6f67"
-SRC_URI[sha256sum] = "406865f587b44be7092f206d73fc1de252600b79b3cacc587b74b5ef5c623596"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch
deleted file mode 100644
index 3508838e8..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Encode arm EABI ( hard/soft ) calling convention in ELF header
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/cmd/link/internal/ld/elf.go
-===================================================================
---- go.orig/src/cmd/link/internal/ld/elf.go
-+++ go/src/cmd/link/internal/ld/elf.go
-@@ -950,7 +950,13 @@ func Elfinit(ctxt *Link) {
- case sys.ARM, sys.MIPS:
- if SysArch.Family == sys.ARM {
- // we use EABI on linux/arm, freebsd/arm, netbsd/arm.
-- if Headtype == obj.Hlinux || Headtype == obj.Hfreebsd || Headtype == obj.Hnetbsd {
-+ if Headtype == obj.Hlinux {
-+ if obj.GOARM == 7 {
-+ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float
-+ } else {
-+ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float
-+ }
-+ } else if Headtype == obj.Hfreebsd || Headtype == obj.Hnetbsd {
- // We set a value here that makes no indication of which
- // float ABI the object uses, because this is information
- // used by the dynamic linker to compare executables and
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-cc-handling.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-cc-handling.patch
deleted file mode 100644
index dc9b811b2..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-cc-handling.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Accept CC with multiple words in its name
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go
-+++ go/src/cmd/go/build.go
-@@ -3100,12 +3100,24 @@ func (b *builder) gccCmd(objdir string)
- return b.ccompilerCmd("CC", defaultCC, objdir)
- }
-
-+// gccCmd returns a gcc command line prefix
-+// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gccCmdForReal() []string {
-+ return envList("CC", defaultCC)
-+}
-+
- // gxxCmd returns a g++ command line prefix
- // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
- func (b *builder) gxxCmd(objdir string) []string {
- return b.ccompilerCmd("CXX", defaultCXX, objdir)
- }
-
-+// gxxCmd returns a g++ command line prefix
-+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gxxCmdForReal() []string {
-+ return envList("CXX", defaultCXX)
-+}
-+
- // gfortranCmd returns a gfortran command line prefix.
- func (b *builder) gfortranCmd(objdir string) []string {
- return b.ccompilerCmd("FC", "gfortran", objdir)
-Index: go/src/cmd/go/env.go
-===================================================================
---- go.orig/src/cmd/go/env.go
-+++ go/src/cmd/go/env.go
-@@ -63,10 +63,9 @@ func mkEnv() []envVar {
- }
-
- cmd := b.gccCmd(".")
-- env = append(env, envVar{"CC", cmd[0]})
-+ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")})
- env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
-- cmd = b.gxxCmd(".")
-- env = append(env, envVar{"CXX", cmd[0]})
-+ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")})
-
- if buildContext.CgoEnabled {
- env = append(env, envVar{"CGO_ENABLED", "1"})
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-target-cc-for-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-target-cc-for-build.patch
deleted file mode 100644
index 2f6156ecd..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/fix-target-cc-for-build.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700
-+++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700
-@@ -158,7 +158,7 @@
- fi
-
- echo "##### Building packages and commands for $GOOS/$GOARCH."
--CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
-+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
- echo
-
- rm -f "$GOTOOLDIR"/go_bootstrap
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/gotooldir.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/gotooldir.patch
deleted file mode 100644
index 94670259f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/gotooldir.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Define tooldir in relation to GOTOOLDIR env var
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/go/build/build.go
-===================================================================
---- go.orig/src/go/build/build.go
-+++ go/src/go/build/build.go
-@@ -1388,7 +1388,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".
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go
-+++ go/src/cmd/go/build.go
-@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
- }
-
- cgoExe := tool("cgo")
-- if a.cgo != nil && a.cgo.target != "" {
-+ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
- cgoExe = a.cgo.target
- }
- outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/split-host-and-target-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/split-host-and-target-build.patch
deleted file mode 100644
index b0dd95bbe..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/split-host-and-target-build.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Add new option --target-only to build target components
-Separates the host and target pieces of build
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash
-+++ go/src/make.bash
-@@ -154,13 +154,22 @@ if [ "$1" = "--no-clean" ]; then
- buildall=""
- shift
- fi
--./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
-+do_host_build="yes"
-+do_target_build="yes"
-+if [ "$1" = "--target-only" ]; then
-+ do_host_build="no"
-+ shift
-+elif [ "$1" = "--host-only" ]; then
-+ do_target_build="no"
-+ shift
-+fi
-
--# Delay move of dist tool to now, because bootstrap may clear tool directory.
--mv cmd/dist/dist "$GOTOOLDIR"/dist
--echo
-+if [ "$do_host_build" = "yes" ]; then
-+ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
-+ # Delay move of dist tool to now, because bootstrap may clear tool directory.
-+ mv cmd/dist/dist "$GOTOOLDIR"/dist
-+ echo
-
--if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
- echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
- # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
- # use the host compiler, CC, from `cmd/dist/dist env` instead.
-@@ -169,11 +178,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
- echo
- fi
-
--echo "##### Building packages and commands for $GOOS/$GOARCH."
--CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
--echo
-+if [ "$do_target_build" = "yes" ]; then
-+ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}"
-+ echo "##### Building packages and commands for $GOOS/$GOARCH."
-+ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then
-+ rm -rf ./host-tools
-+ mkdir ./host-tools
-+ mv "$GOTOOLDIR"/* ./host-tools
-+ GOTOOLDIR="$PWD/host-tools"
-+ fi
-+ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL}
-+ echo
-
--rm -f "$GOTOOLDIR"/go_bootstrap
-+ rm -f "$GOTOOLDIR"/go_bootstrap
-+fi
-
- if [ "$1" != "--no-banner" ]; then
- "$GOTOOLDIR"/dist banner
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/syslog.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/syslog.patch
deleted file mode 100644
index 29be06f1b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.8/syslog.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Add timeouts to logger
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
---- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700
-@@ -33,6 +33,9 @@
- const severityMask = 0x07
- const facilityMask = 0xf8
-
-+var writeTimeout = 1 * time.Second
-+var connectTimeout = 1 * time.Second
-+
- const (
- // Severity.
-
-@@ -100,6 +103,7 @@
- type serverConn interface {
- writeString(p Priority, hostname, tag, s, nl string) error
- close() error
-+ setWriteDeadline(t time.Time) error
- }
-
- type netConn struct {
-@@ -273,7 +277,11 @@
- nl = "\n"
- }
-
-- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
-+ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
-+ if err != nil {
-+ return 0, err
-+ }
-+ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
- if err != nil {
- return 0, err
- }
-@@ -305,6 +313,10 @@
- return n.conn.Close()
- }
-
-+func (n *netConn) setWriteDeadline(t time.Time) error {
-+ return n.conn.SetWriteDeadline(t)
-+}
-+
- // NewLogger creates a log.Logger whose output is written to
- // the system log service with the specified priority. The logFlag
- // argument is the flag set passed through to log.New to create
-diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
---- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700
-@@ -19,7 +19,7 @@
- logPaths := []string{"/dev/log", "/var/run/syslog"}
- for _, network := range logTypes {
- for _, path := range logPaths {
-- conn, err := net.Dial(network, path)
-+ conn, err := net.DialTimeout(network, path, connectTimeout)
- if err != nil {
- continue
- } else {
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
new file mode 100644
index 000000000..7f12241dc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9.inc
@@ -0,0 +1,23 @@
+require go-common.inc
+
+GO_BASEVERSION = "1.9"
+FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
+
+SRC_URI += "\
+ file://0001-make.bash-quote-CC_FOR_TARGET.patch \
+ file://0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch \
+ file://0003-make.bash-better-separate-host-and-target-builds.patch \
+ file://0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch \
+ file://0005-cmd-go-make-GOROOT-precious-by-default.patch \
+ file://0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch \
+ file://0007-ld-add-soname-to-shareable-objects.patch \
+ file://0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch \
+ file://0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch \
+ file://0010-make.bash-override-CC-when-building-dist-and-go_boot.patch \
+"
+SRC_URI_append_libc-musl = " file://set-external-linker.patch"
+
+SRC_URI[main.md5sum] = "da2d44ea384076efec43ee1f8b7d45d2"
+SRC_URI[main.sha256sum] = "a4ab229028ed167ba1986825751463605264e44868362ca8e7accc8be057e993"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch
new file mode 100644
index 000000000..7800975e4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0001-make.bash-quote-CC_FOR_TARGET.patch
@@ -0,0 +1,32 @@
+From d24734ad44006791fd48fc45ea34fe608ff672fb Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Wed, 13 Sep 2017 08:04:23 -0700
+Subject: [PATCH 1/7] make.bash: quote CC_FOR_TARGET
+
+For OE cross-builds, $CC_FOR_TARGET has more than
+one word and needs to be quoted.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/make.bash | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/make.bash b/src/make.bash
+index 71e7531..dcf3256 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -175,7 +175,7 @@ echo "##### Building packages and commands for $GOOS/$GOARCH."
+
+ old_bin_files=$(cd $GOROOT/bin && echo *)
+
+-CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
++CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
+
+ # Check that there are no new files in $GOROOT/bin other than go and gofmt
+ # and $GOOS_$GOARCH (a directory used when cross-compiling).
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch
new file mode 100644
index 000000000..a4e42261c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch
@@ -0,0 +1,67 @@
+From a7170d32a13aead608abd18996f6dab2e2a631b5 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Wed, 13 Sep 2017 08:06:37 -0700
+Subject: [PATCH 2/7] cmd/go: fix CC and CXX environment variable construction
+
+For OE cross-builds, CC and CXX have multiple words, and
+we need their complete definitions when setting up the
+environment during Go builds.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/envcmd/env.go | 4 ++--
+ src/cmd/go/internal/work/build.go | 12 ++++++++++++
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index 43d4334..529d21d 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -74,10 +74,10 @@ func MkEnv() []cfg.EnvVar {
+ }
+
+ cmd := b.GccCmd(".")
+- env = append(env, cfg.EnvVar{Name: "CC", Value: cmd[0]})
++ env = append(env, cfg.EnvVar{Name: "CC", Value: strings.Join(b.GccCmdForReal(), " ")})
+ env = append(env, cfg.EnvVar{Name: "GOGCCFLAGS", Value: strings.Join(cmd[3:], " ")})
+ cmd = b.GxxCmd(".")
+- env = append(env, cfg.EnvVar{Name: "CXX", Value: cmd[0]})
++ env = append(env, cfg.EnvVar{Name: "CXX", Value: strings.Join(b.GxxCmdForReal(), " ")})
+
+ if cfg.BuildContext.CgoEnabled {
+ env = append(env, cfg.EnvVar{Name: "CGO_ENABLED", Value: "1"})
+diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
+index 7d667ff..85df0b3 100644
+--- a/src/cmd/go/internal/work/build.go
++++ b/src/cmd/go/internal/work/build.go
+@@ -3127,12 +3127,24 @@ func (b *Builder) GccCmd(objdir string) []string {
+ return b.ccompilerCmd("CC", cfg.DefaultCC, objdir)
+ }
+
++// gccCmd returns a gcc command line prefix
++// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
++func (b *Builder) GccCmdForReal() []string {
++ return envList("CC", cfg.DefaultCC)
++}
++
+ // gxxCmd returns a g++ command line prefix
+ // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
+ func (b *Builder) GxxCmd(objdir string) []string {
+ return b.ccompilerCmd("CXX", cfg.DefaultCXX, objdir)
+ }
+
++// gxxCmd returns a g++ command line prefix
++// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
++func (b *Builder) GxxCmdForReal() []string {
++ return envList("CXX", cfg.DefaultCXX)
++}
++
+ // gfortranCmd returns a gfortran command line prefix.
+ func (b *Builder) gfortranCmd(objdir string) []string {
+ return b.ccompilerCmd("FC", "gfortran", objdir)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch
index afbae02b4..ffd9f2359 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch
@@ -1,22 +1,30 @@
-Add new option --target-only to build target components
-Separates the host and target pieces of build
+From 31e88f06af7ab787d8fe0c1ca625193e1799e167 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Wed, 13 Sep 2017 08:12:04 -0700
+Subject: [PATCH 3/7] make.bash: better separate host and target builds
+
+Fore OE cross-builds, the simple checks in make.bash are
+insufficient for distinguishing host and target build
+environments, so add some options for telling the
+script which parts are being built.
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash
-+++ go/src/make.bash
-@@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/make.bash | 51 ++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 28 insertions(+), 23 deletions(-)
+
+diff --git a/src/make.bash b/src/make.bash
+index dcf3256..9553623 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -156,13 +156,22 @@ if [ "$1" = "--no-clean" ]; then
buildall=""
shift
fi
-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
--# Delay move of dist tool to now, because bootstrap may clear tool directory.
--mv cmd/dist/dist "$GOTOOLDIR"/dist
--echo
-
--if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
+do_host_build="yes"
+do_target_build="yes"
+if [ "$1" = "--target-only" ]; then
@@ -26,23 +34,42 @@ Index: go/src/make.bash
+ do_target_build="no"
+ shift
+fi
-+
+
+-# Delay move of dist tool to now, because bootstrap may clear tool directory.
+-mv cmd/dist/dist "$GOTOOLDIR"/dist
+-echo
+if [ "$do_host_build" = "yes" ]; then
+ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
+ # Delay move of dist tool to now, because bootstrap may clear tool directory.
+ mv cmd/dist/dist "$GOTOOLDIR"/dist
+ echo
-+
+
+-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
# CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
# use the host compiler, CC, from `cmd/dist/dist env` instead.
-@@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
+@@ -171,24 +180,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
echo
fi
-echo "##### Building packages and commands for $GOOS/$GOARCH."
+-
+-old_bin_files=$(cd $GOROOT/bin && echo *)
+-
-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
+-
+-# Check that there are no new files in $GOROOT/bin other than go and gofmt
+-# and $GOOS_$GOARCH (a directory used when cross-compiling).
+-(cd $GOROOT/bin && for f in *; do
+- if ! expr " $old_bin_files go gofmt ${GOOS}_${GOARCH} " : ".* $f " >/dev/null 2>/dev/null; then
+- echo 1>&2 "ERROR: unexpected new file in $GOROOT/bin: $f"
+- exit 1
+- fi
+-done)
+-
-echo
+-
+-rm -f "$GOTOOLDIR"/go_bootstrap
+if [ "$do_target_build" = "yes" ]; then
+ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}"
+ echo "##### Building packages and commands for $GOOS/$GOARCH."
@@ -54,10 +81,12 @@ Index: go/src/make.bash
+ fi
+ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL}
+ echo
-
--rm -f "$GOTOOLDIR"/go_bootstrap
++
+ rm -f "$GOTOOLDIR"/go_bootstrap
+fi
if [ "$1" != "--no-banner" ]; then
"$GOTOOLDIR"/dist banner
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
new file mode 100644
index 000000000..180b06a4d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
@@ -0,0 +1,68 @@
+From 1369178b497b12088ec4c2794606cc9f14cc327c Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Wed, 13 Sep 2017 08:15:03 -0700
+Subject: [PATCH 4/7] cmd/go: allow GOTOOLDIR to be overridden in the
+ environment
+
+For OE cross-builds, host-side tools reside in the native
+GOROOT, not the target GOROOT. Allow GOTOOLDIR to be set
+in the environment to allow that split, rather than always
+computing GOTOOLDIR relative to the GOROOT setting.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/cfg/cfg.go | 7 ++++++-
+ src/cmd/go/internal/work/build.go | 2 +-
+ src/go/build/build.go | 2 +-
+ 3 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
+index b3ad1ce..c1dc974 100644
+--- a/src/cmd/go/internal/cfg/cfg.go
++++ b/src/cmd/go/internal/cfg/cfg.go
+@@ -91,7 +91,12 @@ 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)
++ s := os.Getenv("GOTOOLDIR")
++ if s == "" {
++ build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++ } else {
++ build.ToolDir = s
++ }
+ }
+
+ func findGOROOT() string {
+diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
+index 85df0b3..7b9a69e 100644
+--- a/src/cmd/go/internal/work/build.go
++++ b/src/cmd/go/internal/work/build.go
+@@ -1337,7 +1337,7 @@ func (b *Builder) build(a *Action) (err error) {
+ }
+
+ var cgoExe string
+- if a.cgo != nil && a.cgo.Target != "" {
++ if a.cgo != nil && a.cgo.Target != "" && os.Getenv("GOTOOLDIR") == "" {
+ cgoExe = a.cgo.Target
+ } else {
+ cgoExe = base.Tool("cgo")
+diff --git a/src/go/build/build.go b/src/go/build/build.go
+index fd89871..e16145b 100644
+--- a/src/go/build/build.go
++++ b/src/go/build/build.go
+@@ -1588,7 +1588,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.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch
new file mode 100644
index 000000000..6e93bcb6c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch
@@ -0,0 +1,41 @@
+From 44f961975dac6cf464a77b5f6dd0c47cc192c4fd Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Wed, 13 Sep 2017 08:19:52 -0700
+Subject: [PATCH 5/7] cmd/go: make GOROOT precious by default
+
+For OE builds, we never want packages that have
+already been installed into the build root to be
+modified, so prevent the go build tool from checking
+if they should be rebuilt.
+
+Also add an environment variable to override this
+behavior, just for building the Go runtime.
+
+Upstream-Status: Pending
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/load/pkg.go | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go
+index 60de666..2660d3f 100644
+--- a/src/cmd/go/internal/load/pkg.go
++++ b/src/cmd/go/internal/load/pkg.go
+@@ -1530,6 +1530,13 @@ func isStale(p *Package) (bool, string) {
+ return true, "build ID mismatch"
+ }
+
++ // For OE builds, make anything in GOROOT non-stale,
++ // to prevent a package build from overwriting the
++ // build root.
++ if p.Goroot && os.Getenv("GOROOT_OVERRIDE") != "1" {
++ return false, "GOROOT-resident packages do not get rebuilt"
++ }
++
+ // Package is stale if a dependency is.
+ for _, p1 := range p.Internal.Deps {
+ if p1.Stale {
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch
new file mode 100644
index 000000000..f0f564044
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch
@@ -0,0 +1,36 @@
+From aae74d1045ca03306ba4159206ee3bac72bcdfbb Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Wed, 13 Sep 2017 08:23:23 -0700
+Subject: [PATCH 6/7] make.bash: add GOTOOLDIR_BOOTSTRAP environment variable
+
+For cross-canadian builds, we need to use the native
+GOTOOLDIR during the bootstrap phase, so provide a way
+to pass that setting into the build script.
+
+Upstream-Status: Pending
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/make.bash | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/make.bash b/src/make.bash
+index 9553623..2e6fb05 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -172,10 +172,11 @@ if [ "$do_host_build" = "yes" ]; then
+ mv cmd/dist/dist "$GOTOOLDIR"/dist
+ echo
+
++ GOTOOLDIR_BOOTSTRAP="${GOTOOLDIR_BOOTSTRAP:-$GOTOOLDIR}"
+ echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
+ # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
+ # use the host compiler, CC, from `cmd/dist/dist env` instead.
+- CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
++ CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOTOOLDIR="$GOTOOLDIR_BOOTSTRAP" \
+ "$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
+ echo
+ fi
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch
new file mode 100644
index 000000000..6459782d8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0007-ld-add-soname-to-shareable-objects.patch
@@ -0,0 +1,46 @@
+From e957c3458d53e37bf416f51d2f8bf54c195e50f5 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Wed, 13 Sep 2017 08:27:02 -0700
+Subject: [PATCH 7/7] ld: add soname to shareable objects
+
+Shared library handling in OE depends on the inclusion
+of an soname header, so update the go linker to add that
+header for both internal and external linking.
+
+Upstream-Status: Pending
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/link/internal/ld/lib.go | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
+index 0234105..0b9e2d0 100644
+--- a/src/cmd/link/internal/ld/lib.go
++++ b/src/cmd/link/internal/ld/lib.go
+@@ -1124,12 +1124,14 @@ func (l *Link) hostlink() {
+ // Pass -z nodelete to mark the shared library as
+ // non-closeable: a dlclose will do nothing.
+ argv = append(argv, "-shared", "-Wl,-z,nodelete")
++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ }
+ case BuildmodeShared:
+ if UseRelro() {
+ argv = append(argv, "-Wl,-z,relro")
+ }
+ argv = append(argv, "-shared")
++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ case BuildmodePlugin:
+ if Headtype == objabi.Hdarwin {
+ argv = append(argv, "-dynamiclib")
+@@ -1138,6 +1140,7 @@ func (l *Link) hostlink() {
+ argv = append(argv, "-Wl,-z,relro")
+ }
+ argv = append(argv, "-shared")
++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ }
+ }
+
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch
new file mode 100644
index 000000000..0977c7835
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch
@@ -0,0 +1,33 @@
+From 03e6c339d4fb712fbb8c4ca6ef2fc7100dcdb3d7 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Thu, 14 Sep 2017 05:38:10 -0700
+Subject: [PATCH 8/8] make.bash: add GOHOSTxx indirection for cross-canadian
+ builds
+
+Add environment variables for specifying the host OS/arch
+that we are building the compiler for, so it can differ from
+the build host OS/arch.
+
+Upstream-Status: Pending
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/make.bash | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/make.bash b/src/make.bash
+index 2e6fb05..0bdadc6 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -173,6 +173,8 @@ if [ "$do_host_build" = "yes" ]; then
+ echo
+
+ GOTOOLDIR_BOOTSTRAP="${GOTOOLDIR_BOOTSTRAP:-$GOTOOLDIR}"
++ GOHOSTOS="${GOHOSTOS_CROSS:-$GOHOSTOS}"
++ GOHOSTARCH="${GOHOSTARCH_CROSS:-$GOHOSTARCH}"
+ echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
+ # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
+ # use the host compiler, CC, from `cmd/dist/dist env` instead.
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch
new file mode 100644
index 000000000..aa5fcfdd2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch
@@ -0,0 +1,47 @@
+From aae44527c8065d54f6acaf87c82cba1ac96fae59 Mon Sep 17 00:00:00 2001
+From: Ian Lance Taylor <iant@golang.org>
+Date: Fri, 18 Aug 2017 17:46:03 -0700
+Subject: [PATCH] cmd/go: -buildmode=pie forces external linking mode on all
+ systems
+
+The go tool assumed that -buildmode=pie implied internal linking on
+linux-amd64. However, that was changed by CL 36417 for issue #18968.
+
+Fixes #21452
+
+Change-Id: I8ed13aea52959cc5c53223f4c41ba35329445545
+Reviewed-on: https://go-review.googlesource.com/57231
+Run-TryBot: Ian Lance Taylor <iant@golang.org>
+TryBot-Result: Gobot Gobot <gobot@golang.org>
+Reviewed-by: Avelino <t@avelino.xxx>
+Reviewed-by: Rob Pike <r@golang.org>
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ src/cmd/go/internal/load/pkg.go | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go
+index 2660d3f..d40773b 100644
+--- a/src/cmd/go/internal/load/pkg.go
++++ b/src/cmd/go/internal/load/pkg.go
+@@ -954,11 +954,12 @@ func (p *Package) load(stk *ImportStack, bp *build.Package, err error) *Package
+
+ if cfg.BuildContext.CgoEnabled && p.Name == "main" && !p.Goroot {
+ // Currently build modes c-shared, pie (on systems that do not
+- // support PIE with internal linking mode), plugin, and
+- // -linkshared force external linking mode, as of course does
++ // support PIE with internal linking mode (currently all
++ // systems: issue #18968)), plugin, and -linkshared force
++ // external linking mode, as of course does
+ // -ldflags=-linkmode=external. External linking mode forces
+ // an import of runtime/cgo.
+- pieCgo := cfg.BuildBuildmode == "pie" && (cfg.BuildContext.GOOS != "linux" || cfg.BuildContext.GOARCH != "amd64")
++ pieCgo := cfg.BuildBuildmode == "pie"
+ linkmodeExternal := false
+ for i, a := range cfg.BuildLdflags {
+ if a == "-linkmode=external" {
+--
+2.14.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch
new file mode 100644
index 000000000..83fd78c3d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/0010-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -0,0 +1,43 @@
+From 21d83dd9499e5be30eea28dd7034d1ea2a01c838 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Tue, 14 Nov 2017 07:38:42 -0800
+Subject: [PATCH 10/10] make.bash: override CC when building dist and
+ go_bootstrap
+
+For cross-canadian builds, dist and go_bootstrap
+run on the build host, so CC needs to point to the
+build host's C compiler. Add a BUILD_CC environment
+for this, falling back to $CC if not present.
+
+Upstream-Status: Pending
+
+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 0bdadc6..f199349 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -131,7 +131,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)
+@@ -167,7 +167,7 @@ elif [ "$1" = "--host-only" ]; then
+ fi
+
+ if [ "$do_host_build" = "yes" ]; then
+- ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
++ CC=${BUILD_CC:-${CC}} ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
+ # Delay move of dist tool to now, because bootstrap may clear tool directory.
+ mv cmd/dist/dist "$GOTOOLDIR"/dist
+ echo
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/set-external-linker.patch b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/set-external-linker.patch
new file mode 100644
index 000000000..d6bd7fa39
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-1.9/set-external-linker.patch
@@ -0,0 +1,111 @@
+Change the dynamic linker hardcoding to use musl when not using glibc
+this should be applied conditional to musl being the system C library
+
+Upstream-Status: Inappropriate [Real Fix should be portable across libcs]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: go/src/cmd/link/internal/amd64/obj.go
+===================================================================
+--- go.orig/src/cmd/link/internal/amd64/obj.go
++++ go/src/cmd/link/internal/amd64/obj.go
+@@ -67,7 +67,7 @@ func Init() {
+ ld.Thearch.Append64 = ld.Append64l
+ ld.Thearch.TLSIEtoLE = tlsIEtoLE
+
+- ld.Thearch.Linuxdynld = "/lib64/ld-linux-x86-64.so.2"
++ ld.Thearch.Linuxdynld = "/lib/ld-musl-x86_64.so.1"
+ ld.Thearch.Freebsddynld = "/libexec/ld-elf.so.1"
+ ld.Thearch.Openbsddynld = "/usr/libexec/ld.so"
+ ld.Thearch.Netbsddynld = "/libexec/ld.elf_so"
+Index: go/src/cmd/link/internal/arm/obj.go
+===================================================================
+--- go.orig/src/cmd/link/internal/arm/obj.go
++++ go/src/cmd/link/internal/arm/obj.go
+@@ -63,7 +63,7 @@ func Init() {
+ ld.Thearch.Append32 = ld.Append32l
+ ld.Thearch.Append64 = ld.Append64l
+
+- ld.Thearch.Linuxdynld = "/lib/ld-linux.so.3" // 2 for OABI, 3 for EABI
++ ld.Thearch.Linuxdynld = "/lib/ld-musl-armhf.so.1"
+ ld.Thearch.Freebsddynld = "/usr/libexec/ld-elf.so.1"
+ ld.Thearch.Openbsddynld = "/usr/libexec/ld.so"
+ ld.Thearch.Netbsddynld = "/libexec/ld.elf_so"
+Index: go/src/cmd/link/internal/arm64/obj.go
+===================================================================
+--- go.orig/src/cmd/link/internal/arm64/obj.go
++++ go/src/cmd/link/internal/arm64/obj.go
+@@ -62,7 +62,7 @@ func Init() {
+ ld.Thearch.Append32 = ld.Append32l
+ ld.Thearch.Append64 = ld.Append64l
+
+- ld.Thearch.Linuxdynld = "/lib/ld-linux-aarch64.so.1"
++ ld.Thearch.Linuxdynld = "/lib/ld-musl-aarch64.so.1"
+
+ ld.Thearch.Freebsddynld = "XXX"
+ ld.Thearch.Openbsddynld = "XXX"
+Index: go/src/cmd/link/internal/mips/obj.go
+===================================================================
+--- go.orig/src/cmd/link/internal/mips/obj.go
++++ go/src/cmd/link/internal/mips/obj.go
+@@ -77,7 +77,7 @@ func Init() {
+ ld.Thearch.Append64 = ld.Append64b
+ }
+
+- ld.Thearch.Linuxdynld = "/lib/ld.so.1"
++ ld.Thearch.Linuxdynld = "/lib/ld-musl-mipsle.so.1"
+
+ ld.Thearch.Freebsddynld = "XXX"
+ ld.Thearch.Openbsddynld = "XXX"
+Index: go/src/cmd/link/internal/mips64/obj.go
+===================================================================
+--- go.orig/src/cmd/link/internal/mips64/obj.go
++++ go/src/cmd/link/internal/mips64/obj.go
+@@ -75,7 +75,7 @@ func Init() {
+ ld.Thearch.Append64 = ld.Append64b
+ }
+
+- ld.Thearch.Linuxdynld = "/lib64/ld64.so.1"
++ ld.Thearch.Linuxdynld = "/lib64/ld-musl-mips64le.so.1"
+
+ ld.Thearch.Freebsddynld = "XXX"
+ ld.Thearch.Openbsddynld = "XXX"
+Index: go/src/cmd/link/internal/ppc64/obj.go
+===================================================================
+--- go.orig/src/cmd/link/internal/ppc64/obj.go
++++ go/src/cmd/link/internal/ppc64/obj.go
+@@ -77,7 +77,7 @@ func Init() {
+ }
+
+ // TODO(austin): ABI v1 uses /usr/lib/ld.so.1
+- ld.Thearch.Linuxdynld = "/lib64/ld64.so.1"
++ ld.Thearch.Linuxdynld = "/lib/ld-musl-powerpc64le.so.1"
+
+ ld.Thearch.Freebsddynld = "XXX"
+ ld.Thearch.Openbsddynld = "XXX"
+Index: go/src/cmd/link/internal/s390x/obj.go
+===================================================================
+--- go.orig/src/cmd/link/internal/s390x/obj.go
++++ go/src/cmd/link/internal/s390x/obj.go
+@@ -62,7 +62,7 @@ func Init() {
+ ld.Thearch.Append32 = ld.Append32b
+ ld.Thearch.Append64 = ld.Append64b
+
+- ld.Thearch.Linuxdynld = "/lib64/ld64.so.1"
++ ld.Thearch.Linuxdynld = "/lib/ld-musl-s390x.so.1"
+
+ // not relevant for s390x
+ ld.Thearch.Freebsddynld = "XXX"
+Index: go/src/cmd/link/internal/x86/obj.go
+===================================================================
+--- go.orig/src/cmd/link/internal/x86/obj.go
++++ go/src/cmd/link/internal/x86/obj.go
+@@ -63,7 +63,7 @@ func Init() {
+ ld.Thearch.Append32 = ld.Append32l
+ ld.Thearch.Append64 = ld.Append64l
+
+- ld.Thearch.Linuxdynld = "/lib/ld-linux.so.2"
++ ld.Thearch.Linuxdynld = "/lib/ld-musl-i386.so.1"
+ ld.Thearch.Freebsddynld = "/usr/libexec/ld-elf.so.1"
+ ld.Thearch.Openbsddynld = "/usr/libexec/ld.so"
+ ld.Thearch.Netbsddynld = "/usr/libexec/ld.elf_so"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb
deleted file mode 100644
index 3d4141e87..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-bootstrap-native_1.4.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-BOOTSTRAP = "1.4"
-require go-native.inc
-require go-${PV}.inc
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 f74b8b765..9af68738a 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
@@ -14,9 +14,13 @@ LICENSE = "BSD-3-Clause"
inherit goarch
-SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz"
+SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz;name=main"
S = "${WORKDIR}/go"
B = "${S}"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
SSTATE_SCAN_CMD = "true"
+
+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
new file mode 100644
index 000000000..8afda6b2c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -0,0 +1,62 @@
+inherit cross-canadian
+
+DEPENDS = "go-native virtual/${HOST_PREFIX}go-crosssdk virtual/nativesdk-${HOST_PREFIX}go-runtime \
+ virtual/${HOST_PREFIX}gcc-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc \
+ virtual/nativesdk-${HOST_PREFIX}compilerlibs"
+PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+
+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}"'
+
+do_configure[noexec] = "1"
+
+do_compile() {
+ export GOBIN="${B}/bin"
+ rm -rf ${GOBIN} ${B}/pkg
+ mkdir ${GOBIN}
+ cd src
+ ./make.bash --host-only --no-banner
+ cd ${B}
+}
+
+
+make_wrapper() {
+ rm -f ${D}${bindir}/$2
+ cat <<END >${D}${bindir}/$2
+#!/bin/sh
+here=\`dirname \$0\`
+native_goroot=\`readlink -f \$here/../../lib/${TARGET_SYS}/go\`
+export GOARCH="${TARGET_GOARCH}"
+export GOOS="${TARGET_GOOS}"
+test -n "\$GOARM" || export GOARM="${TARGET_GOARM}"
+test -n "\$GO386" || export GO386="${TARGET_GO386}"
+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
+}
+
+do_install() {
+ install -d ${D}${libdir}/go/pkg/tool
+ cp --preserve=mode,timestamps -R ${B}/pkg/tool/${HOST_GOTUPLE} ${D}${libdir}/go/pkg/tool/
+ install -d ${D}${bindir} ${D}${libdir}/go/bin
+ for f in ${B}/${GO_BUILD_BINDIR}/*
+ 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-canadian_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
new file mode 100644
index 000000000..7ac9449e4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross-canadian_1.9.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.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross.inc
index 93206a5d0..3ac7211bc 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,18 +1,62 @@
inherit cross
-DEPENDS += "gcc-cross-${TARGET_ARCH}"
+PROVIDES = "virtual/${TARGET_PREFIX}go"
+DEPENDS += "go-native"
PN = "go-cross-${TARGET_ARCH}"
-# Ignore how TARGET_ARCH is computed.
-TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}"
+export GOHOSTOS = "${BUILD_GOOS}"
+export GOHOSTARCH = "${BUILD_GOARCH}"
+export GOOS = "${TARGET_GOOS}"
+export GOARCH = "${TARGET_GOARCH}"
+export GOARM = "${TARGET_GOARM}"
+export GO386 = "${TARGET_GO386}"
+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}"
+CC = "${@d.getVar('BUILD_CC').strip()}"
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/go-cross:"
+do_configure[noexec] = "1"
-GOROOT_FINAL = "${libdir}/go"
-export GOROOT_FINAL
+do_compile() {
+ export GOBIN="${B}/bin"
+ rm -rf ${GOBIN} ${B}/pkg
+ mkdir ${GOBIN}
+ cd src
+ ./make.bash --host-only
+ cd ${B}
+}
-# x32 ABI is not supported on go compiler so far
-COMPATIBLE_HOST_linux-gnux32 = "null"
-# ppc32 is not supported in go compilers
-COMPATIBLE_HOST_powerpc = "null"
+
+make_wrapper() {
+ 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}}"
+\$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
+END
+ 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
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.7.bb
deleted file mode 100644
index 56ee084b1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.7.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require go-cross.inc
-require go_${PV}.bb
-
-# Go binaries are not understood by the strip tool.
-INHIBIT_SYSROOT_STRIP = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.8.bb
deleted file mode 100644
index 56ee084b1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.8.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require go-cross.inc
-require go_${PV}.bb
-
-# Go binaries are not understood by the strip tool.
-INHIBIT_SYSROOT_STRIP = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
index e7a6ab277..80b5a03f6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-cross_1.9.bb
@@ -1,2 +1,2 @@
+require go-cross.inc
require go-${PV}.inc
-require go.inc
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
new file mode 100644
index 000000000..f67e4b92a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk.inc
@@ -0,0 +1,54 @@
+inherit crosssdk
+
+DEPENDS = "go-native virtual/${TARGET_PREFIX}gcc-crosssdk virtual/nativesdk-${TARGET_PREFIX}compilerlibs virtual/${TARGET_PREFIX}binutils-crosssdk"
+PN = "go-crosssdk-${TARGET_ARCH}"
+PROVIDES = "virtual/${TARGET_PREFIX}go-crosssdk"
+
+export GOHOSTOS = "${BUILD_GOOS}"
+export GOHOSTARCH = "${BUILD_GOARCH}"
+export GOOS = "${TARGET_GOOS}"
+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}
+ cd src
+ ./make.bash --host-only
+ cd ${B}
+}
+
+make_wrapper() {
+ rm -f ${D}${bindir}/$2
+ cat <<END >${D}${bindir}/$2
+#!/bin/bash
+here=\`dirname \$0\`
+export GOARCH="${TARGET_GOARCH}"
+export GOOS="${TARGET_GOOS}"
+\$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
+END
+ chmod +x ${D}${bindir}/$2
+}
+
+do_install() {
+ install -d ${D}${libdir}/go
+ install -d ${D}${libdir}/go/bin
+ install -d ${D}${libdir}/go/pkg/tool
+ install -d ${D}${bindir}
+ cp --preserve=mode,timestamps -R ${S}/pkg/tool/${BUILD_GOTUPLE} ${D}${libdir}/go/pkg/tool/
+ 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-crosssdk_1.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.bb
new file mode 100644
index 000000000..1857c8a57
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-crosssdk_1.9.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-dep_0.3.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb
new file mode 100644
index 000000000..abfeb4837
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-dep_0.3.0.bb
@@ -0,0 +1,16 @@
+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-native.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native.inc
index c21f8fda7..95db1c2b7 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
@@ -1,16 +1,28 @@
+# Use immediate assingment here to get the original (/usr/lib)
+# instead of the one rewritten by native.bbclass.
+nonstaging_libdir := "${libdir}"
+
inherit native
-BOOTSTRAP ?= ""
+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"
+
export GOOS = "${BUILD_GOOS}"
export GOARCH = "${BUILD_GOARCH}"
-export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go${BOOTSTRAP}"
-export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go1.4"
+CC = "${@d.getVar('BUILD_CC').strip()}"
+
export CGO_ENABLED = "1"
-do_configure[noexec] = "1"
+do_configure() {
+ 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}
@@ -18,7 +30,7 @@ do_compile() {
mkdir -p ${WORKDIR}/build-tmp
cd src
- CGO_ENABLED=0 ./make.bash --host-only
+ ./make.bash --host-only
}
make_wrapper() {
@@ -26,31 +38,25 @@ make_wrapper() {
cat <<END >${D}${bindir}/$2$3
#!/bin/bash
here=\`dirname \$0\`
-export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go$3\`}"
-\$here/../lib/go$3/bin/$1 "\$@"
+export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}"
+\$here/../lib/go/bin/$1 "\$@"
END
- chmod +x ${D}${bindir}/$2$3
+ chmod +x ${D}${bindir}/$2
}
do_install() {
- install -d ${D}${libdir}/go${BOOTSTRAP}
- cp -a ${B}/pkg ${D}${libdir}/go${BOOTSTRAP}/
- install -d ${D}${libdir}/go${BOOTSTRAP}/src
+ 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 -a ${S}/src/$d ${D}${libdir}/go${BOOTSTRAP}/src/; \
+ [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
done)
-
- install -d ${D}${bindir} ${D}${libdir}/go${BOOTSTRAP}/bin
+ 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${BOOTSTRAP}/bin
- make_wrapper $base $base ${BOOTSTRAP}
+ install -m755 $f ${D}${libdir}/go/bin
+ make_wrapper $base $base
done
}
-
-do_package[noexec] = "1"
-do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
index 182fca27a..bbf3c0dd7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.8.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-native_1.9.bb
@@ -1,3 +1,2 @@
require ${PN}.inc
require go-${PV}.inc
-DEPENDS += "go-bootstrap-native"
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
new file mode 100644
index 000000000..29ae86e4e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime.inc
@@ -0,0 +1,98 @@
+DEPENDS = "virtual/${TARGET_PREFIX}go go-native"
+DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk"
+PROVIDES = "virtual/${TARGET_PREFIX}go-runtime"
+
+export GOHOSTOS = "${BUILD_GOOS}"
+export GOHOSTARCH = "${BUILD_GOARCH}"
+export GOOS = "${TARGET_GOOS}"
+export GOARCH = "${TARGET_GOARCH}"
+export GOARM = "${TARGET_GOARM}"
+export GO386 = "${TARGET_GO386}"
+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"
+
+do_configure() {
+ :
+}
+
+do_configure_libc-musl() {
+ rm -f ${S}/src/runtime/race/*.syso
+}
+
+do_compile() {
+ export GOBIN="${B}/bin"
+ export CC="${@d.getVar('BUILD_CC').strip()}"
+ rm -rf ${GOBIN} ${B}/pkg
+ mkdir ${GOBIN}
+ 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
+ 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}
+}
+
+do_install() {
+ install -d ${D}${libdir}/go/src
+ cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
+ if [ "${BUILD_GOTUPLE}" != "${TARGET_GOTUPLE}" ]; then
+ rm -rf ${D}${libdir}/go/pkg/${BUILD_GOTUPLE}
+ rm -rf ${D}${libdir}/go/pkg/obj/${BUILD_GOTUPLE}
+ fi
+ rm -rf ${D}${libdir}/go/pkg/tool
+ rm -rf ${D}${libdir}/go/pkg/obj
+ rm -rf ${D}${libdir}/go/pkg/bootstrap
+ find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do
+ cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
+ done
+ 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 \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.shlibname \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.shlibname \
+ ${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 \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.a \
+ ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.a \
+ ${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"
+
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+BBCLASSEXTEND = "nativesdk"
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
new file mode 100644
index 000000000..43b68b4e4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-runtime_1.9.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-target.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
new file mode 100644
index 000000000..cac5d7822
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go-target.inc
@@ -0,0 +1,61 @@
+inherit goarch
+DEPENDS = "virtual/${TARGET_PREFIX}go go-native"
+DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
+
+export GOHOSTOS = "${BUILD_GOOS}"
+export GOHOSTARCH = "${BUILD_GOARCH}"
+export GOOS = "${TARGET_GOOS}"
+export GOARCH = "${TARGET_GOARCH}"
+export GOARM = "${TARGET_GOARM}"
+export GO386 = "${TARGET_GO386}"
+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 = ""
+
+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
+
+ cd src
+ ./make.bash
+ cd ${B}
+}
+
+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/
+ install -d ${D}${libdir}/go/bin
+ install -d ${D}${bindir}
+ for f in ${B}/${GO_BUILD_BINDIR}/*; do
+ name=`basename $f`
+ install -m 0755 $f ${D}${libdir}/go/bin/
+ ln -sf ../${BASELIB}/go/bin/$name ${D}${bindir}/
+ done
+}
+
+PACKAGES = "${PN} ${PN}-dev"
+FILES_${PN} = "${libdir}/go/bin ${libdir}/go/pkg/tool/${TARGET_GOTUPLE} ${bindir}"
+FILES_${PN}-dev = "${libdir}/go"
+RDEPENDS_${PN}-dev = "perl bash"
+INSANE_SKIP_${PN} = "ldflags"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go.inc b/import-layers/yocto-poky/meta/recipes-devtools/go/go.inc
deleted file mode 100644
index 25437ddfe..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go.inc
+++ /dev/null
@@ -1,86 +0,0 @@
-inherit goarch
-DEPENDS += "go-bootstrap-native"
-
-# libgcc is required for the target specific libraries to build
-# properly, but apparently not for go-cross and, more importantly,
-# also can't be used there because go-cross cannot depend on
-# the tune-specific libgcc. Otherwise go-cross also would have
-# to be tune-specific.
-DEPENDS += "${@ 'libgcc' if not oe.utils.inherits(d, 'cross') else ''}"
-
-# Prevent runstrip from running because you get errors when the host arch != target arch
-INHIBIT_PACKAGE_STRIP = "1"
-INHIBIT_SYSROOT_STRIP = "1"
-
-# x32 ABI is not supported on go compiler so far
-COMPATIBLE_HOST_linux-gnux32 = "null"
-# ppc32 is not supported in go compilers
-COMPATIBLE_HOST_powerpc = "null"
-
-export GOHOSTOS = "${BUILD_GOOS}"
-export GOHOSTARCH = "${BUILD_GOARCH}"
-export GOOS = "${TARGET_GOOS}"
-export GOARCH = "${TARGET_GOARCH}"
-export GOARM = "${TARGET_GOARM}"
-export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go1.4"
-export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export CC_FOR_TARGET = "${CC}"
-export CXX_FOR_TARGET = "${CXX}"
-
-do_configure[noexec] = "1"
-
-do_compile_prepend_class-cross() {
- export CGO_ENABLED=0
-}
-
-do_compile() {
- export GOBIN="${B}/bin"
- export CC="${@d.getVar('BUILD_CC', True).strip()}"
- rm -rf ${GOBIN} ${B}/pkg
- mkdir ${GOBIN}
-
- export TMPDIR=${WORKDIR}/build-tmp
- mkdir -p ${WORKDIR}/build-tmp
-
- cd src
- ./make.bash --host-only
- # Ensure cgo.a is built with the target toolchain
- export GOBIN="${B}/target/bin"
- rm -rf ${GOBIN}
- mkdir -p ${GOBIN}
- GO_FLAGS="-a" ./make.bash
-}
-
-do_install_class-target() {
- install -d ${D}${libdir}/go
- cp -a ${B}/pkg ${D}${libdir}/go/
- install -d ${D}${libdir}/go/src
- (cd ${S}/src; for d in *; do \
- [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
- done)
- install -d ${D}${bindir}
- if [ -d ${B}/bin/${GOOS}_${GOARCH} ]
- then
- install -m 0755 ${B}/bin/${GOOS}_${GOARCH}/* ${D}${bindir}
- else
- install -m 0755 ${B}/bin/* ${D}${bindir}
- fi
-}
-
-do_install_class-cross() {
- install -d ${D}${libdir}/go
- cp -a ${B}/pkg ${D}${libdir}/go/
- install -d ${D}${libdir}/go/src
- (cd ${S}/src; for d in *; do \
- [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
- done)
- install -d ${D}${bindir}
- for f in ${B}/bin/go*
- do
- install -m755 $f ${D}${bindir}
- done
-}
-do_package_qa[noexec] = "1"
-
-RDEPENDS_${PN} += "perl"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.6.bb
deleted file mode 100644
index 2f590338c..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.6.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require go.inc
-require go-${PV}.inc
-
-BBCLASSEXTEND = "cross"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.8.bb
deleted file mode 100644
index 091b1318a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.8.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require go-${PV}.inc
-require go.inc
-TUNE_CCARGS_remove = "-march=mips32r2"
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
new file mode 100644
index 000000000..c67e2cb05
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/go/go_1.9.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-target.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_aarch64.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_aarch64.patch
deleted file mode 100644
index f1788b62f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_aarch64.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-guile: add aarch64 recognition
-
-Assume little-endian.
-
-Upstream-Status: Pending
-
-Signed-off-by: joe.slater@windriver.com
-
---- a/module/system/base/target.scm
-+++ b/module/system/base/target.scm
-@@ -70,6 +70,8 @@
- ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
- "mips" "mips64"))
- (endianness big))
-+ ((string-match "^aarch64" cpu)
-+ (endianness little))
- ((string-match "^arm.*eb" cpu)
- (endianness big))
- ((string-match "^arm.*" cpu)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_endianness.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_endianness.patch
deleted file mode 100644
index ea4328b81..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/arm_endianness.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Support form ARM endianness
-
-Fixes Yocto bug# 2729
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-Index: guile-2.0.5/module/system/base/target.scm
-===================================================================
---- guile-2.0.5.orig/module/system/base/target.scm 2012-01-24 03:06:06.000000000 -0800
-+++ guile-2.0.5/module/system/base/target.scm 2012-07-12 13:05:44.372364103 -0700
-@@ -70,7 +70,9 @@
- ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
- "mips" "mips64"))
- (endianness big))
-- ((string-match "^arm.*el" cpu)
-+ ((string-match "^arm.*eb" cpu)
-+ (endianness big))
-+ ((string-match "^arm.*" cpu)
- (endianness little))
- (else
- (error "unknown CPU endianness" cpu)))))
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
deleted file mode 100644
index c7bf635ac..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Inappropriate [debian patch]
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-From e52bfcdbaca5dce498678d8f512381e3e39a4066 Mon Sep 17 00:00:00 2001
-From: Rob Browning <rlb@defaultvalue.org>
-Date: Sun, 18 Mar 2012 11:40:55 -0500
-Subject: Mark "Unused modules are removed" gc test as unresolved.
-
-As per discussion with upstream, mark this test as unresolved since it
-may produce false negatives, depending on the behavior/timing of the
-garbage collector.
----
- test-suite/tests/gc.test | 11 ++++++-----
- 1 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/test-suite/tests/gc.test b/test-suite/tests/gc.test
-index a969752..8c8e13e 100644
---- a/test-suite/tests/gc.test
-+++ b/test-suite/tests/gc.test
-@@ -84,11 +84,13 @@
- ;; one gc round. not sure why.
-
- (maybe-gc-flakiness
-- (= (let lp ((i 0))
-- (if (guard)
-- (lp (1+ i))
-- i))
-- total))))
-+ (or (= (let lp ((i 0))
-+ (if (guard)
-+ (lp (1+ i))
-+ i))
-+ total)
-+ (throw 'unresolved)))))
-+
-
- (pass-if "Lexical vars are collectable"
- (let ((l (compile
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
deleted file mode 100644
index d3faf3e01..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Inappropriate [debian patch]
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-From 848543091d55dddb54a85612155964506d712852 Mon Sep 17 00:00:00 2001
-From: Rob Browning <rlb@defaultvalue.org>
-Date: Sun, 18 Mar 2012 13:28:24 -0500
-Subject: Mark "mutex with owner not retained" threads test as unresolved.
-
-As per discussion with upstream, mark this test as unresolved since it
-may produce false negatives, depending on the behavior/timing of the
-garbage collector.
----
- test-suite/tests/threads.test | 6 ++++--
- 1 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/test-suite/tests/threads.test b/test-suite/tests/threads.test
-index 85a7c38..50899cb 100644
---- a/test-suite/tests/threads.test
-+++ b/test-suite/tests/threads.test
-@@ -414,8 +414,10 @@
-
- (gc) (gc)
- (let ((m (g)))
-- (and (mutex? m)
-- (eq? (mutex-owner m) (current-thread)))))))
-+ (or
-+ (and (mutex? m)
-+ (eq? (mutex-owner m) (current-thread)))
-+ (throw 'unresolved))))))
-
- ;;
- ;; mutex lock levels
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch
deleted file mode 100644
index 5597bb21f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Pending
-
-This fixes sed issue when prefix has / in it, like /usr/local
-
-autoreconf error avoided:
-| sed: -e expression #1, char 9: unknown option to `s'
-| configure.ac:39: error: AC_INIT should be called with package and version arguments
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/01
-
-Index: guile-2.0.5/build-aux/git-version-gen
-===================================================================
---- guile-2.0.5.orig/build-aux/git-version-gen
-+++ guile-2.0.5/build-aux/git-version-gen
-@@ -187,7 +187,7 @@ else
- v=UNKNOWN
- fi
-
--v=`echo "$v" |sed "s/^$prefix//"`
-+v=`echo "$v" |sed "s#^$prefix##"`
-
- # Test whether to append the "-dirty" suffix only if the version
- # string we're using came from git. I.e., skip the test if it's "UNKNOWN"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
deleted file mode 100644
index 290b9d447..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 9c4e120a7a87db34d22a50883a5a525170b480d7 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 6 Jan 2015 23:10:51 -0800
-Subject: [PATCH] libguile/Makefile.am: install-data-hook -> install-exec-hook
-
-It may install such a file:
-/usr/lib64/libguile-2.0*-gdb.scm
-
-This is because when there is no file in the directory:
-for f in libguile-2.0*; do
- [snip]
-done
-
-The f would be libguile-2.0* itself, use install-exec-hook will fix the
-problem since it depends on install-libLTLIBRARIES.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- libguile/Makefile.am | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/libguile/Makefile.am b/libguile/Makefile.am
-index 5decd99..52645b7 100644
---- a/libguile/Makefile.am
-+++ b/libguile/Makefile.am
-@@ -446,10 +446,8 @@ EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \
- ## delete guile-snarf.awk from the installation bindir, in case it's
- ## lingering there due to an earlier guile version not having been
- ## wiped out.
--install-exec-hook:
-+install-exec-hook: libguile-2.0-gdb.scm
- rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
--
--install-data-hook: libguile-2.0-gdb.scm
- @$(MKDIR_P) $(DESTDIR)$(libdir)
- ## We want to install libguile-2.0-gdb.scm as SOMETHING-gdb.scm.
- ## SOMETHING is the full name of the final library. We want to ignore
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
deleted file mode 100644
index da69b5fd7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Inappropriate [opensuse patch]
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Index: guile-2.0.3/libguile/hash.c
-===================================================================
---- guile-2.0.3.orig/libguile/hash.c 2011-07-06 15:49:59.000000000 -0700
-+++ guile-2.0.3/libguile/hash.c 2012-01-13 21:49:43.332844884 -0800
-@@ -270,7 +270,7 @@ scm_hasher(SCM obj, unsigned long n, siz
- unsigned long
- scm_ihashq (SCM obj, unsigned long n)
- {
-- return (SCM_UNPACK (obj) >> 1) % n;
-+ return ((unsigned long) SCM_UNPACK (obj) >> 1) % n;
- }
-
-
-@@ -306,7 +306,7 @@ scm_ihashv (SCM obj, unsigned long n)
- if (SCM_NUMP(obj))
- return (unsigned long) scm_hasher(obj, n, 10);
- else
-- return SCM_UNPACK (obj) % n;
-+ return (unsigned long) SCM_UNPACK (obj) % n;
- }
-
-
-Index: guile-2.0.3/libguile/struct.c
-===================================================================
---- guile-2.0.3.orig/libguile/struct.c 2011-07-06 15:50:00.000000000 -0700
-+++ guile-2.0.3/libguile/struct.c 2012-01-13 21:49:43.332844884 -0800
-@@ -942,7 +942,7 @@ scm_struct_ihashq (SCM obj, unsigned lon
- {
- /* The length of the hash table should be a relative prime it's not
- necessary to shift down the address. */
-- return SCM_UNPACK (obj) % n;
-+ return (unsigned long) SCM_UNPACK (obj) % n;
- }
-
- SCM_DEFINE (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0,
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
deleted file mode 100644
index 6c348384a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-libguile/vm-i-system.c: workaround ice ssa corruption while compiling with option -g -O
-
-While compiling with option -g -O, there was a ssa corruption:
-..
-Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE.
-sp_48(ab) and sp_3476(ab)
-guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine':
-guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption
- #define VM_NAME vm_debug_engine
- ^
-guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME'
- VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
- ^
-Please submit a full bug report,
-with preprocessed source if appropriate.
-See <http://gcc.gnu.org/bugs.html> for instructions.
-...
-
-Tweak libguile/vm-i-system.c to add boundary value check to workaround it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- libguile/vm-i-system.c | 20 ++++++++++++++++----
- 1 file changed, 16 insertions(+), 4 deletions(-)
-
-diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
---- a/libguile/vm-i-system.c
-+++ b/libguile/vm-i-system.c
-@@ -625,10 +625,22 @@ VM_DEFINE_INSTRUCTION (47, bind_optionals_shuffle, "bind-optionals/shuffle", 6,
- /* now shuffle up, from walk to ntotal */
- {
- scm_t_ptrdiff nshuf = sp - walk + 1, i;
-- sp = (fp - 1) + ntotal + nshuf;
-- CHECK_OVERFLOW ();
-- for (i = 0; i < nshuf; i++)
-- sp[-i] = walk[nshuf-i-1];
-+ /* check the value of nshuf to workaround ice ssa corruption */
-+ /* while compiling with -O -g */
-+ if (nshuf > 0)
-+ {
-+ sp = (fp - 1) + ntotal + nshuf;
-+ CHECK_OVERFLOW ();
-+ for (i = 0; i < nshuf; i++)
-+ sp[-i] = walk[nshuf-i-1];
-+ }
-+ else
-+ {
-+ sp = (fp - 1) + ntotal + nshuf;
-+ CHECK_OVERFLOW ();
-+ for (i = 0; i < nshuf; i++)
-+ sp[-i] = walk[nshuf-i-1];
-+ }
- }
- /* and fill optionals & keyword args with SCM_UNDEFINED */
- while (walk <= (fp - 1) + ntotal)
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.14.bb b/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.14.bb
deleted file mode 100644
index 7a01d0ffc..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.14.bb
+++ /dev/null
@@ -1,125 +0,0 @@
-SUMMARY = "Guile is the GNU Ubiquitous Intelligent Language for Extensions"
-DESCRIPTION = "Guile is the GNU Ubiquitous Intelligent Language for Extensions,\
- the official extension language for the GNU operating system.\
- Guile is a library designed to help programmers create flexible applications.\
- Using Guile in an application allows the application's functionality to be\
- extended by users or other programmers with plug-ins, modules, or scripts.\
- Guile provides what might be described as 'practical software freedom,'\
- making it possible for users to customize an application to meet their\
- needs without digging into the application's internals."
-
-HOMEPAGE = "http://www.gnu.org/software/guile/"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
- file://debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch \
- file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \
- file://opensuse/guile-64bit.patch \
- file://guile_2.0.6_fix_sed_error.patch \
- file://arm_endianness.patch \
- file://arm_aarch64.patch \
- file://workaround-ice-ssa-corruption.patch \
- file://libguile-Makefile.am-hook.patch \
- "
-
-SRC_URI[md5sum] = "c64977c775effd19393364b3018fd8cd"
-SRC_URI[sha256sum] = "e8442566256e1be14e51fc18839cd799b966bc5b16c6a1d7a7c35155a8619d82"
-
-inherit autotools gettext pkgconfig texinfo
-BBCLASSEXTEND = "native"
-
-# Fix "Argument list too long" error when len(TMPDIR) = 410
-acpaths = "-I ./m4"
-
-DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline"
-# add guile-native only to the target recipe's DEPENDS
-DEPENDS_append_class-target = " guile-native libatomic-ops"
-
-# The comment of the script guile-config said it has been deprecated but we should
-# at least add the required dependency to make it work since we still provide the script.
-RDEPENDS_${PN} = "pkgconfig"
-
-RDEPENDS_${PN}_append_libc-glibc_class-target = " glibc-gconv-iso8859-1"
-
-EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix --without-libreadline-prefix', ''][bb.data.inherits_class('native',d)]}"
-
-EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR} \
- --with-libgmp-prefix=${STAGING_LIBDIR} \
- --with-libltdl-prefix=${STAGING_LIBDIR}"
-EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no "
-
-CFLAGS_append_libc-musl = " -DHAVE_GC_SET_FINALIZER_NOTIFIER \
- -DHAVE_GC_GET_HEAP_USAGE_SAFE \
- -DHAVE_GC_GET_FREE_SPACE_DIVISOR \
- -DHAVE_GC_SET_FINALIZE_ON_DEMAND \
- "
-
-do_configure_prepend() {
- mkdir -p po
-}
-
-export GUILE_FOR_BUILD="${BUILD_SYS}-guile"
-
-do_install_append_class-native() {
- install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile
-
- create_wrapper ${D}/${bindir}/guile \
- GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
- GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
- create_wrapper ${D}${bindir}/${HOST_SYS}-guile \
- GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
- GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
-}
-
-do_install_append_class-target() {
- # cleanup buildpaths in scripts
- sed -i -e 's:${STAGING_DIR_NATIVE}::' ${D}${bindir}/guile-config
- sed -i -e 's:${STAGING_DIR_HOST}::' ${D}${bindir}/guile-snarf
-
- sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc
-}
-
-do_install_append_libc-musl() {
- rm -f ${D}${libdir}/charset.alias
-}
-
-SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
-
-guile_cross_config() {
- # this is only for target recipe
- if [ "${PN}" = "guile" ]
- then
- # Create guile-config returning target values instead of native values
- install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
- printf '#!%s \\\n--no-auto-compile -e main -s\n!#\n(define %%guile-build-info %s(\n' $(which ${BUILD_SYS}-guile) "'" \
- > ${B}/guile-config.cross
- sed -n -e 's:^[ \t]*{[ \t]*": (:' \
- -e 's:",[ \t]*": . ":' \
- -e 's:" *}, *\\:"):' \
- -e 's:^.*cachedir.*$::' \
- -e '/^ (/p' \
- < ${B}/libguile/libpath.h >> ${B}/guile-config.cross
- echo '))' >> ${B}/guile-config.cross
- cat ${B}/meta/guile-config >> ${B}/guile-config.cross
- install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
- fi
-}
-
-# Guile needs the compiled files to be newer than the source, and it won't
-# auto-compile into the prefix even if it can write there, so touch them here as
-# sysroot is managed.
-SSTATEPOSTINSTFUNCS += "guile_sstate_postinst"
-GUILESSTATEDIR = "${COMPONENTS_DIR}/${TUNE_PKGARCH}/${PN}/${libdir}/guile/2.0/ccache"
-GUILESSTATEDIR_class-native = "${COMPONENTS_DIR}/${BUILD_ARCH}/${PN}/${libdir_native}/guile/2.0/ccache"
-guile_sstate_postinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- find ${GUILESSTATEDIR} -type f | xargs touch
- fi
-}
-
-# http://errors.yoctoproject.org/Errors/Details/20491/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
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
index 4d255423e..c01725229 100644
--- 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
@@ -1,4 +1,5 @@
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"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb
index 551bdf061..ecff2faf2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb
@@ -16,7 +16,7 @@ UPSTREAM_CHECK_URI = "https://launchpad.net/intltool/trunk/"
DEPENDS = "libxml-parser-perl-native"
RDEPENDS_${PN} = "gettext-dev libxml-parser-perl"
-DEPENDS_class-native = "libxml-parser-perl-native"
+DEPENDS_class-native = "libxml-parser-perl-native gettext-native"
inherit autotools pkgconfig perlnative
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
index df3b6002a..537be5e6d 100644
--- 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
@@ -1,14 +1,11 @@
-From 9522ac8e5d5b20a472f3ffc356d388d36f7f582c Mon Sep 17 00:00:00 2001
+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.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
---
-Upstream-Status: Backport [https://github.com/json-c/json-c/commit/014924ba899f659917bb64392bbff7d3c803afc2]
-Signed-off-by: André Draszik <adraszik@tycoint.com>
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
json_object.c | 1 +
json_tokener.c | 1 +
@@ -28,10 +25,10 @@ index 6cc73bc..77e8b21 100644
return 0;
}
diff --git a/json_tokener.c b/json_tokener.c
-index 7fa32ae..b32d657 100644
+index 9a76293..ae7b1ae 100644
--- a/json_tokener.c
+++ b/json_tokener.c
-@@ -306,6 +306,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
+@@ -305,6 +305,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
tok->err = json_tokener_error_parse_unexpected;
goto out;
}
@@ -73,5 +70,5 @@ index 712c387..74e3b0f 100644
break;
case 0 : return c;
--
-2.14.1
+2.12.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch
deleted file mode 100644
index bfe9d7231..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 93582ad85ef48c18ac12f00a9a9e124989b1fcab Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Fri, 1 May 2015 12:52:18 +0200
-Subject: [PATCH] Link against libm when needed
-
-In certain C libraries (e.g uClibc), isnan() and related functions are
-implemented in libm, so json-c needs to link against it. This commit
-therefore adds an AC_TRY_LINK() test to check whether a program
-calling isnan() can be properly linked with no special flags. If not,
-we assume linking against libm is needed.
-
-The json-c.pc.in file is also adjusted so that in the case of static
-linking against json-c, -lm is also used.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
-Upstream-Status: Backport
-
- configure.ac | 4 ++++
- json-c.pc.in | 3 ++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index c50f81b..30e7174 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -50,6 +50,10 @@ AC_CHECK_DECLS([isinf], [], [], [[#include <math.h>]])
- AC_CHECK_DECLS([_isnan], [], [], [[#include <float.h>]])
- AC_CHECK_DECLS([_finite], [], [], [[#include <float.h>]])
-
-+if test "$ac_cv_have_decl_isnan" = "yes" ; then
-+ AC_TRY_LINK([#include <math.h>], [float f = 0.0; return isnan(f)], [], [LIBS="$LIBS -lm"])
-+fi
-+
- #check if .section.gnu.warning accepts long strings (for __warn_references)
- AC_LANG_PUSH([C])
-
-diff --git a/json-c.pc.in b/json-c.pc.in
-index 037739d..05bfbc8 100644
---- a/json-c.pc.in
-+++ b/json-c.pc.in
-@@ -6,6 +6,7 @@ includedir=@includedir@
- Name: json-c
- Description: JSON implementation in C
- Version: @VERSION@
--Requires:
-+Requires:
-+Libs.private: @LIBS@
- Libs: -L${libdir} -ljson-c
- Cflags: -I${includedir}/json-c
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch
deleted file mode 100644
index d29d9118d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 9be71700eb580c815688584a64621a38867c3fdd Mon Sep 17 00:00:00 2001
-From: James Myatt <james.myatt@tessella.com>
-Date: Thu, 5 Feb 2015 15:57:14 +0000
-Subject: [PATCH] json_tokener requires INF and NAN
-
----
-Upstream-Status: Backport
-
- json_tokener.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-Index: json-c-0.12/json_tokener.c
-===================================================================
---- json-c-0.12.orig/json_tokener.c
-+++ json-c-0.12/json_tokener.c
-@@ -16,6 +16,7 @@
- #include "config.h"
-
- #include <math.h>
-+#include "math_compat.h"
- #include <stdio.h>
- #include <stdlib.h>
- #include <stddef.h>
-@@ -352,12 +353,10 @@ struct json_object* json_tokener_parse_e
-
- case json_tokener_state_inf: /* aka starts with 'i' */
- {
-- int size;
-- int size_inf;
-+ size_t size_inf;
- int is_negative = 0;
-
- printbuf_memappend_fast(tok->pb, &c, 1);
-- size = json_min(tok->st_pos+1, json_null_str_len);
- size_inf = json_min(tok->st_pos+1, json_inf_str_len);
- char *infbuf = tok->pb->buf;
- if (*infbuf == '-')
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb
index 072c092c0..401cf1320 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.1.bb
@@ -5,26 +5,25 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
- file://0001-json_tokener-requires-INF-and-NAN.patch \
- file://0001-Link-against-libm-when-needed.patch \
file://0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch \
- "
-
-SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491"
-SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f"
+ "
+SRC_URI[md5sum] = "55f7853f7d8cf664554ce3fa71bf1c7d"
+SRC_URI[sha256sum] = "2a136451a7932d80b7d197b10441e26e39428d67b1443ec43bbba824705e1123"
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"
-RECIPE_UPSTREAM_DATE = "Apr 11, 2014"
-CHECK_DATE = "Dec 04, 2015"
+RECIPE_UPSTREAM_VERSION = "0.12.1"
+RECIPE_UPSTREAM_DATE = "Jun 07, 2016"
+CHECK_DATE = "Apr 19, 2017"
RPROVIDES_${PN} = "libjson"
inherit autotools
+EXTRA_OECONF = "--enable-rdrand"
+
do_configure_prepend() {
# Clean up autoconf cruft that should not be in the tarball
rm -f ${S}/config.status
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
deleted file mode 100644
index 4ca0e4da3..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "Linux kernel style configuration framework for other projects"
-DESCRIPTION = "The kconfig-frontends project aims at centralising \
-the effort of keeping an up-to-date, out-of-tree, packaging of the \
-kconfig infrastructure, ready for use by third-party projects. \
-The kconfig-frontends package provides the kconfig parser, as well as all \
-the frontends"
-HOMEPAGE = "http://ymorin.is-a-geek.org/projects/kconfig-frontends"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=9b8cf60ff39767ff04b671fca8302408"
-SECTION = "devel"
-DEPENDS += "ncurses flex bison gperf-native"
-RDEPENDS_${PN} += "python bash"
-SRC_URI = "git://ymorin.is-a-geek.org/kconfig-frontends"
-
-SRCREV = "75d35b172fc0f7b6620dd659af41f2ce04edc4e6"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig
-do_configure_prepend () {
- mkdir -p ${S}/scripts/.autostuff/m4
-}
-
-do_install_append() {
- ln -s kconfig-conf ${D}${bindir}/conf
- ln -s kconfig-mconf ${D}${bindir}/mconf
-}
-
-EXTRA_OECONF += "--disable-gconf --disable-qconf"
-
-# Some packages have the version preceeding the .so instead properly
-# versioned .so.<version>, so we need to reorder and repackage.
-SOLIBS = "-${@d.getVar('PV')[:-2]}.so"
-FILES_SOLIBSDEV = "${libdir}/libkconfig-parser.so"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch b/import-layers/yocto-poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
index ec1fdc409..dc3d97635 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
@@ -3,7 +3,7 @@ From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:26:00 +0200
Subject: [PATCH 2/2] Set library installation path correctly
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libcomps/pull/32]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
libcomps/src/CMakeLists.txt | 2 +-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
index 73acda6af..791a32e74 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
@@ -7,7 +7,7 @@ Subject: [PATCH 1/4] FindGtkDoc.cmake: drop the requirement for
For some reason cmake is not able to find it when building in openembedded,
and it's bundled with the source code anyway.
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
cmake/modules/FindGtkDoc.cmake | 2 +-
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 954add6e7..280edb7a6 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,28 +1,29 @@
-From 5958b151a4dbb89114e90c971a34b74f873b7beb Mon Sep 17 00:00:00 2001
+From 3012a93745223751cc979e3770207a09a075bec6 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] Get parameters for both libsolv and libsolvext (libdnf is
+Subject: [PATCH 5/5] Get parameters for both libsolv and libsolvext (libdnf is
using both)
-Upstream-Status: Pending [depends on whether https://github.com/openSUSE/libsolv/pull/177 is accepted]
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
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 b531da1..e512da0 100644
+index 8b2ab9a..e2d33d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -28,7 +28,7 @@ find_package (PkgConfig REQUIRED)
+@@ -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)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
-PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
- pkg_check_modules (CHECK REQUIRED check)
- pkg_check_modules (REPO REQUIRED librepo)
+ if (ENABLE_RHSM_SUPPORT)
+ pkg_check_modules (RHSM REQUIRED librhsm)
--
2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
index 3d772a5f8..7eecc3d05 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
@@ -3,7 +3,7 @@ From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:17:19 +0200
Subject: [PATCH 2/4] Prefix sysroot path to introspection tools path.
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
libdnf/CMakeLists.txt | 4 ++--
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
index d7e59d833..81264094e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
@@ -3,7 +3,7 @@ From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:20:01 +0200
Subject: [PATCH 3/4] Set the library installation directory correctly.
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
CMakeLists.txt | 4 +++-
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 931959b5f..1ea931089 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,29 +1,30 @@
-From 6d2718b925453f9a6915001f489606eb8e4086c8 Mon Sep 17 00:00:00 2001
+From 55cbe6f40fe0836385e1a7241ec811cbe99e5840 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/4] Set libsolv variables with pkg-config (cmake's own module
+Subject: [PATCH 4/5] Set libsolv variables with pkg-config (cmake's own module
doesn't work properly).
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/312]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8edb627..b531da1 100644
+index a75df04..8b2ab9a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -28,7 +28,8 @@ find_package (PkgConfig REQUIRED)
+@@ -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)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
-find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext)
+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
+set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
- pkg_check_modules (CHECK REQUIRED check)
- pkg_check_modules (REPO REQUIRED librepo)
- FIND_PROGRAM (VALGRIND_PROGRAM NAMES valgrind PATH /usr/bin /usr/local/bin)
+ if (ENABLE_RHSM_SUPPORT)
+ pkg_check_modules (RHSM REQUIRED librhsm)
+ include_directories (${RHSM_INCLUDE_DIRS})
--
2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb
index ef28611f8..01d9346d9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libdnf/libdnf_0.9.3.bb
@@ -10,8 +10,7 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf \
file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
"
-PV = "0.2.3+git${SRCPV}"
-SRCREV = "367545629cc01a8e622890d89bd13d062ce60d7b"
+SRCREV = "1b19950e82d88eec28d01b4e7c1da712c941201d"
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
index 01fea4046..08a58f175 100644
--- 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
@@ -3,7 +3,7 @@ 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: Pending
+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 ++-
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
index 0d2fae434..89ca60e81 100644
--- 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
@@ -3,7 +3,7 @@ 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: Pending
+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 +-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
index 6665b316c..f7d7ab3a2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
@@ -4,7 +4,7 @@ Date: Fri, 30 Dec 2016 18:23:27 +0200
Subject: [PATCH 4/4] Set gpgme variables with pkg-config, not with cmake
module (which doesn't work properly)
-Upstream-Status: Pending
+Upstream-Status: Inappropriate [gpgme upstream does not have pkg-config support and is not interested in it]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
CMakeLists.txt | 3 ++-
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
new file mode 100644
index 000000000..b0c7d1ca3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch
@@ -0,0 +1,40 @@
+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_git.bb
index 2f194f143..3238b14fa 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/librepo/librepo_git.bb
@@ -7,6 +7,7 @@ SRC_URI = "git://github.com/rpm-software-management/librepo.git \
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}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
index b2239fbad..fcbce7286 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
@@ -4,6 +4,8 @@ hardcoding paths.
RP 2015/2/3
+Upstream-Status: Inappropriate
+
Index: libtool-2.4.5/libtoolize.in
===================================================================
--- libtool-2.4.5.orig/libtoolize.in
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index 06abb0558..b02620b4b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -15,6 +15,7 @@ ACLOCALEXTRAPATH_class-target = ""
do_install_append () {
sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
+ -e "s@${DEBUG_PREFIX_MAP}@@g" \
-e 's@${STAGING_DIR_HOST}@@g' \
-e 's@${STAGING_DIR_NATIVE}@@g' \
-e 's@^\(sys_lib_search_path_spec="\).*@\1${libdir} ${base_libdir}"@' \
@@ -22,5 +23,6 @@ do_install_append () {
-e 's@^\(compiler_lib_search_path="\).*@\1${libdir} ${base_libdir}"@' \
-e 's@^\(predep_objects="\).*@\1"@' \
-e 's@^\(postdep_objects="\).*@\1"@' \
+ -e "s@${HOSTTOOLS_DIR}/@@g" \
-i ${D}${bindir}/libtool
}
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
new file mode 100644
index 000000000..e25179925
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -0,0 +1,93 @@
+From 28293e48cf1a52004c6a78de448718441f9e05f9 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
+ are macros
+
+musl defines some functions as macros and not inline functions
+if this is the case then make sure to undefine them
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ include/llvm/Analysis/TargetLibraryInfo.def | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def
+index 9cbe917c146..aff8419cf54 100644
+--- a/include/llvm/Analysis/TargetLibraryInfo.def
++++ b/include/llvm/Analysis/TargetLibraryInfo.def
+@@ -656,6 +656,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
+ TLI_DEFINE_ENUM_INTERNAL(fopen)
+ TLI_DEFINE_STRING_INTERNAL("fopen")
+ /// FILE *fopen64(const char *filename, const char *opentype)
++#ifdef fopen64
++#undef fopen64
++#endif
+ 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")
+ /// int fseeko(FILE *stream, off_t offset, int whence);
+ TLI_DEFINE_ENUM_INTERNAL(fseeko)
+ TLI_DEFINE_STRING_INTERNAL("fseeko")
++#ifdef fseeko64
++#undef fseeko64
++#endif
+ /// 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")
+ TLI_DEFINE_ENUM_INTERNAL(fstat)
+ TLI_DEFINE_STRING_INTERNAL("fstat")
+ /// int fstat64(int filedes, struct stat64 *buf)
++#ifdef fstat64
++#undef fstat64
++#endif
+ 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")
+ TLI_DEFINE_ENUM_INTERNAL(ftello)
+ TLI_DEFINE_STRING_INTERNAL("ftello")
+ /// off64_t ftello64(FILE *stream)
++#ifdef ftello64
++#undef ftello64
++#endif
+ TLI_DEFINE_ENUM_INTERNAL(ftello64)
+ TLI_DEFINE_STRING_INTERNAL("ftello64")
+ /// int ftrylockfile(FILE *file);
+@@ -836,6 +848,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
+ TLI_DEFINE_ENUM_INTERNAL(lstat)
+ TLI_DEFINE_STRING_INTERNAL("lstat")
+ /// int lstat64(const char *path, struct stat64 *buf);
++#ifdef lstat64
++#undef lstat64
++#endif
+ TLI_DEFINE_ENUM_INTERNAL(lstat64)
+ TLI_DEFINE_STRING_INTERNAL("lstat64")
+ /// void *malloc(size_t size);
+@@ -1055,6 +1070,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
+ TLI_DEFINE_ENUM_INTERNAL(stat)
+ TLI_DEFINE_STRING_INTERNAL("stat")
+ /// int stat64(const char *path, struct stat64 *buf);
++#ifdef stat64
++#undef stat64
++#endif
+ 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")
+ TLI_DEFINE_ENUM_INTERNAL(tmpfile)
+ TLI_DEFINE_STRING_INTERNAL("tmpfile")
+ /// FILE *tmpfile64(void)
++#ifdef tmpfile64
++#undef tmpfile64
++#endif
+ TLI_DEFINE_ENUM_INTERNAL(tmpfile64)
+ TLI_DEFINE_STRING_INTERNAL("tmpfile64")
+ /// int toascii(int c);
+--
+2.13.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
new file mode 100644
index 000000000..832bd729e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch
@@ -0,0 +1,39 @@
+From d776487bac17650704614248d19d1e6b35775001 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
+
+When using a native llvm-config from inside a sysroot, we need llvm-config to
+return the libraries, include directories, etc. from inside the sysroot rather
+than from the native sysroot. Thus provide an env override for calling
+llvm-config from a target sysroot.
+
+Signed-off-by: Martin Kelly <mkelly@xevo.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ tools/llvm-config/llvm-config.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 08b096afb05..d8d7742744e 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -225,6 +225,13 @@ Typical components:\n\
+
+ /// \brief Compute the path to the main executable.
+ std::string GetExecutablePath(const char *Argv0) {
++ // Hack for Yocto: we need to override the root path when we are using
++ // llvm-config from within a target sysroot.
++ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH");
++ if (Sysroot != nullptr) {
++ return Sysroot;
++ }
++
+ // This just needs to be some symbol in the binary; C++ doesn't
+ // allow taking the address of ::main however.
+ void *P = (void *)(intptr_t)GetExecutablePath;
+--
+2.13.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
new file mode 100644
index 000000000..f06fa49ae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/llvm/llvm_git.bb
@@ -0,0 +1,185 @@
+# Copyright (C) 2017 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "The LLVM Compiler Infrastructure"
+HOMEPAGE = "http://llvm.org"
+LICENSE = "NCSA"
+SECTION = "devel"
+
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=e825e017edc35cfd58e26116e5251771"
+
+DEPENDS = "libffi libxml2-native zlib ninja-native llvm-native"
+
+RDEPENDS_${PN}_append_class-target = " ncurses-terminfo"
+
+inherit perlnative pythonnative cmake pkgconfig
+
+PROVIDES += "llvm${PV}"
+
+LLVM_RELEASE = "${PV}"
+LLVM_DIR = "llvm${LLVM_RELEASE}"
+
+SRCREV = "9a5c333388cbb54a0ce3a67c4f539f5e590a089b"
+PV = "5.0"
+PATCH_VERSION = "0"
+SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=release_50;protocol=http \
+ file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
+ file://0002-llvm-allow-env-override-of-exe-path.patch \
+ "
+UPSTREAM_VERSION_UNKNOWN = "1"
+S = "${WORKDIR}/git"
+
+LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
+def get_llvm_arch(bb, d, arch_var):
+ import re
+ a = d.getVar(arch_var)
+ if re.match('(i.86|athlon|x86.64)$', a): return 'X86'
+ elif re.match('arm$', a): return 'ARM'
+ elif re.match('armeb$', a): return 'ARM'
+ elif re.match('aarch64$', a): return 'AArch64'
+ elif re.match('aarch64_be$', a): return 'AArch64'
+ elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips'
+ elif re.match('p(pc|owerpc)(|64)', a): return 'PowerPC'
+ else:
+ raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a)
+
+def get_llvm_target_arch(bb, d):
+ return get_llvm_arch(bb, d, 'TARGET_ARCH')
+#
+# Default to build all OE-Core supported target arches (user overridable).
+#
+LLVM_TARGETS ?= "${@get_llvm_target_arch(bb, d)}"
+LLVM_TARGETS_prepend_x86 = "AMDGPU;"
+LLVM_TARGETS_prepend_x86-64 = "AMDGPU;"
+
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv4t = "arm"
+
+EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
+ -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \
+ -DLLVM_ENABLE_PIC=ON \
+ -DLLVM_BINDINGS_LIST='' \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_ENABLE_FFI=ON \
+ -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
+ -DLLVM_OPTIMIZED_TABLEGEN=ON \
+ -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS}" \
+ -G Ninja"
+
+EXTRA_OECMAKE_append_class-target = "\
+ -DCMAKE_CROSSCOMPILING:BOOL=ON \
+ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
+ "
+
+EXTRA_OECMAKE_append_class-nativesdk = "\
+ -DCMAKE_CROSSCOMPILING:BOOL=ON \
+ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
+ "
+
+do_configure_prepend() {
+# Fix paths in llvm-config
+ sed -i "s|sys::path::parent_path(CurrentPath))\.str()|sys::path::parent_path(sys::path::parent_path(CurrentPath))).str()|g" ${S}/tools/llvm-config/llvm-config.cpp
+ sed -ri "s#/(bin|include|lib)(/?\")#/\1/${LLVM_DIR}\2#g" ${S}/tools/llvm-config/llvm-config.cpp
+ sed -ri "s#lib/${LLVM_DIR}#${baselib}/${LLVM_DIR}#g" ${S}/tools/llvm-config/llvm-config.cpp
+}
+
+do_compile() {
+ NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE}
+}
+
+do_compile_class-native() {
+ NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
+}
+
+do_install() {
+ NINJA_STATUS="[%p] " 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}
+ cp -r ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/
+
+ install -d ${D}${includedir}/${LLVM_DIR}
+ cp -r ${LLVM_INSTALL_DIR}${includedir}/* ${D}${includedir}/${LLVM_DIR}/
+
+ install -d ${D}${libdir}/${LLVM_DIR}
+
+ # The LLVM sources have "/lib" embedded and so we cannot completely rely on the ${libdir} variable
+ if [ -d ${LLVM_INSTALL_DIR}${libdir}/ ]; then
+ cp -r ${LLVM_INSTALL_DIR}${libdir}/* ${D}${libdir}/${LLVM_DIR}/
+ elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib ]; then
+ cp -r ${LLVM_INSTALL_DIR}${prefix}/lib/* ${D}${libdir}/${LLVM_DIR}/
+ elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib64 ]; then
+ cp -r ${LLVM_INSTALL_DIR}${prefix}/lib64/* ${D}${libdir}/${LLVM_DIR}/
+ fi
+
+ # Remove unnecessary cmake files
+ rm -rf ${D}${libdir}/${LLVM_DIR}/cmake
+
+ ln -s ${LLVM_DIR}/libLLVM-${PV}${SOLIBSDEV} ${D}${libdir}/libLLVM-${PV}${SOLIBSDEV}
+
+ # We'll have to delete the libLLVM.so due to multiple reasons...
+ rm -rf ${D}${libdir}/${LLVM_DIR}/libLLVM.so
+ rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so
+}
+do_install_class-native() {
+ install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
+ install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
+ install -D -m 0755 ${B}/lib/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so
+}
+
+PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello"
+ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY_${PN}-staticdev = "1"
+FILES_${PN} = ""
+FILES_${PN}-staticdev = ""
+FILES_${PN}-dbg = " \
+ ${bindir}/${LLVM_DIR}/.debug \
+ ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \
+ ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \
+ ${libdir}/${LLVM_DIR}/.debug/libLTO.so* \
+ ${libdir}/${LLVM_DIR}/.debug/llvm-config \
+ /usr/src/debug \
+"
+
+FILES_${PN}-dev = " \
+ ${bindir}/${LLVM_DIR} \
+ ${includedir}/${LLVM_DIR} \
+ ${libdir}/${LLVM_DIR}/llvm-config \
+"
+
+RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello"
+
+FILES_${PN}-bugpointpasses = "\
+ ${libdir}/${LLVM_DIR}/BugpointPasses.so \
+"
+FILES_${PN} += "\
+ ${libdir}/${LLVM_DIR}/libLTO.so.* \
+"
+
+FILES_${PN}-llvmhello = "\
+ ${libdir}/${LLVM_DIR}/LLVMHello.so \
+"
+
+PACKAGES_DYNAMIC = "^libllvm${LLVM_RELEASE}-.*$"
+NOAUTOPACKAGEDEBUG = "1"
+
+INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm-${LLVM_RELEASE}.${PATCH_VERSION} += "dev-so"
+INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm-${LLVM_RELEASE} += "dev-so"
+INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm += "dev-so"
+
+python llvm_populate_packages() {
+ libdir = bb.data.expand('${libdir}', d)
+ libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d)
+ split_dbg_packages = do_split_packages(d, libllvm_libdir+'/.debug', '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s-dbg', 'Split debug package for %s', allow_dirs=True)
+ split_packages = do_split_packages(d, libdir, '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s', 'Split package for %s', allow_dirs=True, allow_links=True, recursive=True)
+ split_staticdev_packages = do_split_packages(d, libllvm_libdir, '^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True)
+ if split_packages:
+ pn = d.getVar('PN')
+ d.appendVar('RDEPENDS_' + pn, ' '+' '.join(split_packages))
+ d.appendVar('RDEPENDS_' + pn + '-dbg', ' '+' '.join(split_dbg_packages))
+ d.appendVar('RDEPENDS_' + pn + '-staticdev', ' '+' '.join(split_staticdev_packages))
+}
+
+PACKAGESPLITFUNCS_prepend = "llvm_populate_packages "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc
index 4a83929f0..2002594e8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/m4/m4.inc
@@ -1,4 +1,5 @@
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."
@@ -6,5 +7,4 @@ GNU M4 also has built-in functions for including files, running shell commands,
inherit autotools texinfo
EXTRA_OEMAKE += "'infodir=${infodir}'"
-LDFLAGS_prepend_libc-uclibc = " -lrt "
SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz"
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
new file mode 100644
index 000000000..cb6faa8c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/convert.bin.c
@@ -0,0 +1,348 @@
+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_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
index 2bcc8d7bd..330fa7c9a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
@@ -17,21 +17,28 @@ SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
"
SRC_URI_append_class-native = " \
file://fix-makefile-to-find-libz.patch \
+ file://convert.bin.c \
"
CLEANBROKEN = "1"
S = "${WORKDIR}/git/util/mkelfImage"
-CFLAGS += "-fno-stack-protector"
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
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb
index b9c6c6f32..a16147657 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb
@@ -4,7 +4,6 @@ HOMEPAGE = "https://launchpad.net/mklibs"
SECTION = "devel"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64"
-DEPENDS = "python-native"
SRC_URI = "http://snapshot.debian.org/archive/debian/20161123T152011Z/pool/main/m/mklibs/mklibs_${PV}.tar.xz \
file://ac_init_fix.patch\
@@ -20,6 +19,6 @@ SRC_URI[sha256sum] = "6f0cf24ade13fff76e943c003413d85c3e497c984c95c1ecea1c9731ca
UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/m/mklibs/"
-inherit autotools gettext native pythonnative
+inherit autotools gettext native
S = "${WORKDIR}/mklibs"
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 7858819c3..50acdb1cc 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,11 +4,12 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
SRCBRANCH ?= "master"
-SRCREV = "2cb6695e8dec00d887bdd5309d1b57d836fcd214"
+SRCREV = "37c86e60c0442fef570b75cd81aeb1db4d0cbafd"
PV = "0.1"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH}"
+UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"
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 4fbc54f8f..48ba2ee07 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
@@ -5,7 +5,7 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
-inherit autotools pkgconfig
+inherit autotools pkgconfig update-alternatives
DEPENDS = "zlib lzo e2fsprogs util-linux"
@@ -30,6 +30,11 @@ PACKAGECONFIG[xattr] = ",,acl,"
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"
+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"
+
do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
new file mode 100644
index 000000000..01455f101
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
@@ -0,0 +1,23 @@
+Disabled reading host configs.
+
+Upstream-Status: Inappropriate [native]
+
+Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
+
+--- mtools-4.0.18/config.c.orig 2017-06-13 12:27:38.644000000 +0300
++++ mtools-4.0.18/config.c 2017-06-13 12:28:47.576000000 +0300
+@@ -701,14 +701,6 @@
+ memcpy(devices, const_devices,
+ nr_const_devices*sizeof(struct device));
+
+- (void) ((parse(CONF_FILE,1) |
+- parse(LOCAL_CONF_FILE,1) |
+- parse(SYS_CONF_FILE,1)) ||
+- (parse(OLD_CONF_FILE,1) |
+- parse(OLD_LOCAL_CONF_FILE,1)));
+- /* the old-name configuration files only get executed if none of the
+- * new-name config files were used */
+-
+ homedir = get_homedir();
+ if ( homedir ){
+ strncpy(conf_file, homedir, MAXPATHLEN );
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb
index b0efc9ecf..dcd32ed94 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb
@@ -33,13 +33,12 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
"
+SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch"
inherit autotools texinfo
EXTRA_OECONF = "--without-x"
-LDFLAGS_append_libc-uclibc = " -liconv "
-
BBCLASSEXTEND = "native nativesdk"
PACKAGECONFIG ??= ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb
index 3280b8458..bf18cd6d1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.13.01.bb
@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 "
-SRC_URI[md5sum] = "d15843c3fb7db39af80571ee27ec6fad"
-SRC_URI[sha256sum] = "00b0891c678c065446ca59bcee64719d0096d54d6886e6e472aeee2e170ae324"
+SRC_URI[md5sum] = "1f7d4662040d24351df7d6719ed4f97a"
+SRC_URI[sha256sum] = "08f97baf0a7f892128c6413cfa93b69dc5825fbbd06c70928aea028835d198fa"
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.7.2.bb
new file mode 100644
index 000000000..4d3b27230
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ninja/ninja_1.7.2.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Ninja is a small build system with a focus on speed."
+HOMEPAGE = "http://martine.github.com/ninja/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e"
+
+DEPENDS = "re2c-native ninja-native"
+
+SRCREV = "717b7b4a31db6027207588c0fb89c3ead384747b"
+
+SRC_URI = "git://github.com/martine/ninja.git;branch=release"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
+
+S = "${WORKDIR}/git"
+
+do_configure[noexec] = "1"
+
+do_compile_class-native() {
+ ./configure.py --bootstrap
+}
+
+do_compile() {
+ ./configure.py
+ ninja
+}
+
+do_install() {
+ install -D -m 0755 ${S}/ninja ${D}${bindir}/ninja
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch
new file mode 100644
index 000000000..c36ae2ffd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch
@@ -0,0 +1,112 @@
+From d42b23f4fb5d6bd58e92e995fe5befc76efbae0c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 27 Apr 2017 15:47:58 +0300
+Subject: [PATCH] Switch all scripts to use Python 3.x
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ makePackage | 2 +-
+ opkg-compare-indexes | 2 +-
+ opkg-graph-deps | 2 +-
+ opkg-list-fields | 2 +-
+ opkg-make-index | 2 +-
+ opkg-show-deps | 2 +-
+ opkg-unbuild | 2 +-
+ opkg-update-index | 2 +-
+ opkg.py | 2 +-
+ 9 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/makePackage b/makePackage
+index 4bdfc56..02124dd 100755
+--- a/makePackage
++++ b/makePackage
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+
+ # The general algorithm this program follows goes like this:
+ # Run tar to extract control from control.tar.gz from the package.
+diff --git a/opkg-compare-indexes b/opkg-compare-indexes
+index b60d20a..80c1263 100755
+--- a/opkg-compare-indexes
++++ b/opkg-compare-indexes
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-graph-deps b/opkg-graph-deps
+index 6653fd5..f1e376a 100755
+--- a/opkg-graph-deps
++++ b/opkg-graph-deps
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-list-fields b/opkg-list-fields
+index c14a90f..24f7955 100755
+--- a/opkg-list-fields
++++ b/opkg-list-fields
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-make-index b/opkg-make-index
+index 3f757f6..2988f9f 100755
+--- a/opkg-make-index
++++ b/opkg-make-index
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-show-deps b/opkg-show-deps
+index 153f21e..4e18b4f 100755
+--- a/opkg-show-deps
++++ b/opkg-show-deps
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-unbuild b/opkg-unbuild
+index 4f36bec..57642c9 100755
+--- a/opkg-unbuild
++++ b/opkg-unbuild
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+ from __future__ import print_function
+
+diff --git a/opkg-update-index b/opkg-update-index
+index 341c1c2..7bff8a1 100755
+--- a/opkg-update-index
++++ b/opkg-update-index
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import absolute_import
+
+ import sys, os
+diff --git a/opkg.py b/opkg.py
+index 2ecac8a..7e64de4 100644
+--- a/opkg.py
++++ b/opkg.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # Copyright (C) 2001 Alexander S. Guy <a7r@andern.org>
+ # Andern Research Labs
+ #
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
index 9deea0f5e..646cc8ff9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
@@ -4,21 +4,21 @@ SECTION = "base"
HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
+ file://opkg.py;beginline=2;endline=18;md5=63ce9e6bcc445181cd9e4baf4b4ccc35"
PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
-SRCREV = "1a708fd73d10c2b7677dd4cc4e017746ebbb9166"
-PV = "0.3.4+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/opkg-utils \
+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 \
"
SRC_URI_append_class-native = " file://tar_ignore_error.patch"
-S = "${WORKDIR}/git"
+SRC_URI[md5sum] = "a19e09c79bf1152aac62e8a120d679ff"
+SRC_URI[sha256sum] = "7f4b08912e26a3f4f6f423f3b4e7157a73b1f3a7483fc59b216d1a80b50b0c38"
TARGET_CC_ARCH += "${LDFLAGS}"
-PYTHONRDEPS = "python python-shell python-io python-math python-crypt python-logging python-fcntl python-subprocess python-pickle python-compression python-textutils python-stringold"
+# 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_class-native = ""
PACKAGECONFIG = "python update-alternatives"
@@ -30,6 +30,10 @@ do_install() {
if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
rm -f "${D}${bindir}/update-alternatives"
fi
+
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
+ grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm
+ fi
}
do_install_append_class-target() {
@@ -38,6 +42,10 @@ do_install_append_class-target() {
fi
}
+# These are empty and will pull python3-dev into images where it wouldn't
+# have been otherwise, so don't generate them.
+PACKAGES_remove = "${PN}-dev ${PN}-staticdev"
+
PACKAGES =+ "update-alternatives-opkg"
FILES_update-alternatives-opkg = "${bindir}/update-alternatives"
RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb
index 682142a5d..0c2dbc9e3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb
@@ -1,4 +1,5 @@
SUMMARY = "Architecture-dependent configuration for opkg"
+HOMEPAGE = "http://code.google.com/p/opkg/"
LICENSE = "MIT"
PACKAGE_ARCH = "${MACHINE_ARCH}"
PR = "r1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/opkg-configure.service b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/opkg-configure.service
index 8e74026ec..432c3ddc2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/opkg-configure.service
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/opkg-configure.service
@@ -8,7 +8,7 @@ Before=sysinit.target
Type=oneshot
EnvironmentFile=-@SYSCONFDIR@/default/postinst
ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/opkg configure > $LOGFILE 2>&1; else @BINDIR@/opkg configure; fi"
-ExecStartPost=@BASE_BINDIR@/systemctl disable opkg-configure.service
+ExecStartPost=@BASE_BINDIR@/systemctl --no-reload disable opkg-configure.service
StandardOutput=syslog
RemainAfterExit=No
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/status-conffile.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/status-conffile.patch
deleted file mode 100644
index 6fc405b2f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/status-conffile.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 086d5083dfe0102368cb7c8ce89b0c06b64ca773 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 10 Jan 2017 15:24:59 +0000
-Subject: [PATCH 1/2] opkg_cmd: only look at conffile status if we're going to
- output it
-
-The loop to compare the recorded conffile hash with their hash on disk is
-outputted at level INFO but the loop was executed at level NOTICE and higher.
-
-This means that if a conffile had been deleted the status operation would
-produce error messages for output it isn't displaying.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- libopkg/opkg_cmd.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
-index ba57c6a..37416fd 100644
---- a/libopkg/opkg_cmd.c
-+++ b/libopkg/opkg_cmd.c
-@@ -638,7 +638,7 @@ static int opkg_info_status_cmd(int argc, char **argv, int installed_only)
-
- pkg_formatted_info(stdout, pkg);
-
-- if (opkg_config->verbosity >= NOTICE) {
-+ if (opkg_config->verbosity >= INFO) {
- conffile_list_elt_t *iter;
- for (iter = nv_pair_list_first(&pkg->conffiles); iter;
- iter = nv_pair_list_next(&pkg->conffiles, iter)) {
---
-2.8.1
-
-From 225e30e0f9fa7cfeaa3f89e2713e5147ab371def Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 10 Jan 2017 15:28:47 +0000
-Subject: [PATCH 2/2] conffile: gracefully handle deleted conffiles in
- conffile_has_been_modified
-
-Handle conffiles that don't exist gracefully so that instead of showing an error
-message from file_md5sum_alloc() a notice that the file has been deleted is
-shown instead.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- libopkg/conffile.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libopkg/conffile.c b/libopkg/conffile.c
-index b2f2469..7b4b87b 100644
---- a/libopkg/conffile.c
-+++ b/libopkg/conffile.c
-@@ -51,6 +51,11 @@ int conffile_has_been_modified(conffile_t * conffile)
- }
-
- root_filename = root_filename_alloc(filename);
-+ if (!file_exists(root_filename)) {
-+ opkg_msg(INFO, "Conffile %s deleted\n", conffile->name);
-+ free(root_filename);
-+ return 1;
-+ }
-
- md5sum = file_md5sum_alloc(root_filename);
-
---
-2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb
index a21fde1cf..3e511b6bb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb
@@ -15,11 +15,10 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
file://opkg-configure.service \
file://opkg.conf \
file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
- file://status-conffile.patch \
"
-SRC_URI[md5sum] = "6c52a065499056a196e0b45a27e392de"
-SRC_URI[sha256sum] = "750b900b53b62a9b280b601a196f02da81091eda2f3478c509512aa5a1ec93be"
+SRC_URI[md5sum] = "d202d09ea0932943071b842626cab13c"
+SRC_URI[sha256sum] = "734bc21dea11262113fa86b928d09812618b3966f352350cf916a6ae0d343f32"
inherit autotools pkgconfig systemd
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.26.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb
index e47342f3f..303f991fd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.27.bb
@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
-SRC_URI[md5sum] = "8e9bef677bae289d3324d81c337a4507"
-SRC_URI[sha256sum] = "7d52fa80ef84988359c3434e1eea302d077a08987abdde6905678ebcad4fa649"
+SRC_URI[md5sum] = "5837dc20dacb5b668935bbded10cbb61"
+SRC_URI[sha256sum] = "51e53e58fc8158e5986a1f1a49a6d970c5b16493841cf7b9de2c2bde7ce36b93"
inherit autotools pkgconfig gtk-doc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/libtool-tag.patch b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/libtool-tag.patch
new file mode 100644
index 000000000..7f601afab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/libtool-tag.patch
@@ -0,0 +1,21 @@
+Repect LIBTOOLFLAGS
+
+This add a knob that can be controlled from env to set generic options
+for libtool
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: uuid-1.6.2/Makefile.in
+===================================================================
+--- uuid-1.6.2.orig/Makefile.in
++++ uuid-1.6.2/Makefile.in
+@@ -56,7 +56,7 @@ RM = rm -f
+ CP = cp
+ RMDIR = rmdir
+ SHTOOL = $(S)/shtool
+-LIBTOOL = @LIBTOOL@
++LIBTOOL = @LIBTOOL@ $(LIBTOOLFLAGS)
+ TRUE = true
+ POD2MAN = pod2man
+ PERL = @PERL@
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
index 85a1bcf5c..5d9ca790e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
@@ -27,6 +27,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/
file://uuid-nostrip.patch \
file://install-pc.patch \
file://ldflags.patch \
+ file://libtool-tag.patch \
"
SRC_URI[md5sum] = "5db0d43a9022a6ebbbc25337ae28942f"
SRC_URI[sha256sum] = "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0"
@@ -37,6 +38,7 @@ inherit autotools update-alternatives
EXTRA_OECONF = "--without-dce --without-cxx --without-perl --without-perl-compat --without-php --without-pgsql"
EXTRA_OECONF = "--includedir=${includedir}/ossp"
+EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
do_configure_prepend() {
# This package has a completely custom aclocal.m4, which should be acinclude.m4.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch
index a273688b9..0b45c39bd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/avoidholes.patch
@@ -31,7 +31,7 @@ was good, the implementation wasn't correct and they've been rewritten here.
RP
2017/3/7
-Upstream-Status: Pending
+Upstream-Status: Accepted
Index: patchelf-0.9/src/patchelf.cc
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch
new file mode 100644
index 000000000..f64cbed5c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch
@@ -0,0 +1,38 @@
+commit 1cc234fea5600190d872329aca60e2365cefc39e
+Author: Ed Bartosh <ed.bartosh@linux.intel.com>
+Date: Fri Jul 21 12:33:53 2017 +0300
+
+fix adjusting startPage
+
+startPage is adjusted unconditionally for all executables.
+This results in incorrect addresses assigned to INTERP and LOAD
+program headers, which breaks patched executable.
+
+Adjusting startPage variable only when startOffset > startPage
+should fix this.
+
+This change is related to the issue NixOS#10
+
+Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
+
+Github PR: https://github.com/NixOS/patchelf/pull/127
+
+Upstream-Status: Submitted
+
+diff --git a/src/patchelf.cc b/src/patchelf.cc
+index cbd36c0..e9d7ea5 100644
+--- a/src/patchelf.cc
++++ b/src/patchelf.cc
+@@ -720,10 +720,8 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
+ since DYN executables tend to start at virtual address 0, so
+ rewriteSectionsExecutable() won't work because it doesn't have
+ any virtual address space to grow downwards into. */
+- if (isExecutable) {
+- if (startOffset >= startPage) {
+- debug("shifting new PT_LOAD segment by %d bytes to work around a Linux kernel bug\n", startOffset - startPage);
+- }
++ if (isExecutable && startOffset > startPage) {
++ debug("shifting new PT_LOAD segment by %d bytes to work around a Linux kernel bug\n", startOffset - startPage);
+ startPage = startOffset;
+ }
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb
index 01f0e6213..d70303963 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb
@@ -3,6 +3,7 @@ SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
file://handle-read-only-files.patch \
file://Increase-maxSize-to-64MB.patch \
file://avoidholes.patch \
+ file://fix-adjusting-startPage.patch \
"
LICENSE = "GPLv3"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb
index 476fa6f07..9635a5e70 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.2.2.bb
@@ -7,9 +7,7 @@ HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz \
-"
-
+SRC_URI = "https://dev.gentoo.org/~vapier/dist/pax-utils-${PV}.tar.xz"
SRC_URI[md5sum] = "a580468318f0ff42edf4a8cd314cc942"
SRC_URI[sha256sum] = "7f4a7f8db6b4743adde7582fa48992ad01776796fcde030683732f56221337d9"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.71.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb
index 432803c7b..a399c10b5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.71.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/liburi-perl_1.72.bb
@@ -11,10 +11,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f"
DEPENDS += "perl"
-SRC_URI = "https://downloads.yoctoproject.org/mirror/sources/URI-${PV}.tar.gz"
+SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz"
-SRC_URI[md5sum] = "247c3da29a794f72730e01aa5a715daf"
-SRC_URI[sha256sum] = "9c8eca0d7f39e74bbc14706293e653b699238eeb1a7690cc9c136fb8c2644115"
+SRC_URI[md5sum] = "cd56d81ed429efaa97e7f3ff08851b48"
+SRC_URI[sha256sum] = "35f14431d4b300de4be1163b0b5332de2d7fbda4f05ff1ed198a8e9330d40a32"
S = "${WORKDIR}/URI-${PV}"
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 d9bbf713a..cc3a660f7 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
@@ -1,4 +1,5 @@
SUMMARY = "XML::Parser - A perl module for parsing XML documents"
+HOMEPAGE = "https://libexpat.github.io/"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://README;beginline=2;endline=6;md5=c8767d7516229f07b26e42d1cf8b51f1"
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 2c01976ca..047842704 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
@@ -2,6 +2,7 @@ DESCRIPTION = "libxml-perl is a collection of smaller Perl modules, scripts, and
documents for working with XML in Perl. libxml-perl software \
works in combination with XML::Parser, PerlSAX, XML::DOM, \
XML::Grove and others."
+HOMEPAGE = "http://search.cpan.org/dist/libxml-perl/"
SUMMARY = "Collection of Perl modules for working with XML"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
index 2243bb2c2..0cf2eebda 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.24.bb
@@ -7,13 +7,13 @@ where the original uses plain Perl or SAX parsers."
HOMEPAGE = "http://search.cpan.org/~markov/XML-LibXML-Simple-0.93/lib/XML/LibXML/Simple.pod"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=fa1187fceda00eee10b62961407ea7be"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=23477e18a0d04392cdf44ae70e49b495"
DEPENDS += "libxml-parser-perl"
SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz"
-SRC_URI[md5sum] = "0914abddfce749453ed89b54029f2643"
-SRC_URI[sha256sum] = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49"
+SRC_URI[md5sum] = "1cd2e8e3421160c42277523d5b2f4dd2"
+SRC_URI[sha256sum] = "9a14819fd17c75fbb90adcec0446ceab356cab0ccaff870f2e1659205dc2424f"
S = "${WORKDIR}/XML-Simple-${PV}"
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 e01d11fbe..6c56a7d70 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
@@ -32,6 +32,7 @@ do_configure () {
-Dcc="${CC}" \
-Dcflags="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
+ -Dlddlflags="${LDFLAGS} -shared" \
-Dcf_by="Open Embedded" \
-Dprefix=${prefix} \
-Dvendorprefix=${prefix} \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch
index 7391ac583..14a05d291 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/0001-Configure-Remove-fstack-protector-strong-for-native-.patch
@@ -10,7 +10,7 @@ be removed when all supported distros comes with GCC>=4.9.
[YOCTO #10338]
-Upstream-status: Inappropriate [configuration]
+Upstream-Status: Inappropriate [configuration]
[1] http://errors.yoctoproject.org/Errors/Details/109589/
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff
index a63b96831..c597701ca 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan-missing-site-dirs.diff
@@ -13,6 +13,7 @@ explicitly tell CPAN not to touch those with INSTALLDIRS=site.
Bug-Debian: http://bugs.debian.org/688842
Patch-Name: debian/cpan-missing-site-dirs.diff
+Upstream-Status: Pending
---
cpan/CPAN/lib/CPAN/FirstTime.pm | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff
index 6b5295045..572f14951 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/cpan_definstalldirs.diff
@@ -9,6 +9,7 @@ explicitly in Makefile.PL or Build.PL. This makes sense for the normal @INC
ordering, but not ours.
Patch-Name: debian/cpan_definstalldirs.diff
+Upstream-Status: Pending
---
cpan/CPAN/lib/CPAN/FirstTime.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff
index 280bf1170..0861650eb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/db_file_ver.diff
@@ -8,6 +8,7 @@ Bug-Debian: http://bugs.debian.org/340047
Package dependencies ensure the correct library is linked at run-time.
Patch-Name: debian/db_file_ver.diff
+Upstream-Status: Pending
---
cpan/DB_File/version.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff
index 601ee4c30..c2ac4a3bd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff
@@ -15,6 +15,7 @@ warnings will still be useful, so modify them slightly to point to the
separate packages instead.
Patch-Name: debian/deprecate-with-apt.diff
+Upstream-Status: Pending
---
lib/deprecate.pm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/doc_info.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/doc_info.diff
index fbea2ee22..4662ecdaa 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/doc_info.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/doc_info.diff
@@ -6,6 +6,7 @@ Subject: Replace generic man(1) instructions with Debian-specific information.
Indicate that the user needs to install the perl-doc package.
Patch-Name: debian/doc_info.diff
+Upstream-Status: Pending
---
pod/perl.pod | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff
index e074b20fd..b3bd58c1d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/enc2xs_inc.diff
@@ -11,6 +11,7 @@ Bug-Debian: http://bugs.debian.org/290336
issues with follow => 1 (see #603686 and [rt.cpan.org #64585])
Patch-Name: debian/enc2xs_inc.diff
+Upstream-Status: Pending
---
cpan/Encode/bin/enc2xs | 8 ++++----
t/porting/customized.t | 3 +++
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/errno_ver.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/errno_ver.diff
index 3d09229ed..a965fbeee 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/errno_ver.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/errno_ver.diff
@@ -11,7 +11,7 @@ processes embedding perl when upgrading to a newer version,
compatible, but built on a different machine.
Patch-Name: debian/errno_ver.diff
-
+Upstream-Status: Pending
---
ext/Errno/Errno_pm.PL | 5 -----
1 file changed, 5 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff
index adb4bd991..e023038f0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/extutils_set_libperl_path.diff
@@ -7,6 +7,7 @@ The Debian packaging moves libperl.a a couple of levels up from the
CORE directory to match other static libraries.
Patch-Name: debian/extutils_set_libperl_path.diff
+Upstream-Status: Pending
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +-
pp.c | 2 +-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fakeroot.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fakeroot.diff
index ec461cfe5..bdf34d185 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fakeroot.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fakeroot.diff
@@ -11,6 +11,7 @@ since fakeroot (which now sets LD_LIBRARY_PATH) is not used for the "build"
rule where the Makefile is created, but is for the clean/binary* targets.
Patch-Name: debian/fakeroot.diff
+Upstream-Status: Pending
---
Makefile.SH | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/find_html2text.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/find_html2text.diff
index d319e7518..082709140 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/find_html2text.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/find_html2text.diff
@@ -16,6 +16,7 @@ Please see the attached patch for a quick fix of this issue.
[Maintainer's note: html2text in Debian is not the same implementation
as the html2text.pl which is expected, but should provide similar
functionality].
+Upstream-Status: Pending
---
cpan/CPAN/lib/CPAN/Distribution.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff
index 61a92712e..f3d92583e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/document_makemaker_ccflags.diff
@@ -10,6 +10,7 @@ Compiling XS extensions without $Config{ccflags} can break the
binary interface on some platforms.
Patch-Name: fixes/document_makemaker_ccflags.diff
+Upstream-Status: Pending
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff
index 525f962c1..d9b36f6d2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/memoize_storable_nstore.diff
@@ -47,6 +47,7 @@ Bug-Debian: http://bugs.debian.org/587650
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=77790
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=77790
Patch-Name: fixes/memoize_storable_nstore.diff
+Upstream-Status: Pending
---
cpan/Memoize/Memoize/Storable.pm | 2 +-
cpan/Memoize/t/tie_storable.t | 24 ++++++++++++++++++++----
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff
index 3c31972c6..afcf7fb01 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/net_smtp_docs.diff
@@ -7,6 +7,7 @@ Bug-Debian: http://bugs.debian.org/100195
Bug: http://rt.cpan.org/Public/Bug/Display.html?id=36038
Patch-Name: fixes/net_smtp_docs.diff
+Upstream-Status: Pending
---
cpan/libnet/lib/Net/SMTP.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff
index b5564fdbc..9bdf41b47 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff
@@ -12,6 +12,7 @@ Bug: https://rt.perl.org/Ticket/Display.html?id=125381
Bug-Debian: https://bugs.debian.org/788636
Origin: upstream, http://perl5.git.perl.org/perl.git/commit/89d84ff965
Patch-Name: fixes/perl-Cnn.diff
+Upstream-Status: Pending
---
t/run/switchC.t | 7 ++++++-
util.c | 17 ++++++++---------
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff
index 7c9ca867a..d23573f18 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/pod_man_reproducible_date.diff
@@ -13,6 +13,7 @@ consistent. Thanks, Niko Tyni.
Bug-Debian: http://bugs.debian.org/759405
Origin: upstream
Patch-Name: fixes/pod_man_reproducible_date.diff
+Upstream-Status: Pending
---
cpan/podlators/lib/Pod/Man.pm | 69 +++++++++++++++++++++++++++++++-----------
cpan/podlators/t/devise-date.t | 29 +++++++++++++-----
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff
index 7ebbf9c60..9de29b865 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-empty-date.diff
@@ -10,6 +10,7 @@ One may want to set this to an empty string. Handle that correctly.
Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=e0e9fcb53e8fc954b2b1955385eea18c27f869af
Bug-Debian: https://bugs.debian.org/780259
Patch-Name: fixes/podman-empty-date.diff
+Upstream-Status: Pending
---
cpan/podlators/lib/Pod/Man.pm | 2 +-
cpan/podlators/t/devise-date.t | 6 +++++-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff
index 1a6036116..d8858d8a6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-pipe.diff
@@ -14,6 +14,7 @@ standard input. (Debian Bug#777405)
Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=d98872e46c93861b7aba14949e1258712087dc55
Bug-Debian: https://bugs.debian.org/777405
Patch-Name: fixes/podman-pipe.diff
+Upstream-Status: Pending
---
cpan/podlators/lib/Pod/Man.pm | 15 +++++++++++++++
cpan/podlators/scripts/pod2man.PL | 4 ++++
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff
index 0cdfeffd1..b6ae409ac 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc-docs.diff
@@ -12,6 +12,7 @@ entry.
Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=52db93bf80e4a06f8497e4ebade0506b6ee0e70d
Bug-Debian: https://bugs.debian.org/780259
Patch-Name: fixes/podman-utc-docs.diff
+Upstream-Status: Pending
---
cpan/podlators/lib/Pod/Man.pm | 6 +++++-
cpan/podlators/scripts/pod2man.PL | 11 ++++++-----
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff
index fbd7b9db9..3fb7c20dd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/podman-utc.diff
@@ -14,6 +14,7 @@ The attached patch fixes this by using GMT (~UTC) dates instead.
Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=913fbb2bd2ce071e20128629302ae2852554cad4
Bug-Debian: https://bugs.debian.org/780259
Patch-Name: fixes/podman-utc.diff
+Upstream-Status: Pending
---
cpan/podlators/lib/Pod/Man.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff
index d1b498b52..c8663f535 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/fixes/respect_umask.diff
@@ -7,6 +7,7 @@ This is needed to satisfy Debian policy regarding group-writable
site directories.
Patch-Name: fixes/respect_umask.diff
+Upstream-Status: Pending
---
cpan/ExtUtils-Install/lib/ExtUtils/Install.pm | 18 +++++++++---------
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 18 +++++++++---------
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff
index a62c746e9..7e1fd697c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/instmodsh_doc.diff
@@ -4,6 +4,7 @@ Date: Tue, 8 Mar 2005 19:30:38 +1100
Subject: Debian policy doesn't install .packlist files for core or vendor.
Patch-Name: debian/instmodsh_doc.diff
+Upstream-Status: Pending
---
cpan/ExtUtils-MakeMaker/bin/instmodsh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff
index d80f86c21..ff0b2871f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/ld_run_path.diff
@@ -4,6 +4,7 @@ Date: Fri, 18 Mar 2005 22:22:25 +1100
Subject: Remove standard libs from LD_RUN_PATH as per Debian policy.
Patch-Name: debian/ld_run_path.diff
+Upstream-Status: Pending
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff
index 54ef9640e..d5347422d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libnet_config_path.diff
@@ -5,6 +5,7 @@ Subject: Set location of libnet.cfg to /etc/perl/Net as /usr may not be
writable.
Patch-Name: debian/libnet_config_path.diff
+Upstream-Status: Pending
---
cpan/libnet/lib/Net/Config.pm | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff
index 76b805451..0cdc0d3e3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/libperl_embed_doc.diff
@@ -6,6 +6,7 @@ Subject: Note that libperl-dev package is required for embedded linking
Bug-Debian: http://bugs.debian.org/186778
Patch-Name: debian/libperl_embed_doc.diff
+Upstream-Status: Pending
---
lib/ExtUtils/Embed.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff
index fd471ed7a..7cf1242c0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/locale-robustness.diff
@@ -14,6 +14,7 @@ the test more robust by first clearing all the locale relevant variables.
Bug: https://rt.perl.org/Ticket/Display.html?id=124310
Bug-Debian: https://bugs.debian.org/782068
Patch-Name: debian/locale-robustness.diff
+Upstream-Status: Pending
---
t/run/locale.t | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff
index fa0f9daf9..5f0718089 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker-pasthru.diff
@@ -11,6 +11,7 @@ the PASTHRU list fixes this.
Bug-Debian: https://bugs.debian.org/758471
Patch-Name: debian/makemaker-pasthru.diff
+Upstream-Status: Pending
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff
index b1b4cb9a6..d870b608c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/makemaker_customized.diff
@@ -4,6 +4,7 @@ Date: Sat, 23 May 2015 21:15:06 +0200
Subject: Update t/porting/customized.dat for files patched in Debian
Patch-Name: debian/makemaker_customized.diff
+Upstream-Status: Pending
---
t/porting/customized.dat | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/mod_paths.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/mod_paths.diff
index ae1590760..7e2248403 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/mod_paths.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/mod_paths.diff
@@ -17,6 +17,7 @@ The rationale being that an admin (via site), or module packager
version than is included in core.
Patch-Name: debian/mod_paths.diff
+Upstream-Status: Pending
---
perl.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff
index b911fd276..7484bec41 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/no_packlist_perllocal.diff
@@ -4,6 +4,7 @@ Date: Tue, 8 Mar 2005 19:30:38 +1100
Subject: Don't install .packlist or perllocal.pod for perl or vendor
Patch-Name: debian/no_packlist_perllocal.diff
+Upstream-Status: Pending
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 35 +++----------------------
1 file changed, 3 insertions(+), 32 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/patchlevel.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/patchlevel.diff
index 8656b027e..2d05ae548 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/patchlevel.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/patchlevel.diff
@@ -10,6 +10,7 @@ The list of packaged patches is in patchlevel-debian.h, which is generated
from the debian/patches/ directory when building the package.
Patch-Name: debian/patchlevel.diff
+Upstream-Status: Pending
---
patchlevel.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch
index 533952cac..6f1625bb1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perl5db-x-terminal-emulator.patch
@@ -10,6 +10,7 @@ Bug-Debian: http://bugs.debian.org/668490
Forwarded: not-needed
Patch-Name: debian/perl5db-x-terminal-emulator.patch
+Upstream-Status: Pending
---
lib/perl5db.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perlivp.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perlivp.diff
index 2c1eab970..5c7413b96 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perlivp.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/perlivp.diff
@@ -21,6 +21,7 @@ On Sat, Jan 10, 2009 at 12:37:18AM +1100, Brendan O'Dea wrote:
Signed-off-by: Niko Tyni <ntyni@debian.org>
Patch-Name: debian/perlivp.diff
+Upstream-Status: Pending
---
utils/perlivp.PL | 1 +
1 file changed, 1 insertion(+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff
index 6270b8731..47075625c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/pod2man-customized.diff
@@ -4,6 +4,7 @@ Date: Sat, 18 Apr 2015 17:39:32 +0300
Subject: Update porting/customized.dat for pod2man modifications
Patch-Name: debian/pod2man-customized.diff
+Upstream-Status: Pending
---
t/porting/customized.dat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff
index c41efbe3e..b681c3e89 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prefix_changes.diff
@@ -9,6 +9,7 @@ PREFIX= to the "make install" command (used when packaging
modules).
Patch-Name: debian/prefix_changes.diff
+Upstream-Status: Pending
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm | 12 ++++++------
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 3 +--
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prune_libs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prune_libs.diff
index d153e0efc..a2ed52ab2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prune_libs.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/prune_libs.diff
@@ -10,7 +10,7 @@ We want to keep the dependencies on perl-base as small as possible,
and some of the original list may be present on buildds (see Bug#128355).
Patch-Name: debian/prune_libs.diff
-
+Upstream-Status: Pending
---
Configure | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/regen-skip.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/regen-skip.diff
index 8a3fc9912..5d9a7c4b4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/regen-skip.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/regen-skip.diff
@@ -8,6 +8,7 @@ for instance because the repository only imported the Perl tarball,
the regeneration check is broken because lib/.gitignore is missing.
Patch-Name: debian/regen-skip.diff
+Upstream-Status: Pending
---
regen/lib_cleanup.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff
index ecfc0bc62..3b3745238 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-kfreebsd-crash.diff
@@ -12,6 +12,7 @@ a new unrelated test case.
Skip the test until the culprit is found.
Patch-Name: debian/skip-kfreebsd-crash.diff
+Upstream-Status: Pending
---
t/op/threads.t | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff
index 4c87104cc..279f4ab76 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/skip-upstream-git-tests.diff
@@ -9,6 +9,7 @@ upstream. This complicates things needlessly for downstream packagers.
Skip the tests altogether even if the .git directory exists.
Patch-Name: debian/skip-upstream-git-tests.diff
+Upstream-Status: Pending
---
t/test.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff
index cb3145776..4964e480c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/squelch-locale-warnings.diff
@@ -14,6 +14,7 @@ Any real locale problem will show up after the system upgrade too, and
the warning will be triggered normally again at that point.
Patch-Name: debian/squelch-locale-warnings.diff
+Upstream-Status: Pending
---
locale.c | 5 ++++-
pod/perllocale.pod | 8 ++++++++
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff
index 53adc2f4d..ab373b333 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/debian/writable_site_dirs.diff
@@ -6,6 +6,7 @@ Subject: Set umask approproately for site install directories
Policy requires group writable site directories
Patch-Name: debian/writable_site_dirs.diff
+Upstream-Status: Pending
---
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch
index 6b05b877f..b85b50cea 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch
@@ -9,6 +9,8 @@ Fixed:
Can't locate ../../t/lib/dbmt_common.pl in @INC
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Upstream-Status: Pending
---
ext/ODBM_File/t/odbm.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 cf7a8e121..b55d2223e 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
@@ -124,30 +124,8 @@ do_configure() {
cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
done
- # Fixups for uclibc
- if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
- sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
- -e "s,\(d_futimes=\)'define',\1'undef',g" \
- -e "s,\(d_finitel=\)'define',\1'undef',g" \
- -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \
- -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
- -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \
- -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
- -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \
- -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \
- -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \
- -e "s,\(d_sockatmark=\)'define',\1'undef',g" \
- -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \
- -e "s,\(d_eaccess=\)'define',\1'undef',g" \
- -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
- -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
- -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
- -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
- -e "s,-fstack-protector,-fno-stack-protector,g" \
- config.sh-${TARGET_ARCH}-${TARGET_OS}
- fi
# Fixups for musl
- if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" ]; then
+ if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" -o "${TARGET_OS}" = "linux-muslx32" ]; then
sed -i -e "s,\(d_libm_lib_version=\)'define',\1'undef',g" \
-e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
-e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
@@ -193,7 +171,7 @@ do_configure() {
;;
esac
# These are strewn all over the source tree
- for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${S}/* -r -l` ${S}/utils/h2xs.PL ; do
+ for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" --exclude="Glossary" -m1 "/usr/include/.*\.h" ${S}/* -r -l` ${S}/utils/h2xs.PL ; do
echo Fixing: $foo
sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo
done
@@ -245,6 +223,7 @@ PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
perl_package_preprocess () {
# Fix up installed configuration
sed -i -e "s,${D},,g" \
+ -e "s,${DEBUG_PREFIX_MAP},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
-e "s,-isystem${STAGING_INCDIR} ,,g" \
-e "s,${STAGING_LIBDIR},${libdir},g" \
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
new file mode 100644
index 000000000..3805ad3eb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch
@@ -0,0 +1,224 @@
+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
new file mode 100644
index 000000000..49ebe31e4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch
@@ -0,0 +1,48 @@
+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/pkg-config-esdk.in b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in
new file mode 100644
index 000000000..4fc9b0a4a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Orignal pkg-config-native action when called as pkg-config-native
+# NO Change here
+if [ "pkg-config-native" = "`basename $0`" ] ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+else
+ # in this case check if we are in the esdk
+ if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then
+ parentpid=`ps -o ppid= -p $$`
+ parentpid_info=`ps -wo comm= -o args= -p $parentpid`
+
+ # check if we are being called from the kernel's make menuconfig
+ if ( echo $parentpid_info | grep -q check-lxdialog ) ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+ fi
+ fi
+fi
+
+pkg-config.real "$@"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in
new file mode 100644
index 000000000..9ed30a0d8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+PKG_CONFIG_PATH="@PATH_NATIVE@"
+unset PKG_CONFIG_SYSROOT_DIR
+
+pkg-config "$@"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper
new file mode 100755
index 000000000..695f34956
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper
@@ -0,0 +1,16 @@
+#!/bin/sh
+# pkgconf wrapper to deal with pkg-config/pkgconf compatibility issues
+#
+# Copyright (C) 2015 Christopher Larson <chris_larson@mentor.com>
+# License: MIT (see COPYING.MIT at the root of the repository for terms)
+
+for arg; do
+ case "$arg" in
+ --variable|--variable=*)
+ # pkg-config doesn't sysroot-prefix user variables
+ unset PKG_CONFIG_SYSROOT_DIR
+ ;;
+ esac
+done
+
+exec pkgconf "$@"
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.3.7.bb
new file mode 100644
index 000000000..5da0dd15b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
@@ -0,0 +1,73 @@
+SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks."
+DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \
+flags for development frameworks. It is similar to pkg-config from \
+freedesktop.org, providing additional functionality while also maintaining \
+compatibility."
+HOMEPAGE = "http://pkgconf.org"
+BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
+SECTION = "devel"
+PROVIDES += "pkgconfig"
+RPROVIDES_${PN} += "pkgconfig"
+DEFAULT_PREFERENCE = "-1"
+
+# 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"
+
+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"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
+
+do_install_append () {
+ # Install a wrapper which deals, as much as possible with pkgconf vs
+ # pkg-config compatibility issues.
+ install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
+}
+
+do_install_append_class-native () {
+ # Install a pkg-config-native wrapper that will use the native sysroot instead
+ # of the MACHINE sysroot, for using pkg-config when building native tools.
+ sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+ < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
+ install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+ sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+ -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
+ < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
+ install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
+}
+
+ALTERNATIVE_${PN} = "pkg-config"
+
+# When using the RPM generated automatic package dependencies, some packages
+# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
+# specifying an appropriate provide.
+RPROVIDES_${PN} += "pkgconfig(pkg-config)"
+
+# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
+FILES_${PN}-dev_remove = "${datadir}/aclocal"
+FILES_${PN} += "${datadir}/aclocal"
+
+BBCLASSEXTEND += "native nativesdk"
+
+pkgconf_sstate_fixup_esdk () {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
+ pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
+ mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
+ lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+ sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
+ fi
+}
+
+SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch
deleted file mode 100644
index 14c8293a5..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 946d36266d8a30f04fe34d3183bf4929141934d2 Mon Sep 17 00:00:00 2001
-From: coypu <coypu@sdf.org>
-Date: Wed, 2 Mar 2016 19:38:48 +0200
-Subject: [PATCH] gdate: Move warning pragma outside of function
-
-Commit 0817af40e8c74c721c30f6ef482b1f53d12044c7 breaks the build on
-older versions of GCC, which don't allow pragma inside functions.
-
-https://bugzilla.gnome.org/761550
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- glib/glib/gdate.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/glib/glib/gdate.c b/glib/glib/gdate.c
-index 1978cf7..20e6c4a 100644
---- a/glib/glib/gdate.c
-+++ b/glib/glib/gdate.c
-@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
- *
- * Returns: number of characters written to the buffer, or 0 the buffer was too small
- */
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
-+
- gsize
- g_date_strftime (gchar *s,
- gsize slen,
-@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s,
- return retval;
- #endif
- }
-+
-+#pragma GCC diagnostic pop
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
new file mode 100644
index 000000000..4fc9b0a4a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Orignal pkg-config-native action when called as pkg-config-native
+# NO Change here
+if [ "pkg-config-native" = "`basename $0`" ] ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+else
+ # in this case check if we are in the esdk
+ if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then
+ parentpid=`ps -o ppid= -p $$`
+ parentpid_info=`ps -wo comm= -o args= -p $parentpid`
+
+ # check if we are being called from the kernel's make menuconfig
+ if ( echo $parentpid_info | grep -q check-lxdialog ) ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+ fi
+ fi
+fi
+
+pkg-config.real "$@"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
index dc44992c7..52ef2a977 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -8,13 +8,13 @@ SECTION = "console/utils"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "87152c05be88ca8be71a3a563f275b3686d32c28"
-PV = "0.29.1+git${SRCPV}"
+SRCREV = "edf8e6f0ea77ede073f07bff0d2ae1fc7a38103b"
+PV = "0.29.2+git${SRCPV}"
SRC_URI = "git://anongit.freedesktop.org/pkg-config \
+ file://pkg-config-esdk.in \
file://pkg-config-native.in \
file://fix-glib-configure-libtool-usage.patch \
- file://0001-gdate-Move-warning-pragma-outside-of-function.patch \
file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \
"
@@ -55,4 +55,19 @@ do_install_append_class-native () {
-e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
< ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+ sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+ -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
+ < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
+ install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
}
+
+pkgconfig_sstate_fixup_esdk () {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
+ pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
+ mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
+ lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+ sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
+ fi
+}
+
+SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconfig_sstate_fixup_esdk"
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 4529dbfcf..570ef36a3 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
@@ -3,6 +3,7 @@ SECTION = "devel"
# Would need transfig-native for documentation if it wasn't disabled
DEPENDS = "elfutils binutils"
SUMMARY = "An ELF prelinking utility"
+HOMEPAGE = "http://git.yoctoproject.org/cgit.cgi/prelink-cross/about/"
DESCRIPTION = "The prelink package contains a utility which modifies ELF shared libraries \
and executables, so that far fewer relocations need to be resolved at \
runtime and thus programs come up faster."
@@ -31,6 +32,8 @@ SRC_URI = "git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink \
file://prelink.cron.daily \
file://prelink.default \
file://macros.prelink"
+UPSTREAM_CHECK_GITTAGREGEX = "upstream has no usable tags"
+UPSTREAM_VERSION_UNKNOWN = "1"
TARGET_OS_ORIG := "${TARGET_OS}"
OVERRIDES_append = ":${TARGET_OS_ORIG}"
@@ -150,13 +153,15 @@ do_install_append () {
install -m 0644 ${WORKDIR}/macros.prelink ${D}${sysconfdir}/rpm/macros.prelink
}
-# If we're using image-prelink, we want to skip this on the host side
-# but still do it if the package is installed on the target...
+# If we ae doing a cross install, we want to avoid prelinking.
+# Prelinking during a cross install should be handled by the image-prelink
+# bbclass. If the user desires this to run on the target at first boot
+# they will need to create a custom boot script.
pkg_postinst_prelink() {
#!/bin/sh
if [ "x$D" != "x" ]; then
- ${@bb.utils.contains('USER_CLASSES', 'image-prelink', 'exit 0', 'exit 1', d)}
+ exit 0
fi
prelink -a
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
new file mode 100644
index 000000000..42557b17a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Use-epoll-API-on-Linux.patch
@@ -0,0 +1,292 @@
+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/fastopreply.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch
new file mode 100644
index 000000000..904c2d04e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fastopreply.patch
@@ -0,0 +1,76 @@
+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
new file mode 100644
index 000000000..b085a4505
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/toomanyfiles.patch
@@ -0,0 +1,59 @@
+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.
+
+Rather than hang, when this happens, close out inactive connections, allowing us
+to accept the new ones. The disconnected clients will simply reconnect. There is
+a small risk of data loss here sadly but its better than hanging.
+
+RP
+2017/4/25
+
+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;
++ int hitmaxfiles;
+
+ clients = malloc(16 * sizeof(*clients));
+
+@@ -597,6 +598,7 @@ pseudo_server_loop(void) {
+ active_clients = 1;
+ max_clients = 16;
+ highest_client = 0;
++ hitmaxfiles = 0;
+
+ 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;
+ }
++ } else if (hitmaxfiles) {
++ /* Only close one per loop iteration in the interests of caution */
++ close_client(i);
++ hitmaxfiles = 0;
+ }
+ if (die_forcefully)
+ break;
+ }
++ hitmaxfiles = 0;
+ 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;
++ } 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);
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
index b427b9ac3..73ef57231 100644
--- 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
@@ -7,6 +7,9 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz
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"
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
new file mode 100644
index 000000000..b9e585610
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch
@@ -0,0 +1,45 @@
+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 5b134edf0..ffd6ced13 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
@@ -11,11 +11,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
numpy/distutils/system_info.py | 50 +++++-------------------------------------
1 file changed, 6 insertions(+), 44 deletions(-)
-diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
-index 9dd48e2..80e197a 100644
---- a/numpy/distutils/system_info.py
-+++ b/numpy/distutils/system_info.py
-@@ -204,51 +204,13 @@ if sys.platform == 'win32':
+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 = []
else:
@@ -29,7 +29,10 @@ index 9dd48e2..80e197a 100644
- '/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',
@@ -50,7 +53,7 @@ index 9dd48e2..80e197a 100644
- # tests are run in debug mode Python 3.
- tmp = open(os.devnull, 'w')
- p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE,
-- stderr=tmp)
+- stderr=tmp)
- except (OSError, DistutilsError):
- # OSError if gcc is not installed, or SandboxViolation (DistutilsError
- # subclass) if an old setuptools bug is triggered (see gh-3160).
@@ -64,15 +67,8 @@ index 9dd48e2..80e197a 100644
- 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.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch
deleted file mode 100644
index 08cb078fa..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 154b2c19f392817a936aea0190e276f8228cb489 Mon Sep 17 00:00:00 2001
-From: "Erik M. Bray" <erik.bray@lri.fr>
-Date: Mon, 12 Dec 2016 13:07:16 +0100
-Subject: [PATCH] BUG: xlocale.h is not available in newlib--all the defines
- used here from xlocale.h are instead found in locale.h
-
-Added a feature check for xlocale.h, with fallback to locale.h if it is
-missing.
----
- numpy/core/setup_common.py | 1 +
- numpy/core/src/multiarray/numpyos.c | 8 +++++++-
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-Upstream-Status: Backport
-RP 2017/9/6
-
-diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
-index ba7521e3043..a1729e65656 100644
---- a/numpy/core/setup_common.py
-+++ b/numpy/core/setup_common.py
-@@ -113,6 +113,7 @@ def check_api_version(apiversion, codegen_dir):
- "xmmintrin.h", # SSE
- "emmintrin.h", # SSE2
- "features.h", # for glibc version linux
-+ "xlocale.h" # see GH#8367
- ]
-
- # optional gcc compiler builtins and their call arguments and optional a
-diff --git a/numpy/core/src/multiarray/numpyos.c b/numpy/core/src/multiarray/numpyos.c
-index 450ec40b6e0..84617ea78c3 100644
---- a/numpy/core/src/multiarray/numpyos.c
-+++ b/numpy/core/src/multiarray/numpyos.c
-@@ -15,7 +15,13 @@
-
- #ifdef HAVE_STRTOLD_L
- #include <stdlib.h>
--#include <xlocale.h>
-+#ifdef HAVE_XLOCALE_H
-+ /*
-+ * the defines from xlocale.h are included in locale.h on some sytems;
-+ * see gh-8367
-+ */
-+ #include <xlocale.h>
-+#endif
- #endif
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
index 04c96d7b5..13e8f4fa2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
@@ -1,17 +1,21 @@
SUMMARY = "A sophisticated Numeric Processing Package for Python"
SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7e51a5677b22b865abbfb3dff6ffb2d0"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96"
SRCNAME = "numpy"
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
+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://d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch \
+ file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \
${CONFIGFILESURI} "
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/"
+
+SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92"
+SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93"
+
+UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
CONFIGFILESURI ?= ""
@@ -82,9 +86,6 @@ do_compile_prepend_class-target() {
FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-SRC_URI[md5sum] = "03bd7927c314c43780271bf1ab795ebc"
-SRC_URI[sha256sum] = "04db2fbd64e2e7c68e740b14402b25af51418fc43a59d9e54172b38b906b0f69"
-
# install what is needed for numpy.test()
RDEPENDS_${PN} = "python-unittest \
python-difflib \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb
index 8f9665f92..29874b884 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.13.1.bb
@@ -1,17 +1,20 @@
SUMMARY = "A sophisticated Numeric Processing Package for Python"
SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7e51a5677b22b865abbfb3dff6ffb2d0"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96"
SRCNAME = "numpy"
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
+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://d70d37b7c4aa2af3fe879a0d858c54f2aa32a725.patch \
+ file://0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch \
${CONFIGFILESURI} "
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/"
+SRC_URI[md5sum] = "6d459e4a24f5035f720dda3c57716a92"
+SRC_URI[sha256sum] = "de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93"
+
+UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
CONFIGFILESURI ?= ""
@@ -82,9 +85,6 @@ do_compile_prepend_class-target() {
FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-SRC_URI[md5sum] = "03bd7927c314c43780271bf1ab795ebc"
-SRC_URI[sha256sum] = "04db2fbd64e2e7c68e740b14402b25af51418fc43a59d9e54172b38b906b0f69"
-
# install what is needed for numpy.test()
RDEPENDS_${PN} = "python3-unittest \
python3-difflib \
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
index 7ed254bbd..57d4834b3 100644
--- 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
@@ -281,7 +281,7 @@ 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}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
+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
index 1e20f00c6..0260e87e7 100644
--- 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
@@ -1,6 +1,6 @@
# 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>
+# Generator: 'scripts/contrib/python/generate-manifest-3.5.py' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
@@ -34,7 +34,7 @@ FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/__pyca
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 "
+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"
@@ -66,7 +66,7 @@ FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/__pycache__/
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__ "
+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"
@@ -241,7 +241,7 @@ 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"
+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"
@@ -277,7 +277,7 @@ RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang ${PN}-pyd
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}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
+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_0.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb
deleted file mode 100644
index d855e42a7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require python-async.inc
-
-inherit setuptools
-
-RDEPENDS_${PN} += "python-threading python-lang"
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 feddf275b..777608c1b 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
@@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
SRC_URI = "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
-SRC_URI[md5sum] = "77f8339e68dedb6d7c4e26371a588ed9"
-SRC_URI[sha256sum] = "e96f8e953cf9fee0a7599fc587667591328760b6341a0081ef311a942fc96204"
+SRC_URI[md5sum] = "df94212b19d270a625b67b4c84ac9a41"
+SRC_URI[sha256sum] = "5c00cbd256e2b1d039381d4f7d71fcb7ee5cc196ca10c101ff7191bd82ab5d9c"
UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/"
UPSTREAM_CHECK_REGEX = "/GitPython/(?P<pver>(\d+[\.\-_]*)+)"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.1.1.bb
deleted file mode 100644
index e49dbea54..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.1.1.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-git.inc
-
-DEPENDS = "python-gitdb"
-
-inherit setuptools
-
-RDEPENDS_${PN} += "python-gitdb python-lang python-io python-shell python-math python-re python-subprocess python-stringold python-unixadmin"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
deleted file mode 100644
index 177739579..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require python-gitdb.inc
-
-DEPENDS = "python-async python-smmap"
-
-inherit distutils
-
-RDEPENDS_${PN} += "python-smmap python-async python-mmap python-lang python-zlib python-io python-shell"
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 10364db97..1c83af6a2 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
@@ -1,12 +1,13 @@
SUMMARY = "Templating library for Python"
+HOMEPAGE = "http://www.makotemplates.org/"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863"
SRC_URI = "https://files.pythonhosted.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
-SRC_URI[md5sum] = "a28e22a339080316b2acc352b9ee631c"
-SRC_URI[sha256sum] = "48559ebd872a8e77f92005884b3d88ffae552812cdf17db6768e5c3be5ebbe0d"
+SRC_URI[md5sum] = "5836cc997b1b773ef389bf6629c30e65"
+SRC_URI[sha256sum] = "4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae"
UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/"
UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.6.bb
deleted file mode 100644
index 230044e1a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.6.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require python-mako.inc
-
-inherit setuptools
-
-RDEPENDS_${PN} = "python-threading \
- python-netclient \
- python-html \
-"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
-
-# The same utility is packaged in python3-mako, so it would conflict
-do_install_append() {
- rm -f ${D}${bindir}/mako-render
- rmdir ${D}${bindir}
-}
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
index 581a37ab1..b05aae0f1 100644
--- 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
@@ -1,10 +1,9 @@
# 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>
+# 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-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 "
-
+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
index 10be3e9bb..f1f732eb8 100644
--- 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
@@ -1,10 +1,10 @@
# 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>
+# Generator: '../scripts/contrib/python/generate-manifest-3.5.py --native' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-RPROVIDES+="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 "
+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-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
index 3757f3a8b..9b3509caf 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,4 +1,5 @@
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"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.1.bb
deleted file mode 100644
index 1321797ef..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.1.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "A Pure Python Expect like Module for Python"
-HOMEPAGE = "http://pexpect.readthedocs.org/"
-SECTION = "devel/python"
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1c7a725251880af8c6a148181665385b"
-
-SRCNAME = "pexpect"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "3694410001a99dff83f0b500a1ca1c95"
-SRC_URI[sha256sum] = "3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect"
-
-S = "${WORKDIR}/pexpect-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-core \
- python-io \
- python-terminal \
- python-resource \
- python-fcntl \
- python-ptyprocess \
-"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb
deleted file mode 100644
index eed24ad2e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Run a subprocess in a pseudo terminal"
-HOMEPAGE = "http://ptyprocess.readthedocs.io/en/latest/"
-SECTION = "devel/python"
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=cfdcd51fa7d5808da4e74346ee394490"
-
-SRCNAME = "ptyprocess"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "94e537122914cc9ec9c1eadcd36e73a1"
-SRC_URI[sha256sum] = "0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/ptyprocess"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-core \
-"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl.inc
deleted file mode 100644
index d26318b6d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Python bindings for libcurl"
-HOMEPAGE = "http://pycurl.sourceforge.net/"
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1+ | MIT"
-LIC_FILES_CHKSUM = "file://README.rst;beginline=166;endline=182;md5=a84a1caa65b89d4584b693d3680062fb \
- file://COPYING-LGPL;md5=3579a9fd0221d49a237aaa33492f988c \
- file://COPYING-MIT;md5=b7e434aeb228ed731c00bcf177e79b19"
-
-DEPENDS = "curl ${PYTHON_PN}"
-RDEPENDS_${PN} = "${PYTHON_PN}-core curl"
-SRCNAME = "pycurl"
-
-SRC_URI = "\
- http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \
- file://no-static-link.patch \
-"
-
-SRC_URI[archive.md5sum] = "bca7bf47320082588db544ced2ba8717"
-SRC_URI[archive.sha256sum] = "8a1e0eb55573388275a1d6c2534ca4cfca5d7fa772b99b505c08fa149b27aed0"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-BBCLASSEXTEND = "native"
-
-# Ensure the docstrings are generated as make clean will remove them
-do_compile_prepend() {
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py docstrings
-}
-
-do_install_append() {
- rm -rf ${D}${datadir}/share
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
deleted file mode 100644
index 212779ca3..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur pycurl-7.19.5.2-orig/setup.py pycurl-7.19.5.2/setup.py
---- pycurl-7.19.5.2-orig/setup.py 2015-11-02 15:42:24.000000000 +0200
-+++ pycurl-7.19.5.2/setup.py 2015-11-02 17:59:36.121527273 +0200
-@@ -154,7 +154,7 @@
- optbuf = ''
- sslhintbuf = ''
- errtext = ''
-- for option in ["--libs", "--static-libs"]:
-+ for option in ["--libs"]:
- p = subprocess.Popen((CURL_CONFIG, option),
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- stdout, stderr = p.communicate()
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb
deleted file mode 100644
index eb70cea66..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require python-pycurl.inc
-
-inherit distutils
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 40f47d4bc..ca521a965 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
@@ -3,14 +3,14 @@ HOMEPAGE = "https://pypi.python.org/pypi/setuptools"
SECTION = "devel/python"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://setup.py;beginline=146;endline=146;md5=3e8df024d6c1442d18e84acf8fbbc475"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158"
SRCNAME = "setuptools"
-SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.zip"
-SRC_URI[md5sum] = "8b67868c3430e978833ebd0d1b766694"
-SRC_URI[sha256sum] = "8303fb24306385f09bf8b0e5a385c1548e42e8efc08558d64049bc0d55ea012d"
+SRC_URI[md5sum] = "b9e6c049617bac0f9e908a41ab4a29ac"
+SRC_URI[sha256sum] = "b0fe5d432d922df595e918577c51458d63f245115d141b309ac32ecfca329df5"
UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_32.1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb
index 526474c7e..0efacc137 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_32.1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_36.2.7.bb
@@ -5,9 +5,7 @@ PROVIDES = "python-distribute"
DEPENDS += "python"
DEPENDS_class-native += "python-native"
-inherit distutils
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
+inherit setuptools
RDEPENDS_${PN} = "\
python-stringold \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb
deleted file mode 100644
index 4350485f7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit setuptools
-require python-six.inc
-
-RDEPENDS_${PN} += "python-io"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb
deleted file mode 100644
index c118dd8d6..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require python-smmap.inc
-
-inherit setuptools
-
-RDEPENDS_${PN} += "python-codecs python-mmap python-lang"
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 50cc5911a..f5568d2d2 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,6 +1,6 @@
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
===================================================================
--- Python-2.7.13.orig/configure.ac
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch
new file mode 100644
index 000000000..44fcaacf3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch
@@ -0,0 +1,82 @@
+From 71447f04979b267f8866573b67a4340b2719d799 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 4 Aug 2017 14:10:43 +0800
+Subject: [PATCH] setup.py: pass missing libraries to Extension for multiprocessing module
+
+In the following commit:
+...
+commit e711cafab13efc9c1fe6c5cd75826401445eb585
+Author: Benjamin Peterson <benjamin@python.org>
+Date: Wed Jun 11 16:44:04 2008 +0000
+
+ Merged revisions 64104,64117 via svnmerge from
+ svn+ssh://pythondev@svn.python.org/python/trunk
+...
+(see diff in setup.py)
+It assigned libraries for multiprocessing module according
+the host_platform, but not pass it to Extension.
+
+In glibc, the following commit caused two definition of
+sem_getvalue are different.
+https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524
+(see diff in nptl/sem_getvalue.c for detail)
+`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1
+and `__old_sem_getvalue' is to compat the old version
+sem_getvalue@GLIBC_2.0.
+
+To build python for embedded Linux systems:
+http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html
+If not explicitly link to library pthread (-lpthread), it will
+load glibc's sem_getvalue randomly at runtime.
+
+Such as build python on linux x86_64 host and run the python
+on linux x86_32 target. If not link library pthread, it caused
+multiprocessing bounded semaphore could not work correctly.
+...
+>>> import multiprocessing
+>>> pool_sema = multiprocessing.BoundedSemaphore(value=1)
+>>> pool_sema.acquire()
+True
+>>> pool_sema.release()
+Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ValueError: semaphore or lock released too many times
+...
+
+And the semaphore issue also caused multiprocessing.Queue().put() hung.
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/2999]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ setup.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 54054c2..9646bfc 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1586,8 +1586,10 @@ class PyBuildExt(build_ext):
+ elif host_platform.startswith('netbsd'):
+ macros = dict()
+ libraries = []
+-
+- else: # Linux and other unices
++ elif host_platform.startswith(('linux')):
++ macros = dict()
++ libraries = ['pthread']
++ else: # Other unices
+ macros = dict()
+ libraries = ['rt']
+
+@@ -1610,6 +1612,7 @@ class PyBuildExt(build_ext):
+ if sysconfig.get_config_var('WITH_THREAD'):
+ exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
+ define_macros=macros.items(),
++ libraries=libraries,
+ include_dirs=["Modules/_multiprocessing"]))
+ else:
+ missing.append('_multiprocessing')
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch
new file mode 100644
index 000000000..12651798e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch
@@ -0,0 +1,34 @@
+The compiled .pyc files contain time stamp corresponding to the compile time.
+This prevents binary reproducibility. This patch allows to achieve binary
+reproducibility by overriding the build time stamp by the value
+exported via SOURCE_DATE_EPOCH.
+
+Patch by Bernhard M. Wiedemann
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+Fri Feb 24 17:08:25 UTC 2017 - bwiedemann@suse.com
+
+- Add reproducible.patch to allow reproducible builds of various
+ python packages like python-amqp
+ Upstream: https://github.com/python/cpython/pull/296
+
+
+@@ -0,0 +1,15 @@
+Index: Python-2.7.13/Lib/py_compile.py
+===================================================================
+--- Python-2.7.13.orig/Lib/py_compile.py
++++ Python-2.7.13/Lib/py_compile.py
+@@ -108,6 +108,10 @@ def compile(file, cfile=None, dfile=None
+ timestamp = long(os.fstat(f.fileno()).st_mtime)
+ except AttributeError:
+ timestamp = long(os.stat(file).st_mtime)
++ sde = os.environ.get('SOURCE_DATE_EPOCH')
++ if sde and timestamp > int(sde):
++ timestamp = int(sde)
++ os.utime(file, (timestamp, timestamp))
+ codestring = f.read()
+ try:
+ codeobject = __builtin__.compile(codestring, dfile or file,'exec')
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
index 2c657861c..fb4a3bcf9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
@@ -2,6 +2,7 @@ Python tries to use ncursesw from the host,
if it is not found causes an error on configure,
we should use ncursesw from sysroot instead
+Upstream-Status: Pending
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.13.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.14.bb
index e36388c6f..81a449d64 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.13.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.14.bb
@@ -2,13 +2,13 @@ SUMMARY = "Text processing system for documentation"
HOMEPAGE = "http://docutils.sourceforge.net"
SECTION = "devel/python"
LICENSE = "PSF & BSD-2-Clause & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7a4646907ab9083c826280b19e103106"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=35a23d42b615470583563132872c97d6"
DEPENDS = "python3"
SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
-SRC_URI[md5sum] = "ea4a893c633c788be9b8078b6b305d53"
-SRC_URI[sha256sum] = "718c0f5fb677be0f34b781e04241c4067cbd9327b66bdd8e763201130f5175be"
+SRC_URI[md5sum] = "c53768d63db3873b7d452833553469de"
+SRC_URI[sha256sum] = "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274"
S = "${WORKDIR}/docutils-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb
index 7a2d452a2..4ac2a0ec7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.1.5.bb
@@ -4,4 +4,4 @@ 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"
+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-mako_1.0.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
index 2b50ffd08..2b50ffd08 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.7.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb
index 782e2cda9..8cd9c88a8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.3.bb
@@ -7,7 +7,7 @@ DISTRO_SRC_URI_linuxstdbase = ""
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://12-distutils-prefix-is-inside-staging-area.patch \
file://python-config.patch \
-file://000-cross-compile.patch \
+file://0001-cross-compile-support.patch \
file://030-fixup-include-dirs.patch \
file://070-dont-clean-ipkg-install.patch \
file://080-distutils-dont_adjust_files.patch \
@@ -24,12 +24,13 @@ ${DISTRO_SRC_URI} \
file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
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 \
"
-SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e"
-SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40"
+SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
+SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e"
# exclude pre-releases for both python 2.x and 3.x
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
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 99bba4403..1e2ff74f5 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
@@ -17,6 +17,10 @@ S = "${WORKDIR}/nose-${PV}"
inherit setuptools3
+do_install_append() {
+ mv ${D}${bindir}/nosetests ${D}${bindir}/nosetests3
+}
+
RDEPENDS_${PN}_class-target = "\
python3-unittest \
"
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.1.bb
index 4456b9b1b..9b907a263 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.1.bb
@@ -53,4 +53,4 @@ RDEPENDS_${PN} = "\
python3-xmlrpc \
"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
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
index f9031b3bc..9258ba11c 100644
--- 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
@@ -19,6 +19,8 @@ S = "${WORKDIR}/pycairo-${PV}"
inherit distutils3 pkgconfig
+CFLAGS += "-fPIC"
+
BBCLASSEXTEND = "native"
do_configure() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb
deleted file mode 100644
index 5d11192ab..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycurl_7.21.5.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/python-pycurl:"
-
-require python-pycurl.inc
-
-inherit distutils3
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
new file mode 100644
index 000000000..aaedb58fe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-Don-t-use-gnome-common-macros.patch
@@ -0,0 +1,33 @@
+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_3.22.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb
index 143048d9e..9d10af2e0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.22.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.24.1.bb
@@ -5,16 +5,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection upstream-version-is-even
-DEPENDS += "gnome-common-native python3 glib-2.0"
+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] = "ed4117ed5d554d25fd7718807fbf819f"
-SRC_URI[sha256sum] = "08b29cfb08efc80f7a8630a2734dec65a99c1b59f1e5771c671d2e4ed8a5cbe7"
+SRC_URI[md5sum] = "69a843311d0f0385dff376e11a2d83d2"
+SRC_URI[sha256sum] = "a628a95aa0909e13fb08230b1b98fc48adef10b220932f76d62f6821b3fdbffd"
S = "${WORKDIR}/${SRCNAME}-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygpgme_0.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygpgme_0.3.bb
deleted file mode 100644
index 495f677cf..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygpgme_0.3.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "A Python module for working with OpenPGP messages"
-HOMEPAGE = "https://launchpad.net/pygpgme"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://README;md5=2dc15a76acf01e126188c8de634ae4b3"
-
-SRC_URI = "https://launchpad.net/pygpgme/trunk/${PV}/+download/pygpgme-${PV}.tar.gz"
-SRC_URI[md5sum] = "d38355af73f0352cde3d410b25f34fd0"
-SRC_URI[sha256sum] = "5fd887c407015296a8fd3f4b867fe0fcca3179de97ccde90449853a3dfb802e1"
-
-S = "${WORKDIR}/pygpgme-${PV}"
-
-inherit distutils3
-
-DEPENDS = "gpgme python3"
-
-RDEPENDS_${PN} += "python3-core"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
index 65af6f0da..a7bca9740 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_32.1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
@@ -2,23 +2,19 @@ require python-setuptools.inc
DEPENDS += "python3"
DEPENDS_class-native += "python3-native"
+DEPENDS_class-nativesdk += "nativesdk-python3"
-inherit distutils3
+inherit setuptools3
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
-
-# The installer puts the wrong path in the setuptools.pth file. Correct it.
do_install_append() {
- rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
- echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
}
-RDEPENDS_${PN} = "\
+RDEPENDS_${PN}_class-native = "\
python3-distutils \
python3-compression \
"
-RDEPENDS_${PN}_class-target = "\
+RDEPENDS_${PN} = "\
python3-ctypes \
python3-distutils \
python3-email \
@@ -34,4 +30,4 @@ RDEPENDS_${PN}_class-target = "\
python3-unittest \
python3-xml \
"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
index b7e0ac635..8ea3f03fe 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
@@ -1,4 +1,4 @@
-From 045c99b5f1eb6e4e0d8ad1ef9f0ba6574f738150 Mon Sep 17 00:00:00 2001
+From 04df959365e2b54d7503edf0e5534ff094284f2d Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 23 Oct 2015 12:25:09 +0300
Subject: [PATCH] Do not use the shell version of python-config that was
@@ -14,13 +14,13 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
-index d7fc9a0..47e60bc 100644
+index 236f005..5c4337f 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -1270,12 +1270,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
+@@ -1348,12 +1348,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py
# Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
- sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
+ LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
- # On Darwin, always use the python version of the script, the shell
- # version doesn't use the compiler customizations that are provided
- # in python (_osx_support.py).
@@ -34,5 +34,5 @@ index d7fc9a0..47e60bc 100644
# Install the include files
--
-2.1.4
+2.11.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch
new file mode 100644
index 000000000..d1c92e9ee
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch
@@ -0,0 +1,66 @@
+From bcddbf40c7f1b80336268cdddacc17369fb0ccea Mon Sep 17 00:00:00 2001
+From: Libin Dang <libin.dang@windriver.com>
+Date: Tue, 11 Apr 2017 14:12:15 +0800
+Subject: [PATCH] Issue #21272: Use _sysconfigdata.py to initialize
+ distutils.sysconfig
+
+Backport upstream commit
+https://github.com/python/cpython/commit/409482251b06fe75c4ee56e85ffbb4b23d934159
+
+Upstream-Status: Backport
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ Lib/distutils/sysconfig.py | 35 ++++-------------------------------
+ 1 file changed, 4 insertions(+), 31 deletions(-)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index 6d5cfd0..9925d24 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -424,38 +424,11 @@ _config_vars = None
+
+ def _init_posix():
+ """Initialize the module as appropriate for POSIX systems."""
+- g = {}
+- # load the installed Makefile:
+- try:
+- filename = get_makefile_filename()
+- parse_makefile(filename, g)
+- except OSError as msg:
+- my_msg = "invalid Python installation: unable to open %s" % filename
+- if hasattr(msg, "strerror"):
+- my_msg = my_msg + " (%s)" % msg.strerror
+-
+- raise DistutilsPlatformError(my_msg)
+-
+- # load the installed pyconfig.h:
+- try:
+- filename = get_config_h_filename()
+- with open(filename) as file:
+- parse_config_h(file, g)
+- except OSError as msg:
+- my_msg = "invalid Python installation: unable to open %s" % filename
+- if hasattr(msg, "strerror"):
+- my_msg = my_msg + " (%s)" % msg.strerror
+-
+- raise DistutilsPlatformError(my_msg)
+-
+- # On AIX, there are wrong paths to the linker scripts in the Makefile
+- # -- these paths are relative to the Python source, but when installed
+- # the scripts are in another directory.
+- if python_build:
+- g['LDSHARED'] = g['BLDSHARED']
+-
++ # _sysconfigdata is generated at build time, see the sysconfig module
++ from _sysconfigdata import build_time_vars
+ global _config_vars
+- _config_vars = g
++ _config_vars = {}
++ _config_vars.update(build_time_vars)
+
+
+ def _init_nt():
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
index 2d822218f..118d75ddc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/0001-cross-compile-support.patch
@@ -1,27 +1,32 @@
+From 624c029abcc73c724020ccea9a2b4b5b5c00f2a6 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
+
We cross compile python. This patch uses tools from host/native
python instead of in-tree tools
-Khem
Upstream-Status: Inappropriate[Configuration Specific]
-
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- Makefile.pre.in | 25 +++++++++++++------------
- 1 file changed, 13 insertions(+), 12 deletions(-)
+ Makefile.pre.in | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
-Index: Python-3.5.2/Makefile.pre.in
-===================================================================
---- Python-3.5.2.orig/Makefile.pre.in
-+++ Python-3.5.2/Makefile.pre.in
-@@ -220,6 +220,7 @@ LIBOBJS= @LIBOBJS@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index a88b7d5..7cb8bb3 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -221,6 +221,7 @@ LIBOBJS= @LIBOBJS@
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
-+HOSTPYTHON= $(BUILDPYTHON)
++HOSTPYTHON= $(BUILDPYTHON)
- cross_compiling=@cross_compiling@
+ PYTHON_FOR_GEN=@PYTHON_FOR_GEN@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
-@@ -279,6 +280,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
+@@ -280,6 +281,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
@@ -29,7 +34,7 @@ Index: Python-3.5.2/Makefile.pre.in
PSRCS= \
Parser/acceler.c \
-@@ -509,7 +511,7 @@ build_all_generate_profile:
+@@ -510,7 +512,7 @@ build_all_generate_profile:
run_profile_task:
: # FIXME: can't run for a cross build
@@ -38,16 +43,16 @@ Index: Python-3.5.2/Makefile.pre.in
build_all_merge_profile:
$(LLVM_PROF_MERGER)
-@@ -792,7 +794,7 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
+@@ -787,7 +789,7 @@ $(IO_OBJS): $(IO_H)
+
+ $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
@$(MKDIR_P) Include
- # Avoid copying the file onto itself for an in-tree build
- if test "$(cross_compiling)" != "yes"; then \
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
- else \
- cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \
- mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \
-@@ -990,7 +992,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/pyth
+- $(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)
######################################################################
TESTOPTS= $(EXTRATESTOPTS)
@@ -56,7 +61,7 @@ Index: Python-3.5.2/Makefile.pre.in
TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
TESTTIMEOUT= 3600
-@@ -1481,7 +1483,7 @@ frameworkinstallstructure: $(LDLIBRARY)
+@@ -1468,7 +1470,7 @@ frameworkinstallstructure: $(LDLIBRARY)
fi; \
done
$(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
@@ -65,7 +70,7 @@ Index: Python-3.5.2/Makefile.pre.in
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1547,7 +1549,7 @@ config.status: $(srcdir)/configure
+@@ -1534,7 +1536,7 @@ config.status: $(srcdir)/configure
# Run reindent on the library
reindent:
@@ -74,7 +79,7 @@ Index: Python-3.5.2/Makefile.pre.in
# Rerun configure with the same options as it was run last time,
# provided the config.status script exists
-@@ -1683,7 +1685,7 @@ funny:
+@@ -1674,7 +1676,7 @@ funny:
# Perform some verification checks on any modified files.
patchcheck: all
@@ -83,3 +88,6 @@ Index: Python-3.5.2/Makefile.pre.in
# Dependencies
+--
+2.11.0
+
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
new file mode 100644
index 000000000..7217c6ede
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch
@@ -0,0 +1,56 @@
+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/pass-missing-libraries-to-Extension-for-mul.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch
new file mode 100644
index 000000000..5c3af6b62
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch
@@ -0,0 +1,82 @@
+From a784b70d47ba2104afbcfd805e2a66cdc2109ec5 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 4 Aug 2017 11:16:14 +0800
+Subject: [PATCH] setup.py: pass missing libraries to Extension for multiprocessing module
+
+In the following commit:
+...
+commit e711cafab13efc9c1fe6c5cd75826401445eb585
+Author: Benjamin Peterson <benjamin@python.org>
+Date: Wed Jun 11 16:44:04 2008 +0000
+
+ Merged revisions 64104,64117 via svnmerge from
+ svn+ssh://pythondev@svn.python.org/python/trunk
+...
+(see diff in setup.py)
+It assigned libraries for multiprocessing module according
+the host_platform, but not pass it to Extension.
+
+In glibc, the following commit caused two definition of
+sem_getvalue are different.
+https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524
+(see diff in nptl/sem_getvalue.c for detail)
+`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1
+and `__old_sem_getvalue' is to compat the old version
+sem_getvalue@GLIBC_2.0.
+
+To build python for embedded Linux systems:
+http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html
+If not explicitly link to library pthread (-lpthread), it will
+load glibc's sem_getvalue randomly at runtime.
+
+Such as build python on linux x86_64 host and run the python
+on linux x86_32 target. If not link library pthread, it caused
+multiprocessing bounded semaphore could not work correctly.
+...
+>>> import multiprocessing
+>>> pool_sema = multiprocessing.BoundedSemaphore(value=1)
+>>> pool_sema.acquire()
+True
+>>> pool_sema.release()
+Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ValueError: semaphore or lock released too many times
+...
+
+And the semaphore issue also caused multiprocessing.Queue().put() hung.
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/2999]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ setup.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 4f0f522..d05707d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1606,8 +1606,10 @@ class PyBuildExt(build_ext):
+ elif host_platform.startswith('netbsd'):
+ macros = dict()
+ libraries = []
+-
+- else: # Linux and other unices
++ elif host_platform.startswith(('linux')):
++ macros = dict()
++ libraries = ['pthread']
++ else: # Other unices
+ macros = dict()
+ libraries = ['rt']
+
+@@ -1626,6 +1628,7 @@ class PyBuildExt(build_ext):
+ if sysconfig.get_config_var('WITH_THREAD'):
+ exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
+ define_macros=list(macros.items()),
++ libraries=libraries,
+ include_dirs=["Modules/_multiprocessing"]))
+ else:
+ missing.append('_multiprocessing')
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch
deleted file mode 100644
index ab1b7230e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From aab3e8c432b90508ac14755128f5a687be2fdf43 Mon Sep 17 00:00:00 2001
-From: Mingli Yu <Mingli.Yu@windriver.com>
-Date: Thu, 22 Sep 2016 16:39:49 +0800
-Subject: [PATCH] python3: fix CVE-2016-1000110
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which
-indicates that the script is in CGI mode.
-
-Issue #27568 Reported and patch contributed by RĂ©mi Rampin. [#27568]
-
-Backport patch from https://hg.python.org/cpython/rev/a0ac52ed8f79
-
-Upstream-Status: Backport
-CVE: CVE-2016-1000110
-Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
----
- Doc/howto/urllib2.rst | 5 +++++
- Doc/library/urllib.request.rst | 17 ++++++++++++++++-
- Lib/test/test_urllib.py | 14 +++++++++++++-
- Lib/urllib/request.py | 6 ++++++
- Misc/NEWS | 4 ++++
- 5 files changed, 44 insertions(+), 2 deletions(-)
-
-diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst
-index 24a4156..d2c7991 100644
---- a/Doc/howto/urllib2.rst
-+++ b/Doc/howto/urllib2.rst
-@@ -538,6 +538,11 @@ setting up a `Basic Authentication`_ handler: ::
- through a proxy. However, this can be enabled by extending urllib.request as
- shown in the recipe [#]_.
-
-+.. note::
-+
-+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see
-+ the documentation on :func:`~urllib.request.getproxies`.
-+
-
- Sockets and Layers
- ==================
-diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
-index 1338906..1291aeb 100644
---- a/Doc/library/urllib.request.rst
-+++ b/Doc/library/urllib.request.rst
-@@ -173,6 +173,16 @@ The :mod:`urllib.request` module defines the following functions:
- If both lowercase and uppercase environment variables exist (and disagree),
- lowercase is preferred.
-
-+ .. note::
-+
-+ If the environment variable ``REQUEST_METHOD`` is set, which usually
-+ indicates your script is running in a CGI environment, the environment
-+ variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
-+ because that variable can be injected by a client using the "Proxy:" HTTP
-+ header. If you need to use an HTTP proxy in a CGI environment, either use
-+ ``ProxyHandler`` explicitly, or make sure the variable name is in
-+ lowercase (or at least the ``_proxy`` suffix).
-+
-
- The following classes are provided:
-
-@@ -280,6 +290,11 @@ The following classes are provided:
- list of hostname suffixes, optionally with ``:port`` appended, for example
- ``cern.ch,ncsa.uiuc.edu,some.host:8080``.
-
-+ .. note::
-+
-+ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set;
-+ see the documentation on :func:`~urllib.request.getproxies`.
-+
-
- .. class:: HTTPPasswordMgr()
-
-@@ -1138,7 +1153,7 @@ the returned bytes object to string once it determines or guesses
- the appropriate encoding.
-
- The following W3C document, https://www.w3.org/International/O-charset\ , lists
--the various ways in which a (X)HTML or a XML document could have specified its
-+the various ways in which an (X)HTML or an XML document could have specified its
- encoding information.
-
- As the python.org website uses *utf-8* encoding as specified in its meta tag, we
-diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
-index 5d05f8d..247598a 100644
---- a/Lib/test/test_urllib.py
-+++ b/Lib/test/test_urllib.py
-@@ -1,4 +1,4 @@
--"""Regresssion tests for what was in Python 2's "urllib" module"""
-+"""Regression tests for what was in Python 2's "urllib" module"""
-
- import urllib.parse
- import urllib.request
-@@ -232,6 +232,18 @@ class ProxyTests(unittest.TestCase):
- self.assertTrue(urllib.request.proxy_bypass_environment('anotherdomain.com:8888'))
- self.assertTrue(urllib.request.proxy_bypass_environment('newdomain.com:1234'))
-
-+ def test_proxy_cgi_ignore(self):
-+ try:
-+ self.env.set('HTTP_PROXY', 'http://somewhere:3128')
-+ proxies = urllib.request.getproxies_environment()
-+ self.assertEqual('http://somewhere:3128', proxies['http'])
-+ self.env.set('REQUEST_METHOD', 'GET')
-+ proxies = urllib.request.getproxies_environment()
-+ self.assertNotIn('http', proxies)
-+ finally:
-+ self.env.unset('REQUEST_METHOD')
-+ self.env.unset('HTTP_PROXY')
-+
- def test_proxy_bypass_environment_host_match(self):
- bypass = urllib.request.proxy_bypass_environment
- self.env.set('NO_PROXY',
-diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
-index 1731fe3..3be327d 100644
---- a/Lib/urllib/request.py
-+++ b/Lib/urllib/request.py
-@@ -2412,6 +2412,12 @@ def getproxies_environment():
- name = name.lower()
- if value and name[-6:] == '_proxy':
- proxies[name[:-6]] = value
-+ # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY
-+ # (non-all-lowercase) as it may be set from the web server by a "Proxy:"
-+ # header from the client
-+ # If "proxy" is lowercase, it will still be used thanks to the next block
-+ if 'REQUEST_METHOD' in os.environ:
-+ proxies.pop('http', None)
- for name, value in os.environ.items():
- if name[-6:] == '_proxy':
- name = name.lower()
-diff --git a/Misc/NEWS b/Misc/NEWS
-index 4ad2551..2fcc95b 100644
---- a/Misc/NEWS
-+++ b/Misc/NEWS
-@@ -329,6 +329,10 @@ Library
- - Issue #26644: Raise ValueError rather than SystemError when a negative
- length is passed to SSLSocket.recv() or read().
-
-+- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
-+ HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates
-+ that the script is in CGI mode.
-+
- - Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes
- instead of up to 1024.
-
---
-2.8.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch
new file mode 100644
index 000000000..32ecab9fe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch
@@ -0,0 +1,97 @@
+The compiled .pyc files contain time stamp corresponding to the compile time.
+This prevents binary reproducibility. This patch allows to achieve binary
+reproducibility by overriding the build time stamp by the value
+exported via SOURCE_DATE_EPOCH.
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+
+From aeab488630fdb1b56a8d0b0c13fa88706b2afe9b Mon Sep 17 00:00:00 2001
+From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
+Date: Sat, 25 Feb 2017 06:42:28 +0100
+Subject: [PATCH] bpo-29708: support SOURCE_DATE_EPOCH env var in py_compile
+
+to allow for reproducible builds of python packages
+
+See https://reproducible-builds.org/ for why this is good
+and https://reproducible-builds.org/specs/source-date-epoch/
+for the definition of this variable.
+
+Background:
+In some distributions like openSUSE, binary rpms contain precompiled .pyc files.
+
+And packages like amqp or twisted dynamically generate .py files at build time
+so those have the current time and that timestamp gets embedded
+into the .pyc file header.
+When we then adapt file timestamps in rpms to be constant,
+the timestamp in the .pyc header will no more match
+the .py timestamp in the filesystem.
+The software will still work, but it will not use the .pyc file as it should.
+---
+ Doc/library/py_compile.rst | 4 ++++
+ Lib/py_compile.py | 4 ++++
+ Lib/test/test_py_compile.py | 19 +++++++++++++++++++
+ 3 files changed, 27 insertions(+)
+
+diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst
+index 0af8fb1..841f3e8 100644
+--- a/Doc/library/py_compile.rst
++++ b/Doc/library/py_compile.rst
+@@ -53,6 +53,10 @@ byte-code cache files in the directory containing the source code.
+ :func:`compile` function. The default of ``-1`` selects the optimization
+ level of the current interpreter.
+
++ If the SOURCE_DATE_EPOCH environment variable is set, the .py file mtime
++ and timestamp entry in .pyc file header, will be limited to this value.
++ See https://reproducible-builds.org/specs/source-date-epoch/ for more info.
++
+ .. versionchanged:: 3.2
+ Changed default value of *cfile* to be :PEP:`3147`-compliant. Previous
+ default was *file* + ``'c'`` (``'o'`` if optimization was enabled).
+diff --git a/Lib/py_compile.py b/Lib/py_compile.py
+index 11c5b50..62dcdc7 100644
+--- a/Lib/py_compile.py
++++ b/Lib/py_compile.py
+@@ -137,6 +137,10 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1):
+ except FileExistsError:
+ pass
+ source_stats = loader.path_stats(file)
++ sde = os.environ.get('SOURCE_DATE_EPOCH')
++ if sde and source_stats['mtime'] > int(sde):
++ source_stats['mtime'] = int(sde)
++ os.utime(file, (source_stats['mtime'], source_stats['mtime']))
+ bytecode = importlib._bootstrap_external._code_to_bytecode(
+ code, source_stats['mtime'], source_stats['size'])
+ mode = importlib._bootstrap_external._calc_mode(file)
+diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
+index 4a6caa5..3d09963 100644
+--- a/Lib/test/test_py_compile.py
++++ b/Lib/test/test_py_compile.py
+@@ -98,6 +98,25 @@ def test_bad_coding(self):
+ self.assertFalse(os.path.exists(
+ importlib.util.cache_from_source(bad_coding)))
+
++ def test_source_date_epoch(self):
++ testtime = 123456789
++ orig_sde = os.getenv("SOURCE_DATE_EPOCH")
++ os.environ["SOURCE_DATE_EPOCH"] = str(testtime)
++ py_compile.compile(self.source_path, self.pyc_path)
++ if orig_sde:
++ os.environ["SOURCE_DATE_EPOCH"] = orig_sde
++ else:
++ del os.environ["SOURCE_DATE_EPOCH"]
++ self.assertTrue(os.path.exists(self.pyc_path))
++ self.assertFalse(os.path.exists(self.cache_path))
++ statinfo = os.stat(self.source_path)
++ self.assertEqual(statinfo.st_mtime, testtime)
++ f = open(self.pyc_path, "rb")
++ f.read(4)
++ timebytes = f.read(4) # read timestamp from pyc header
++ f.close()
++ self.assertEqual(timebytes, (testtime).to_bytes(4, 'little'))
++
+ @unittest.skipIf(sys.flags.optimize > 0, 'test does not work with -O')
+ def test_double_dot_no_clobber(self):
+ # http://bugs.python.org/issue22966
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
index 0d9152ccd..9b40e8ac9 100644
--- 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
@@ -1,21 +1,7 @@
-This patch updates random.c to match upstream python's code at revision
-8125d9a8152b. This addresses various issues around problems with glibc 2.24
-and 2.25 such that python would fail to start with:
-
-[rpurdie@centos7 ~]$ /tmp/t2/sysroots/x86_64-pokysdk-linux/usr/bin/python3
-Fatal Python error: getentropy() failed
-Aborted
-
-(taken from our buildtools-tarball also breaks eSDK)
-
-Upstream-Status: Backport
-
-# HG changeset patch
-# User Victor Stinner <victor.stinner@gmail.com>
-# Date 1483957133 -3600
-# Node ID 8125d9a8152b79e712cb09c7094b9129b9bcea86
-# Parent 337461574c90281630751b6095c4e1baf380cf7d
-Issue #29157: Prefer getrandom() over getentropy()
+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:
@@ -26,12 +12,17 @@ and default branches:
* Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom()
works in non-blocking mode on Python 3.5
-RP 2017/1/22
+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(-)
-Index: Python-3.5.2/Python/random.c
-===================================================================
---- Python-3.5.2.orig/Python/random.c
-+++ Python-3.5.2/Python/random.c
+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
@@ -42,7 +33,7 @@ Index: Python-3.5.2/Python/random.c
#else
# include <fcntl.h>
# ifdef HAVE_SYS_STAT_H
-@@ -36,10 +39,9 @@ win32_urandom_init(int raise)
+@@ -37,10 +40,9 @@ win32_urandom_init(int raise)
return 0;
error:
@@ -55,7 +46,7 @@ Index: Python-3.5.2/Python/random.c
return -1;
}
-@@ -52,8 +54,9 @@ win32_urandom(unsigned char *buffer, Py_
+@@ -53,8 +55,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
if (hCryptProv == 0)
{
@@ -66,7 +57,7 @@ Index: Python-3.5.2/Python/random.c
}
while (size > 0)
-@@ -62,11 +65,9 @@ win32_urandom(unsigned char *buffer, Py_
+@@ -63,11 +66,9 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer))
{
/* CryptGenRandom() failed */
@@ -80,7 +71,7 @@ Index: Python-3.5.2/Python/random.c
return -1;
}
buffer += chunk;
-@@ -75,55 +76,29 @@ win32_urandom(unsigned char *buffer, Py_
+@@ -76,58 +77,23 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
return 0;
}
@@ -129,13 +120,19 @@ Index: Python-3.5.2/Python/random.c
#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 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:
+ - 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.
@@ -144,26 +141,16 @@ Index: Python-3.5.2/Python/random.c
static int
py_getrandom(void *buffer, Py_ssize_t size, int raise)
{
-- /* Is getrandom() supported by the running kernel?
-- * Need Linux kernel 3.17 or newer, or Solaris 11.3 or newer */
-+ /* Is getrandom() supported by the running kernel? Set to 0 if getrandom()
-+ failed with ENOSYS or EPERM. Need Linux kernel 3.17 or newer, or Solaris
-+ 11.3 or newer */
- static int getrandom_works = 1;
-
- /* getrandom() on Linux will block if called before the kernel has
-@@ -132,84 +107,165 @@ py_getrandom(void *buffer, Py_ssize_t si
+@@ -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;
-- int n;
+ char *dest;
-+ long n;
+ long n;
-- if (!getrandom_works)
-+ if (!getrandom_works) {
+ if (!getrandom_works) {
return 0;
-+ }
+ }
+ dest = buffer;
while (0 < size) {
@@ -174,11 +161,8 @@ Index: Python-3.5.2/Python/random.c
+ requested. */
n = Py_MIN(size, 1024);
#else
-- n = size;
-+ n = Py_MIN(size, LONG_MAX);
- #endif
-
- errno = 0;
+ 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
@@ -209,56 +193,45 @@ Index: Python-3.5.2/Python/random.c
#endif
if (n < 0) {
-- if (errno == ENOSYS) {
+- /* 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) {
+ if (errno == ENOSYS || errno == EPERM) {
getrandom_works = 0;
return 0;
}
+
if (errno == EAGAIN) {
-- /* If we failed with EAGAIN, the entropy pool was
-- * uninitialized. In this case, we return failure to fall
-- * back to reading from /dev/urandom.
-- *
-- * Note: In this case the data read will not be random so
-- * should not be used for cryptographic purposes. Retaining
-- * the existing semantics for practical purposes. */
-+ /* getrandom(GRND_NONBLOCK) fails with EAGAIN if the system
-+ urandom is not initialiazed yet. In this case, fall back on
-+ reading from /dev/urandom.
-+
-+ Note: In this case the data read will not be random so
-+ should not be used for cryptographic purposes. Retaining
-+ the existing semantics for practical purposes. */
- getrandom_works = 0;
- return 0;
+ /* 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)
+- if (!raise) {
- Py_FatalError("getrandom() interrupted by a signal");
-- return -1;
+ if (raise) {
+ if (PyErr_CheckSignals()) {
+ return -1;
-+ }
+ }
+- return -1;
}
+
- /* retry getrandom() */
-+
+ /* retry getrandom() if it was interrupted by a signal */
continue;
}
-- if (raise)
-+ if (raise) {
+ if (raise) {
PyErr_SetFromErrno(PyExc_OSError);
-- else
+ }
+- else {
- Py_FatalError("getrandom() failed");
-+ }
+- }
return -1;
}
@@ -269,12 +242,19 @@ Index: Python-3.5.2/Python/random.c
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).
@@ -282,25 +262,47 @@ Index: Python-3.5.2/Python/random.c
+ 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);
@@ -309,7 +311,11 @@ Index: Python-3.5.2/Python/random.c
+ 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)
@@ -334,71 +340,44 @@ Index: Python-3.5.2/Python/random.c
+ PyErr_SetFromErrno(PyExc_OSError);
+ }
+ return -1;
-+ }
+ }
+- buffer += n;
+- size -= n;
+
+ buffer += len;
+ size -= len;
-+ }
+ }
+- close(fd);
+ return 1;
-+}
+ }
+#endif /* defined(HAVE_GETENTROPY) && !defined(sun) */
-+
- static struct {
- int fd;
-@@ -217,127 +273,123 @@ static struct {
- ino_t st_ino;
- } urandom_cache = { -1 };
+-/* 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:
-
--/* Read size bytes from /dev/urandom into buffer.
-- Call Py_FatalError() on error. */
--static void
--dev_urandom_noraise(unsigned char *buffer, Py_ssize_t size)
--{
-- int fd;
-- Py_ssize_t n;
++
+ - Return 0 on success
+ - Raise an exception (if raise is non-zero) and return -1 on error
-
-- assert (0 < size);
++
+ Possible causes of errors:
-
--#ifdef PY_GETRANDOM
-- if (py_getrandom(buffer, size, 0) == 1)
-- return;
-- /* getrandom() is not supported by the running kernel, fall back
-- * on reading /dev/urandom */
--#endif
++
+ - 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
-
-- fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
-- if (fd < 0)
-- Py_FatalError("Failed to open /dev/urandom");
++
+ read() is retried if it failed with EINTR: interrupted by a signal.
-
-- 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 */
-- Py_FatalError("Failed to read bytes from /dev/urandom");
-- break;
-- }
-- buffer += n;
-- size -= (Py_ssize_t)n;
-- }
-- close(fd);
--}
++
+ 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.
@@ -406,9 +385,7 @@ Index: Python-3.5.2/Python/random.c
+ 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.
-
--/* Read size bytes from /dev/urandom into buffer.
-- Return 0 on success, raise an exception and return -1 on error. */
++
+ 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. */
@@ -422,22 +399,24 @@ Index: Python-3.5.2/Python/random.c
-#ifdef PY_GETRANDOM
- int res;
-#endif
-
+-
- if (size <= 0)
- return 0;
-+ if (raise) {
-+ struct _Py_stat_struct st;
-#ifdef PY_GETRANDOM
- res = py_getrandom(buffer, size, 1);
-- if (res < 0)
+- if (res < 0) {
- return -1;
-- if (res == 1)
+- }
+- if (res == 1) {
- return 0;
-- /* getrandom() is not supported by the running kernel, fall back
-- * on reading /dev/urandom */
+- }
+- /* 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)
@@ -516,8 +495,9 @@ Index: Python-3.5.2/Python/random.c
- do {
- n = _Py_read(fd, buffer, (size_t)size);
-- if (n == -1)
+- if (n == -1) {
- return -1;
+- }
- if (n == 0) {
- PyErr_Format(PyExc_RuntimeError,
- "Failed to read %zi bytes from /dev/urandom",
@@ -566,7 +546,7 @@ Index: Python-3.5.2/Python/random.c
return 0;
}
-@@ -349,8 +401,8 @@ dev_urandom_close(void)
+@@ -376,8 +402,8 @@ dev_urandom_close(void)
urandom_cache.fd = -1;
}
}
@@ -576,7 +556,7 @@ Index: Python-3.5.2/Python/random.c
/* Fill buffer with pseudo-random bytes generated by a linear congruent
generator (LCG):
-@@ -373,29 +425,98 @@ lcg_urandom(unsigned int x0, unsigned ch
+@@ -400,31 +426,100 @@ lcg_urandom(unsigned int x0, unsigned char *buffer, size_t size)
}
}
@@ -661,7 +641,7 @@ Index: Python-3.5.2/Python/random.c
#else
- return dev_urandom_python((char*)buffer, size);
+ res = py_getentropy(buffer, size, raise);
- #endif
++#endif
+ if (res < 0) {
+ return -1;
+ }
@@ -673,9 +653,9 @@ Index: Python-3.5.2/Python/random.c
+#endif
+
+ return dev_urandom(buffer, size, raise);
-+#endif
-+}
-+
+ #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.
@@ -685,10 +665,12 @@ Index: Python-3.5.2/Python/random.c
+_PyOS_URandom(void *buffer, Py_ssize_t size)
+{
+ return pyurandom(buffer, size, 1);
- }
-
++}
++
void
-@@ -436,13 +557,14 @@ _PyRandom_Init(void)
+ _PyRandom_Init(void)
+ {
+@@ -463,13 +558,14 @@ _PyRandom_Init(void)
}
}
else {
@@ -710,7 +692,7 @@ Index: Python-3.5.2/Python/random.c
}
}
-@@ -454,8 +576,6 @@ _PyRandom_Fini(void)
+@@ -481,8 +577,6 @@ _PyRandom_Fini(void)
CryptReleaseContext(hCryptProv, 0);
hCryptProv = 0;
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb
index 2ff7c9e27..13df12fe5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.3.bb
@@ -8,7 +8,7 @@ DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://python-config.patch \
-file://000-cross-compile.patch \
+file://0001-cross-compile-support.patch \
file://030-fixup-include-dirs.patch \
file://070-dont-clean-ipkg-install.patch \
file://080-distutils-dont_adjust_files.patch \
@@ -16,6 +16,7 @@ file://130-readline-setup.patch \
file://150-fix-setupterm.patch \
file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \
+file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
${DISTRO_SRC_URI} \
"
@@ -35,13 +36,15 @@ SRC_URI += "\
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://python3-fix-CVE-2016-1000110.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] = "8906efbacfcdc7c3c9198aeefafd159e"
-SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40"
+SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
+SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e"
# exclude pre-releases for both python 2.x and 3.x
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
@@ -193,7 +196,7 @@ py_package_preprocess () {
require python-${PYTHON_MAJMIN}-manifest.inc
# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
+RPROVIDES_${PN}-modules = "${PN}"
RRECOMMENDS_${PN}-core = "${PN}-readline"
RRECOMMENDS_${PN}-crypt = "openssl"
RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
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.13.bb
index 4ef99523e..754c02909 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.13.bb
@@ -1,5 +1,5 @@
require python.inc
-DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
+DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib"
PR = "${INC_PR}"
DISTRO_SRC_URI ?= "file://sitecustomize.py"
@@ -27,6 +27,8 @@ SRC_URI += "\
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 \
"
S = "${WORKDIR}/Python-${PV}"
@@ -37,6 +39,9 @@ CONFIGUREOPTS += " --with-system-ffi "
EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
+PACKAGECONFIG ??= "bdb"
+PACKAGECONFIG[bdb] = ",,db"
+
do_configure_append() {
rm -f ${S}/Makefile.orig
autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
@@ -116,6 +121,10 @@ do_install() {
fi
oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
+
+ if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
+ rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
+ fi
}
do_install_append_class-nativesdk () {
@@ -152,7 +161,9 @@ FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
PACKAGES += "${PN}-misc"
FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
RDEPENDS_${PN}-modules += "${PN}-misc"
-RDEPENDS_${PN}-ptest = "${PN}-modules"
+
+# ptest
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
inherit ptest
@@ -162,10 +173,23 @@ do_install_ptest() {
sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
-e s:LIBDIR:${libdir}:g \
-i ${D}${PTEST_PATH}/run-ptest
+
+ #Remove build host references
+ sed -i \
+ -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT}::g' \
+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+ ${D}/${PTEST_PATH}/Makefile
}
# catch manpage
PACKAGES += "${PN}-man"
FILES_${PN}-man = "${datadir}/man"
+# Nasty but if bdb isn't enabled the package won't be generated
+RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
+
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
index 27d53157d..d86b15517 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
@@ -20,6 +20,5 @@ do_install() {
install tunctl ${D}${bindir}/
}
-RM_WORK_EXCLUDE_ITEMS += "recipe-sysroot-native"
DEPENDS += "qemu-native"
addtask addto_recipe_sysroot after do_populate_sysroot before do_build
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 0e1411af6..2a1d14b31 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
@@ -26,7 +26,6 @@ EXTRA_OECONF = " \
--disable-strip \
--disable-werror \
--target-list=${@get_qemu_target_list(d)} \
- --with-system-pixman \
--extra-cflags='${CFLAGS}' \
"
EXTRA_OECONF_append_class-native = " --python=${USRBINPATH}/python2.7"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch
index b8a783d4e..f1dbaffea 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch
@@ -239,19 +239,19 @@ index 44739ebad2..bc8072d0bc 100644
+ 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, 0,
++ 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, 0,
++ 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, 0,
++ TPMPassthruState, 1, NULL,
+ tpm_blobs.savestate.size),
+ VMSTATE_END_OF_LIST()
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/04b33e21866412689f18b7ad6daf0a54d8f959a7.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/04b33e21866412689f18b7ad6daf0a54d8f959a7.patch
deleted file mode 100644
index d947e8cba..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/04b33e21866412689f18b7ad6daf0a54d8f959a7.patch
+++ /dev/null
@@ -1,282 +0,0 @@
-From 04b33e21866412689f18b7ad6daf0a54d8f959a7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 28 Jun 2017 13:44:52 -0700
-Subject: [PATCH] Replace 'struct ucontext' with 'ucontext_t' type
-
-glibc used to have:
-
- typedef struct ucontext { ... } ucontext_t;
-
-glibc now has:
-
- typedef struct ucontext_t { ... } ucontext_t;
-
-(See https://sourceware.org/bugzilla/show_bug.cgi?id=21457
- for detail and rationale for the glibc change)
-
-However, QEMU used "struct ucontext" in declarations. This is a
-private name and compatibility cannot be guaranteed. Switch to
-only using the standardized type name.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Message-id: 20170628204452.41230-1-raj.khem@gmail.com
-Cc: Kamil Rytarowski <kamil@netbsd.org>
-Cc: Riku Voipio <riku.voipio@iki.fi>
-Cc: Laurent Vivier <laurent@vivier.eu>
-Cc: Paolo Bonzini <pbonzini@redhat.com>
-Reviewed-by: Eric Blake <eblake@redhat.com>
-[PMM: Rewrote commit message, based mostly on the one from
- Nathaniel McCallum]
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
-Upstream-Status: Backport
-RP 2017/9/6
----
- linux-user/host/aarch64/hostdep.h | 2 +-
- linux-user/host/arm/hostdep.h | 2 +-
- linux-user/host/i386/hostdep.h | 2 +-
- linux-user/host/ppc64/hostdep.h | 2 +-
- linux-user/host/s390x/hostdep.h | 2 +-
- linux-user/host/x86_64/hostdep.h | 2 +-
- linux-user/signal.c | 10 +++++-----
- tests/tcg/test-i386.c | 4 ++--
- user-exec.c | 18 +++++++++---------
- 9 files changed, 22 insertions(+), 22 deletions(-)
-
-diff --git a/linux-user/host/aarch64/hostdep.h b/linux-user/host/aarch64/hostdep.h
-index 64f75ce..a8d41a2 100644
---- a/linux-user/host/aarch64/hostdep.h
-+++ b/linux-user/host/aarch64/hostdep.h
-@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
- /* Adjust the signal context to rewind out of safe-syscall if we're in it */
- static inline void rewind_if_in_safe_syscall(void *puc)
- {
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- __u64 *pcreg = &uc->uc_mcontext.pc;
-
- if (*pcreg > (uintptr_t)safe_syscall_start
-diff --git a/linux-user/host/arm/hostdep.h b/linux-user/host/arm/hostdep.h
-index 5c1ae60..9276fe6 100644
---- a/linux-user/host/arm/hostdep.h
-+++ b/linux-user/host/arm/hostdep.h
-@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
- /* Adjust the signal context to rewind out of safe-syscall if we're in it */
- static inline void rewind_if_in_safe_syscall(void *puc)
- {
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- unsigned long *pcreg = &uc->uc_mcontext.arm_pc;
-
- if (*pcreg > (uintptr_t)safe_syscall_start
-diff --git a/linux-user/host/i386/hostdep.h b/linux-user/host/i386/hostdep.h
-index d834bd8..073be74 100644
---- a/linux-user/host/i386/hostdep.h
-+++ b/linux-user/host/i386/hostdep.h
-@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
- /* Adjust the signal context to rewind out of safe-syscall if we're in it */
- static inline void rewind_if_in_safe_syscall(void *puc)
- {
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- greg_t *pcreg = &uc->uc_mcontext.gregs[REG_EIP];
-
- if (*pcreg > (uintptr_t)safe_syscall_start
-diff --git a/linux-user/host/ppc64/hostdep.h b/linux-user/host/ppc64/hostdep.h
-index 0b0f5f7..98979ad 100644
---- a/linux-user/host/ppc64/hostdep.h
-+++ b/linux-user/host/ppc64/hostdep.h
-@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
- /* Adjust the signal context to rewind out of safe-syscall if we're in it */
- static inline void rewind_if_in_safe_syscall(void *puc)
- {
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- unsigned long *pcreg = &uc->uc_mcontext.gp_regs[PT_NIP];
-
- if (*pcreg > (uintptr_t)safe_syscall_start
-diff --git a/linux-user/host/s390x/hostdep.h b/linux-user/host/s390x/hostdep.h
-index 6f9da9c..4f0171f 100644
---- a/linux-user/host/s390x/hostdep.h
-+++ b/linux-user/host/s390x/hostdep.h
-@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
- /* Adjust the signal context to rewind out of safe-syscall if we're in it */
- static inline void rewind_if_in_safe_syscall(void *puc)
- {
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- unsigned long *pcreg = &uc->uc_mcontext.psw.addr;
-
- if (*pcreg > (uintptr_t)safe_syscall_start
-diff --git a/linux-user/host/x86_64/hostdep.h b/linux-user/host/x86_64/hostdep.h
-index 3b42596..a4fefb5 100644
---- a/linux-user/host/x86_64/hostdep.h
-+++ b/linux-user/host/x86_64/hostdep.h
-@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
- /* Adjust the signal context to rewind out of safe-syscall if we're in it */
- static inline void rewind_if_in_safe_syscall(void *puc)
- {
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- greg_t *pcreg = &uc->uc_mcontext.gregs[REG_RIP];
-
- if (*pcreg > (uintptr_t)safe_syscall_start
-diff --git a/linux-user/signal.c b/linux-user/signal.c
-index d68bd26..cc0c3fc 100644
---- a/linux-user/signal.c
-+++ b/linux-user/signal.c
-@@ -3346,7 +3346,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
- *
- * a0 = signal number
- * a1 = pointer to siginfo_t
-- * a2 = pointer to struct ucontext
-+ * a2 = pointer to ucontext_t
- *
- * $25 and PC point to the signal handler, $29 points to the
- * struct sigframe.
-@@ -3764,7 +3764,7 @@ struct target_signal_frame {
-
- struct rt_signal_frame {
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- uint32_t tramp[2];
- };
-
-@@ -3980,7 +3980,7 @@ struct rt_signal_frame {
- siginfo_t *pinfo;
- void *puc;
- siginfo_t info;
-- struct ucontext uc;
-+ ucontext_t uc;
- uint16_t retcode[4]; /* Trampoline code. */
- };
-
-@@ -4515,7 +4515,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
- tswap_siginfo(&frame->info, info);
- }
-
-- /*err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext));*/
-+ /*err |= __clear_user(&frame->uc, offsetof(ucontext_t, uc_mcontext));*/
- __put_user(0, &frame->uc.tuc_flags);
- __put_user(0, &frame->uc.tuc_link);
- __put_user(target_sigaltstack_used.ss_sp,
-@@ -5007,7 +5007,7 @@ enum {
-
- struct target_ucontext {
- target_ulong tuc_flags;
-- target_ulong tuc_link; /* struct ucontext __user * */
-+ target_ulong tuc_link; /* ucontext_t __user * */
- struct target_sigaltstack tuc_stack;
- #if !defined(TARGET_PPC64)
- int32_t tuc_pad[7];
-diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c
-index 0f7b943..9599204 100644
---- a/tests/tcg/test-i386.c
-+++ b/tests/tcg/test-i386.c
-@@ -1720,7 +1720,7 @@ int tab[2];
-
- void sig_handler(int sig, siginfo_t *info, void *puc)
- {
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
-
- printf("si_signo=%d si_errno=%d si_code=%d",
- info->si_signo, info->si_errno, info->si_code);
-@@ -1912,7 +1912,7 @@ void test_exceptions(void)
- /* specific precise single step test */
- void sig_trap_handler(int sig, siginfo_t *info, void *puc)
- {
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- printf("EIP=" FMTLX "\n", (long)uc->uc_mcontext.gregs[REG_EIP]);
- }
-
-diff --git a/user-exec.c b/user-exec.c
-index a8f95fa..2a975ea 100644
---- a/user-exec.c
-+++ b/user-exec.c
-@@ -167,7 +167,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
- #elif defined(__OpenBSD__)
- struct sigcontext *uc = puc;
- #else
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- #endif
- unsigned long pc;
- int trapno;
-@@ -222,7 +222,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
- #elif defined(__OpenBSD__)
- struct sigcontext *uc = puc;
- #else
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- #endif
-
- pc = PC_sig(uc);
-@@ -289,7 +289,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- ucontext_t *uc = puc;
- #else
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- #endif
- unsigned long pc;
- int is_write;
-@@ -316,7 +316,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
- void *puc)
- {
- siginfo_t *info = pinfo;
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- uint32_t *pc = uc->uc_mcontext.sc_pc;
- uint32_t insn = *pc;
- int is_write = 0;
-@@ -414,7 +414,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
- #if defined(__NetBSD__)
- ucontext_t *uc = puc;
- #else
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- #endif
- unsigned long pc;
- int is_write;
-@@ -441,7 +441,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
- int cpu_signal_handler(int host_signum, void *pinfo, void *puc)
- {
- siginfo_t *info = pinfo;
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- uintptr_t pc = uc->uc_mcontext.pc;
- uint32_t insn = *(uint32_t *)pc;
- bool is_write;
-@@ -474,7 +474,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, void *puc)
- int cpu_signal_handler(int host_signum, void *pinfo, void *puc)
- {
- siginfo_t *info = pinfo;
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- unsigned long ip;
- int is_write = 0;
-
-@@ -505,7 +505,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
- void *puc)
- {
- siginfo_t *info = pinfo;
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- unsigned long pc;
- uint16_t *pinsn;
- int is_write = 0;
-@@ -558,7 +558,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
- void *puc)
- {
- siginfo_t *info = pinfo;
-- struct ucontext *uc = puc;
-+ ucontext_t *uc = puc;
- greg_t pc = uc->uc_mcontext.pc;
- int is_write;
-
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch
deleted file mode 100644
index e0f7a1a3f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 7139ccbc907441337b4b59cde2c5b5a54cb5b2cc Mon Sep 17 00:00:00 2001
-From: Sona Sarmadi <sona.sarmadi@enea.com>
-
-virtio-gpu: fix information leak in capset get dispatch
-
-In virgl_cmd_get_capset function, it uses g_malloc to allocate
-a response struct to the guest. As the 'resp'struct hasn't been full
-initialized it will lead the 'resp->padding' field to the guest.
-Use g_malloc0 to avoid this.
-
-Signed-off-by: Li Qiang <liqiang6-s@360.cn>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-id: 58188cae.4a6ec20a.3d2d1.aff2@mx.google.com
-
-[Sona: backported from master to v2.8.0 and resolved conflict]
-
-Reference to upstream patch:
-http://git.qemu-project.org/?p=qemu.git;a=commit;h=85d9d044471f93c48c5c396f7e217b4ef12f69f8
-
-CVE: CVE-2016-9908
-Upstream-Status: Backport
-
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
- hw/display/virtio-gpu-3d.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
-index 23f39de..d98b140 100644
---- a/hw/display/virtio-gpu-3d.c
-+++ b/hw/display/virtio-gpu-3d.c
-@@ -371,7 +371,7 @@ static void virgl_cmd_get_capset(VirtIOGPU *g,
-
- virgl_renderer_get_cap_set(gc.capset_id, &max_ver,
- &max_size);
-- resp = g_malloc(sizeof(*resp) + max_size);
-+ resp = g_malloc0(sizeof(*resp) + max_size);
-
- resp->hdr.type = VIRTIO_GPU_RESP_OK_CAPSET;
- virgl_renderer_fill_caps(gc.capset_id,
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch
deleted file mode 100644
index c009ffd96..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From b8e23926c568f2e963af39028b71c472e3023793 Mon Sep 17 00:00:00 2001
-From: Li Qiang <liq3ea@gmail.com>
-Date: Mon, 28 Nov 2016 21:29:25 -0500
-Subject: [PATCH] virtio-gpu: call cleanup mapping function in resource destroy
-
-If the guest destroy the resource before detach banking, the 'iov'
-and 'addrs' field in resource is not freed thus leading memory
-leak issue. This patch avoid this.
-
-CVE: CVE-2016-9912
-Upstream-Status: Backport
-
-Signed-off-by: Li Qiang <liq3ea@gmail.com>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-id: 1480386565-10077-1-git-send-email-liq3ea@gmail.com
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
- hw/display/virtio-gpu.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
-index ed2b6d3..6a26258 100644
---- a/hw/display/virtio-gpu.c
-+++ b/hw/display/virtio-gpu.c
-@@ -28,6 +28,8 @@
- static struct virtio_gpu_simple_resource*
- virtio_gpu_find_resource(VirtIOGPU *g, uint32_t resource_id);
-
-+static void virtio_gpu_cleanup_mapping(struct virtio_gpu_simple_resource *res);
-+
- #ifdef CONFIG_VIRGL
- #include <virglrenderer.h>
- #define VIRGL(_g, _virgl, _simple, ...) \
-@@ -364,6 +366,7 @@ static void virtio_gpu_resource_destroy(VirtIOGPU *g,
- struct virtio_gpu_simple_resource *res)
- {
- pixman_image_unref(res->image);
-+ virtio_gpu_cleanup_mapping(res);
- QTAILQ_REMOVE(&g->reslist, res, next);
- g->hostmem -= res->hostmem;
- g_free(res);
---
-1.9.1
-
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
new file mode 100644
index 000000000..ce0b1ee3e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13672.patch
@@ -0,0 +1,504 @@
+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
new file mode 100644
index 000000000..3d0695fd6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13673.patch
@@ -0,0 +1,53 @@
+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
new file mode 100644
index 000000000..352f73f62
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-13711.patch
@@ -0,0 +1,87 @@
+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
new file mode 100644
index 000000000..969ad877d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2017-14167.patch
@@ -0,0 +1,70 @@
+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/add-ptest-in-makefile.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
index 2ce3478e4..e9639820b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
@@ -1,21 +1,22 @@
-Upstream-Status: Pending
+From 4201a5791fc4798a45a9b9f881602d7bacb74ed1 Mon Sep 17 00:00:00 2001
+From: Juro Bystricky <juro.bystricky@intel.com>
+Date: Thu, 31 Aug 2017 11:06:56 -0700
+Subject: Add subpackage -ptest which runs all unit test cases for qemu.
-Add subpackage -ptest which runs all unit test cases for qemu.
+Upstream-Status: Pending
Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- tests/Makefile.include | 8 ++++++++
- 1 file changed, 8 insertions(+)
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
diff --git a/tests/Makefile.include b/tests/Makefile.include
-index 14be491..0fce37a 100644
+index f08b741..3d1b3e9 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
-@@ -776,3 +776,11 @@ all: $(QEMU_IOTESTS_HELPERS-y)
-
+@@ -924,4 +924,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
-include $(wildcard tests/*.d)
-include $(wildcard tests/libqos/*.d)
-+
+
+buildtest-TESTS: $(check-unit-y)
+
+runtest-TESTS:
@@ -23,6 +24,5 @@ index 14be491..0fce37a 100644
+ nf=$$(echo $$f | sed 's/tests\//\.\//g'); \
+ $$nf; \
+ done
---
-2.9.0
-
++
+ endif
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
new file mode 100644
index 000000000..9bbbc6f76
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
@@ -0,0 +1,46 @@
+From bef93bb81588b5323a52d2e1886f2a77b64a976b Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Tue, 26 Feb 2013 11:43:28 -0500
+Subject: [PATCH 03/18] apic: fixup fallthrough to PIC
+
+Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
+interrupts through the local APIC if the local APIC config says so.]
+missed a check to ensure the local APIC is enabled. Since if the local
+APIC is disabled it doesn't matter what the local APIC config says.
+
+If this check isn't done and the guest has disabled the local APIC the
+guest will receive a general protection fault, similar to what is seen
+here:
+
+https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html
+
+The GPF is caused by an attempt to service interrupt 0xffffffff. This
+comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr()
+(with the local APIC disabled apic_get_interrupt() returns -1).
+apic_accept_pic_intr() returns 0 and thus the interrupt number which
+is returned from cpu_get_pic_interrupt(), and which is attempted to be
+serviced, is -1.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ 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);
+ uint32_t lvt0;
+
+- if (!s)
++ if (!s || !(s->spurious_vec & APIC_SV_ENABLE))
+ return -1;
+
+ lvt0 = s->lvt[APIC_LVT_LINT0];
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch
deleted file mode 100644
index 59cdc1c30..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
-
-From 9ac096d8eccf2d56ece646320c282c8369f8337c Mon Sep 17 00:00:00 2001
-From: Cristian Iorga <cristian.iorga@intel.com>
-Date: Tue, 29 Jul 2014 18:35:59 +0300
-Subject: [PATCH] configure: fix Darwin target detection
-
-fix Darwin target detection for qemu
-cross-compilation.
-
-Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
----
- configure | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure b/configure
-index 283c71c..1c66a11 100755
---- a/configure
-+++ b/configure
-@@ -444,6 +444,8 @@ elif check_define __sun__ ; then
- targetos='SunOS'
- elif check_define __HAIKU__ ; then
- targetos='Haiku'
-+elif check_define __APPLE__ ; then
-+ targetos='Darwin'
- else
- targetos=`uname -s`
- fi
---
-1.9.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
new file mode 100644
index 000000000..6f722433d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/ppc_locking.patch
@@ -0,0 +1,105 @@
+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/qemu-2.5.0-cflags.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
index 173394fd0..eb99d1463 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
@@ -1,3 +1,5 @@
+Upstream-Status: Pending
+
--- a/configure
+++ b/configure
@@ -4468,10 +4468,6 @@ fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch
deleted file mode 100644
index ba21e71b0..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-[Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread
-
-From: Sam Bobroff
-Subject: [Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread_create()
-Date: Mon, 30 Jan 2017 16:08:07 +1100
-Programs run under qemu-ppc64 on an x86_64 host currently segfault
-if they use pthread_create() due to the adjustment made to the NIP in
-commit bd6fefe71cec5a0c7d2be4ac96307f25db56abf9.
-
-This patch changes cpu_loop() to set the NIP back to the
-pre-incremented value before calling do_syscall(), which causes the
-correct address to be used for the new thread and corrects the fault.
-
-Signed-off-by: Sam Bobroff <address@hidden>
-
-Upstream-Status: Backport
-
----
-
-linux-user/main.c | 4 +++-
-1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/linux-user/main.c b/linux-user/main.c
-index 30049581ef..b5dee01541 100644
---- a/linux-user/main.c
-+++ b/linux-user/main.c
-@@ -1712,18 +1712,20 @@ void cpu_loop(CPUPPCState *env)
- * in syscalls.
- */
- env->crf[0] &= ~0x1;
-+ env->nip += 4;
- ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4],
- env->gpr[5], env->gpr[6], env->gpr[7],
- env->gpr[8], 0, 0);
- if (ret == -TARGET_ERESTARTSYS) {
-+ env->nip -= 4;
- break;
- }
- if (ret == (target_ulong)(-TARGET_QEMU_ESIGRETURN)) {
-+ env->nip -= 4;
- /* Returning from a successful sigreturn syscall.
- Avoid corrupting register state. */
- break;
- }
-- env->nip += 4;
- if (ret > (target_ulong)(-515)) {
- env->crf[0] |= 0x1;
- ret = -ret;
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.10.0.bb
new file mode 100644
index 000000000..a9b4939b0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.10.0.bb
@@ -0,0 +1,63 @@
+require qemu.inc
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest = "bash make"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+ file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
+
+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 \
+ file://qemu-enlarge-env-entry-size.patch \
+ 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://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 \
+ "
+UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
+
+
+SRC_URI_append_class-native = " \
+ file://fix-libcap-header-issue-on-some-distro.patch \
+ file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
+ "
+
+SRC_URI[md5sum] = "ca73441de73a9b52c6c49c97190d2185"
+SRC_URI[sha256sum] = "7e9f39e1306e6dcc595494e91c1464d4b03f55ddd2053183e0e1b69f7f776d48"
+
+COMPATIBLE_HOST_mipsarchn32 = "null"
+COMPATIBLE_HOST_mipsarchn64 = "null"
+
+do_install_append() {
+ # Prevent QA warnings about installed ${localstatedir}/run
+ if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
+ install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
+}
+
+do_compile_ptest() {
+ make buildtest-TESTS
+}
+
+do_install_ptest() {
+ cp -rL ${B}/tests ${D}${PTEST_PATH}
+ find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
+
+ cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.8.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.8.0.bb
deleted file mode 100644
index fa70009f7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.8.0.bb
+++ /dev/null
@@ -1,65 +0,0 @@
-require qemu.inc
-
-inherit ptest
-
-RDEPENDS_${PN}-ptest = "bash make"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
- file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-
-SRC_URI += " \
- file://powerpc_rom.bin \
- file://disable-grabs.patch \
- file://exclude-some-arm-EABI-obsolete-syscalls.patch \
- file://wacom.patch \
- file://add-ptest-in-makefile.patch \
- file://run-ptest \
- file://configure-fix-Darwin-target-detection.patch \
- file://qemu-enlarge-env-entry-size.patch \
- file://no-valgrind.patch \
- file://pathlimit.patch \
- file://qemu-2.5.0-cflags.patch \
- file://target-ppc-fix-user-mode.patch \
- file://glibc-2.25.patch \
- file://04b33e21866412689f18b7ad6daf0a54d8f959a7.patch \
-"
-
-SRC_URI += " \
- 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.patch \
- file://CVE-2016-9908.patch \
- file://CVE-2016-9912.patch \
-"
-
-SRC_URI_append_class-native = " \
- file://fix-libcap-header-issue-on-some-distro.patch \
- file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
- "
-
-SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "17940dce063b6ce450a12e719a6c9c43"
-SRC_URI[sha256sum] = "dafd5d7f649907b6b617b822692f4c82e60cf29bc0fc58bc2036219b591e5e62"
-
-COMPATIBLE_HOST_mipsarchn32 = "null"
-COMPATIBLE_HOST_mipsarchn64 = "null"
-
-do_install_append() {
- # Prevent QA warnings about installed ${localstatedir}/run
- if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
- install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
-}
-
-do_compile_ptest() {
- make buildtest-TESTS
-}
-
-do_install_ptest() {
- cp -rL ${B}/tests ${D}${PTEST_PATH}
- find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
-
- cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index e40cdafc9..c983fbae6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -1,4 +1,5 @@
SUMMARY = "QEMU wrapper script"
+HOMEPAGE = "http://qemu.org"
LICENSE = "MIT"
S = "${WORKDIR}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake.inc b/import-layers/yocto-poky/meta/recipes-devtools/remake/remake.inc
deleted file mode 100644
index df889fcf9..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Makefile debugger which is gnumake compatible"
-DESCRIPTION = "remake is a patched and modernized version of GNU make \
-utility that adds improved error reporting, the ability to trace \
-execution in a comprehensible way, and a debugger."
-
-HOMEPAGE = "http://bashdb.sourceforge.net/remake/"
-SECTION = "devel"
-
-SRC_URI = "git://github.com/rocky/remake.git"
-
-inherit autotools gettext update-alternatives pkgconfig
-
-ALTERNATIVE_${PN} = "make"
-ALTERNATIVE_LINK_NAME[make] = "${bindir}/make"
-ALTERNATIVE_TARGET[make] = "${bindir}/remake"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake/version-remake.texi.patch b/import-layers/yocto-poky/meta/recipes-devtools/remake/remake/version-remake.texi.patch
deleted file mode 100644
index fa6329e06..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake/version-remake.texi.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-version-remake.texi is not there but it is required by remake.texi,
-just add it for getting the 'make remake.info' works.
-
-==============================================================
-diff --git a/doc/version-remake.texi b/doc/version-remake.texi
-new file mode 100644
-index 0000000..2a3b72b
---- /dev/null
-+++ b/doc/version-remake.texi
-@@ -0,0 +1,4 @@
-+@set UPDATED 10 June 2012
-+@set UPDATED-MONTH June 2012
-+@set EDITION 3.82+dbg-0.9git
-+@set VERSION 3.82+dbg-0.9git
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb
deleted file mode 100644
index 8eab7e3a0..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
-require remake.inc
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+)\+dbg.+)"
-SRC_URI += "file://version-remake.texi.patch \
- "
-SRCREV = "cf54641d50a0165bb17622b3e9770f426ccbc561"
-S = "${WORKDIR}/git"
-
-DEPENDS += "readline guile"
-# Need to add "gettext-native" dependency to remake-native.
-# By default only "gettext-minimal-native" is added
-# when inherit gettext.
-DEPENDS_class-native += "gettext-native"
-PROVIDES += "virtual/make"
-
-do_configure_prepend() {
- # remove the default LINGUAS since we are not going to generate languages
- rm ${S}/po/LINGUAS
- touch ${S}/po/LINGUAS
- # create config.rpath which required by configure.ac
- ( cd ${S}; autopoint || touch config.rpath )
-}
-
-BBCLASSEXTEND = "native"
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 d99ddeb9e..1f61acaf4 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
@@ -4,7 +4,7 @@ Date: Mon, 27 Feb 2017 09:43:30 +0200
Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
default configuration and macros.
-Upstream-Status: Inappropriate [oe-core specific]
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/263]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
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 95c70136b..edf9ec089 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
@@ -3,7 +3,7 @@ From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 27 Feb 2017 14:43:21 +0200
Subject: [PATCH] Fix build with musl C library.
-Upstream-Status: Pending
+Upstream-Status: Inappropriate [problem already solved in master branch]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
new file mode 100644
index 000000000..6e44f0b7f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
@@ -0,0 +1,84 @@
+From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 25 May 2017 18:15:27 +0300
+Subject: [PATCH 1/4] Split binary package building into a separate function
+
+So that it can be run as a thread pool task.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ build/pack.c | 33 +++++++++++++++++++++------------
+ 1 file changed, 21 insertions(+), 12 deletions(-)
+
+diff --git a/build/pack.c b/build/pack.c
+index 518f4e92a..ccfd614cc 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
+ return RPMRC_OK;
+ }
+
+-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
+ {
+- rpmRC rc;
+- const char *errorString;
+- Package pkg;
+- char *pkglist = NULL;
+-
+- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+- char *fn;
++ const char *errorString;
++ rpmRC rc = RPMRC_OK;
+
+ if (pkg->fileList == NULL)
+- continue;
++ return rc;
+
+ if ((rc = processScriptFiles(spec, pkg)))
+ return rc;
+@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+ headerGetString(pkg->header, RPMTAG_NAME), errorString);
+ return RPMRC_FAIL;
+ }
+- fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
++ *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
+ if ((binDir = strchr(binRpm, '/')) != NULL) {
+ struct stat st;
+ char *dn;
+@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
+ free(binRpm);
+ }
+
+- rc = writeRPM(pkg, NULL, fn, NULL);
++ rc = writeRPM(pkg, NULL, *filename, NULL);
+ if (rc == RPMRC_OK) {
+ /* Do check each written package if enabled */
+- char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL);
++ char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
+ if (pkgcheck[0] != ' ') {
+ rc = checkPackages(pkgcheck);
+ }
+ free(pkgcheck);
++ }
++ return rc;
++}
++
++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++{
++ rpmRC rc;
++ Package pkg;
++ char *pkglist = NULL;
++
++ for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
++ char *fn = NULL;
++ rc = packageBinary(spec, pkg, cookie, cheating, &fn);
++ if (rc == RPMRC_OK) {
+ rstrcat(&pkglist, fn);
+ rstrcat(&pkglist, " ");
+ }
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
new file mode 100644
index 000000000..d10041c2e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
@@ -0,0 +1,127 @@
+From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 25 May 2017 19:30:20 +0300
+Subject: [PATCH 1/3] Run binary package creation via thread pools.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ build/pack.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
+ configure.ac | 3 +++
+ 2 files changed, 70 insertions(+), 14 deletions(-)
+
+diff --git a/build/pack.c b/build/pack.c
+index ccfd614cc..ed5b9ab4e 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
+ return rc;
+ }
+
+-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++struct binaryPackageTaskData
+ {
+- rpmRC rc;
+ Package pkg;
++ char *filename;
++ rpmRC result;
++ struct binaryPackageTaskData *next;
++};
++
++static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
++{
++ struct binaryPackageTaskData *tasks = NULL;
++ struct binaryPackageTaskData *task = NULL;
++ struct binaryPackageTaskData *prev = NULL;
++
++ for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
++ task = rcalloc(1, sizeof(*task));
++ task->pkg = pkg;
++ 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
++ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
++ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
++ tasks = task;
++ }
++ if (prev != NULL) {
++ prev->next = task;
++ }
++ prev = task;
++ }
++
++ #pragma omp parallel
++ #pragma omp single
++ // re-declaring task variable is necessary, or older gcc versions will produce code that segfaults
++ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
++ if (task != tasks)
++ #pragma omp task
++ {
++ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
++ rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
++ }
++ }
++
++ return tasks;
++}
++
++static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
++{
++ while (tasks != NULL) {
++ struct binaryPackageTaskData* next = tasks->next;
++ rfree(tasks->filename);
++ rfree(tasks);
++ tasks = next;
++ }
++}
++
++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++{
+ char *pkglist = NULL;
+
+- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+- char *fn = NULL;
+- rc = packageBinary(spec, pkg, cookie, cheating, &fn);
+- if (rc == RPMRC_OK) {
+- rstrcat(&pkglist, fn);
+- rstrcat(&pkglist, " ");
+- }
+- free(fn);
+- if (rc != RPMRC_OK) {
+- pkglist = _free(pkglist);
+- return rc;
+- }
++ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
++
++ for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
++ if (task->result == RPMRC_OK) {
++ rstrcat(&pkglist, task->filename);
++ rstrcat(&pkglist, " ");
++ } else {
++ _free(pkglist);
++ freeBinaryPackageTasks(tasks);
++ return RPMRC_FAIL;
++ }
+ }
++ freeBinaryPackageTasks(tasks);
+
+ /* Now check the package set if enabled */
+ if (pkglist != NULL) {
+diff --git a/configure.ac b/configure.ac
+index a506ec819..59fa0acaf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -17,6 +17,9 @@ AC_DISABLE_STATIC
+
+ PKG_PROG_PKG_CONFIG
+
++AC_OPENMP
++RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS"
++
+ dnl Checks for programs.
+ AC_PROG_CXX
+ AC_PROG_AWK
+--
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
new file mode 100644
index 000000000..c348ae533
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
@@ -0,0 +1,207 @@
+From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 30 May 2017 13:58:30 +0300
+Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools
+ thread-safe
+
+Otherwise multithreaded rpm building explodes in various ways due
+to data races.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ rpmio/rpmstrpool.c | 56 +++++++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 47 insertions(+), 9 deletions(-)
+
+diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c
+index 30a57eb10..58ba95a02 100644
+--- a/rpmio/rpmstrpool.c
++++ b/rpmio/rpmstrpool.c
+@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets)
+ return ht;
+ }
+
++static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid);
++
+ static void poolHashResize(rpmstrPool pool, int numBuckets)
+ {
+ poolHash ht = pool->hash;
+@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int numBuckets)
+
+ for (int i=0; i<ht->numBuckets; i++) {
+ if (!ht->buckets[i].keyid) continue;
+- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
++ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
+ for (unsigned int j=0;;j++) {
+ unsigned int hash = hashbucket(keyHash, j) % numBuckets;
+ if (!buckets[hash].keyid) {
+@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool, const char * key, unsigned int ke
+ ht->buckets[hash].keyid = keyid;
+ ht->keyCount++;
+ break;
+- } else if (!strcmp(rpmstrPoolStr(pool, ht->buckets[hash].keyid), key)) {
++ } else if (!strcmp(rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid), key)) {
+ return;
+ }
+ }
+@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool)
+ int maxcollisions = 0;
+
+ for (i=0; i<ht->numBuckets; i++) {
+- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
++ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
+ for (unsigned int j=0;;j++) {
+ unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets;
+ if (hash==i) {
+@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool)
+
+ pool->hash = poolHashCreate(sizehint);
+ for (int i = 1; i <= pool->offs_size; i++)
+- poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
++ poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i);
+ }
+
+ rpmstrPool rpmstrPoolCreate(void)
+@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void)
+
+ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
+ {
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool) {
+ if (pool->nrefs > 1) {
+ pool->nrefs--;
+@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
+ free(pool);
+ }
+ }
++ }
+ return NULL;
+ }
+
+ rpmstrPool rpmstrPoolLink(rpmstrPool pool)
+ {
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool)
+ pool->nrefs++;
++ }
+ return pool;
+ }
+
+ void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
+ {
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool && !pool->frozen) {
+ if (!keephash) {
+ pool->hash = poolHashFree(pool->hash);
+@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
+ pool->offs_alloced * sizeof(*pool->offs));
+ pool->frozen = 1;
+ }
++ }
+ }
+
+ void rpmstrPoolUnfreeze(rpmstrPool pool)
+ {
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool) {
+ if (pool->hash == NULL) {
+ rpmstrPoolRehash(pool);
+ }
+ pool->frozen = 0;
+ }
++ }
+ }
+
+ static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash)
+@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const char * key, size_t keylen,
+ return 0;
+ }
+
+- s = rpmstrPoolStr(pool, ht->buckets[hash].keyid);
++ s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid);
+ /* pool string could be longer than keylen, require exact matche */
+ if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0')
+ return ht->buckets[hash].keyid;
+@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool, const char *s, size_t slen,
+ rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create)
+ {
+ rpmsid sid = 0;
+-
++ #pragma omp critical(rpmstrpool)
++ {
+ if (s != NULL) {
+ unsigned int hash = rstrnhash(s, slen);
+ sid = strn2id(pool, s, slen, hash, create);
+ }
++ }
+ return sid;
+ }
+
+ rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create)
+ {
+ rpmsid sid = 0;
+-
++ #pragma omp critical(rpmstrpool)
++ {
+ if (s != NULL) {
+ size_t slen;
+ unsigned int hash = rstrlenhash(s, &slen);
+ sid = strn2id(pool, s, slen, hash, create);
+ }
++ }
+ return sid;
+ }
+
+-const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
++static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid)
+ {
+ const char *s = NULL;
+ if (pool && sid > 0 && sid <= pool->offs_size)
+@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
+ return s;
+ }
+
++const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
++{
++ const char *s = NULL;
++ #pragma omp critical(rpmstrpool)
++ {
++ s = rpmstrPoolStrNoLock(pool, sid);
++ }
++ return s;
++}
++
+ size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid)
+ {
+ size_t slen = 0;
++ #pragma omp critical(rpmstrpool)
++ {
+ if (pool && sid > 0 && sid <= pool->offs_size) {
+ slen = strlen(pool->offs[sid]);
+ }
++ }
+ return slen;
+ }
+
+@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
+
+ rpmsid rpmstrPoolNumStr(rpmstrPool pool)
+ {
+- return (pool != NULL) ? pool->offs_size : 0;
++ rpmsid id = 0;
++ #pragma omp critical(rpmstrpool)
++ {
++ if (pool) {
++ id = pool->offs_size;
++ }
++ }
++ return id;
+ }
+--
+2.11.0
+
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
new file mode 100644
index 000000000..64a5651f7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
@@ -0,0 +1,337 @@
+From ec305795a302d226343e69031ff2024dfcde69c0 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
+ buildHost() and getBuildTime()
+
+Their use is causing difficult to diagnoze data races when building multiple
+packages in parallel, and is a bad idea in general, as it also makes it more
+difficult to reason about code.
+
+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 +++++++++--------------------------------------
+ build/rpmbuild_internal.h | 8 +++--
+ 3 files changed, 74 insertions(+), 72 deletions(-)
+
+diff --git a/build/build.c b/build/build.c
+index 5f99c8db7..09a1311c5 100644
+--- a/build/build.c
++++ b/build/build.c
+@@ -6,6 +6,8 @@
+ #include "system.h"
+
+ #include <errno.h>
++#include <netdb.h>
++#include <time.h>
+ #include <sys/wait.h>
+
+ #include <rpm/rpmlog.h>
+@@ -16,6 +18,50 @@
+
+ #include "debug.h"
+
++static rpm_time_t getBuildTime(void)
++{
++ rpm_time_t buildTime = 0;
++ char *srcdate;
++ time_t epoch;
++ char *endptr;
++
++ srcdate = getenv("SOURCE_DATE_EPOCH");
++ if (srcdate) {
++ errno = 0;
++ epoch = strtol(srcdate, &endptr, 10);
++ if (srcdate == endptr || *endptr || errno != 0)
++ rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
++ else
++ buildTime = (int32_t) epoch;
++ } else
++ buildTime = (int32_t) time(NULL);
++
++ return buildTime;
++}
++
++static char * buildHost(void)
++{
++ char* hostname;
++ struct hostent *hbn;
++ char *bhMacro;
++
++ bhMacro = rpmExpand("%{?_buildhost}", NULL);
++ if (strcmp(bhMacro, "") != 0) {
++ rasprintf(&hostname, "%s", bhMacro);
++ } else {
++ hostname = rcalloc(1024, sizeof(*hostname));
++ (void) gethostname(hostname, 1024);
++ hbn = gethostbyname(hostname);
++ if (hbn)
++ strcpy(hostname, hbn->h_name);
++ else
++ rpmlog(RPMLOG_WARNING,
++ _("Could not canonicalize hostname: %s\n"), hostname);
++ }
++ free(bhMacro);
++ return(hostname);
++}
++
+ /**
+ */
+ static rpmRC doRmSource(rpmSpec spec)
+@@ -203,6 +249,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;
++ const char* host = buildHost();
++ rpm_time_t buildTime = getBuildTime();
++
+
+ 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)
+ goto exit;
+
+ if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
+- (rc = packageSources(spec, &cookie)))
++ (rc = packageSources(spec, &cookie, buildTime, host)))
+ return rc;
+
+ if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
+- (rc = packageBinaries(spec, cookie, (didBuild == 0))))
++ (rc = packageBinaries(spec, cookie, (didBuild == 0), buildTime, host)))
+ goto exit;
+
+ if ((what & RPMBUILD_CLEAN) &&
+@@ -295,6 +344,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
+ (void) unlink(spec->specFile);
+
+ exit:
++ free(host);
+ free(cookie);
+ spec->rootDir = NULL;
+ if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
+diff --git a/build/pack.c b/build/pack.c
+index ed5b9ab4e..62427065a 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -6,8 +6,6 @@
+ #include "system.h"
+
+ #include <errno.h>
+-#include <netdb.h>
+-#include <time.h>
+ #include <sys/wait.h>
+
+ #include <rpm/rpmlib.h> /* RPMSIGTAG*, rpmReadPackageFile */
+@@ -151,57 +149,6 @@ exit:
+ return rc;
+ }
+
+-static rpm_time_t * getBuildTime(void)
+-{
+- static rpm_time_t buildTime[1];
+- char *srcdate;
+- time_t epoch;
+- char *endptr;
+-
+- if (buildTime[0] == 0) {
+- srcdate = getenv("SOURCE_DATE_EPOCH");
+- if (srcdate) {
+- errno = 0;
+- epoch = strtol(srcdate, &endptr, 10);
+- if (srcdate == endptr || *endptr || errno != 0)
+- rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
+- else
+- buildTime[0] = (int32_t) epoch;
+- } else
+- buildTime[0] = (int32_t) time(NULL);
+- }
+-
+- return buildTime;
+-}
+-
+-static const char * buildHost(void)
+-{
+- static char hostname[1024];
+- static int oneshot = 0;
+- struct hostent *hbn;
+- char *bhMacro;
+-
+- if (! oneshot) {
+- bhMacro = rpmExpand("%{?_buildhost}", NULL);
+- if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
+- strcpy(hostname, bhMacro);
+- } else {
+- if (strcmp(bhMacro, "") != 0)
+- rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too long\n"));
+- (void) gethostname(hostname, sizeof(hostname));
+- hbn = gethostbyname(hostname);
+- if (hbn)
+- strcpy(hostname, hbn->h_name);
+- else
+- rpmlog(RPMLOG_WARNING,
+- _("Could not canonicalize hostname: %s\n"), hostname);
+- }
+- free(bhMacro);
+- oneshot = 1;
+- }
+- return(hostname);
+-}
+-
+ static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
+ {
+ struct TriggerFileEntry *p;
+@@ -308,7 +255,8 @@ static int haveRichDep(Package pkg)
+ }
+
+ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
+- const char *fileName, char **cookie)
++ const char *fileName, char **cookie,
++ rpm_time_t buildTime, const char* buildHost)
+ {
+ FD_t fd = NULL;
+ char * rpmio_flags = NULL;
+@@ -397,7 +345,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
+
+ /* Create and add the cookie */
+ if (cookie) {
+- rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime()));
++ rasprintf(cookie, "%s %d", buildHost, buildTime);
+ headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
+ }
+
+@@ -546,7 +494,7 @@ static rpmRC checkPackages(char *pkgcheck)
+ return RPMRC_OK;
+ }
+
+-static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
++static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename, rpm_time_t buildTime, const char* buildHost)
+ {
+ const char *errorString;
+ rpmRC rc = RPMRC_OK;
+@@ -565,8 +513,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);
+- headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost());
+- headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
++ headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost);
++ headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
+
+ 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
+ free(binRpm);
+ }
+
+- rc = writeRPM(pkg, NULL, *filename, NULL);
++ rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost);
+ if (rc == RPMRC_OK) {
+ /* Do check each written package if enabled */
+ char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
+@@ -624,7 +572,7 @@ struct binaryPackageTaskData
+ struct binaryPackageTaskData *next;
+ };
+
+-static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
++static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
+ {
+ struct binaryPackageTaskData *tasks = NULL;
+ struct binaryPackageTaskData *task = NULL;
+@@ -636,7 +584,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
+- task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
++ task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
+ 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
+ if (task != tasks)
+ #pragma omp task
+ {
+- task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
++ task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
+ 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)
+ }
+ }
+
+-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
+ {
+ char *pkglist = NULL;
+
+- struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
++ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost);
+
+ 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)
+ return RPMRC_OK;
+ }
+
+-rpmRC packageSources(rpmSpec spec, char **cookie)
++rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost)
+ {
+ Package sourcePkg = spec->sourcePackage;
+ rpmRC rc;
+
+ /* Add some cruft */
+ headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
+- headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost());
+- headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
++ headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
++ headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
+
+ /* XXX this should be %_srpmdir */
+ { char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL);
+ char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
+
+ spec->sourcePkgId = NULL;
+- rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie);
++ rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie, buildTime, buildHost);
+
+ /* 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
+--- a/build/rpmbuild_internal.h
++++ b/build/rpmbuild_internal.h
+@@ -408,19 +408,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?
++ * @param buildTime the build timestamp that goes into packages
++ * @param buildHost the hostname where the build is happening
+ * @return RPMRC_OK on success
+ */
+ RPM_GNUC_INTERNAL
+-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating);
++rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost);
+
+ /** \ingroup rpmbuild
+ * Generate source package.
+ * @param spec spec file control structure
+ * @retval cookie build identifier "cookie" or NULL
++ * @param buildTime the build timestamp that goes into packages
++ * @param buildHost the hostname where the build is happening
+ * @return RPMRC_OK on success
+ */
+ RPM_GNUC_INTERNAL
+-rpmRC packageSources(rpmSpec spec, char **cookie);
++rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost);
+
+ RPM_GNUC_INTERNAL
+ int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
+--
+2.11.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_git.bb
index b0f57809c..7866314ad 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_git.bb
@@ -38,8 +38,13 @@ SRC_URI = "git://github.com/rpm-software-management/rpm \
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 \
"
+UPSTREAM_VERSION_UNKNOWN = "1"
PV = "4.13.90+git${SRCPV}"
PE = "1"
@@ -47,8 +52,8 @@ SRCREV = "a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be"
S = "${WORKDIR}/git"
-DEPENDS = "nss libarchive db file popt xz dbus elfutils python3"
-DEPENDS_append_class-native = " file-replacement-native"
+DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python3"
+DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
inherit autotools gettext pkgconfig python3native
export PYTHON_ABI
@@ -68,6 +73,9 @@ EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --di
BBCLASSEXTEND = "native nativesdk"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
+
# Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
# libmagic also has sysroot path contamination, so override it
do_install_append_class-native() {
@@ -99,7 +107,8 @@ do_install_append_class-target() {
}
do_install_append () {
- sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}/${libdir}/rpm/macros
+ sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
+ ${D}/${libdir}/rpm/macros
sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
${D}${libdir}/rpm/pythondistdeps.py
@@ -119,3 +128,11 @@ FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
RPROVIDES_${PN} += "rpm-build"
RDEPENDS_${PN} = "bash perl python3-core"
+
+PACKAGE_PREPROCESS_FUNCS += "rpm_package_preprocess"
+
+# Do not specify a sysroot when compiling on a target.
+rpm_package_preprocess () {
+ sed -i -e 's:--sysroot[^ ]*::g' \
+ ${PKGD}/${libdir}/rpm/macros
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/CVE-2017-14064.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/CVE-2017-14064.patch
deleted file mode 100644
index 700d1bc58..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/CVE-2017-14064.patch
+++ /dev/null
@@ -1,353 +0,0 @@
-From d86d283fcb35d1442a121b92030884523908a331 Mon Sep 17 00:00:00 2001
-From: nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
-Date: Sat, 22 Apr 2017 07:29:01 +0000
-Subject: [PATCH] merge revision(s) 58323,58324:
-
- Merge json-2.0.4.
-
- * https://github.com/flori/json/releases/tag/v2.0.4
- * https://github.com/flori/json/blob/09fabeb03e73ed88dc8ce8f19d76ac59e51dae20/CHANGES.md#2017-03-23-204
- Use `assert_raise` instead of `assert_raises`.
-
-git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@58445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
-Upstream-Status: Backport
-CVE: CVE-2017-14064
-
-Signed-off-by: Armin Kuster <akuster@mvisa.com>
-
----
- ext/json/fbuffer/fbuffer.h | 3 ---
- ext/json/generator/generator.c | 12 +++++-----
- ext/json/generator/generator.h | 1 -
- ext/json/json.gemspec | Bin 5473 -> 5474 bytes
- ext/json/lib/json/version.rb | 2 +-
- ext/json/parser/parser.c | 48 +++++++++++++++++++++++----------------
- ext/json/parser/parser.rl | 14 +++++++++---
- test/json/json_encoding_test.rb | 2 ++
- test/json/json_generator_test.rb | 0
- version.h | 2 +-
- 10 files changed, 49 insertions(+), 35 deletions(-)
- mode change 100755 => 100644 test/json/json_generator_test.rb
-
-Index: ruby-2.4.0/ext/json/fbuffer/fbuffer.h
-===================================================================
---- ruby-2.4.0.orig/ext/json/fbuffer/fbuffer.h
-+++ ruby-2.4.0/ext/json/fbuffer/fbuffer.h
-@@ -12,9 +12,6 @@
- #define RFLOAT_VALUE(val) (RFLOAT(val)->value)
- #endif
-
--#ifndef RARRAY_PTR
--#define RARRAY_PTR(ARRAY) RARRAY(ARRAY)->ptr
--#endif
- #ifndef RARRAY_LEN
- #define RARRAY_LEN(ARRAY) RARRAY(ARRAY)->len
- #endif
-Index: ruby-2.4.0/ext/json/generator/generator.c
-===================================================================
---- ruby-2.4.0.orig/ext/json/generator/generator.c
-+++ ruby-2.4.0/ext/json/generator/generator.c
-@@ -308,7 +308,7 @@ static char *fstrndup(const char *ptr, u
- 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 sel
- }
- } 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
- }
- } 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(VAL
- }
- } 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
- }
- } 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 s
- }
- } 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;
-Index: ruby-2.4.0/ext/json/generator/generator.h
-===================================================================
---- ruby-2.4.0.orig/ext/json/generator/generator.h
-+++ ruby-2.4.0/ext/json/generator/generator.h
-@@ -1,7 +1,6 @@
- #ifndef _GENERATOR_H_
- #define _GENERATOR_H_
-
--#include <string.h>
- #include <math.h>
- #include <ctype.h>
-
-Index: ruby-2.4.0/ext/json/lib/json/version.rb
-===================================================================
---- ruby-2.4.0.orig/ext/json/lib/json/version.rb
-+++ ruby-2.4.0/ext/json/lib/json/version.rb
-@@ -1,7 +1,7 @@
- # frozen_string_literal: false
- module JSON
- # JSON version
-- VERSION = '2.0.2'
-+ VERSION = '2.0.4'
- VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
- VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
- VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
-Index: ruby-2.4.0/ext/json/parser/parser.c
-===================================================================
---- ruby-2.4.0.orig/ext/json/parser/parser.c
-+++ ruby-2.4.0/ext/json/parser/parser.c
-@@ -1435,13 +1435,21 @@ static VALUE json_string_unescape(VALUE
- break;
- case 'u':
- if (pe > stringEnd - 4) {
-- return Qnil;
-+ rb_enc_raise(
-+ EXC_ENCODING eParserError,
-+ "%u: incomplete unicode character escape sequence at '%s'", __LINE__, p
-+ );
- } else {
- UTF32 ch = unescape_unicode((unsigned char *) ++pe);
- pe += 3;
- if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
- pe++;
-- if (pe > stringEnd - 6) return Qnil;
-+ if (pe > stringEnd - 6) {
-+ rb_enc_raise(
-+ EXC_ENCODING eParserError,
-+ "%u: incomplete surrogate pair at '%s'", __LINE__, p
-+ );
-+ }
- if (pe[0] == '\\' && pe[1] == 'u') {
- UTF32 sur = unescape_unicode((unsigned char *) pe + 2);
- ch = (((ch & 0x3F) << 10) | ((((ch >> 6) & 0xF) + 1) << 16)
-@@ -1471,7 +1479,7 @@ static VALUE json_string_unescape(VALUE
- }
-
-
--#line 1475 "parser.c"
-+#line 1483 "parser.c"
- enum {JSON_string_start = 1};
- enum {JSON_string_first_final = 8};
- enum {JSON_string_error = 0};
-@@ -1479,7 +1487,7 @@ enum {JSON_string_error = 0};
- enum {JSON_string_en_main = 1};
-
-
--#line 504 "parser.rl"
-+#line 512 "parser.rl"
-
-
- static int
-@@ -1501,15 +1509,15 @@ static char *JSON_parse_string(JSON_Pars
-
- *result = rb_str_buf_new(0);
-
--#line 1505 "parser.c"
-+#line 1513 "parser.c"
- {
- cs = JSON_string_start;
- }
-
--#line 525 "parser.rl"
-+#line 533 "parser.rl"
- json->memo = p;
-
--#line 1513 "parser.c"
-+#line 1521 "parser.c"
- {
- if ( p == pe )
- goto _test_eof;
-@@ -1534,7 +1542,7 @@ case 2:
- goto st0;
- goto st2;
- tr2:
--#line 490 "parser.rl"
-+#line 498 "parser.rl"
- {
- *result = json_string_unescape(*result, json->memo + 1, p);
- if (NIL_P(*result)) {
-@@ -1545,14 +1553,14 @@ tr2:
- {p = (( p + 1))-1;}
- }
- }
--#line 501 "parser.rl"
-+#line 509 "parser.rl"
- { p--; {p++; cs = 8; goto _out;} }
- goto st8;
- st8:
- if ( ++p == pe )
- goto _test_eof8;
- case 8:
--#line 1556 "parser.c"
-+#line 1564 "parser.c"
- goto st0;
- st3:
- if ( ++p == pe )
-@@ -1628,7 +1636,7 @@ case 7:
- _out: {}
- }
-
--#line 527 "parser.rl"
-+#line 535 "parser.rl"
-
- if (json->create_additions && RTEST(match_string = json->match_string)) {
- VALUE klass;
-@@ -1675,7 +1683,7 @@ static VALUE convert_encoding(VALUE sour
- }
- FORCE_UTF8(source);
- } else {
-- source = rb_str_conv_enc(source, NULL, rb_utf8_encoding());
-+ source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
- }
- #endif
- return source;
-@@ -1808,7 +1816,7 @@ static VALUE cParser_initialize(int argc
- }
-
-
--#line 1812 "parser.c"
-+#line 1820 "parser.c"
- enum {JSON_start = 1};
- enum {JSON_first_final = 10};
- enum {JSON_error = 0};
-@@ -1816,7 +1824,7 @@ enum {JSON_error = 0};
- enum {JSON_en_main = 1};
-
-
--#line 720 "parser.rl"
-+#line 728 "parser.rl"
-
-
- /*
-@@ -1833,16 +1841,16 @@ static VALUE cParser_parse(VALUE self)
- GET_PARSER;
-
-
--#line 1837 "parser.c"
-+#line 1845 "parser.c"
- {
- cs = JSON_start;
- }
-
--#line 736 "parser.rl"
-+#line 744 "parser.rl"
- p = json->source;
- pe = p + json->len;
-
--#line 1846 "parser.c"
-+#line 1854 "parser.c"
- {
- if ( p == pe )
- goto _test_eof;
-@@ -1876,7 +1884,7 @@ st0:
- cs = 0;
- goto _out;
- tr2:
--#line 712 "parser.rl"
-+#line 720 "parser.rl"
- {
- char *np = JSON_parse_value(json, p, pe, &result, 0);
- if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;}
-@@ -1886,7 +1894,7 @@ st10:
- if ( ++p == pe )
- goto _test_eof10;
- case 10:
--#line 1890 "parser.c"
-+#line 1898 "parser.c"
- switch( (*p) ) {
- case 13: goto st10;
- case 32: goto st10;
-@@ -1975,7 +1983,7 @@ case 9:
- _out: {}
- }
-
--#line 739 "parser.rl"
-+#line 747 "parser.rl"
-
- if (cs >= JSON_first_final && p == pe) {
- return result;
-Index: ruby-2.4.0/ext/json/parser/parser.rl
-===================================================================
---- ruby-2.4.0.orig/ext/json/parser/parser.rl
-+++ ruby-2.4.0/ext/json/parser/parser.rl
-@@ -446,13 +446,21 @@ static VALUE json_string_unescape(VALUE
- break;
- case 'u':
- if (pe > stringEnd - 4) {
-- return Qnil;
-+ rb_enc_raise(
-+ EXC_ENCODING eParserError,
-+ "%u: incomplete unicode character escape sequence at '%s'", __LINE__, p
-+ );
- } else {
- UTF32 ch = unescape_unicode((unsigned char *) ++pe);
- pe += 3;
- if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
- pe++;
-- if (pe > stringEnd - 6) return Qnil;
-+ if (pe > stringEnd - 6) {
-+ rb_enc_raise(
-+ EXC_ENCODING eParserError,
-+ "%u: incomplete surrogate pair at '%s'", __LINE__, p
-+ );
-+ }
- if (pe[0] == '\\' && pe[1] == 'u') {
- UTF32 sur = unescape_unicode((unsigned char *) pe + 2);
- ch = (((ch & 0x3F) << 10) | ((((ch >> 6) & 0xF) + 1) << 16)
-@@ -570,7 +578,7 @@ static VALUE convert_encoding(VALUE sour
- }
- FORCE_UTF8(source);
- } else {
-- source = rb_str_conv_enc(source, NULL, rb_utf8_encoding());
-+ source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
- }
- #endif
- return source;
-Index: ruby-2.4.0/test/json/json_encoding_test.rb
-===================================================================
---- ruby-2.4.0.orig/test/json/json_encoding_test.rb
-+++ ruby-2.4.0/test/json/json_encoding_test.rb
-@@ -79,6 +79,8 @@ class JSONEncodingTest < Test::Unit::Tes
- json = '["\ud840\udc01"]'
- assert_equal json, generate(utf8, :ascii_only => true)
- assert_equal utf8, parse(json)
-+ assert_raise(JSON::ParserError) { parse('"\u"') }
-+ assert_raise(JSON::ParserError) { parse('"\ud800"') }
- end
-
- def test_chars
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 8b6845034..a5b2184af 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
@@ -1,3 +1,4 @@
+Upstream-Status: Pending
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
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
new file mode 100644
index 000000000..88e693c94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/ruby-CVE-2017-14064.patch
@@ -0,0 +1,87 @@
+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_2.4.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb
index 8cc52d621..7d27ac84e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.4.1.bb
@@ -6,11 +6,11 @@ SRC_URI += " \
file://ruby-CVE-2017-9227.patch \
file://ruby-CVE-2017-9228.patch \
file://ruby-CVE-2017-9229.patch \
- file://CVE-2017-14064.patch \
+ file://ruby-CVE-2017-14064.patch \
"
-SRC_URI[md5sum] = "7e9485dcdb86ff52662728de2003e625"
-SRC_URI[sha256sum] = "152fd0bd15a90b4a18213448f485d4b53e9f7662e1508190aa5b702446b29e3d"
+SRC_URI[md5sum] = "782bca562e474dd25956dd0017d92677"
+SRC_URI[sha256sum] = "a330e10d5cb5e53b3a0078326c5731888bb55e32c4abfeb27d9e7f8e5d000250"
# 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
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
index 85a043949..1b71a1f8b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
+++ b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
@@ -8,7 +8,7 @@ ConditionPathExistsGlob=#SYSCONFDIR#/*-postinsts
[Service]
Type=oneshot
ExecStart=#SBINDIR#/run-postinsts
-ExecStartPost=#BASE_BINDIR#/systemctl disable run-postinsts.service
+ExecStartPost=#BASE_BINDIR#/systemctl --no-reload disable run-postinsts.service
RemainAfterExit=No
TimeoutSec=0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch
new file mode 100644
index 000000000..39521a7d8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch
@@ -0,0 +1,32 @@
+From https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/squashfs-tools/files/squashfs-tools-4.3-sysmacros.patch
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Pending
+
+
+sys/types.h might not always include sys/sysmacros.h for major/minor/makedev
+
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -59,6 +59,7 @@
+ #else
+ #include <endian.h>
+ #include <sys/sysinfo.h>
++#include <sys/sysmacros.h>
+ #endif
+
+ #include "squashfs_fs.h"
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -38,6 +38,10 @@
+ #include <limits.h>
+ #include <ctype.h>
+
++#ifdef linux
++#include <sys/sysmacros.h>
++#endif
++
+ struct cache *fragment_cache, *data_cache;
+ struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
+ pthread_t *thread, *inflator_thread;
diff --git a/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 33ed09ae8..0f991706c 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
@@ -13,8 +13,10 @@ SRCREV = "9c1db6d13a51a2e009f0027ef336ce03624eac0d"
SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2;name=lzma \
file://0001-mksquashfs.c-get-inline-functions-work-with-C99.patch;striplevel=2 \
+ file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \
file://fix-compat.patch \
"
+UPSTREAM_VERSION_UNKNOWN = "1"
SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch
new file mode 100644
index 000000000..52096b28c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch
@@ -0,0 +1,37 @@
+From 9f3fd388ae7c46420bccba405468690ed46d669a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 18 Sep 2017 22:51:32 -0700
+Subject: [PATCH] tests/sigaction: Check for mips and alpha before using
+ sa_restorer
+
+local structure does not define restorer member for mips and alpha
+in definition, we need to match that assumption here where they are
+being set
+
+Fixes
+| ../../strace-4.18/tests/sigaction.c:177:36: error: 'struct_set_sa {aka struct set_sa}' has no member named 'restorer'
+| # define SA_RESTORER_ARGS , new_act->restorer
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ tests/sigaction.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/sigaction.c b/tests/sigaction.c
+index 7b46944..f46cda7 100644
+--- a/tests/sigaction.c
++++ b/tests/sigaction.c
+@@ -170,7 +170,7 @@ main(void)
+ sigdelset(mask.libc, SIGHUP);
+
+ memcpy(new_act->mask, mask.old, sizeof(mask.old));
+-#ifdef SA_RESTORER
++#if defined(SA_RESTORER) && !defined(MIPS) && !defined(ALPHA)
+ new_act->flags = SA_RESTORER;
+ new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL;
+ # define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx"
+--
+2.14.1
+
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 876c2d862..97bcc90a8 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
@@ -1,19 +1,23 @@
-strace: Add ptest
+From 0574ae9926308dcbca78bd8cd0f0f143f19cbcb5 Mon Sep 17 00:00:00 2001
+From: Gabriel Barbu <gabriel.barbu@enea.com>
+Date: Thu, 25 Jul 2013 15:28:33 +0200
+Subject: [PATCH 4/8] strace: Add ptest
Upstream-Status: Inappropriate
Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+
---
configure.ac | 2 +-
tests/Makefile.am | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index b2b03c6..464a9dc 100644
+index 61d6425..6387c24 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -39,7 +39,7 @@ AC_COPYRIGHT([Copyright (C) 1999-2017 The strace developers.])
+@@ -41,7 +41,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])
@@ -23,11 +27,11 @@ index b2b03c6..464a9dc 100644
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 311d3bb..72f9022 100644
+index 5aa7f89..a55a355 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
-@@ -960,3 +960,21 @@ $(objects): scno.h
- CLEANFILES = ksysent.h $(TESTS:=.tmp)
+@@ -379,3 +379,21 @@ clean-local-check:
+ CLEANFILES = ksysent.h
include ../scno.am
+
@@ -47,4 +51,7 @@ index 311d3bb..72f9022 100644
+ install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
+ done
-+ for i in net net-fd scm_rights-fd sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; 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/update-gawk-paths.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
index 94ee53c7f..f6ffa8e7a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
@@ -12,20 +12,20 @@ Upstream-Status: Inappropriate [configuration]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
- mpers.awk | 2 +-
- tests-m32/caps.awk | 2 +-
- tests-m32/match.awk | 2 +-
- tests-m32/sigaction.awk | 2 +-
- tests-mx32/caps.awk | 2 +-
- tests-mx32/match.awk | 2 +-
- tests-mx32/sigaction.awk | 2 +-
- tests/caps.awk | 2 +-
- tests/match.awk | 2 +-
- tests/sigaction.awk | 2 +-
+ mpers.awk | 2 +-
+ tests-m32/caps.awk | 2 +-
+ tests-m32/match.awk | 2 +-
+ tests-m32/rt_sigaction.awk | 2 +-
+ tests-mx32/caps.awk | 2 +-
+ tests-mx32/match.awk | 2 +-
+ tests-mx32/rt_sigaction.awk | 2 +-
+ tests/caps.awk | 2 +-
+ tests/match.awk | 2 +-
+ tests/rt_sigaction.awk | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/mpers.awk b/mpers.awk
-index 99248c5..ff10520 100644
+index fe54763..b5238a8 100644
--- a/mpers.awk
+++ b/mpers.awk
@@ -1,4 +1,4 @@
@@ -35,7 +35,7 @@ index 99248c5..ff10520 100644
# Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
# Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
diff --git a/tests-m32/caps.awk b/tests-m32/caps.awk
-index 67003ac..a66f1f0 100644
+index c6e31ef..5efc6cc 100644
--- a/tests-m32/caps.awk
+++ b/tests-m32/caps.awk
@@ -1,4 +1,4 @@
@@ -54,18 +54,18 @@ index abfbae9..f2740bf 100644
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
-diff --git a/tests-m32/sigaction.awk b/tests-m32/sigaction.awk
-index 5c6b6d0..3e14464 100644
---- a/tests-m32/sigaction.awk
-+++ b/tests-m32/sigaction.awk
+diff --git a/tests-m32/rt_sigaction.awk b/tests-m32/rt_sigaction.awk
+index 9c3a9ed..8414243 100644
+--- a/tests-m32/rt_sigaction.awk
++++ b/tests-m32/rt_sigaction.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
- # All rights reserved.
+ # Copyright (c) 2016 Elvira Khabirova <lineprinter0@gmail.com>
diff --git a/tests-mx32/caps.awk b/tests-mx32/caps.awk
-index 67003ac..a66f1f0 100644
+index c6e31ef..5efc6cc 100644
--- a/tests-mx32/caps.awk
+++ b/tests-mx32/caps.awk
@@ -1,4 +1,4 @@
@@ -84,18 +84,18 @@ index abfbae9..f2740bf 100644
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
-diff --git a/tests-mx32/sigaction.awk b/tests-mx32/sigaction.awk
-index 5c6b6d0..3e14464 100644
---- a/tests-mx32/sigaction.awk
-+++ b/tests-mx32/sigaction.awk
+diff --git a/tests-mx32/rt_sigaction.awk b/tests-mx32/rt_sigaction.awk
+index 9c3a9ed..8414243 100644
+--- a/tests-mx32/rt_sigaction.awk
++++ b/tests-mx32/rt_sigaction.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
- # All rights reserved.
+ # Copyright (c) 2016 Elvira Khabirova <lineprinter0@gmail.com>
diff --git a/tests/caps.awk b/tests/caps.awk
-index 67003ac..a66f1f0 100644
+index c6e31ef..5efc6cc 100644
--- a/tests/caps.awk
+++ b/tests/caps.awk
@@ -1,4 +1,4 @@
@@ -114,13 +114,13 @@ index abfbae9..f2740bf 100644
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
-diff --git a/tests/sigaction.awk b/tests/sigaction.awk
-index 5c6b6d0..3e14464 100644
---- a/tests/sigaction.awk
-+++ b/tests/sigaction.awk
+diff --git a/tests/rt_sigaction.awk b/tests/rt_sigaction.awk
+index 9c3a9ed..8414243 100644
+--- a/tests/rt_sigaction.awk
++++ b/tests/rt_sigaction.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
- # All rights reserved.
+ # Copyright (c) 2016 Elvira Khabirova <lineprinter0@gmail.com>
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.16.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb
index b6cd2ac9b..5b2891ad9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.16.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.18.bb
@@ -2,7 +2,7 @@ SUMMARY = "System call tracing tool"
HOMEPAGE = "http://strace.sourceforge.net"
SECTION = "console/utils"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=488acb3aaaf5d14a2e1a852d13668a70"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f132b4d2adfccc63da4139a609367711"
SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
file://disable-git-version-gen.patch \
@@ -13,10 +13,11 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \
file://mips-SIGEMT.patch \
file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
+ file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
"
-SRC_URI[md5sum] = "2873366cac98770efcbed6e748d5ef23"
-SRC_URI[sha256sum] = "98487cb5178ec1259986cc9f6e2a844f50e5d1208c112cc22431a1e4d9adf0ef"
+SRC_URI[md5sum] = "3579b3266bb096cebaefbe2cdb1a3a78"
+SRC_URI[sha256sum] = "89ad887c1e6226bdbca8da31d589cadea4be0744b142eb47b768086c937fca08"
inherit autotools ptest bluetooth
@@ -42,7 +43,16 @@ do_compile_ptest() {
do_install_ptest() {
oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
- sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
+ sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
+ -e 's,--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' \
+ -e '/^DEB_CHANGELOGTIME/d' \
+ -e '/^RPM_CHANGELOGTIME/d' \
+ ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
}
BBCLASSEXTEND = "native"
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
new file mode 100644
index 000000000..0599c2bad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion/CVE-2017-9800.patch
@@ -0,0 +1,136 @@
+------------------------------------------------------------------------
+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&amp;sortby=rev&amp;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.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb
index 05fba677b..532edeb08 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.6.bb
@@ -8,17 +8,18 @@ HOMEPAGE = "http://subversion.tigris.org"
BBCLASSEXTEND = "native"
-inherit gettext
+inherit gettext pkgconfig
SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
file://disable_macos.patch \
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] = "9fcbae352a5efe73d46a88c97c6bba14"
-SRC_URI[sha256sum] = "8a4fc68aff1d18dcb4dd9e460648d24d9e98657fbed496c582929c6b3ce555e5"
+SRC_URI[md5sum] = "f27e00338d4a9f7f9aec9d4a3f8b418b"
+SRC_URI[sha256sum] = "dbcbc51fb634082f009121f2cb64350ce32146612787ffb0f7ced351aacaae19"
LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb
index 69bce1f8d..f8b109409 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb
@@ -1,5 +1,5 @@
SUMMARY = "Multi-purpose linux bootloader"
-HOMEPAGE = "http://syslinux.zytor.com/"
+HOMEPAGE = "http://www.syslinux.org/"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a"
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
new file mode 100644
index 000000000..5aa0463ac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
@@ -0,0 +1,32 @@
+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_231.bb b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb
index 1d8803616..4da000e5d 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_231.bb
@@ -2,7 +2,9 @@ LICENSE = "LGPLv2.1 & GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
-SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https"
+SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https \
+ file://0001-parse-util-Don-t-use-xlocale.h.patch \
+"
# Modify these as desired
PV = "231+git${SRCPV}"
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 e5e41f148..9db26dccc 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,6 +16,7 @@ SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent;branch=1.4_ne
file://tcf-agent.init \
file://tcf-agent.service \
"
+UPSTREAM_VERSION_UNKNOWN = "1"
DEPENDS = "util-linux openssl"
RDEPENDS_${PN} = "bash"
@@ -30,16 +31,22 @@ INITSCRIPT_NAME = "tcf-agent"
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,`"
+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}'"
-# They don't build on ARM and we don't need them actually.
-CFLAGS += "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \
+LCL_STOP_SERVICES = "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \
-DSERVICE_Memory=0 -DSERVICE_Registers=0 -DSERVICE_MemoryMap=0 \
- -DSERVICE_StackTrace=0 -DSERVICE_Symbols=0 -DSERVICE_LineNumbers=0 \
- -DSERVICE_Expressions=0"
+ -DSERVICE_StackTrace=0 -DSERVICE_Expressions=0"
+
+
+# These features don't compile for several cases.
+#
+CFLAGS_append_mips = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_mips64 = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_libc-musl = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_powerpc64 = " ${LCL_STOP_SERVICES}"
do_install() {
oe_runmake install INSTALLROOT=${D}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb
index 40cd18fb0..dac73be6e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.7.bb
@@ -24,8 +24,8 @@ SRC_URI = "${BASE_SRC_URI} \
file://alter-includedir.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "5193aea8107839a79df8ac709552ecb7"
-SRC_URI[sha256sum] = "a265409781e4b3edcc4ef822533071b34c3dc6790b893963809b9fe221befe07"
+SRC_URI[md5sum] = "5673aaf45b5de5d8dd80bb3daaeb8838"
+SRC_URI[sha256sum] = "7c6b8f84e37332423cfe5bae503440d88450da8cc1243496249faa5268026ba5"
SRC_URI_class-native = "${BASE_SRC_URI}"
@@ -35,23 +35,15 @@ VER = "${PV}"
inherit autotools ptest binconfig
-DEPENDS_class-native = "zlib-native"
-
EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
-do_configure() {
- cd ${S}
- gnu-configize
- cd ${B}
- oe_runconf
-}
-
do_compile_prepend() {
echo > ${S}/../compat/fixstrtod.c
}
do_install() {
- autotools_do_install install-private-headers
+ autotools_do_install
+ oe_runmake 'DESTDIR=${D}' install-private-headers
ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh
@@ -59,7 +51,6 @@ do_install() {
install -d ${D}${bindir_crossscripts}
install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
install -m 0755 tclConfig.sh ${D}${libdir}
- cd ..
for dir in compat generic unix; do
install -d ${D}${includedir}/${BPN}${VER}/$dir
install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/
@@ -95,3 +86,16 @@ BINCONFIG_GLOB = "*Config.sh"
# Fix the path in sstate
SSTATE_SCAN_FILES += "*Config.sh"
+
+# Cleanup host path from ${libdir}/tclConfig.sh and remove the
+# ${bindir_crossscripts}/tclConfig.sh from target
+PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
+tcl_package_preprocess() {
+ sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \
+ -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \
+ -e "s;${STAGING_INCDIR};${includedir};g" \
+ -e "s;--sysroot=${RECIPE_SYSROOT};;g" \
+ ${PKGD}${libdir}/tclConfig.sh
+
+ rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb b/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
index 52aa17e25..cebc8660d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
@@ -17,7 +17,8 @@ S = "${WORKDIR}/trunk"
# Only subversion url left in OE-Core, use a mirror tarball instead since
# this rarely changes.
# svn://svn.code.sf.net/p/unfs3/code;module=trunk;rev=${MOD_PV};protocol=http
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/trunk_svn.code.sf.net_.p.unfs3.code_497_.tar.gz \
+# rename the tarball in mirror to avoid clash with user local svn tarball
+SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/unfs3-0.9.22.r497.tar.gz \
file://unfs3_parallel_build.patch \
file://alternate_rpc_ports.patch \
file://fix_pid_race_parent_writes_child_pid.patch \
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 b338ea097..1261c0277 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
@@ -2,7 +2,12 @@ SUMMARY = "C#-like programming language for easing GObject programming"
DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \
Vala compiles to plain C and has no runtime environment nor penalities whatsoever."
SECTION = "devel"
-DEPENDS = "bison-native flex-native libxslt-native glib-2.0"
+DEPENDS = "bison-native flex-native glib-2.0"
+
+# Appending libxslt-native to dependencies has an effect
+# of rebuilding the manual, which is very slow. Let's do this
+# only when api-documentation distro feature is enabled.
+DEPENDS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'libxslt-native', '', d)}"
# vala-native contains a native version of vapigen, which we use instead of the target one
DEPENDS_append_class-target = " vala-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.34.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb
index d1b49aea7..51000d9e1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.34.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.36.4.bb
@@ -4,5 +4,5 @@ SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.pa
file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
"
-SRC_URI[md5sum] = "a856989d749fc5e472a3592b96f9ca48"
-SRC_URI[sha256sum] = "6b17bd339414563ebc51f64b0b837919ea7552d8a8ffa71cdc837d25c9696b83"
+SRC_URI[md5sum] = "3c19014093f1a3d995357253b463082c"
+SRC_URI[sha256sum] = "e9f23ce711c1a72ce664d10946fbc5953f01b0b7f2a3562e7a01e362d86de059"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch
deleted file mode 100644
index dc6feff7f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 1b1a024efd18d44294e184e792c1e039cab02bfe Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 14 Feb 2016 09:14:12 +0000
-Subject: [PATCH] fix build for musl targets
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 2 --
- coregrind/vg_preloaded.c | 2 +-
- include/pub_tool_redir.h | 7 +++++--
- 3 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9366dc7..679f514 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1066,8 +1066,6 @@ case "${GLIBC_VERSION}" in
- ;;
- 2.0|2.1|*)
- AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
-- AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,])
-- AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc])
- ;;
- esac
-
-diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c
-index 2ea7a7a..e49c832 100644
---- a/coregrind/vg_preloaded.c
-+++ b/coregrind/vg_preloaded.c
-@@ -56,7 +56,7 @@
- void VG_NOTIFY_ON_LOAD(freeres)( void );
- void VG_NOTIFY_ON_LOAD(freeres)( void )
- {
--# if !defined(__UCLIBC__) \
-+# if !defined(__UCLIBC__) && defined(__GLIBC__) \
- && !defined(VGPV_arm_linux_android) \
- && !defined(VGPV_x86_linux_android) \
- && !defined(VGPV_mips32_linux_android) \
-diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h
-index bac00d7..fbb2ef2 100644
---- a/include/pub_tool_redir.h
-+++ b/include/pub_tool_redir.h
-@@ -242,8 +242,7 @@
- /* --- Soname of the standard C library. --- */
-
- #if defined(VGO_linux) || defined(VGO_solaris)
--# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so*
--
-+# define VG_Z_LIBC_SONAME libcZdZa // libc.*
- #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6)
- # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib
-
-@@ -274,7 +273,11 @@
- /* --- Soname of the pthreads library. --- */
-
- #if defined(VGO_linux)
-+# if defined(__GLIBC__) || defined(__UCLIBC__)
- # define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0
-+# else
-+# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.*
-+#endif
- #elif defined(VGO_darwin)
- # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib
- #elif defined(VGO_solaris)
---
-2.7.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch
new file mode 100644
index 000000000..9f1da7bac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch
@@ -0,0 +1,108 @@
+From 715cf122388f3527afa5649cebf9f1522c240693 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 20 Apr 2017 10:11:16 -0700
+Subject: [PATCH] makefiles: Drop setting -mcpu to cortex-a8 on arm
+ architecture
+
+We can not assume that all arches armv7+ are cortex-a8 only
+it fails to build for rpi which is armv7ve based (cortex-a8) cpu
+implementation.
+Fixes
+| cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.all.am | 6 +++---
+ helgrind/tests/Makefile.am | 6 +++---
+ none/tests/arm/Makefile.am | 18 +++++++++---------
+ 3 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/Makefile.all.am b/Makefile.all.am
+index 02059a3..c7c4700 100644
+--- a/Makefile.all.am
++++ b/Makefile.all.am
+@@ -197,11 +197,11 @@ AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g
+
+ AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@
+ AM_CFLAGS_ARM_LINUX = @FLAG_M32@ \
+- $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8
++ $(AM_CFLAGS_BASE) -marm
+ AM_CFLAGS_PSO_ARM_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) \
+- -marm -mcpu=cortex-a8 $(AM_CFLAGS_PSO_BASE)
++ -marm $(AM_CFLAGS_PSO_BASE)
+ AM_CCASFLAGS_ARM_LINUX = @FLAG_M32@ \
+- -marm -mcpu=cortex-a8 -g
++ -marm -g
+
+ AM_FLAG_M3264_ARM64_LINUX = @FLAG_M64@
+ AM_CFLAGS_ARM64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE)
+diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
+index df82169..07eb66a 100644
+--- a/helgrind/tests/Makefile.am
++++ b/helgrind/tests/Makefile.am
+@@ -189,9 +189,9 @@ if ! VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
+ endif
+
+ if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
+-annotate_hbefore_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
+-tc07_hbl1_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
+-tc08_hbl2_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
++annotate_hbefore_CFLAGS = $(AM_CFLAGS)
++tc07_hbl1_CFLAGS = $(AM_CFLAGS)
++tc08_hbl2_CFLAGS = $(AM_CFLAGS)
+ else
+ annotate_hbefore_CFLAGS = $(AM_CFLAGS)
+ tc07_hbl1_CFLAGS = $(AM_CFLAGS)
+diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
+index 024eb6d..ccecb90 100644
+--- a/none/tests/arm/Makefile.am
++++ b/none/tests/arm/Makefile.am
+@@ -52,10 +52,10 @@ allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
+ # need special helping w.r.t -mfpu and -mfloat-abi, though.
+ # Also force -O0 since -O takes hundreds of MB of memory
+ # for v6intThumb.c.
+-v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -marm
+-v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
++v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -marm
++v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb
+
+-v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
++v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb
+
+ v8crypto_a_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -marm
+ v8crypto_t_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -mthumb
+@@ -65,23 +65,23 @@ v8memory_a_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ v8memory_t_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mthumb
+
+-vfp_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
++vfp_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ -mfpu=neon \
+ -mthumb
+
+
+-neon128_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
++neon128_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ -mfpu=neon \
+ -mthumb
+
+-neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
++neon64_CFLAGS = $(AM_CFLAGS) -g -O0 \
+ -mfpu=neon \
+ -mthumb
+
+ intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb
+-ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
+-ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
++ldrt_CFLAGS = $(AM_CFLAGS) -g -mthumb
++ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -marm
+
+-vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3
++vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mfpu=vfpv3
+
+ vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm
+--
+2.12.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch
new file mode 100644
index 000000000..a48d7db07
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch
@@ -0,0 +1,32 @@
+From 3409dc35c15bb14c8a525239806322648e079ab1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Jul 2017 17:12:43 -0700
+Subject: [PATCH 1/3] memcheck/arm64: Define __THROW if not already defined
+
+Helps compiling with musl where __THROW is not available
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ memcheck/tests/arm64-linux/scalar.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h
+index 9008816..8ef050f 100644
+--- a/memcheck/tests/arm64-linux/scalar.h
++++ b/memcheck/tests/arm64-linux/scalar.h
+@@ -12,6 +12,10 @@
+ #include <sys/types.h>
+ #include <sys/mman.h>
+
++#ifndef __THROW
++#define __THROW
++#endif
++
+ // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
+ // declare this ourselves.
+ extern long int syscall (long int __sysno, ...) __THROW;
+--
+2.13.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch
new file mode 100644
index 000000000..bf16a1adf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch
@@ -0,0 +1,30 @@
+From 629ac492b1d9bc709d17337eb9b1c28603eca250 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 28 Jun 2017 11:01:25 -0700
+Subject: [PATCH] memcheck/tests: Use ucontext_t instead of struct ucontext
+
+glibc 2.26 does not expose struct ucontext anymore
+
+Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=381769]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ memcheck/tests/linux/stack_changes.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
+index ffb49c6..acc4109 100644
+--- a/memcheck/tests/linux/stack_changes.c
++++ b/memcheck/tests/linux/stack_changes.c
+@@ -11,7 +11,7 @@
+ // checks that Valgrind notices their stack changes properly.
+
+ #ifdef __GLIBC__
+-typedef struct ucontext mycontext;
++typedef ucontext_t mycontext;
+
+ mycontext ctx1, ctx2, oldc;
+ int count;
+--
+2.13.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch
new file mode 100644
index 000000000..27366153f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch
@@ -0,0 +1,31 @@
+From 64ad2744acfb4fa40b1c114633a053f87125a203 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 00:46:39 -0700
+Subject: [PATCH 1/6] sigqueue: Rename _sifields to __si_fields on musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ memcheck/tests/linux/sigqueue.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/memcheck/tests/linux/sigqueue.c b/memcheck/tests/linux/sigqueue.c
+index d18bd72..acb7cba 100644
+--- a/memcheck/tests/linux/sigqueue.c
++++ b/memcheck/tests/linux/sigqueue.c
+@@ -8,6 +8,11 @@
+ #include <syscall.h>
+ #include <unistd.h>
+
++/* musl libc defines siginfo_t __si_fields instead of _sifields */
++#if defined(__linux__) && !defined(__GLIBC__)
++#define _sifields __si_fields
++#endif
++
+ int main(int argc, char **argv)
+ {
+ siginfo_t *si;
+--
+2.13.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch
new file mode 100644
index 000000000..185b8f9e6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch
@@ -0,0 +1,39 @@
+From de692e359801a1f0488c76267e4f904dd2efe754 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 00:39:07 -0700
+Subject: [PATCH] str_tester.c: Limit rawmemchr() test to glibc
+
+rawmemchr() is a GNU extention therefore mark it so
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ memcheck/tests/str_tester.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/memcheck/tests/str_tester.c b/memcheck/tests/str_tester.c
+index 9f7790a..47e4b4a 100644
+--- a/memcheck/tests/str_tester.c
++++ b/memcheck/tests/str_tester.c
+@@ -504,7 +504,7 @@ test_strchrnul (void)
+ #endif
+
+ // DDD: better done by testing for the function.
+-#if !defined(__APPLE__) && !defined(__sun)
++#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
+ static void
+ test_rawmemchr (void)
+ {
+@@ -1442,7 +1442,7 @@ main (void)
+ test_strchrnul ();
+ # endif
+
+-# if !defined(__APPLE__) && !defined(__sun)
++# if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
+ /* rawmemchr. */
+ test_rawmemchr ();
+ # endif
+--
+2.13.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
new file mode 100644
index 000000000..3f9f33b48
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
@@ -0,0 +1,49 @@
+From 862b807076d57f2f58ed9d572ddac8bb402774a2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 01:01:10 -0700
+Subject: [PATCH 2/6] context APIs are not available on musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ memcheck/tests/linux/stack_changes.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
+index a978fc2..ffb49c6 100644
+--- a/memcheck/tests/linux/stack_changes.c
++++ b/memcheck/tests/linux/stack_changes.c
+@@ -10,6 +10,7 @@
+ // This test is checking the libc context calls (setcontext, etc.) and
+ // checks that Valgrind notices their stack changes properly.
+
++#ifdef __GLIBC__
+ typedef struct ucontext mycontext;
+
+ mycontext ctx1, ctx2, oldc;
+@@ -51,9 +52,11 @@ int init_context(mycontext *uc)
+
+ return ret;
+ }
++#endif
+
+ int main(int argc, char **argv)
+ {
++#ifdef __GLIBC__
+ int c1 = init_context(&ctx1);
+ int c2 = init_context(&ctx2);
+
+@@ -66,6 +69,8 @@ int main(int argc, char **argv)
+ //free(ctx1.uc_stack.ss_sp);
+ VALGRIND_STACK_DEREGISTER(c2);
+ //free(ctx2.uc_stack.ss_sp);
+-
++#else
++ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
++#endif
+ return 0;
+ }
+--
+2.13.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch
new file mode 100644
index 000000000..543347229
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch
@@ -0,0 +1,32 @@
+From 67d199dbdcbb3feff5f8928f87725fc64c0307d7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Jul 2017 17:36:42 -0700
+Subject: [PATCH 2/3] memcheck/x86: Define __THROW if not defined
+
+musl does not have __THROW, therefore make it null
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ memcheck/tests/x86-linux/scalar.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h
+index ef28b03..52f742e 100644
+--- a/memcheck/tests/x86-linux/scalar.h
++++ b/memcheck/tests/x86-linux/scalar.h
+@@ -11,6 +11,10 @@
+ #include <sys/types.h>
+ #include <sys/mman.h>
+
++#ifndef __THROW
++#define __THROW
++#endif
++
+ // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
+ // declare this ourselves.
+ extern long int syscall (long int __sysno, ...) __THROW;
+--
+2.13.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch
new file mode 100644
index 000000000..c2965c40d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch
@@ -0,0 +1,45 @@
+From ecbdea7bd8b08205f1bc3f6b72d4b4a80f313fcb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 01:03:17 -0700
+Subject: [PATCH 3/6] correct include directive path for config.h
+
+when building out of source tree, it can not find
+the generated config.h otherwise
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ memcheck/tests/linux/syscalls-2007.c | 2 +-
+ memcheck/tests/linux/syslog-syscall.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/memcheck/tests/linux/syscalls-2007.c b/memcheck/tests/linux/syscalls-2007.c
+index b61c6d5..cc3fd62 100644
+--- a/memcheck/tests/linux/syscalls-2007.c
++++ b/memcheck/tests/linux/syscalls-2007.c
+@@ -10,7 +10,7 @@
+
+ #define _GNU_SOURCE
+
+-#include "../../config.h"
++#include "config.h"
+ #include <fcntl.h>
+ #include <signal.h>
+ #include <stdint.h>
+diff --git a/memcheck/tests/linux/syslog-syscall.c b/memcheck/tests/linux/syslog-syscall.c
+index 1143722..21e758b 100644
+--- a/memcheck/tests/linux/syslog-syscall.c
++++ b/memcheck/tests/linux/syslog-syscall.c
+@@ -6,7 +6,7 @@
+ * klogctl().
+ */
+
+-#include "../../config.h"
++#include "config.h"
+ #include <stdio.h>
+ #if defined(HAVE_SYS_KLOG_H)
+ #include <sys/klog.h>
+--
+2.13.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch
new file mode 100644
index 000000000..fa1344c85
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch
@@ -0,0 +1,68 @@
+From d103475875858ab8a2e6b53ce178bb2f63883d4c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 5 Jul 2017 17:37:56 -0700
+Subject: [PATCH 3/3] tests/seg_override: Replace __modify_ldt() with syscall()
+
+__modify_ldt() is specific to glibc, replacing it with syscall()
+makes it more portable.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ none/tests/x86-linux/seg_override.c | 15 ++++++---------
+ 1 file changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c
+index b7619c9..c89874b 100644
+--- a/none/tests/x86-linux/seg_override.c
++++ b/none/tests/x86-linux/seg_override.c
+@@ -2,6 +2,8 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
++#include <unistd.h>
++#include <syscall.h>
+
+ /* Stuff from Wine. */
+
+@@ -52,14 +54,11 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent )
+ /* our copy of the ldt */
+ LDT_ENTRY ldt_copy[8192];
+
+-/* System call to set LDT entry. */
+-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
+-extern int __modify_ldt (int, void *, size_t);
+-
+ void print_ldt ( void )
+ {
+ int res;
+- res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
++ /* System call to set LDT entry. */
++ res = syscall(SYS_modify_ldt, 0, ldt_copy, 8192*sizeof(LDT_ENTRY) );
+ printf("got %d bytes\n", res );
+ perror("error is");
+ }
+@@ -83,9 +82,6 @@ struct modify_ldt_ldt_s
+ unsigned int empty:25;
+ };
+
+-/* System call to set LDT entry. */
+-//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
+-
+ void set_ldt1 ( void* base )
+ {
+ int stat;
+@@ -102,7 +98,8 @@ void set_ldt1 ( void* base )
+ ldt_entry.read_exec_only = 0;
+ ldt_entry.limit_in_pages = 0;
+ ldt_entry.seg_not_present = 0;
+- stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry));
++ /* System call to set LDT entry. */
++ stat = syscall(SYS_modify_ldt, 1, &ldt_entry, sizeof (ldt_entry));
+ printf("stat = %d\n", stat);
+ }
+
+--
+2.13.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
index ed313d644..39022d04a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
@@ -1,4 +1,4 @@
-From 38ae233b6893a4eec7f9ed6d8ad02392bca8eaed Mon Sep 17 00:00:00 2001
+From 739421e253e6eba3eb6438651822f80fa9c0502a Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 15 Dec 2015 15:31:50 +0200
Subject: [PATCH 1/2] Fix out of tree builds.
@@ -13,21 +13,21 @@ Upstream-Status: Pending
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- configure.ac | 64 ++++++++++++++++++++++++++++++------------------------------
- 1 file changed, 32 insertions(+), 32 deletions(-)
+ configure.ac | 68 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 8ab7f9b..9366dc7 100644
+index 3874296fde0b..7a5ba2c8557e 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -377,44 +377,44 @@ case "${host_os}" in
+@@ -373,50 +373,50 @@ case "${host_os}" in
9.*)
AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard])
AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version])
- DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}"
- DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}"
;;
10.*)
AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard])
@@ -77,9 +77,17 @@ index 8ab7f9b..9366dc7 100644
+ DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
;;
+ 16.*)
+ AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra])
+ AC_DEFINE([DARWIN_VERS], DARWIN_10_12, [Darwin / Mac OS X version])
+- DEFAULT_SUPP="darwin16.supp ${DEFAULT_SUPP}"
+- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
+ ;;
*)
AC_MSG_RESULT([unsupported (${kernel})])
-@@ -426,13 +426,13 @@ case "${host_os}" in
+@@ -428,13 +428,13 @@ case "${host_os}" in
solaris2.11*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="solaris"
@@ -95,7 +103,7 @@ index 8ab7f9b..9366dc7 100644
;;
*)
-@@ -1015,29 +1015,29 @@ AC_MSG_CHECKING([the glibc version])
+@@ -982,29 +982,29 @@ AC_MSG_CHECKING([the glibc version])
case "${GLIBC_VERSION}" in
2.2)
AC_MSG_RESULT(${GLIBC_VERSION} family)
@@ -135,7 +143,7 @@ index 8ab7f9b..9366dc7 100644
;;
2.*)
AC_MSG_RESULT(${GLIBC_VERSION} family)
-@@ -1046,8 +1046,8 @@ case "${GLIBC_VERSION}" in
+@@ -1013,8 +1013,8 @@ case "${GLIBC_VERSION}" in
AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1,
[Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)])
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
@@ -146,7 +154,7 @@ index 8ab7f9b..9366dc7 100644
;;
darwin)
AC_MSG_RESULT(Darwin)
-@@ -1057,7 +1057,7 @@ case "${GLIBC_VERSION}" in
+@@ -1024,7 +1024,7 @@ case "${GLIBC_VERSION}" in
bionic)
AC_MSG_RESULT(Bionic)
AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
@@ -155,7 +163,7 @@ index 8ab7f9b..9366dc7 100644
;;
solaris)
AC_MSG_RESULT(Solaris)
-@@ -1079,11 +1079,11 @@ if test "$VGCONF_OS" != "solaris"; then
+@@ -1051,11 +1051,11 @@ if test "$VGCONF_OS" != "solaris"; then
# attempt to detect whether such libraries are installed on the
# build machine (or even if any X facilities are present); just
# add the suppressions antidisirregardless.
@@ -171,5 +179,5 @@ index 8ab7f9b..9366dc7 100644
--
-2.6.2
+2.13.2.3.g44cd85c14
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch
new file mode 100644
index 000000000..1cb706254
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch
@@ -0,0 +1,37 @@
+From fb77fef4f866dac7bcc6d1ae025da60564869f84 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 01:06:11 -0700
+Subject: [PATCH 4/6] pth_atfork1.c: Define error() API for musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ none/tests/pth_atfork1.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/pth_atfork1.c b/none/tests/pth_atfork1.c
+index 34201ef..b7f5f2d 100644
+--- a/none/tests/pth_atfork1.c
++++ b/none/tests/pth_atfork1.c
+@@ -18,7 +18,7 @@
+ Boston, MA 02111-1307, USA. */
+
+ #include <errno.h>
+-#if !defined(__APPLE__) && !defined(__sun)
++#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__)
+ # include <error.h>
+ #endif
+ #include <stdlib.h>
+@@ -27,7 +27,7 @@
+ #include <sys/wait.h>
+ #include <stdio.h>
+
+-#if defined(__APPLE__) || defined(__sun)
++#if defined(__APPLE__) || defined(__sun) || (defined(__linux__) && !defined(__GLIBC__))
+ #include <string.h> /* strerror */
+ static void error (int status, int errnum, char* msg)
+ {
+--
+2.13.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch
new file mode 100644
index 000000000..6176640e4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch
@@ -0,0 +1,30 @@
+From b4b9f072c22f96844e02cb9d68f7ff2408680817 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 01:07:59 -0700
+Subject: [PATCH 5/6] tc20_verifywrap.c: Fake __GLIBC_PREREQ with musl
+
+similar to sun
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ helgrind/tests/tc20_verifywrap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/helgrind/tests/tc20_verifywrap.c b/helgrind/tests/tc20_verifywrap.c
+index c110000..a311a49 100644
+--- a/helgrind/tests/tc20_verifywrap.c
++++ b/helgrind/tests/tc20_verifywrap.c
+@@ -20,7 +20,7 @@
+
+ #if !defined(__APPLE__)
+
+-#if defined(__sun__)
++#if defined(__sun__) || (defined(__linux__) && !defined(__GLIBC__))
+ /* Fake __GLIBC_PREREQ on Solaris. Pretend glibc >= 2.4. */
+ # define __GLIBC_PREREQ
+ #else
+--
+2.13.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
new file mode 100644
index 000000000..05886c743
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch
@@ -0,0 +1,32 @@
+From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 10 Jun 2017 01:20:32 -0700
+Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding
+ offset to it
+
+Fixes
+error: invalid use of undefined type 'struct __pthread'
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ drd/tests/pth_detached3.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c
+index c02eef1..35d43a6 100644
+--- a/drd/tests/pth_detached3.c
++++ b/drd/tests/pth_detached3.c
+@@ -21,7 +21,7 @@ int main(int argc, char** argv)
+ pthread_detach(thread);
+
+ /* Invoke pthread_detach() with an invalid thread ID. */
+- pthread_detach(thread + 8);
++ pthread_detach((pthread_t*)(&thread + 8));
+
+ fprintf(stderr, "Finished.\n");
+
+--
+2.13.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch
new file mode 100644
index 000000000..db322398c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/link-gz-tests.patch
@@ -0,0 +1,27 @@
+When checking if the compiler supports compressed debug sections we need to
+actually link instead of just compile. Otherwise the compiler thinks that
+they are supported, but gold does not support -gz=zlib.
+
+Upstream-Status: Backport (r16459)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- a/configure.ac~ 2017-07-11 11:53:16.000000000 +0100
++++ b/configure.ac 2017-07-11 18:16:13.674130483 +0100
+@@ -2119,7 +2119,7 @@
+ safe_CFLAGS=$CFLAGS
+ CFLAGS="-g -gz=zlib"
+
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
+ return 0;
+ ]])], [
+ ac_have_gz_zlib=yes
+@@ -2139,7 +2139,7 @@
+ safe_CFLAGS=$CFLAGS
+ CFLAGS="-g -gz=zlib-gnu"
+
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
+ return 0;
+ ]])], [
+ ac_have_gz_zlib_gnu=yes
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch
new file mode 100644
index 000000000..51259db00
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch
@@ -0,0 +1,87 @@
+Backport a patch from upstream to fix test compilation for PPC where
+system headers don't get included.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+r16450 | mjw | 2017-06-16 10:33:35 +0100 (Fri, 16 Jun 2017) | 7 lines
+
+ppc64 doesn't compile test_isa_2_06_partx.c without VSX support
+
+The #ifdef HAS_VSX guard is wrongly placed. It makes the standard
+include headers not be used. Causing a build failure. Fix by moving
+the #ifdef HAS_VSX after the standard includes.
+
+Index: none/tests/ppc32/test_isa_2_06_part3.c
+===================================================================
+--- a/none/tests/ppc32/test_isa_2_06_part3.c (revision 16449)
++++ b/none/tests/ppc32/test_isa_2_06_part3.c (revision 16450)
+@@ -20,17 +20,18 @@
+ The GNU General Public License is contained in the file COPYING.
+ */
+
+-#ifdef HAS_VSX
+-
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <malloc.h>
+-#include <altivec.h>
+ #include <math.h>
+ #include <unistd.h> // getopt
+
++#ifdef HAS_VSX
++
++#include <altivec.h>
++
+ #ifndef __powerpc64__
+ typedef uint32_t HWord_t;
+ #else
+Index: none/tests/ppc32/test_isa_2_06_part1.c
+===================================================================
+--- a/none/tests/ppc32/test_isa_2_06_part1.c (revision 16449)
++++ b/none/tests/ppc32/test_isa_2_06_part1.c (revision 16450)
+@@ -20,13 +20,14 @@
+ The GNU General Public License is contained in the file COPYING.
+ */
+
+-#ifdef HAS_VSX
+-
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <malloc.h>
++
++#ifdef HAS_VSX
++
+ #include <altivec.h>
+
+ #ifndef __powerpc64__
+Index: none/tests/ppc32/test_isa_2_06_part2.c
+===================================================================
+--- a/none/tests/ppc32/test_isa_2_06_part2.c (revision 16449)
++++ b/none/tests/ppc32/test_isa_2_06_part2.c (revision 16450)
+@@ -20,17 +20,18 @@
+ The GNU General Public License is contained in the file COPYING.
+ */
+
+-#ifdef HAS_VSX
+-
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <malloc.h>
+-#include <altivec.h>
+ #include <math.h>
+ #include <unistd.h> // getopt
+
++#ifdef HAS_VSX
++
++#include <altivec.h>
++
+ #ifndef __powerpc64__
+ typedef uint32_t HWord_t;
+ #else
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/run-ptest b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
index f9a72ec4a..447d33c8c 100755
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
@@ -2,11 +2,24 @@
# run-ptest - 'ptest' test infrastructure shell script that
# wraps the valgrind regression script vg_regtest.
-# Must be run in the /usr/lib/valgrind/ptest directory.
#
# Dave Lerner <dave.lerner@windriver.com>
###############################################################
VALGRINDLIB=@libdir@/valgrind
-tests/vg_regtest --all \
+LOG="${VALGRINDLIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log"
+
+cd ${VALGRINDLIB}/ptest && ./tests/vg_regtest --all \
--valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \
- --yocto-ptest
+ --yocto-ptest 2>&1|tee ${LOG}
+
+passed=`grep PASS: ${LOG}|wc -l`
+failed=`grep FAIL: ${LOG}|wc -l`
+skipped=`grep SKIP: ${LOG}|wc -l`
+all=$((passed + failed + skipped))
+
+( echo "=== Test Summary ==="
+ echo "TOTAL: ${all}"
+ echo "PASSED: ${passed}"
+ echo "FAILED: ${failed}"
+ echo "SKIPPED: ${skipped}"
+) | tee -a /${LOG}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
index 4f8cd3f52..25b412662 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
@@ -3,8 +3,8 @@ HOMEPAGE = "http://valgrind.org/"
BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
LICENSE = "GPLv2 & GPLv2+ & BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://include/pub_tool_basics.h;beginline=1;endline=29;md5=ebb8e640ef633f940c425686c873f9fa \
- file://include/valgrind.h;beginline=1;endline=56;md5=4b5e24908e53016ea561c45f4234a327 \
+ file://include/pub_tool_basics.h;beginline=6;endline=29;md5=d4de0407239381463cf01dd276d7c22e \
+ file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \
file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56"
X11DEPENDS = "virtual/libx11"
@@ -12,7 +12,7 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d
${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \
"
-SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
+SRC_URI = "ftp://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
file://fixed-perl-path.patch \
file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
file://run-ptest \
@@ -23,12 +23,24 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
file://avoid-neon-for-targets-which-don-t-support-it.patch \
file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
-"
-SRC_URI_append_libc-musl = "\
- file://0001-fix-build-for-musl-targets.patch \
-"
-SRC_URI[md5sum] = "6eb03c0c10ea917013a7622e483d61bb"
-SRC_URI[sha256sum] = "67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012cf76a1"
+ file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \
+ file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \
+ file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \
+ file://0002-context-APIs-are-not-available-on-musl.patch \
+ file://0003-correct-include-directive-path-for-config.h.patch \
+ file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \
+ file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \
+ file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \
+ file://0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch \
+ file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \
+ file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
+ file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
+ file://link-gz-tests.patch \
+ file://ppc-headers.patch \
+ "
+SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369"
+SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b"
+UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
@@ -39,6 +51,7 @@ COMPATIBLE_HOST_armv6 = 'null'
# X32 isn't supported by valgrind at this time
COMPATIBLE_HOST_linux-gnux32 = 'null'
+COMPATIBLE_HOST_linux-muslx32 = 'null'
# Disable for some MIPS variants
COMPATIBLE_HOST_mipsarchn32 = 'null'
@@ -51,6 +64,7 @@ EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEIN
# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
+TARGET_CC_ARCH_remove_arm = "${@get_mcpu(d)}"
EXTRA_OEMAKE = "-w"
@@ -62,12 +76,24 @@ CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
# which fixes build path issue in DWARF.
SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
-CFLAGS_append_libc-uclibc = " -D__UCLIBC__ "
+def get_mcpu(d):
+ for arg in (d.getVar('TUNE_CCARGS') or '').split():
+ if arg.startswith('-mcpu='):
+ return arg
+ else:
+ continue
+ return ""
+
+do_configure_prepend () {
+ rm -rf ${S}/config.h
+}
do_install_append () {
install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
}
+TUNE = "${@strip_mcpu(d)}"
+
RDEPENDS_${PN} += "perl"
# valgrind needs debug information for ld.so at runtime in order to
OpenPOWER on IntegriCloud