summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools')
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-Do-not-init-tables-from-dpkg-configuration.patch2
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch48
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch2
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-aptwebserver.cc-Include-array.patch32
-rw-r--r--poky/meta/recipes-devtools/apt/apt_2.2.4.bb (renamed from poky/meta/recipes-devtools/apt/apt_2.2.2.bb)5
-rw-r--r--poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2021.02.19.bb (renamed from poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb)3
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils-2.36.inc13
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/0017-Add-support-for-the-DW_FORM_strx-forms-to-the-BFD-li.patch183
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/0018-Add-DWARF-5-support-in-gold.patch1374
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/CVE-2021-20197.patch388
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils_2.36.bb2
-rw-r--r--poky/meta/recipes-devtools/bison/bison_3.7.6.bb (renamed from poky/meta/recipes-devtools/bison/bison_3.7.5.bb)23
-rw-r--r--poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch42
-rw-r--r--poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb (renamed from poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.10.1.bb)34
-rw-r--r--poky/meta/recipes-devtools/ccache/ccache_4.3.bb (renamed from poky/meta/recipes-devtools/ccache/ccache_4.2.bb)6
-rw-r--r--poky/meta/recipes-devtools/cmake/cmake-native_3.20.3.bb (renamed from poky/meta/recipes-devtools/cmake/cmake-native_3.19.5.bb)2
-rw-r--r--poky/meta/recipes-devtools/cmake/cmake.inc5
-rw-r--r--poky/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch4
-rw-r--r--poky/meta/recipes-devtools/cmake/cmake/0002-cmake-Prevent-the-detection-of-Qt5.patch122
-rw-r--r--poky/meta/recipes-devtools/cmake/cmake_3.20.3.bb (renamed from poky/meta/recipes-devtools/cmake/cmake_3.19.5.bb)0
-rw-r--r--poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch15
-rw-r--r--poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.3.bb (renamed from poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.0.bb)2
-rw-r--r--poky/meta/recipes-devtools/dejagnu/dejagnu_1.6.2.bb1
-rw-r--r--poky/meta/recipes-devtools/distcc/distcc_3.4.bb (renamed from poky/meta/recipes-devtools/distcc/distcc_3.3.5.bb)2
-rw-r--r--poky/meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch39
-rw-r--r--poky/meta/recipes-devtools/dnf/dnf/0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch37
-rw-r--r--poky/meta/recipes-devtools/dnf/dnf_4.7.0.bb (renamed from poky/meta/recipes-devtools/dnf/dnf_4.6.0.bb)4
-rw-r--r--poky/meta/recipes-devtools/dpkg/dpkg_1.20.9.bb (renamed from poky/meta/recipes-devtools/dpkg/dpkg_1.20.7.1.bb)4
-rw-r--r--poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch24
-rw-r--r--poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch48
-rw-r--r--poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch2
-rw-r--r--poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch6
-rw-r--r--poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb (renamed from poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.1.bb)4
-rw-r--r--poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb (renamed from poky/meta/recipes-devtools/elfutils/elfutils_0.183.bb)12
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-add-support-for-ipkg-to-debuginfod.cxx.patch33
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch63
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch4
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch8
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch4
-rw-r--r--poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch16
-rw-r--r--poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb23
-rw-r--r--poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb (renamed from poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.7.bb)2
-rw-r--r--poky/meta/recipes-devtools/file/file_5.40.bb (renamed from poky/meta/recipes-devtools/file/file_5.39.bb)5
-rw-r--r--poky/meta/recipes-devtools/file/files/0001-src-compress.c-correct-header-define-for-xz-lzma.patch27
-rw-r--r--poky/meta/recipes-devtools/flex/flex_2.6.4.bb6
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-11.1.inc (renamed from poky/meta/recipes-devtools/gcc/gcc-10.2.inc)24
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-configure-common.inc1
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc11
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-cross-canadian_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-cross-canadian_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-cross.inc8
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-cross_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-cross_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-crosssdk_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-crosssdk_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-runtime.inc14
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-runtime_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-runtime_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-sanitizers_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-sanitizers_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-source_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/gcc-source_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc-target.inc4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch66
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch202
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch10
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0001-libatomic-libgomp-libitc-Fix-bootstrap-PR70454.patch208
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch57
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch607
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch55
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch658
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch6
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch31
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0005-optional-libstdc.patch26
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch6
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch16
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch10
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0009-cpp-honor-sysroot.patch14
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch6
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch32
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch11
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0013-Disable-sdt.patch18
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0014-libtool.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch14
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0018-export-CPP.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch74
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0020-Don-t-search-host-directory-during-relink-if-inst_pr.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0021-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0022-aarch64-Add-support-for-musl-ldso.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0023-libcc1-fix-libcc1-s-install-path-and-rpath.patch10
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch219
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0025-Search-target-sysroot-gcc-version-specific-dirs-with.patch8
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0026-Fix-various-_FOR_BUILD-and-related-variables.patch18
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0027-nios2-Define-MUSL_DYNAMIC_LINKER.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch14
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch4
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch6
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0032-Fix-for-testsuite-failure.patch2
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0033-Re-introduce-spe-commandline-options.patch13
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch12
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch34
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0036-mingw32-Enable-operation_not_supported.patch8
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0037-libatomic-Do-not-enforce-march-on-aarch64.patch8
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0038-arc-Update-64bit-move-split-patterns.patch290
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0039-arc-Fix-u-maddhisi-patterns.patch127
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc/0040-arc-Update-doloop_end-patterns.patch105
-rw-r--r--poky/meta/recipes-devtools/gcc/gcc_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/gcc_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/libgcc-initial_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/libgcc-initial_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/libgcc_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/libgcc_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gcc/libgfortran_11.1.bb (renamed from poky/meta/recipes-devtools/gcc/libgfortran_10.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-10.2.inc (renamed from poky/meta/recipes-devtools/gdb/gdb-10.1.inc)6
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-common.inc2
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc3
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-cross-canadian_10.2.bb (renamed from poky/meta/recipes-devtools/gdb/gdb-cross-canadian_10.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-cross.inc3
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb-cross_10.2.bb (renamed from poky/meta/recipes-devtools/gdb/gdb-cross_10.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/0012-arc-Add-support-for-signal-handlers.patch218
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/0013-arc-Add-support-for-signal-frames-for-Linux-targets.patch232
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/0014-arc-Take-into-account-the-REGNUM-in-supply-collect-g.patch104
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb/0015-gdb-Add-native-support-for-ARC-in-GNU-Linux.patch414
-rw-r--r--poky/meta/recipes-devtools/gdb/gdb_10.2.bb (renamed from poky/meta/recipes-devtools/gdb/gdb_10.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/git/git_2.32.0.bb (renamed from poky/meta/recipes-devtools/git/git_2.31.1.bb)4
-rw-r--r--poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb4
-rw-r--r--poky/meta/recipes-devtools/go/go-1.16.5.inc (renamed from poky/meta/recipes-devtools/go/go-1.16.2.inc)4
-rw-r--r--poky/meta/recipes-devtools/go/go-binary-native_1.16.5.bb (renamed from poky/meta/recipes-devtools/go/go-binary-native_1.16.2.bb)4
-rw-r--r--poky/meta/recipes-devtools/go/go-common.inc2
-rw-r--r--poky/meta/recipes-devtools/go/go-cross-canadian_1.16.5.bb (renamed from poky/meta/recipes-devtools/go/go-cross-canadian_1.16.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go-cross_1.16.5.bb (renamed from poky/meta/recipes-devtools/go/go-cross_1.16.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go-crosssdk_1.16.5.bb (renamed from poky/meta/recipes-devtools/go/go-crosssdk_1.16.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go-native_1.16.5.bb (renamed from poky/meta/recipes-devtools/go/go-native_1.16.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go-runtime_1.16.5.bb (renamed from poky/meta/recipes-devtools/go/go-runtime_1.16.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go_1.16.5.bb (renamed from poky/meta/recipes-devtools/go/go_1.16.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/help2man/help2man_1.48.3.bb (renamed from poky/meta/recipes-devtools/help2man/help2man_1.48.2.bb)2
-rw-r--r--poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb1
-rw-r--r--poky/meta/recipes-devtools/jquery/jquery_3.6.0.bb5
-rw-r--r--poky/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch6
-rw-r--r--poky/meta/recipes-devtools/libcomps/libcomps/0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch10
-rw-r--r--poky/meta/recipes-devtools/libcomps/libcomps_0.1.17.bb (renamed from poky/meta/recipes-devtools/libcomps/libcomps_0.1.15.bb)2
-rw-r--r--poky/meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch42
-rw-r--r--poky/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-config.h-avoid-the-use-of-non-portable-__WORD.patch17
-rw-r--r--poky/meta/recipes-devtools/libdnf/libdnf_0.63.0.bb (renamed from poky/meta/recipes-devtools/libdnf/libdnf_0.58.0.bb)5
-rw-r--r--poky/meta/recipes-devtools/libedit/libedit_20210522-3.1.bb (renamed from poky/meta/recipes-devtools/libedit/libedit_20210216-3.1.bb)2
-rw-r--r--poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb4
-rw-r--r--poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch15
-rw-r--r--poky/meta/recipes-devtools/librepo/librepo_1.14.1.bb (renamed from poky/meta/recipes-devtools/librepo/librepo_1.13.0.bb)2
-rw-r--r--poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc1
-rw-r--r--poky/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch35
-rw-r--r--poky/meta/recipes-devtools/llvm/llvm/0001-nfc-Fix-missing-include.patch26
-rw-r--r--poky/meta/recipes-devtools/llvm/llvm_git.bb7
-rw-r--r--poky/meta/recipes-devtools/m4/m4-1.4.19.inc (renamed from poky/meta/recipes-devtools/m4/m4-1.4.18.inc)15
-rw-r--r--poky/meta/recipes-devtools/m4/m4-native_1.4.19.bb (renamed from poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb)0
-rw-r--r--poky/meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch33
-rw-r--r--poky/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch41
-rw-r--r--poky/meta/recipes-devtools/m4/m4/ac_config_links.patch24
-rw-r--r--poky/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch130
-rw-r--r--poky/meta/recipes-devtools/m4/m4_1.4.19.bb (renamed from poky/meta/recipes-devtools/m4/m4_1.4.18.bb)0
-rw-r--r--poky/meta/recipes-devtools/meson/meson.inc15
-rw-r--r--poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch26
-rw-r--r--poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch8
-rw-r--r--poky/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch28
-rw-r--r--poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch14
-rw-r--r--poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch16
-rw-r--r--poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch58
-rw-r--r--poky/meta/recipes-devtools/meson/meson/cross-prop-default.patch23
-rw-r--r--poky/meta/recipes-devtools/meson/meson/gi-target-dep.patch2
-rw-r--r--poky/meta/recipes-devtools/meson/meson_0.58.1.bb (renamed from poky/meta/recipes-devtools/meson/meson_0.57.1.bb)0
-rw-r--r--poky/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb (renamed from poky/meta/recipes-devtools/meson/nativesdk-meson_0.57.1.bb)14
-rw-r--r--poky/meta/recipes-devtools/mklibs/files/ac_init_fix.patch19
-rw-r--r--poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch103
-rw-r--r--poky/meta/recipes-devtools/mklibs/files/fix_STT_GNU_IFUNC.patch26
-rw-r--r--poky/meta/recipes-devtools/mklibs/files/fix_cross_compile.patch81
-rw-r--r--poky/meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch34
-rw-r--r--poky/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch18
-rw-r--r--poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb22
-rw-r--r--poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch32
-rw-r--r--poky/meta/recipes-devtools/mmc/mmc-utils_git.bb6
-rw-r--r--poky/meta/recipes-devtools/mtools/mtools_4.0.29.bb (renamed from poky/meta/recipes-devtools/mtools/mtools_4.0.26.bb)2
-rw-r--r--poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.5.bb (renamed from poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb)4
-rw-r--r--poky/meta/recipes-devtools/opkg/opkg/0001-tests-let-the-OS-negotiate-relative-package-dirs.patch43
-rw-r--r--poky/meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch24
-rw-r--r--poky/meta/recipes-devtools/opkg/opkg_0.4.5.bb (renamed from poky/meta/recipes-devtools/opkg/opkg_0.4.4.bb)19
-rw-r--r--poky/meta/recipes-devtools/patchelf/patchelf/6edec83653ce1b5fc201ff6db93b966394766814.patch44
-rw-r--r--poky/meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch44
-rw-r--r--poky/meta/recipes-devtools/patchelf/patchelf_0.12.bb2
-rw-r--r--poky/meta/recipes-devtools/perl-cross/files/0001-cnf-configure_func_sel.sh-disable-thread_safe_nl_lan.patch27
-rw-r--r--poky/meta/recipes-devtools/perl-cross/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch (renamed from poky/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl-cross/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch (renamed from poky/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch (renamed from poky/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch)0
-rw-r--r--poky/meta/recipes-devtools/perl-cross/files/README.md29
-rw-r--r--poky/meta/recipes-devtools/perl-cross/files/determinism.patch46
-rw-r--r--poky/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb39
-rw-r--r--poky/meta/recipes-devtools/perl/files/determinism.patch23
-rw-r--r--poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002009.bb (renamed from poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb)4
-rw-r--r--poky/meta/recipes-devtools/perl/perl_5.34.0.bb (renamed from poky/meta/recipes-devtools/perl/perl_5.32.1.bb)19
-rw-r--r--poky/meta/recipes-devtools/pkgconf/pkgconf_1.7.4.bb (renamed from poky/meta/recipes-devtools/pkgconf/pkgconf_1.7.3.bb)2
-rw-r--r--poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-remove-support-for-the-__int64-type.-See-1.patch144
-rw-r--r--poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-use-C99-printf-format-specifiers-on-Window.patch68
-rw-r--r--poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb4
-rw-r--r--poky/meta/recipes-devtools/pseudo/pseudo_git.bb2
-rw-r--r--poky/meta/recipes-devtools/python-numpy/python3-numpy_1.20.3.bb (renamed from poky/meta/recipes-devtools/python-numpy/python3-numpy_1.20.1.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch4
-rw-r--r--poky/meta/recipes-devtools/python/python-cython.inc2
-rw-r--r--poky/meta/recipes-devtools/python/python-gitdb.inc2
-rw-r--r--poky/meta/recipes-devtools/python/python3-attrs_21.2.0.bb (renamed from poky/meta/recipes-devtools/python/python3-attrs_20.3.0.bb)3
-rw-r--r--poky/meta/recipes-devtools/python/python3-cython_0.29.23.bb (renamed from poky/meta/recipes-devtools/python/python3-cython_0.29.22.bb)0
-rw-r--r--poky/meta/recipes-devtools/python/python3-dbusmock_0.23.1.bb (renamed from poky/meta/recipes-devtools/python/python3-dbusmock_0.22.0.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/python3-docutils_0.16.bb17
-rw-r--r--poky/meta/recipes-devtools/python/python3-docutils_0.17.1.bb11
-rw-r--r--poky/meta/recipes-devtools/python/python3-git_3.1.17.bb (renamed from poky/meta/recipes-devtools/python/python3-git_3.1.14.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/python3-gitdb_4.0.5.bb4
-rw-r--r--poky/meta/recipes-devtools/python/python3-gitdb_4.0.7.bb4
-rw-r--r--poky/meta/recipes-devtools/python/python3-hypothesis_6.14.0.bb (renamed from poky/meta/recipes-devtools/python/python3-hypothesis_6.2.0.bb)12
-rw-r--r--poky/meta/recipes-devtools/python/python3-importlib-metadata_4.5.0.bb (renamed from poky/meta/recipes-devtools/python/python3-importlib-metadata_3.4.0.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/python3-jinja2_3.0.1.bb (renamed from poky/meta/recipes-devtools/python/python3-jinja2_2.11.3.bb)6
-rw-r--r--poky/meta/recipes-devtools/python/python3-libarchive-c_3.1.bb (renamed from poky/meta/recipes-devtools/python/python3-libarchive-c_2.9.bb)5
-rw-r--r--poky/meta/recipes-devtools/python/python3-magic_0.4.24.bb (renamed from poky/meta/recipes-devtools/python/python3-magic_0.4.22.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/python3-markdown_3.3.4.bb13
-rw-r--r--poky/meta/recipes-devtools/python/python3-markupsafe_2.0.1.bb (renamed from poky/meta/recipes-devtools/python/python3-markupsafe_1.1.1.bb)5
-rw-r--r--poky/meta/recipes-devtools/python/python3-more-itertools_8.8.0.bb (renamed from poky/meta/recipes-devtools/python/python3-more-itertools_8.7.0.bb)8
-rw-r--r--poky/meta/recipes-devtools/python/python3-pycairo_1.20.1.bb (renamed from poky/meta/recipes-devtools/python/python3-pycairo_1.20.0.bb)4
-rw-r--r--poky/meta/recipes-devtools/python/python3-pygments_2.9.0.bb (renamed from poky/meta/recipes-devtools/python/python3-pygments_2.8.1.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/python3-pygobject_3.40.1.bb (renamed from poky/meta/recipes-devtools/python/python3-pygobject_3.38.0.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/python3-pytest_6.2.4.bb (renamed from poky/meta/recipes-devtools/python/python3-pytest_6.2.2.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/python3-pyyaml_5.4.1.bb19
-rw-r--r--poky/meta/recipes-devtools/python/python3-scons-native_4.1.0.bb (renamed from poky/meta/recipes-devtools/python/python3-scons-native_3.1.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/python/python3-scons/0001-Fix-man-page-installation.patch46
-rw-r--r--poky/meta/recipes-devtools/python/python3-scons_3.1.2.bb34
-rw-r--r--poky/meta/recipes-devtools/python/python3-scons_4.1.0.bb27
-rw-r--r--poky/meta/recipes-devtools/python/python3-setuptools-scm_6.0.1.bb (renamed from poky/meta/recipes-devtools/python/python3-setuptools-scm_5.0.1.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/python3-setuptools/reproducibility.patch40
-rw-r--r--poky/meta/recipes-devtools/python/python3-setuptools_57.0.0.bb (renamed from poky/meta/recipes-devtools/python/python3-setuptools_54.1.1.bb)5
-rw-r--r--poky/meta/recipes-devtools/python/python3-six_1.15.0.bb5
-rw-r--r--poky/meta/recipes-devtools/python/python3-six_1.16.0.bb4
-rw-r--r--poky/meta/recipes-devtools/python/python3-smartypants_2.0.0.bb13
-rw-r--r--poky/meta/recipes-devtools/python/python3-sortedcontainers_2.4.0.bb (renamed from poky/meta/recipes-devtools/python/python3-sortedcontainers_2.3.0.bb)2
-rw-r--r--poky/meta/recipes-devtools/python/python3-typogrify_2.0.7.bb14
-rw-r--r--poky/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch3
-rw-r--r--poky/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch33
-rw-r--r--poky/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch22
-rw-r--r--poky/meta/recipes-devtools/python/python3/create_manifest3.py47
-rw-r--r--poky/meta/recipes-devtools/python/python3/get_module_deps3.py72
-rw-r--r--poky/meta/recipes-devtools/python/python3/python3-manifest.json15
-rw-r--r--poky/meta/recipes-devtools/python/python3_3.9.5.bb (renamed from poky/meta/recipes-devtools/python/python3_3.9.2.bb)8
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu-native_6.0.0.bb (renamed from poky/meta/recipes-devtools/qemu/qemu-native_5.2.0.bb)2
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb (renamed from poky/meta/recipes-devtools/qemu/qemu-system-native_5.2.0.bb)7
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu.inc29
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch10
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch50
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch35
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch6
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch10
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch15
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch43
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch41
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch12
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch48
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch8
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch50
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch58
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch32
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch49
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch8
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch49
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch12
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/CVE-2021-20203.patch73
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/cross.patch12
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/determinism.patch29
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/mingwfix.patch21
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/mmap.patch29
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu/mmap2.patch25
-rw-r--r--poky/meta/recipes-devtools/qemu/qemu_6.0.0.bb (renamed from poky/meta/recipes-devtools/qemu/qemu_5.2.0.bb)5
-rw-r--r--poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch8
-rw-r--r--poky/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb (renamed from poky/meta/recipes-devtools/rpm/rpm_4.16.1.2.bb)7
-rw-r--r--poky/meta/recipes-devtools/rsync/files/0001-rsync-ssl-Verify-the-hostname-in-the-certificate-whe.patch31
-rw-r--r--poky/meta/recipes-devtools/rsync/rsync_3.2.3.bb1
-rw-r--r--poky/meta/recipes-devtools/ruby/ruby_3.0.1.bb (renamed from poky/meta/recipes-devtools/ruby/ruby_3.0.0.bb)2
-rw-r--r--poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb2
-rw-r--r--poky/meta/recipes-devtools/strace/strace_5.12.bb (renamed from poky/meta/recipes-devtools/strace/strace_5.11.bb)2
-rw-r--r--poky/meta/recipes-devtools/swig/swig.inc2
-rw-r--r--poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch330
-rw-r--r--poky/meta/recipes-devtools/swig/swig/0001-Fix-generated-code-for-constant-expressions-containi.patch179
-rw-r--r--poky/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch13
-rw-r--r--poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch7
-rw-r--r--poky/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch191
-rw-r--r--poky/meta/recipes-devtools/swig/swig/determinism.patch8
-rw-r--r--poky/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch36
-rw-r--r--poky/meta/recipes-devtools/swig/swig_3.0.12.bb13
-rw-r--r--poky/meta/recipes-devtools/swig/swig_4.0.2.bb7
-rw-r--r--poky/meta/recipes-devtools/tcf-agent/tcf-agent/0001-Fixed-copyright-messages.patch56
-rw-r--r--poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb1
-rw-r--r--poky/meta/recipes-devtools/unfs3/unfs3_git.bb2
-rw-r--r--poky/meta/recipes-devtools/vala/vala_0.52.4.bb (renamed from poky/meta/recipes-devtools/vala/vala_0.50.4.bb)2
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-Add-missing-musl.supp.patch72
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-nlcontrolc.vgtest-hanging-on-newer-glibc-and-or-.patch200
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch48
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-musl-fix.patch31
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-tests-swapcontext-Add-SIGALRM-handler-to-avoid-s.patch65
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-helgrind-Intercept-libc-functions.patch54
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-lmw-lswi-and-related-PowerPC-insns-aren-t-allowed-on.patch62
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch2
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch50
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch20
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch643
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/remove-for-all2
-rwxr-xr-xpoky/meta/recipes-devtools/valgrind/valgrind/run-ptest17
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch24
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests2
-rw-r--r--poky/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb (renamed from poky/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb)38
306 files changed, 6459 insertions, 4767 deletions
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-Do-not-init-tables-from-dpkg-configuration.patch b/poky/meta/recipes-devtools/apt/apt/0001-Do-not-init-tables-from-dpkg-configuration.patch
index e0e7e0cd5..72713c3b1 100644
--- a/poky/meta/recipes-devtools/apt/apt/0001-Do-not-init-tables-from-dpkg-configuration.patch
+++ b/poky/meta/recipes-devtools/apt/apt/0001-Do-not-init-tables-from-dpkg-configuration.patch
@@ -1,4 +1,4 @@
-From 382f8381ef8baf754057e376a6d9bf840ca6d543 Mon Sep 17 00:00:00 2001
+From c7a79e753e50f1a5f248ba5812c61616f2f524f0 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 10 May 2019 16:47:38 +0200
Subject: [PATCH] Do not init tables from dpkg configuration
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch b/poky/meta/recipes-devtools/apt/apt/0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch
new file mode 100644
index 000000000..f1816836b
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch
@@ -0,0 +1,48 @@
+From e849b161ce1d87ab369b921438abcf5b3a03e186 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 25 Apr 2021 08:57:03 -0700
+Subject: [PATCH] Hide fstatat64 and prlimit64 defines on musl
+
+musl defines fstatat64 and prlimit64 as macros which confuses the
+seccomp sysall rewiring since there are syscalls with same names
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ methods/aptmethod.h | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/methods/aptmethod.h b/methods/aptmethod.h
+index bd50e80..3085aed 100644
+--- a/methods/aptmethod.h
++++ b/methods/aptmethod.h
+@@ -121,6 +121,12 @@ protected:
+ if (ctx == NULL)
+ return _error->FatalE("HttpMethod::Configuration", "Cannot init seccomp");
+
++#ifndef __GLIBC__
++#pragma push_macro("fstatat64")
++#pragma push_macro("prlimit64")
++#undef fstatat64
++#undef prlimit64
++#endif
+ #define ALLOW(what) \
+ if ((rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(what), 0))) \
+ return _error->FatalE("HttpMethod::Configuration", "Cannot allow %s: %s", #what, strerror(-rc));
+@@ -320,9 +326,11 @@ protected:
+ if ((rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, seccomp_syscall_resolve_name(custom.c_str()), 0)))
+ return _error->FatalE("aptMethod::Configuration", "Cannot allow %s: %s", custom.c_str(), strerror(-rc));
+ }
+-
+ #undef ALLOW
+-
++#ifndef __GLIBC__
++#pragma pop_macro("fstatat64")
++#pragma pop_macro("prlimit64")
++#endif
+ rc = seccomp_load(ctx);
+ if (rc == -EINVAL)
+ {
+--
+2.31.1
+
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
index c14dc2a41..1517b4785 100644
--- a/poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
+++ b/poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
@@ -1,4 +1,4 @@
-From a603b3281f3f60a87531c8cec4843f970170d409 Mon Sep 17 00:00:00 2001
+From 393ac20efc66bfc000a2457e093e369b934c5a50 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 21 May 2020 20:13:25 +0000
Subject: [PATCH] Revert "always run 'dpkg --configure -a' at the end of our
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-aptwebserver.cc-Include-array.patch b/poky/meta/recipes-devtools/apt/apt/0001-aptwebserver.cc-Include-array.patch
new file mode 100644
index 000000000..cfee50c7a
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/0001-aptwebserver.cc-Include-array.patch
@@ -0,0 +1,32 @@
+From f999aeb5ceb77b81c36e6a55300a521aaa2da882 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 26 May 2021 22:12:46 -0700
+Subject: [PATCH] aptwebserver.cc: Include <array>
+
+This helps getting std::array definition
+
+Fixes
+test/interactive-helper/aptwebserver.cc:36:55: error: constexpr variable cannot have non-literal type 'const std::array<std::array<const char *, 2>, 6>'
+ constexpr std::array<std::array<char const *,2>,6> htmlencode = {{
+
+Upstream-Status: Submitted [https://github.com/Debian/apt/pull/133]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ test/interactive-helper/aptwebserver.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc
+index 58ba54f84..0e030c7e9 100644
+--- a/test/interactive-helper/aptwebserver.cc
++++ b/test/interactive-helper/aptwebserver.cc
+@@ -22,6 +22,7 @@
+ #include <unistd.h>
+
+ #include <algorithm>
++#include <array>
+ #include <fstream>
+ #include <iostream>
+ #include <list>
+--
+2.31.1
+
diff --git a/poky/meta/recipes-devtools/apt/apt_2.2.2.bb b/poky/meta/recipes-devtools/apt/apt_2.2.4.bb
index 7d1bce558..f12011141 100644
--- a/poky/meta/recipes-devtools/apt/apt_2.2.2.bb
+++ b/poky/meta/recipes-devtools/apt/apt_2.2.4.bb
@@ -12,6 +12,8 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \
file://0001-CMakeLists.txt-avoid-changing-install-paths-based-on.patch \
file://0001-srvrec-Keep-support-for-older-resolver.patch \
file://0001-cmake-Do-not-build-po-files.patch \
+ file://0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch \
+ file://0001-aptwebserver.cc-Include-array.patch \
"
SRC_URI_append_class-native = " \
@@ -24,7 +26,7 @@ SRC_URI_append_class-nativesdk = " \
file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \
"
-SRC_URI[sha256sum] = "c5449a4c2126a12497a9949cd10209926005d329f6ce7942a3781fa2fcf50487"
+SRC_URI[sha256sum] = "6eecd04a4979bd2040b22a14571c15d342c4e1802b2023acb5aa19649b1f64ea"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
# the package is taken from snapshots.debian.org; that source is static and goes stale
@@ -45,6 +47,7 @@ EXTRA_OECMAKE_append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \
-DDPKG_DATADIR=${datadir}/dpkg \
-DTRIEHASH_EXECUTABLE=${WORKDIR}/triehash \
-DCMAKE_DISABLE_FIND_PACKAGE_ZSTD=True \
+ -DCMAKE_DISABLE_FIND_PACKAGE_SECCOMP=True \
-DWITH_TESTS=False \
"
diff --git a/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb b/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2021.02.19.bb
index 13593d7bb..54079b5f0 100644
--- a/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb
+++ b/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2021.02.19.bb
@@ -6,8 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=11cc2d3ee574f9d6b7ee797bdce4d423 \
file://COPYING.EXCEPTION;md5=fdef168ebff3bc2f13664c365a5fb515"
SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "d46413c8b00a125b1529bae385bbec55"
-SRC_URI[sha256sum] = "17195c833098da79de5778ee90948f4c5d90ed1a0cf8391b4ab348e2ec511e3f"
+SRC_URI[sha256sum] = "e8a6eb9d28ddcba8ffef3fa211653239e9bf239aba6a01a6b7cfc7ceaec69cbd"
inherit autotools allarch texinfo
diff --git a/poky/meta/recipes-devtools/binutils/binutils-2.36.inc b/poky/meta/recipes-devtools/binutils/binutils-2.36.inc
index 296829188..d54e2a345 100644
--- a/poky/meta/recipes-devtools/binutils/binutils-2.36.inc
+++ b/poky/meta/recipes-devtools/binutils/binutils-2.36.inc
@@ -10,22 +10,16 @@ LIC_FILES_CHKSUM="\
file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
"
-def binutils_branch_version(d):
- pvsplit = d.getVar('PV').split('.')
- return pvsplit[0] + "_" + pvsplit[1]
-
# When upgrading to 2.37, please make sure there is no trailing .0, so
# that upstream version check can work correctly.
PV = "2.36.1"
CVE_VERSION = "2.36.1"
-BINUPV = "${@binutils_branch_version(d)}"
-#BRANCH = "binutils-${BINUPV}-branch"
-BRANCH ?= "binutils-2_36-branch"
+SRCBRANCH ?= "binutils-2_36-branch"
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
SRCREV ?= "7651a4871c225925ffdfda0a8c91a6ed370cd9a1"
-BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${BRANCH};protocol=git"
+BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=git"
SRC_URI = "\
${BINUTILS_GIT_URI} \
file://0004-configure-widen-the-regexp-for-SH-architectures.patch \
@@ -41,5 +35,8 @@ SRC_URI = "\
file://0014-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
file://0015-sync-with-OE-libtool-changes.patch \
file://0016-Check-for-clang-before-checking-gcc-version.patch \
+ file://0017-Add-support-for-the-DW_FORM_strx-forms-to-the-BFD-li.patch \
+ file://0018-Add-DWARF-5-support-in-gold.patch \
+ file://CVE-2021-20197.patch \
"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0017-Add-support-for-the-DW_FORM_strx-forms-to-the-BFD-li.patch b/poky/meta/recipes-devtools/binutils/binutils/0017-Add-support-for-the-DW_FORM_strx-forms-to-the-BFD-li.patch
new file mode 100644
index 000000000..b4880e0d1
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/0017-Add-support-for-the-DW_FORM_strx-forms-to-the-BFD-li.patch
@@ -0,0 +1,183 @@
+From a50c11a7a47b26e6a3e095dfb72aa2e465919fb6 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Fri, 5 Mar 2021 17:06:59 +0000
+Subject: [PATCH] Add support for the DW_FORM_strx* forms to the BFD library.
+
+ PR 27521
+ * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
+ (read_indexed_string): Placeholder function.
+ (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
+ forms.
+
+Upstream-Status: Backport [https://sourceware.org/bugzilla/show_bug.cgi?id=27521]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ bfd/dwarf2.c | 105 ++++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 67 insertions(+), 38 deletions(-)
+
+diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
+index 5651696c0f7..5ffcd93f54c 100644
+--- a/bfd/dwarf2.c
++++ b/bfd/dwarf2.c
+@@ -1160,8 +1160,23 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash,
+ static inline bfd_boolean
+ is_str_attr (enum dwarf_form form)
+ {
+- return (form == DW_FORM_string || form == DW_FORM_strp
+- || form == DW_FORM_line_strp || form == DW_FORM_GNU_strp_alt);
++ return (form == DW_FORM_string
++ || form == DW_FORM_strp
++ || form == DW_FORM_strx
++ || form == DW_FORM_strx1
++ || form == DW_FORM_strx2
++ || form == DW_FORM_strx3
++ || form == DW_FORM_strx4
++ || form == DW_FORM_line_strp
++ || form == DW_FORM_GNU_strp_alt);
++}
++
++static const char *
++read_indexed_string (bfd_uint64_t index ATTRIBUTE_UNUSED,
++ struct comp_unit * unit ATTRIBUTE_UNUSED)
++{
++ /* FIXME: Add support for indexed strings. */
++ return "<indexed strings not yet supported>";
+ }
+
+ /* Read and fill in the value of attribute ATTR as described by FORM.
+@@ -1192,6 +1207,9 @@ read_attribute_value (struct attribute * attr,
+
+ switch (form)
+ {
++ case DW_FORM_flag_present:
++ attr->u.val = 1;
++ break;
+ case DW_FORM_ref_addr:
+ /* DW_FORM_ref_addr is an address in DWARF2, and an offset in
+ DWARF3. */
+@@ -1237,15 +1255,32 @@ read_attribute_value (struct attribute * attr,
+ info_ptr = read_n_bytes (info_ptr, info_ptr_end, blk);
+ attr->u.blk = blk;
+ break;
++ case DW_FORM_ref1:
++ case DW_FORM_flag:
++ case DW_FORM_data1:
++ case DW_FORM_addrx1:
++ attr->u.val = read_1_byte (abfd, info_ptr, info_ptr_end);
++ info_ptr += 1;
++ break;
+ case DW_FORM_data2:
++ case DW_FORM_ref2:
+ attr->u.val = read_2_bytes (abfd, info_ptr, info_ptr_end);
+ info_ptr += 2;
+ break;
++ case DW_FORM_addrx3:
++ attr->u.val = read_4_bytes (abfd, info_ptr, info_ptr_end);
++ attr->u.val &= 0xffffff;
++ info_ptr += 3;
++ break;
++ case DW_FORM_ref4:
+ case DW_FORM_data4:
++ case DW_FORM_addrx4:
+ attr->u.val = read_4_bytes (abfd, info_ptr, info_ptr_end);
+ info_ptr += 4;
+ break;
+ case DW_FORM_data8:
++ case DW_FORM_ref8:
++ case DW_FORM_ref_sig8:
+ attr->u.val = read_8_bytes (abfd, info_ptr, info_ptr_end);
+ info_ptr += 8;
+ break;
+@@ -1265,6 +1300,33 @@ read_attribute_value (struct attribute * attr,
+ attr->u.str = read_alt_indirect_string (unit, info_ptr, info_ptr_end, &bytes_read);
+ info_ptr += bytes_read;
+ break;
++ case DW_FORM_strx1:
++ attr->u.val = read_1_byte (abfd, info_ptr, info_ptr_end);
++ info_ptr += 1;
++ attr->u.str = (char *) read_indexed_string (attr->u.val, unit);
++ break;
++ case DW_FORM_strx2:
++ attr->u.val = read_2_bytes (abfd, info_ptr, info_ptr_end);
++ info_ptr += 2;
++ attr->u.str = (char *) read_indexed_string (attr->u.val, unit);
++ break;
++ case DW_FORM_strx3:
++ attr->u.val = read_4_bytes (abfd, info_ptr, info_ptr_end);
++ info_ptr += 3;
++ attr->u.val &= 0xffffff;
++ attr->u.str = (char *) read_indexed_string (attr->u.val, unit);
++ break;
++ case DW_FORM_strx4:
++ attr->u.val = read_4_bytes (abfd, info_ptr, info_ptr_end);
++ info_ptr += 4;
++ attr->u.str = (char *) read_indexed_string (attr->u.val, unit);
++ break;
++ case DW_FORM_strx:
++ attr->u.val = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
++ FALSE, info_ptr_end);
++ info_ptr += bytes_read;
++ attr->u.str = (char *) read_indexed_string (attr->u.val, unit);
++ break;
+ case DW_FORM_exprloc:
+ case DW_FORM_block:
+ amt = sizeof (struct dwarf_block);
+@@ -1287,48 +1349,14 @@ read_attribute_value (struct attribute * attr,
+ info_ptr = read_n_bytes (info_ptr, info_ptr_end, blk);
+ attr->u.blk = blk;
+ break;
+- case DW_FORM_data1:
+- attr->u.val = read_1_byte (abfd, info_ptr, info_ptr_end);
+- info_ptr += 1;
+- break;
+- case DW_FORM_flag:
+- attr->u.val = read_1_byte (abfd, info_ptr, info_ptr_end);
+- info_ptr += 1;
+- break;
+- case DW_FORM_flag_present:
+- attr->u.val = 1;
+- break;
+ case DW_FORM_sdata:
+ attr->u.sval = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+ TRUE, info_ptr_end);
+ info_ptr += bytes_read;
+ break;
+- case DW_FORM_udata:
+- attr->u.val = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+- FALSE, info_ptr_end);
+- info_ptr += bytes_read;
+- break;
+- case DW_FORM_ref1:
+- attr->u.val = read_1_byte (abfd, info_ptr, info_ptr_end);
+- info_ptr += 1;
+- break;
+- case DW_FORM_ref2:
+- attr->u.val = read_2_bytes (abfd, info_ptr, info_ptr_end);
+- info_ptr += 2;
+- break;
+- case DW_FORM_ref4:
+- attr->u.val = read_4_bytes (abfd, info_ptr, info_ptr_end);
+- info_ptr += 4;
+- break;
+- case DW_FORM_ref8:
+- attr->u.val = read_8_bytes (abfd, info_ptr, info_ptr_end);
+- info_ptr += 8;
+- break;
+- case DW_FORM_ref_sig8:
+- attr->u.val = read_8_bytes (abfd, info_ptr, info_ptr_end);
+- info_ptr += 8;
+- break;
+ case DW_FORM_ref_udata:
++ case DW_FORM_udata:
++ case DW_FORM_addrx:
+ attr->u.val = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read,
+ FALSE, info_ptr_end);
+ info_ptr += bytes_read;
+@@ -1361,6 +1389,7 @@ read_attribute_value (struct attribute * attr,
+ info_ptr = read_n_bytes (info_ptr, info_ptr_end, blk);
+ attr->u.blk = blk;
+ break;
++
+ default:
+ _bfd_error_handler (_("DWARF error: invalid or unhandled FORM value: %#x"),
+ form);
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0018-Add-DWARF-5-support-in-gold.patch b/poky/meta/recipes-devtools/binutils/binutils/0018-Add-DWARF-5-support-in-gold.patch
new file mode 100644
index 000000000..353b68085
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/0018-Add-DWARF-5-support-in-gold.patch
@@ -0,0 +1,1374 @@
+From 29dab7648672342418a9d32767e3b3182d9e6a30 Mon Sep 17 00:00:00 2001
+From: Cary Coutant <ccoutant@gmail.com>
+Date: Wed, 17 Mar 2021 21:31:15 -0700
+Subject: [PATCH] Add DWARF 5 support in gold.
+
+elfcpp/
+ PR gold/27246
+ * dwarf.h (enum DW_LNCT): Add line number table content type codes.
+ (enum DW_LINE_OPS): Reformat.
+ (enum DW_LINE_EXTENDED_OPS): Reformat.
+ (enum DW_CHILDREN): Reformat.
+ (enum DW_RLE): Add range list entry types.
+ (enum DW_SECT): Update values for DWARF 5.
+
+gold/
+ PR gold/27246
+ * dwarf_reader.cc (Dwarf_abbrev_table::do_get_abbrev): Handle
+ DW_FORM_implicit_const.
+ (Dwarf_ranges_table::read_ranges_table): Add version parameter;
+ Adjust all callers. Look for .debug_rnglists section if DWARF 5.
+ (Dwarf_ranges_table::read_range_list_v5): New method.
+ (Dwarf_die::read_attributes): Handle new DWARF 5 DW_FORM codes.
+ (Dwarf_die::skip_attributes): Likewise.
+ (Dwarf_info_reader::do_parse): Support DWARF 5 unit header format.
+ (Dwarf_info_reader::read_3bytes_from_pointer): New method.
+ (Sized_dwarf_line_info::Sized_dwarf_line_info): Initialize
+ str_buffer_, str_buffer_start, reloc_map_, line_number_map_.
+ Look for .debug_line_str section.
+ (Sized_dwarf_line_info::read_header_prolog): Support DWARF 5 prolog.
+ (Sized_dwarf_line_info::read_header_tables): Rename to...
+ (Sized_dwarf_line_info::read_header_tables_v2): ... this.
+ (Sized_dwarf_line_info::read_header_tables_v5): New method.
+ (Sized_dwarf_line_info::process_one_opcode): Insert missing "this->".
+ Change advance_line to signed int64_t.
+ (Sized_dwarf_line_info::read_lines): Add endptr parameter; adjust
+ callers. Insert missing "this->".
+ (Sized_dwarf_line_info::read_line_mappings): Support DWARF 5.
+ (Sized_dwarf_line_info::do_addr2line): Add debug code.
+ * dwarf_reader.h (Dwarf_abbrev_table::Attribute): Add implicit_const
+ field. Adjust constructor.
+ (Dwarf_abbrev_table::add_sttribute): Add implicit_const parameter.
+ (Dwarf_ranges_table::read_ranges_table): Add version parameter.
+ (Dwarf_ranges_table::read_range_list_v5): New method.
+ (Dwarf_die): Remove unused attr_off field.
+ (Dwarf_info_reader::Dwarf_info_reader): Initialize unit_type_ field.
+ (Dwarf_info_reader::is_type_unit): New method.
+ (Dwarf_info_reader::read_3bytes_from_pointer): New method.
+ (Dwarf_info_reader::read_range_list): Call read_range_list_v5 for
+ DWARF 5 range lists.
+ (Dwarf_info_reader::is_type_unit_): Remove.
+ (Dwarf_info_reader::unit_type_): New field.
+ (Sized_dwarf_line_info::~Sized_dwarf_line_info): Delete
+ str_buffer_start_.
+ (Sized_dwarf_line_info::read_header_tables): Rename to...
+ (Sized_dwarf_line_info::read_header_tables_v2): ... this.
+ (Sized_dwarf_line_info::read_header_tables_v5): New method.
+ (Sized_dwarf_line_info::read_lines): Add endptr parameter.
+ (Sized_dwarf_line_info::Dwarf_line_infoHeader): Add address_size field.
+ (Sized_dwarf_line_info::str_buffer_): New field.
+ (Sized_dwarf_line_info::str_buffer_end_): New field.
+ (Sized_dwarf_line_info::str_buffer_start_): New field.
+ (Sized_dwarf_line_info::end_of_header_length_): New field.
+ (Sized_dwarf_line_info::end_of_unit_): New field.
+
+Upstream-Status: Backport [5cde809b7b9 Add DWARF 5 support in gold.]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ elfcpp/dwarf.h | 89 +++++--
+ gold/dwarf_reader.cc | 591 +++++++++++++++++++++++++++++++++++++------
+ gold/dwarf_reader.h | 103 ++++++--
+ 3 files changed, 654 insertions(+), 129 deletions(-)
+
+diff --git a/elfcpp/dwarf.h b/elfcpp/dwarf.h
+index e24347f8481..c9a9e02369c 100644
+--- a/elfcpp/dwarf.h
++++ b/elfcpp/dwarf.h
+@@ -152,35 +152,48 @@ enum DW_EH_PE
+ DW_EH_PE_indirect = 0x80
+ };
+
++// Line number table content type codes.
++
++enum DW_LNCT
++{
++ DW_LNCT_path = 0x1,
++ DW_LNCT_directory_index = 0x2,
++ DW_LNCT_timestamp = 0x3,
++ DW_LNCT_size = 0x4,
++ DW_LNCT_MD5 = 0x5,
++ DW_LNCT_lo_user = 0x2000,
++ DW_LNCT_hi_user = 0x3fff
++};
++
+ // Line number opcodes.
+
+ enum DW_LINE_OPS
+ {
+- DW_LNS_extended_op = 0,
+- DW_LNS_copy = 1,
+- DW_LNS_advance_pc = 2,
+- DW_LNS_advance_line = 3,
+- DW_LNS_set_file = 4,
+- DW_LNS_set_column = 5,
+- DW_LNS_negate_stmt = 6,
+- DW_LNS_set_basic_block = 7,
+- DW_LNS_const_add_pc = 8,
+- DW_LNS_fixed_advance_pc = 9,
++ DW_LNS_extended_op = 0x00,
++ DW_LNS_copy = 0x01,
++ DW_LNS_advance_pc = 0x02,
++ DW_LNS_advance_line = 0x03,
++ DW_LNS_set_file = 0x04,
++ DW_LNS_set_column = 0x05,
++ DW_LNS_negate_stmt = 0x06,
++ DW_LNS_set_basic_block = 0x07,
++ DW_LNS_const_add_pc = 0x08,
++ DW_LNS_fixed_advance_pc = 0x09,
+ // DWARF 3.
+- DW_LNS_set_prologue_end = 10,
+- DW_LNS_set_epilogue_begin = 11,
+- DW_LNS_set_isa = 12
++ DW_LNS_set_prologue_end = 0x0a,
++ DW_LNS_set_epilogue_begin = 0x0b,
++ DW_LNS_set_isa = 0x0c
+ };
+
+ // Line number extended opcodes.
+
+ enum DW_LINE_EXTENDED_OPS
+ {
+- DW_LNE_end_sequence = 1,
+- DW_LNE_set_address = 2,
+- DW_LNE_define_file = 3,
++ DW_LNE_end_sequence = 0x01,
++ DW_LNE_set_address = 0x02,
++ DW_LNE_define_file = 0x03,
+ // DWARF4.
+- DW_LNE_set_discriminator = 4,
++ DW_LNE_set_discriminator = 0x04,
+ // HP extensions.
+ DW_LNE_HP_negate_is_UV_update = 0x11,
+ DW_LNE_HP_push_context = 0x12,
+@@ -191,13 +204,15 @@ enum DW_LINE_EXTENDED_OPS
+ DW_LNE_HP_negate_post_semantics = 0x17,
+ DW_LNE_HP_negate_function_exit = 0x18,
+ DW_LNE_HP_negate_front_end_logical = 0x19,
+- DW_LNE_HP_define_proc = 0x20
++ DW_LNE_HP_define_proc = 0x20,
++ DW_LNE_lo_user = 0x80,
++ DW_LNE_hi_user = 0xff
+ };
+
+ enum DW_CHILDREN
+ {
+- DW_CHILDREN_no =0x00,
+- DW_CHILDREN_yes =0x01
++ DW_CHILDREN_no = 0,
++ DW_CHILDREN_yes = 1
+ };
+
+ // Source language names and codes.
+@@ -247,20 +262,38 @@ enum DW_LANG
+ DW_LANG_HP_Assembler = 0x8007
+ };
+
++// Range list entry kinds in .debug_rnglists* section.
++
++enum DW_RLE
++{
++ DW_RLE_end_of_list = 0x00,
++ DW_RLE_base_addressx = 0x01,
++ DW_RLE_startx_endx = 0x02,
++ DW_RLE_startx_length = 0x03,
++ DW_RLE_offset_pair = 0x04,
++ DW_RLE_base_address = 0x05,
++ DW_RLE_start_end = 0x06,
++ DW_RLE_start_length = 0x07
++};
++
+ // DWARF section identifiers used in the package format.
+ // Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFissionDWP.
++// Added (with changes) in DWARF 5.
+
+ enum DW_SECT
+ {
+- DW_SECT_INFO = 1,
+- DW_SECT_TYPES = 2,
+- DW_SECT_ABBREV = 3,
+- DW_SECT_LINE = 4,
+- DW_SECT_LOC = 5,
++ DW_SECT_INFO = 1,
++ DW_SECT_ABBREV = 3,
++ DW_SECT_LINE = 4,
++ DW_SECT_LOCLISTS = 5,
+ DW_SECT_STR_OFFSETS = 6,
+- DW_SECT_MACINFO = 7,
+- DW_SECT_MACRO = 8,
+- DW_SECT_MAX = DW_SECT_MACRO,
++ DW_SECT_MACINFO = 7,
++ DW_SECT_RNGLISTS = 8,
++ DW_SECT_MAX = DW_SECT_RNGLISTS,
++ // These were used only for the experimental Fission support in DWARF 4.
++ DW_SECT_TYPES = 2,
++ DW_SECT_LOC = 5,
++ DW_SECT_MACRO = 8
+ };
+
+ } // End namespace elfcpp.
+diff --git a/gold/dwarf_reader.cc b/gold/dwarf_reader.cc
+index f0e6b89bde2..83a0114ed39 100644
+--- a/gold/dwarf_reader.cc
++++ b/gold/dwarf_reader.cc
+@@ -26,6 +26,7 @@
+ #include <utility>
+ #include <vector>
+
++#include "debug.h"
+ #include "elfcpp_swap.h"
+ #include "dwarf.h"
+ #include "object.h"
+@@ -275,6 +276,14 @@ Dwarf_abbrev_table::do_get_abbrev(unsigned int code)
+ uint64_t form = read_unsigned_LEB_128(this->buffer_pos_, &len);
+ this->buffer_pos_ += len;
+
++ // For DW_FORM_implicit_const, read the constant.
++ int64_t implicit_const = 0;
++ if (form == elfcpp::DW_FORM_implicit_const)
++ {
++ implicit_const = read_signed_LEB_128(this->buffer_pos_, &len);
++ this->buffer_pos_ += len;
++ }
++
+ // A (0,0) pair terminates the list.
+ if (attr == 0 && form == 0)
+ break;
+@@ -282,7 +291,7 @@ Dwarf_abbrev_table::do_get_abbrev(unsigned int code)
+ if (attr == elfcpp::DW_AT_sibling)
+ entry->has_sibling_attribute = true;
+
+- entry->add_attribute(attr, form);
++ entry->add_attribute(attr, form, implicit_const);
+ }
+
+ this->store_abbrev(nextcode, entry);
+@@ -302,8 +311,16 @@ Dwarf_ranges_table::read_ranges_table(
+ Relobj* object,
+ const unsigned char* symtab,
+ off_t symtab_size,
+- unsigned int ranges_shndx)
++ unsigned int ranges_shndx,
++ unsigned int version)
+ {
++ const std::string section_name(version < 5
++ ? ".debug_ranges"
++ : ".debug_rnglists");
++ const std::string compressed_section_name(version < 5
++ ? ".zdebug_ranges"
++ : ".zdebug_rnglists");
++
+ // If we've already read this abbrev table, return immediately.
+ if (this->ranges_shndx_ > 0
+ && this->ranges_shndx_ == ranges_shndx)
+@@ -318,7 +335,7 @@ Dwarf_ranges_table::read_ranges_table(
+ for (unsigned int i = 1; i < object->shnum(); ++i)
+ {
+ std::string name = object->section_name(i);
+- if (name == ".debug_ranges" || name == ".zdebug_ranges")
++ if (name == section_name || name == compressed_section_name)
+ {
+ ranges_shndx = i;
+ this->output_section_offset_ = object->output_section_offset(i);
+@@ -393,7 +410,7 @@ Dwarf_ranges_table::read_range_list(
+ {
+ Dwarf_range_list* ranges;
+
+- if (!this->read_ranges_table(object, symtab, symtab_size, ranges_shndx))
++ if (!this->read_ranges_table(object, symtab, symtab_size, ranges_shndx, 4))
+ return NULL;
+
+ // Correct the offset. For incremental update links, we have a
+@@ -459,6 +476,125 @@ Dwarf_ranges_table::read_range_list(
+ return ranges;
+ }
+
++// Read a DWARF 5 range list from section RANGES_SHNDX at offset RANGES_OFFSET.
++
++Dwarf_range_list*
++Dwarf_ranges_table::read_range_list_v5(
++ Relobj* object,
++ const unsigned char* symtab,
++ off_t symtab_size,
++ unsigned int addr_size,
++ unsigned int ranges_shndx,
++ off_t offset)
++{
++ Dwarf_range_list* ranges;
++
++ if (!this->read_ranges_table(object, symtab, symtab_size, ranges_shndx, 5))
++ return NULL;
++
++ ranges = new Dwarf_range_list();
++ off_t base = 0;
++ unsigned int shndx0 = 0;
++
++ // Correct the offset. For incremental update links, we have a
++ // relocated offset that is relative to the output section, but
++ // here we need an offset relative to the input section.
++ offset -= this->output_section_offset_;
++
++ // Read the range list at OFFSET.
++ const unsigned char* prle = this->ranges_buffer_ + offset;
++ while (prle < this->ranges_buffer_end_)
++ {
++ off_t start;
++ off_t end;
++ unsigned int shndx1 = 0;
++ unsigned int shndx2 = 0;
++ size_t len;
++
++ // Read the entry type.
++ unsigned int rle_type = *prle++;
++ offset += 1;
++
++ if (rle_type == elfcpp::DW_RLE_end_of_list)
++ break;
++
++ switch (rle_type)
++ {
++ case elfcpp::DW_RLE_base_address:
++ if (addr_size == 4)
++ base = this->dwinfo_->read_from_pointer<32>(prle);
++ else
++ base = this->dwinfo_->read_from_pointer<64>(prle);
++ if (this->ranges_reloc_mapper_ != NULL)
++ shndx0 = this->lookup_reloc(offset, &base);
++ prle += addr_size;
++ offset += addr_size;
++ break;
++
++ case elfcpp::DW_RLE_offset_pair:
++ start = read_unsigned_LEB_128(prle, &len);
++ prle += len;
++ offset += len;
++ end = read_unsigned_LEB_128(prle, &len);
++ prle += len;
++ offset += len;
++ if (shndx0 == 0 || object->is_section_included(shndx0))
++ ranges->add(shndx0, base + start, base + end);
++ break;
++
++ case elfcpp::DW_RLE_start_end:
++ if (addr_size == 4)
++ {
++ start = this->dwinfo_->read_from_pointer<32>(prle);
++ end = this->dwinfo_->read_from_pointer<32>(prle + 4);
++ }
++ else
++ {
++ start = this->dwinfo_->read_from_pointer<64>(prle);
++ end = this->dwinfo_->read_from_pointer<64>(prle + 8);
++ }
++ if (this->ranges_reloc_mapper_ != NULL)
++ {
++ shndx1 = this->lookup_reloc(offset, &start);
++ shndx2 = this->lookup_reloc(offset + addr_size, &end);
++ if (shndx1 != shndx2)
++ gold_warning(_("%s: DWARF info may be corrupt; offsets in a "
++ "range list entry are in different sections"),
++ object->name().c_str());
++ }
++ prle += addr_size * 2;
++ offset += addr_size * 2;
++ if (shndx1 == 0 || object->is_section_included(shndx1))
++ ranges->add(shndx1, start, end);
++ break;
++
++ case elfcpp::DW_RLE_start_length:
++ if (addr_size == 4)
++ start = this->dwinfo_->read_from_pointer<32>(prle);
++ else
++ start = this->dwinfo_->read_from_pointer<64>(prle);
++ if (this->ranges_reloc_mapper_ != NULL)
++ shndx1 = this->lookup_reloc(offset, &start);
++ prle += addr_size;
++ offset += addr_size;
++ end = start + read_unsigned_LEB_128(prle, &len);
++ prle += len;
++ offset += len;
++ if (shndx1 == 0 || object->is_section_included(shndx1))
++ ranges->add(shndx1, start, end);
++ break;
++
++ default:
++ gold_warning(_("%s: DWARF range list contains "
++ "unsupported entry type (%d)"),
++ object->name().c_str(), rle_type);
++ break;
++ }
++ }
++
++ return ranges;
++}
++
+ // Look for a relocation at offset OFF in the range table,
+ // and return the section index and offset of the target.
+
+@@ -709,7 +845,13 @@ Dwarf_die::read_attributes()
+ case elfcpp::DW_FORM_flag_present:
+ attr_value.val.intval = 1;
+ break;
++ case elfcpp::DW_FORM_implicit_const:
++ attr_value.val.intval =
++ this->abbrev_code_->attributes[i].implicit_const;
++ break;
+ case elfcpp::DW_FORM_strp:
++ case elfcpp::DW_FORM_strp_sup:
++ case elfcpp::DW_FORM_line_strp:
+ {
+ off_t str_off;
+ if (this->dwinfo_->offset_size() == 4)
+@@ -722,6 +864,26 @@ Dwarf_die::read_attributes()
+ attr_value.val.refval = str_off;
+ break;
+ }
++ case elfcpp::DW_FORM_strx:
++ case elfcpp::DW_FORM_GNU_str_index:
++ attr_value.val.uintval = read_unsigned_LEB_128(pattr, &len);
++ pattr += len;
++ break;
++ case elfcpp::DW_FORM_strx1:
++ attr_value.val.uintval = *pattr++;
++ break;
++ case elfcpp::DW_FORM_strx2:
++ attr_value.val.uintval =
++ this->dwinfo_->read_from_pointer<16>(&pattr);
++ break;
++ case elfcpp::DW_FORM_strx3:
++ attr_value.val.uintval =
++ this->dwinfo_->read_3bytes_from_pointer(&pattr);
++ break;
++ case elfcpp::DW_FORM_strx4:
++ attr_value.val.uintval =
++ this->dwinfo_->read_from_pointer<32>(&pattr);
++ break;
+ case elfcpp::DW_FORM_sec_offset:
+ {
+ off_t sec_off;
+@@ -747,7 +909,6 @@ Dwarf_die::read_attributes()
+ this->dwinfo_->lookup_reloc(attr_off, &sec_off);
+ attr_value.aux.shndx = shndx;
+ attr_value.val.refval = sec_off;
+- ref_form = true;
+ break;
+ }
+ case elfcpp::DW_FORM_ref_addr:
+@@ -815,6 +976,7 @@ Dwarf_die::read_attributes()
+ break;
+ }
+ case elfcpp::DW_FORM_ref4:
++ case elfcpp::DW_FORM_ref_sup4:
+ {
+ off_t sec_off;
+ sec_off = this->dwinfo_->read_from_pointer<32>(&pattr);
+@@ -835,11 +997,20 @@ Dwarf_die::read_attributes()
+ attr_value.val.intval = sec_off;
+ break;
+ }
++ case elfcpp::DW_FORM_data16:
++ {
++ // For now, treat this as a 16-byte block.
++ attr_value.val.blockval = pattr;
++ attr_value.aux.blocklen = 16;
++ pattr += 16;
++ break;
++ }
+ case elfcpp::DW_FORM_ref_sig8:
+ attr_value.val.uintval =
+ this->dwinfo_->read_from_pointer<64>(&pattr);
+ break;
+ case elfcpp::DW_FORM_ref8:
++ case elfcpp::DW_FORM_ref_sup8:
+ {
+ off_t sec_off;
+ sec_off = this->dwinfo_->read_from_pointer<64>(&pattr);
+@@ -856,11 +1027,29 @@ Dwarf_die::read_attributes()
+ pattr += len;
+ break;
+ case elfcpp::DW_FORM_udata:
++ attr_value.val.uintval = read_unsigned_LEB_128(pattr, &len);
++ pattr += len;
++ break;
++ case elfcpp::DW_FORM_addrx:
+ case elfcpp::DW_FORM_GNU_addr_index:
+- case elfcpp::DW_FORM_GNU_str_index:
+ attr_value.val.uintval = read_unsigned_LEB_128(pattr, &len);
+ pattr += len;
+ break;
++ case elfcpp::DW_FORM_addrx1:
++ attr_value.val.uintval = *pattr++;
++ break;
++ case elfcpp::DW_FORM_addrx2:
++ attr_value.val.uintval =
++ this->dwinfo_->read_from_pointer<16>(&pattr);
++ break;
++ case elfcpp::DW_FORM_addrx3:
++ attr_value.val.uintval =
++ this->dwinfo_->read_3bytes_from_pointer(&pattr);
++ break;
++ case elfcpp::DW_FORM_addrx4:
++ attr_value.val.uintval =
++ this->dwinfo_->read_from_pointer<32>(&pattr);
++ break;
+ case elfcpp::DW_FORM_sdata:
+ attr_value.val.intval = read_signed_LEB_128(pattr, &len);
+ pattr += len;
+@@ -870,6 +1059,11 @@ Dwarf_die::read_attributes()
+ len = strlen(attr_value.val.stringval);
+ pattr += len + 1;
+ break;
++ case elfcpp::DW_FORM_loclistx:
++ case elfcpp::DW_FORM_rnglistx:
++ attr_value.val.uintval = read_unsigned_LEB_128(pattr, &len);
++ pattr += len;
++ break;
+ default:
+ return false;
+ }
+@@ -954,9 +1148,12 @@ Dwarf_die::skip_attributes()
+ switch(form)
+ {
+ case elfcpp::DW_FORM_flag_present:
++ case elfcpp::DW_FORM_implicit_const:
+ break;
+ case elfcpp::DW_FORM_strp:
+ case elfcpp::DW_FORM_sec_offset:
++ case elfcpp::DW_FORM_strp_sup:
++ case elfcpp::DW_FORM_line_strp:
+ pattr += this->dwinfo_->offset_size();
+ break;
+ case elfcpp::DW_FORM_addr:
+@@ -993,23 +1190,42 @@ Dwarf_die::skip_attributes()
+ case elfcpp::DW_FORM_data1:
+ case elfcpp::DW_FORM_ref1:
+ case elfcpp::DW_FORM_flag:
++ case elfcpp::DW_FORM_strx1:
++ case elfcpp::DW_FORM_addrx1:
+ pattr += 1;
+ break;
+ case elfcpp::DW_FORM_data2:
+ case elfcpp::DW_FORM_ref2:
++ case elfcpp::DW_FORM_strx2:
++ case elfcpp::DW_FORM_addrx2:
+ pattr += 2;
+ break;
++ case elfcpp::DW_FORM_strx3:
++ case elfcpp::DW_FORM_addrx3:
++ pattr += 3;
++ break;
+ case elfcpp::DW_FORM_data4:
+ case elfcpp::DW_FORM_ref4:
++ case elfcpp::DW_FORM_ref_sup4:
++ case elfcpp::DW_FORM_strx4:
++ case elfcpp::DW_FORM_addrx4:
+ pattr += 4;
+ break;
+ case elfcpp::DW_FORM_data8:
+ case elfcpp::DW_FORM_ref8:
+ case elfcpp::DW_FORM_ref_sig8:
++ case elfcpp::DW_FORM_ref_sup8:
+ pattr += 8;
+ break;
++ case elfcpp::DW_FORM_data16:
++ pattr += 16;
++ break;
+ case elfcpp::DW_FORM_ref_udata:
+ case elfcpp::DW_FORM_udata:
++ case elfcpp::DW_FORM_addrx:
++ case elfcpp::DW_FORM_strx:
++ case elfcpp::DW_FORM_loclistx:
++ case elfcpp::DW_FORM_rnglistx:
+ case elfcpp::DW_FORM_GNU_addr_index:
+ case elfcpp::DW_FORM_GNU_str_index:
+ read_unsigned_LEB_128(pattr, &len);
+@@ -1313,6 +1529,13 @@ Dwarf_info_reader::do_parse()
+ elfcpp::Swap_unaligned<16, big_endian>::readval(pinfo);
+ pinfo += 2;
+
++ // DWARF 5: Read the unit type (1 byte) and address size (1 byte).
++ if (this->cu_version_ >= 5)
++ {
++ this->unit_type_ = *pinfo++;
++ this->address_size_ = *pinfo++;
++ }
++
+ // Read debug_abbrev_offset (4 or 8 bytes).
+ if (this->offset_size_ == 4)
+ abbrev_offset = elfcpp::Swap_unaligned<32, big_endian>::readval(pinfo);
+@@ -1333,13 +1556,14 @@ Dwarf_info_reader::do_parse()
+ }
+ pinfo += this->offset_size_;
+
+- // Read address_size (1 byte).
+- this->address_size_ = *pinfo++;
++ // DWARF 2-4: Read address_size (1 byte).
++ if (this->cu_version_ < 5)
++ this->address_size_ = *pinfo++;
+
+ // For type units, read the two extra fields.
+ uint64_t signature = 0;
+ off_t type_offset = 0;
+- if (this->is_type_unit_)
++ if (this->is_type_unit())
+ {
+ if (!this->check_buffer(pinfo + 8 + this->offset_size_))
+ break;
+@@ -1369,7 +1593,7 @@ Dwarf_info_reader::do_parse()
+ if (root_die.tag() != 0)
+ {
+ // Visit the CU or TU.
+- if (this->is_type_unit_)
++ if (this->is_type_unit())
+ this->visit_type_unit(section_offset + this->cu_offset_,
+ cu_end - cu_start, type_offset, signature,
+ &root_die);
+@@ -1460,6 +1684,19 @@ Dwarf_info_reader::read_from_pointer(const unsigned char** source)
+ return return_value;
+ }
+
++// Read a 3-byte integer. Update SOURCE after read.
++inline typename elfcpp::Valtype_base<32>::Valtype
++Dwarf_info_reader::read_3bytes_from_pointer(const unsigned char** source)
++{
++ typename elfcpp::Valtype_base<32>::Valtype return_value;
++ if (this->object_->is_big_endian())
++ return_value = ((*source)[0] << 16) | ((*source)[1] << 8) | (*source)[2];
++ else
++ return_value = ((*source)[2] << 16) | ((*source)[1] << 8) | (*source)[0];
++ *source += 3;
++ return return_value;
++}
++
+ // Look for a relocation at offset ATTR_OFF in the dwarf info,
+ // and return the section index and offset of the target.
+
+@@ -1561,27 +1798,40 @@ Sized_dwarf_line_info<size, big_endian>::Sized_dwarf_line_info(
+ Object* object,
+ unsigned int read_shndx)
+ : data_valid_(false), buffer_(NULL), buffer_start_(NULL),
++ str_buffer_(NULL), str_buffer_start_(NULL),
+ reloc_mapper_(NULL), symtab_buffer_(NULL), directories_(), files_(),
+- current_header_index_(-1)
++ current_header_index_(-1), reloc_map_(), line_number_map_()
+ {
+- unsigned int debug_shndx;
++ unsigned int debug_line_shndx = 0;
++ unsigned int debug_line_str_shndx = 0;
+
+- for (debug_shndx = 1; debug_shndx < object->shnum(); ++debug_shndx)
++ for (unsigned int i = 1; i < object->shnum(); ++i)
+ {
++ section_size_type buffer_size;
++ bool is_new = false;
++
+ // FIXME: do this more efficiently: section_name() isn't super-fast
+- std::string name = object->section_name(debug_shndx);
++ std::string name = object->section_name(i);
+ if (name == ".debug_line" || name == ".zdebug_line")
+ {
+- section_size_type buffer_size;
+- bool is_new = false;
+- this->buffer_ = object->decompressed_section_contents(debug_shndx,
+- &buffer_size,
+- &is_new);
++ this->buffer_ =
++ object->decompressed_section_contents(i, &buffer_size, &is_new);
+ if (is_new)
+ this->buffer_start_ = this->buffer_;
+ this->buffer_end_ = this->buffer_ + buffer_size;
+- break;
++ debug_line_shndx = i;
++ }
++ else if (name == ".debug_line_str" || name == ".zdebug_line_str")
++ {
++ this->str_buffer_ =
++ object->decompressed_section_contents(i, &buffer_size, &is_new);
++ if (is_new)
++ this->str_buffer_start_ = this->str_buffer_;
++ this->str_buffer_end_ = this->str_buffer_ + buffer_size;
++ debug_line_str_shndx = i;
+ }
++ if (debug_line_shndx > 0 && debug_line_str_shndx > 0)
++ break;
+ }
+ if (this->buffer_ == NULL)
+ return;
+@@ -1594,7 +1844,7 @@ Sized_dwarf_line_info<size, big_endian>::Sized_dwarf_line_info(
+ unsigned int reloc_sh_type = object->section_type(i);
+ if ((reloc_sh_type == elfcpp::SHT_REL
+ || reloc_sh_type == elfcpp::SHT_RELA)
+- && object->section_info(i) == debug_shndx)
++ && object->section_info(i) == debug_line_shndx)
+ {
+ reloc_shndx = i;
+ this->track_relocs_type_ = reloc_sh_type;
+@@ -1640,65 +1890,80 @@ Sized_dwarf_line_info<size, big_endian>::read_header_prolog(
+ uint32_t initial_length = elfcpp::Swap_unaligned<32, big_endian>::readval(lineptr);
+ lineptr += 4;
+
+- // In DWARF2/3, if the initial length is all 1 bits, then the offset
++ // In DWARF, if the initial length is all 1 bits, then the offset
+ // size is 8 and we need to read the next 8 bytes for the real length.
+ if (initial_length == 0xffffffff)
+ {
+- header_.offset_size = 8;
++ this->header_.offset_size = 8;
+ initial_length = elfcpp::Swap_unaligned<64, big_endian>::readval(lineptr);
+ lineptr += 8;
+ }
+ else
+- header_.offset_size = 4;
++ this->header_.offset_size = 4;
+
+- header_.total_length = initial_length;
++ this->header_.total_length = initial_length;
+
+- gold_assert(lineptr + header_.total_length <= buffer_end_);
++ this->end_of_unit_ = lineptr + initial_length;
++ gold_assert(this->end_of_unit_ <= buffer_end_);
+
+- header_.version = elfcpp::Swap_unaligned<16, big_endian>::readval(lineptr);
++ this->header_.version =
++ elfcpp::Swap_unaligned<16, big_endian>::readval(lineptr);
+ lineptr += 2;
+
+- // Skip address size and segment selector for DWARF5.
+- if (header_.version >= 5)
+- lineptr += 2;
++ // We can only read versions 2-5 of the DWARF line number table.
++ // For other versions, just skip the entire line number table.
++ if (this->header_.version < 2 || this->header_.version > 5)
++ return this->end_of_unit_;
+
+- if (header_.offset_size == 4)
+- header_.prologue_length = elfcpp::Swap_unaligned<32, big_endian>::readval(lineptr);
++ // DWARF 5 only: address size and segment selector.
++ if (this->header_.version >= 5)
++ {
++ this->header_.address_size = *lineptr;
++ // We ignore the segment selector.
++ lineptr += 2;
++ }
++
++ if (this->header_.offset_size == 4)
++ this->header_.prologue_length =
++ elfcpp::Swap_unaligned<32, big_endian>::readval(lineptr);
+ else
+- header_.prologue_length = elfcpp::Swap_unaligned<64, big_endian>::readval(lineptr);
+- lineptr += header_.offset_size;
++ this->header_.prologue_length =
++ elfcpp::Swap_unaligned<64, big_endian>::readval(lineptr);
++ lineptr += this->header_.offset_size;
+
+- header_.min_insn_length = *lineptr;
++ this->end_of_header_length_ = lineptr;
++
++ this->header_.min_insn_length = *lineptr;
+ lineptr += 1;
+
+- if (header_.version < 4)
+- header_.max_ops_per_insn = 1;
++ if (this->header_.version < 4)
++ this->header_.max_ops_per_insn = 1;
+ else
+ {
+ // DWARF 4 added the maximum_operations_per_instruction field.
+- header_.max_ops_per_insn = *lineptr;
++ this->header_.max_ops_per_insn = *lineptr;
+ lineptr += 1;
+ // TODO: Add support for values other than 1.
+- gold_assert(header_.max_ops_per_insn == 1);
++ gold_assert(this->header_.max_ops_per_insn == 1);
+ }
+
+- header_.default_is_stmt = *lineptr;
++ this->header_.default_is_stmt = *lineptr;
+ lineptr += 1;
+
+- header_.line_base = *reinterpret_cast<const signed char*>(lineptr);
++ this->header_.line_base = *reinterpret_cast<const signed char*>(lineptr);
+ lineptr += 1;
+
+- header_.line_range = *lineptr;
++ this->header_.line_range = *lineptr;
+ lineptr += 1;
+
+- header_.opcode_base = *lineptr;
++ this->header_.opcode_base = *lineptr;
+ lineptr += 1;
+
+- header_.std_opcode_lengths.resize(header_.opcode_base + 1);
+- header_.std_opcode_lengths[0] = 0;
+- for (int i = 1; i < header_.opcode_base; i++)
++ this->header_.std_opcode_lengths.resize(this->header_.opcode_base + 1);
++ this->header_.std_opcode_lengths[0] = 0;
++ for (int i = 1; i < this->header_.opcode_base; i++)
+ {
+- header_.std_opcode_lengths[i] = *lineptr;
++ this->header_.std_opcode_lengths[i] = *lineptr;
+ lineptr += 1;
+ }
+
+@@ -1707,10 +1972,11 @@ Sized_dwarf_line_info<size, big_endian>::read_header_prolog(
+
+ // The header for a debug_line section is mildly complicated, because
+ // the line info is very tightly encoded.
++// This routine is for DWARF versions 2, 3, and 4.
+
+ template<int size, bool big_endian>
+ const unsigned char*
+-Sized_dwarf_line_info<size, big_endian>::read_header_tables(
++Sized_dwarf_line_info<size, big_endian>::read_header_tables_v2(
+ const unsigned char* lineptr)
+ {
+ ++this->current_header_index_;
+@@ -1775,6 +2041,169 @@ Sized_dwarf_line_info<size, big_endian>::read_header_tables(
+ return lineptr;
+ }
+
++// This routine is for DWARF version 5.
++
++template<int size, bool big_endian>
++const unsigned char*
++Sized_dwarf_line_info<size, big_endian>::read_header_tables_v5(
++ const unsigned char* lineptr)
++{
++ size_t len;
++
++ ++this->current_header_index_;
++
++ gold_assert(static_cast<int>(this->directories_.size())
++ == this->current_header_index_);
++ gold_assert(static_cast<int>(this->files_.size())
++ == this->current_header_index_);
++
++ // Read the directory list.
++ unsigned int format_count = *lineptr;
++ lineptr += 1;
++
++ unsigned int *types = new unsigned int[format_count];
++ unsigned int *forms = new unsigned int[format_count];
++
++ for (unsigned int i = 0; i < format_count; i++)
++ {
++ types[i] = read_unsigned_LEB_128(lineptr, &len);
++ lineptr += len;
++ forms[i] = read_unsigned_LEB_128(lineptr, &len);
++ lineptr += len;
++ }
++
++ uint64_t entry_count = read_unsigned_LEB_128(lineptr, &len);
++ lineptr += len;
++ this->directories_.push_back(std::vector<std::string>(0));
++ std::vector<std::string>& dir_list = this->directories_.back();
++
++ for (unsigned int j = 0; j < entry_count; j++)
++ {
++ std::string dirname;
++
++ for (unsigned int i = 0; i < format_count; i++)
++ {
++ if (types[i] == elfcpp::DW_LNCT_path)
++ {
++ if (forms[i] == elfcpp::DW_FORM_string)
++ {
++ dirname = reinterpret_cast<const char*>(lineptr);
++ lineptr += dirname.size() + 1;
++ }
++ else if (forms[i] == elfcpp::DW_FORM_line_strp)
++ {
++ uint64_t offset;
++ if (this->header_.offset_size == 4)
++ offset =
++ elfcpp::Swap_unaligned<32, big_endian>::readval(lineptr);
++ else
++ offset =
++ elfcpp::Swap_unaligned<64, big_endian>::readval(lineptr);
++ typename Reloc_map::const_iterator it
++ = this->reloc_map_.find(lineptr - this->buffer_);
++ if (it != reloc_map_.end())
++ {
++ if (this->track_relocs_type_ == elfcpp::SHT_RELA)
++ offset = 0;
++ offset += it->second.second;
++ }
++ lineptr += this->header_.offset_size;
++ dirname = reinterpret_cast<const char*>(this->str_buffer_
++ + offset);
++ }
++ else
++ return lineptr;
++ }
++ else
++ return lineptr;
++ }
++ dir_list.push_back(dirname);
++ }
++
++ delete[] types;
++ delete[] forms;
++
++ // Read the filenames list.
++ format_count = *lineptr;
++ lineptr += 1;
++
++ types = new unsigned int[format_count];
++ forms = new unsigned int[format_count];
++
++ for (unsigned int i = 0; i < format_count; i++)
++ {
++ types[i] = read_unsigned_LEB_128(lineptr, &len);
++ lineptr += len;
++ forms[i] = read_unsigned_LEB_128(lineptr, &len);
++ lineptr += len;
++ }
++
++ entry_count = read_unsigned_LEB_128(lineptr, &len);
++ lineptr += len;
++ this->files_.push_back(
++ std::vector<std::pair<int, std::string> >(0));
++ std::vector<std::pair<int, std::string> >& file_list = this->files_.back();
++
++ for (unsigned int j = 0; j < entry_count; j++)
++ {
++ const char* path = NULL;
++ int dirindex = 0;
++
++ for (unsigned int i = 0; i < format_count; i++)
++ {
++ if (types[i] == elfcpp::DW_LNCT_path)
++ {
++ if (forms[i] == elfcpp::DW_FORM_string)
++ {
++ path = reinterpret_cast<const char*>(lineptr);
++ lineptr += strlen(path) + 1;
++ }
++ else if (forms[i] == elfcpp::DW_FORM_line_strp)
++ {
++ uint64_t offset;
++ if (this->header_.offset_size == 4)
++ offset = elfcpp::Swap_unaligned<32, big_endian>::readval(lineptr);
++ else
++ offset = elfcpp::Swap_unaligned<64, big_endian>::readval(lineptr);
++ typename Reloc_map::const_iterator it
++ = this->reloc_map_.find(lineptr - this->buffer_);
++ if (it != reloc_map_.end())
++ {
++ if (this->track_relocs_type_ == elfcpp::SHT_RELA)
++ offset = 0;
++ offset += it->second.second;
++ }
++ lineptr += this->header_.offset_size;
++ path = reinterpret_cast<const char*>(this->str_buffer_
++ + offset);
++ }
++ else
++ return lineptr;
++ }
++ else if (types[i] == elfcpp::DW_LNCT_directory_index)
++ {
++ if (forms[i] == elfcpp::DW_FORM_udata)
++ {
++ dirindex = read_unsigned_LEB_128(lineptr, &len);
++ lineptr += len;
++ }
++ else
++ return lineptr;
++ }
++ else
++ return lineptr;
++ }
++ gold_debug(DEBUG_LOCATION, "File %3d: %s",
++ static_cast<int>(file_list.size()), path);
++ file_list.push_back(std::make_pair(dirindex, path));
++ }
++
++ delete[] types;
++ delete[] forms;
++
++ return lineptr;
++}
++
+ // Process a single opcode in the .debug.line structure.
+
+ template<int size, bool big_endian>
+@@ -1790,15 +2219,15 @@ Sized_dwarf_line_info<size, big_endian>::process_one_opcode(
+
+ // If the opcode is great than the opcode_base, it is a special
+ // opcode. Most line programs consist mainly of special opcodes.
+- if (opcode >= header_.opcode_base)
++ if (opcode >= this->header_.opcode_base)
+ {
+- opcode -= header_.opcode_base;
+- const int advance_address = ((opcode / header_.line_range)
+- * header_.min_insn_length);
++ opcode -= this->header_.opcode_base;
++ const int advance_address = ((opcode / this->header_.line_range)
++ * this->header_.min_insn_length);
+ lsm->address += advance_address;
+
+- const int advance_line = ((opcode % header_.line_range)
+- + header_.line_base);
++ const int advance_line = ((opcode % this->header_.line_range)
++ + this->header_.line_base);
+ lsm->line_num += advance_line;
+ lsm->basic_block = true;
+ *len = oplen;
+@@ -1818,13 +2247,13 @@ Sized_dwarf_line_info<size, big_endian>::process_one_opcode(
+ const uint64_t advance_address
+ = read_unsigned_LEB_128(start, &templen);
+ oplen += templen;
+- lsm->address += header_.min_insn_length * advance_address;
++ lsm->address += this->header_.min_insn_length * advance_address;
+ }
+ break;
+
+ case elfcpp::DW_LNS_advance_line:
+ {
+- const uint64_t advance_line = read_signed_LEB_128(start, &templen);
++ const int64_t advance_line = read_signed_LEB_128(start, &templen);
+ oplen += templen;
+ lsm->line_num += advance_line;
+ }
+@@ -1865,9 +2294,9 @@ Sized_dwarf_line_info<size, big_endian>::process_one_opcode(
+
+ case elfcpp::DW_LNS_const_add_pc:
+ {
+- const int advance_address = (header_.min_insn_length
+- * ((255 - header_.opcode_base)
+- / header_.line_range));
++ const int advance_address = (this->header_.min_insn_length
++ * ((255 - this->header_.opcode_base)
++ / this->header_.line_range));
+ lsm->address += advance_address;
+ }
+ break;
+@@ -1950,7 +2379,7 @@ Sized_dwarf_line_info<size, big_endian>::process_one_opcode(
+ default:
+ {
+ // Ignore unknown opcode silently
+- for (int i = 0; i < header_.std_opcode_lengths[opcode]; i++)
++ for (int i = 0; i < this->header_.std_opcode_lengths[opcode]; i++)
+ {
+ size_t templen;
+ read_unsigned_LEB_128(start, &templen);
+@@ -1970,28 +2399,24 @@ Sized_dwarf_line_info<size, big_endian>::process_one_opcode(
+ template<int size, bool big_endian>
+ unsigned const char*
+ Sized_dwarf_line_info<size, big_endian>::read_lines(unsigned const char* lineptr,
++ unsigned const char* endptr,
+ unsigned int shndx)
+ {
+ struct LineStateMachine lsm;
+
+- // LENGTHSTART is the place the length field is based on. It is the
+- // point in the header after the initial length field.
+- const unsigned char* lengthstart = buffer_;
+-
+- // In 64 bit dwarf, the initial length is 12 bytes, because of the
+- // 0xffffffff at the start.
+- if (header_.offset_size == 8)
+- lengthstart += 12;
+- else
+- lengthstart += 4;
+-
+- while (lineptr < lengthstart + header_.total_length)
++ while (lineptr < endptr)
+ {
+- ResetLineStateMachine(&lsm, header_.default_is_stmt);
++ ResetLineStateMachine(&lsm, this->header_.default_is_stmt);
+ while (!lsm.end_sequence)
+ {
+ size_t oplength;
++
++ if (lineptr >= endptr)
++ break;
++
+ bool add_line = this->process_one_opcode(lineptr, &lsm, &oplength);
++ lineptr += oplength;
++
+ if (add_line
+ && (shndx == -1U || lsm.shndx == -1U || shndx == lsm.shndx))
+ {
+@@ -2012,11 +2437,10 @@ Sized_dwarf_line_info<size, big_endian>::read_lines(unsigned const char* lineptr
+ map.back().last_line_for_offset = false;
+ map.push_back(entry);
+ }
+- lineptr += oplength;
+ }
+ }
+
+- return lengthstart + header_.total_length;
++ return endptr;
+ }
+
+ // Read the relocations into a Reloc_map.
+@@ -2057,9 +2481,17 @@ Sized_dwarf_line_info<size, big_endian>::read_line_mappings(unsigned int shndx)
+ {
+ const unsigned char* lineptr = this->buffer_;
+ lineptr = this->read_header_prolog(lineptr);
+- lineptr = this->read_header_tables(lineptr);
+- lineptr = this->read_lines(lineptr, shndx);
+- this->buffer_ = lineptr;
++ if (this->header_.version >= 2 && this->header_.version <= 4)
++ {
++ lineptr = this->read_header_tables_v2(lineptr);
++ lineptr = this->read_lines(lineptr, this->end_of_unit_, shndx);
++ }
++ else if (this->header_.version == 5)
++ {
++ lineptr = this->read_header_tables_v5(lineptr);
++ lineptr = this->read_lines(lineptr, this->end_of_unit_, shndx);
++ }
++ this->buffer_ = this->end_of_unit_;
+ }
+
+ // Sort the lines numbers, so addr2line can use binary search.
+@@ -2215,6 +2647,9 @@ Sized_dwarf_line_info<size, big_endian>::do_addr2line(
+ off_t offset,
+ std::vector<std::string>* other_lines)
+ {
++ gold_debug(DEBUG_LOCATION, "do_addr2line: shndx %u offset %08x",
++ shndx, static_cast<int>(offset));
++
+ if (this->data_valid_ == false)
+ return "";
+
+diff --git a/gold/dwarf_reader.h b/gold/dwarf_reader.h
+index 80b2231327c..921a1f7c876 100644
+--- a/gold/dwarf_reader.h
++++ b/gold/dwarf_reader.h
+@@ -173,11 +173,12 @@ class Dwarf_abbrev_table
+ // An attribute list entry.
+ struct Attribute
+ {
+- Attribute(unsigned int a, unsigned int f)
+- : attr(a), form(f)
++ Attribute(unsigned int a, unsigned int f, int c)
++ : attr(a), form(f), implicit_const(c)
+ { }
+ unsigned int attr;
+ unsigned int form;
++ int implicit_const;
+ };
+
+ // An abbrev code entry.
+@@ -190,9 +191,9 @@ class Dwarf_abbrev_table
+ }
+
+ void
+- add_attribute(unsigned int attr, unsigned int form)
++ add_attribute(unsigned int attr, unsigned int form, int implicit_const)
+ {
+- this->attributes.push_back(Attribute(attr, form));
++ this->attributes.push_back(Attribute(attr, form, implicit_const));
+ }
+
+ // The DWARF tag.
+@@ -349,14 +350,15 @@ class Dwarf_ranges_table
+ delete this->ranges_reloc_mapper_;
+ }
+
+- // Read the ranges table from an object file.
++ // Fetch the contents of the ranges table from an object file.
+ bool
+ read_ranges_table(Relobj* object,
+ const unsigned char* symtab,
+ off_t symtab_size,
+- unsigned int ranges_shndx);
++ unsigned int ranges_shndx,
++ unsigned int version);
+
+- // Read the range table from an object file.
++ // Read the DWARF 2/3/4 range table.
+ Dwarf_range_list*
+ read_range_list(Relobj* object,
+ const unsigned char* symtab,
+@@ -365,6 +367,15 @@ class Dwarf_ranges_table
+ unsigned int ranges_shndx,
+ off_t ranges_offset);
+
++ // Read the DWARF 5 rnglists table.
++ Dwarf_range_list*
++ read_range_list_v5(Relobj* object,
++ const unsigned char* symtab,
++ off_t symtab_size,
++ unsigned int address_size,
++ unsigned int ranges_shndx,
++ off_t ranges_offset);
++
+ // Look for a relocation at offset OFF in the range table,
+ // and return the section index and offset of the target.
+ unsigned int
+@@ -490,8 +501,6 @@ class Dwarf_die
+ unsigned int shndx;
+ // Block length for block forms.
+ unsigned int blocklen;
+- // Attribute offset for DW_FORM_strp.
+- unsigned int attr_off;
+ } aux;
+ };
+
+@@ -684,6 +693,10 @@ class Dwarf_die
+ // calls the various visit_xxx() methods for each header. Clients
+ // should derive a new class from this one and implement the
+ // visit_compilation_unit() and visit_type_unit() functions.
++// IS_TYPE_UNIT is true if we are reading from a .debug_types section,
++// which is used only in DWARF 4. For DWARF 5, it will be false,
++// and we will determine whether it's a type init when we parse the
++// header.
+
+ class Dwarf_info_reader
+ {
+@@ -695,7 +708,7 @@ class Dwarf_info_reader
+ unsigned int shndx,
+ unsigned int reloc_shndx,
+ unsigned int reloc_type)
+- : is_type_unit_(is_type_unit), object_(object), symtab_(symtab),
++ : object_(object), symtab_(symtab),
+ symtab_size_(symtab_size), shndx_(shndx), reloc_shndx_(reloc_shndx),
+ reloc_type_(reloc_type), abbrev_shndx_(0), string_shndx_(0),
+ buffer_(NULL), buffer_end_(NULL), cu_offset_(0), cu_length_(0),
+@@ -703,7 +716,12 @@ class Dwarf_info_reader
+ abbrev_table_(), ranges_table_(this),
+ reloc_mapper_(NULL), string_buffer_(NULL), string_buffer_end_(NULL),
+ owns_string_buffer_(false), string_output_section_offset_(0)
+- { }
++ {
++ // For DWARF 4, we infer the unit type from the section name.
++ // For DWARF 5, we will read this from the unit header.
++ this->unit_type_ =
++ (is_type_unit ? elfcpp::DW_UT_type : elfcpp::DW_UT_compile);
++ }
+
+ virtual
+ ~Dwarf_info_reader()
+@@ -714,6 +732,13 @@ class Dwarf_info_reader
+ delete[] this->string_buffer_;
+ }
+
++ bool
++ is_type_unit() const
++ {
++ return (this->unit_type_ == elfcpp::DW_UT_type
++ || this->unit_type_ == elfcpp::DW_UT_split_type);
++ }
++
+ // Begin parsing the debug info. This calls visit_compilation_unit()
+ // or visit_type_unit() for each compilation or type unit found in the
+ // section, and visit_die() for each top-level DIE.
+@@ -745,6 +770,9 @@ class Dwarf_info_reader
+ inline typename elfcpp::Valtype_base<valsize>::Valtype
+ read_from_pointer(const unsigned char** source);
+
++ inline typename elfcpp::Valtype_base<32>::Valtype
++ read_3bytes_from_pointer(const unsigned char** source);
++
+ // Look for a relocation at offset ATTR_OFF in the dwarf info,
+ // and return the section index and offset of the target.
+ unsigned int
+@@ -818,12 +846,20 @@ class Dwarf_info_reader
+ Dwarf_range_list*
+ read_range_list(unsigned int ranges_shndx, off_t ranges_offset)
+ {
+- return this->ranges_table_.read_range_list(this->object_,
+- this->symtab_,
+- this->symtab_size_,
+- this->address_size_,
+- ranges_shndx,
+- ranges_offset);
++ if (this->cu_version_ < 5)
++ return this->ranges_table_.read_range_list(this->object_,
++ this->symtab_,
++ this->symtab_size_,
++ this->address_size_,
++ ranges_shndx,
++ ranges_offset);
++ else
++ return this->ranges_table_.read_range_list_v5(this->object_,
++ this->symtab_,
++ this->symtab_size_,
++ this->address_size_,
++ ranges_shndx,
++ ranges_offset);
+ }
+
+ // Return the object.
+@@ -873,8 +909,8 @@ class Dwarf_info_reader
+ bool
+ do_read_string_table(unsigned int string_shndx);
+
+- // True if this is a type unit; false for a compilation unit.
+- bool is_type_unit_;
++ // The unit type (DW_UT_xxx).
++ unsigned int unit_type_;
+ // The object containing the .debug_info or .debug_types input section.
+ Relobj* object_;
+ // The ELF symbol table.
+@@ -1008,6 +1044,8 @@ class Sized_dwarf_line_info : public Dwarf_line_info
+ {
+ if (this->buffer_start_ != NULL)
+ delete[] this->buffer_start_;
++ if (this->str_buffer_start_ != NULL)
++ delete[] this->str_buffer_start_;
+ }
+
+ private:
+@@ -1030,19 +1068,23 @@ class Sized_dwarf_line_info : public Dwarf_line_info
+ void
+ read_relocs();
+
+- // Reads the DWARF2/3 header for this line info. Each takes as input
++ // Reads the DWARF header for this line info. Each takes as input
+ // a starting buffer position, and returns the ending position.
+ const unsigned char*
+ read_header_prolog(const unsigned char* lineptr);
+
+ const unsigned char*
+- read_header_tables(const unsigned char* lineptr);
++ read_header_tables_v2(const unsigned char* lineptr);
++
++ const unsigned char*
++ read_header_tables_v5(const unsigned char* lineptr);
+
+- // Reads the DWARF2/3 line information. If shndx is non-negative,
++ // Reads the DWARF line information. If shndx is non-negative,
+ // discard all line information that doesn't pertain to the given
+ // section.
+ const unsigned char*
+- read_lines(const unsigned char* lineptr, unsigned int shndx);
++ read_lines(const unsigned char* lineptr, const unsigned char* endptr,
++ unsigned int shndx);
+
+ // Process a single line info opcode at START using the state
+ // machine at LSM. Return true if we should define a line using the
+@@ -1069,6 +1111,7 @@ class Sized_dwarf_line_info : public Dwarf_line_info
+ {
+ off_t total_length;
+ int version;
++ int address_size;
+ off_t prologue_length;
+ int min_insn_length; // insn stands for instruction
+ int max_ops_per_insn; // Added in DWARF-4.
+@@ -1089,6 +1132,20 @@ class Sized_dwarf_line_info : public Dwarf_line_info
+ // of the buffer.
+ const unsigned char* buffer_start_;
+
++ // str_buffer is the buffer for the line table strings.
++ const unsigned char* str_buffer_;
++ const unsigned char* str_buffer_end_;
++ // If the buffer was allocated temporarily, and therefore must be
++ // deallocated in the dtor, this contains a pointer to the start
++ // of the buffer.
++ const unsigned char* str_buffer_start_;
++
++ // Pointer to the end of the header_length field (aka prologue_length).
++ const unsigned char* end_of_header_length_;
++
++ // Pointer to the end of the current compilation unit.
++ const unsigned char* end_of_unit_;
++
+ // This has relocations that point into buffer.
+ Sized_elf_reloc_mapper<size, big_endian>* reloc_mapper_;
+ // The type of the reloc section in track_relocs_--SHT_REL or SHT_RELA.
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2021-20197.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2021-20197.patch
new file mode 100644
index 000000000..d6117b65a
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2021-20197.patch
@@ -0,0 +1,388 @@
+From d3edaa91d4cf7202ec14342410194841e2f67f12 Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Fri, 26 Feb 2021 11:30:32 +1030
+Subject: [PATCH] Reinstate various pieces backed out from smart_rename changes
+
+In the interests of a stable release various last minute smart_rename
+patches were backed out of the 2.36 branch. The main reason to
+reinstate some of those backed out changes here is to make necessary
+followup fixes to commit 8e03235147a9 simple cherry-picks from
+mainline. A secondary reason is that ar -M support isn't fixed for
+pr26945 without this patch.
+
+ PR 26945
+ * ar.c: Don't include libbfd.h.
+ (write_archive): Replace xmalloc+strcpy with xstrdup.
+ * arsup.c (temp_name, real_ofd): New static variables.
+ (ar_open): Use make_tempname and bfd_fdopenw.
+ (ar_save): Adjust to suit ar_open changes.
+ * objcopy.c: Don't include libbfd.h.
+ * rename.c: Rename and reorder variables.
+
+(cherry picked from commit 95b91a043aeaeb546d2fea556d84a2de1e917770)
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d3edaa91d4cf7202ec14342410194841e2f67f12]
+CVE: CVE-2021-20197
+Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com>
+---
+ binutils/ar.c | 6 +-
+ binutils/arsup.c | 37 ++++++++----
+ binutils/bucomm.h | 3 +-
+ binutils/objcopy.c | 9 +--
+ binutils/rename.c | 148 +++++++++++----------------------------------
+ 5 files changed, 67 insertions(+), 136 deletions(-)
+
+diff --git a/binutils/ar.c b/binutils/ar.c
+index 45a34e3a6cf..44df48c5c67 100644
+--- a/binutils/ar.c
++++ b/binutils/ar.c
+@@ -25,7 +25,6 @@
+
+ #include "sysdep.h"
+ #include "bfd.h"
+-#include "libbfd.h"
+ #include "libiberty.h"
+ #include "progress.h"
+ #include "getopt.h"
+@@ -1255,8 +1254,7 @@ write_archive (bfd *iarch)
+ bfd *contents_head = iarch->archive_next;
+ int ofd = -1;
+
+- old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1);
+- strcpy (old_name, bfd_get_filename (iarch));
++ old_name = xstrdup (bfd_get_filename (iarch));
+ new_name = make_tempname (old_name, &ofd);
+
+ if (new_name == NULL)
+@@ -1308,7 +1306,7 @@ write_archive (bfd *iarch)
+ /* We don't care if this fails; we might be creating the archive. */
+ bfd_close (iarch);
+
+- if (smart_rename (new_name, old_name, 0) != 0)
++ if (smart_rename (new_name, old_name, NULL) != 0)
+ xexit (1);
+ free (old_name);
+ free (new_name);
+diff --git a/binutils/arsup.c b/binutils/arsup.c
+index 5403a0c5d74..f7ce8f0bc82 100644
+--- a/binutils/arsup.c
++++ b/binutils/arsup.c
+@@ -42,6 +42,8 @@ extern int deterministic;
+
+ static bfd *obfd;
+ static char *real_name;
++static char *temp_name;
++static int real_ofd;
+ static FILE *outfile;
+
+ static void
+@@ -149,27 +151,24 @@ maybequit (void)
+ void
+ ar_open (char *name, int t)
+ {
+- char *tname;
+- const char *bname = lbasename (name);
+- real_name = name;
++ real_name = xstrdup (name);
++ temp_name = make_tempname (real_name, &real_ofd);
+
+- /* Prepend tmp- to the beginning, to avoid file-name clashes after
+- truncation on filesystems with limited namespaces (DOS). */
+- if (asprintf (&tname, "%.*stmp-%s", (int) (bname - name), name, bname) == -1)
++ if (temp_name == NULL)
+ {
+- fprintf (stderr, _("%s: Can't allocate memory for temp name (%s)\n"),
++ fprintf (stderr, _("%s: Can't open temporary file (%s)\n"),
+ program_name, strerror(errno));
+ maybequit ();
+ return;
+ }
+
+- obfd = bfd_openw (tname, NULL);
++ obfd = bfd_fdopenw (temp_name, NULL, real_ofd);
+
+ if (!obfd)
+ {
+ fprintf (stderr,
+ _("%s: Can't open output archive %s\n"),
+- program_name, tname);
++ program_name, temp_name);
+
+ maybequit ();
+ }
+@@ -344,16 +343,30 @@ ar_save (void)
+ }
+ else
+ {
+- char *ofilename = xstrdup (bfd_get_filename (obfd));
++ struct stat target_stat;
+
+ if (deterministic > 0)
+ obfd->flags |= BFD_DETERMINISTIC_OUTPUT;
+
+ bfd_close (obfd);
+
+- smart_rename (ofilename, real_name, 0);
++ if (stat (real_name, &target_stat) != 0)
++ {
++ /* The temp file created in ar_open has mode 0600 as per mkstemp.
++ Create the real empty output file here so smart_rename will
++ update the mode according to the process umask. */
++ obfd = bfd_openw (real_name, NULL);
++ if (obfd != NULL)
++ {
++ bfd_set_format (obfd, bfd_archive);
++ bfd_close (obfd);
++ }
++ }
++
++ smart_rename (temp_name, real_name, NULL);
+ obfd = 0;
+- free (ofilename);
++ free (temp_name);
++ free (real_name);
+ }
+ }
+
+diff --git a/binutils/bucomm.h b/binutils/bucomm.h
+index 91f6a5b228f..aa7e33d8cd1 100644
+--- a/binutils/bucomm.h
++++ b/binutils/bucomm.h
+@@ -71,7 +71,8 @@ extern void print_version (const char *);
+ /* In rename.c. */
+ extern void set_times (const char *, const struct stat *);
+
+-extern int smart_rename (const char *, const char *, int);
++extern int smart_rename (const char *, const char *, struct stat *);
++
+
+ /* In libiberty. */
+ void *xmalloc (size_t);
+diff --git a/binutils/objcopy.c b/binutils/objcopy.c
+index eab3b6db585..73aa8bc2514 100644
+--- a/binutils/objcopy.c
++++ b/binutils/objcopy.c
+@@ -20,7 +20,6 @@
+
+ #include "sysdep.h"
+ #include "bfd.h"
+-#include "libbfd.h"
+ #include "progress.h"
+ #include "getopt.h"
+ #include "libiberty.h"
+@@ -4861,12 +4860,10 @@ strip_main (int argc, char *argv[])
+ output_target, NULL);
+ if (status == 0)
+ {
+- if (preserve_dates)
+- set_times (tmpname, &statbuf);
+ if (output_file != tmpname)
+ status = (smart_rename (tmpname,
+ output_file ? output_file : argv[i],
+- preserve_dates) != 0);
++ preserve_dates ? &statbuf : NULL) != 0);
+ if (status == 0)
+ status = hold_status;
+ }
+@@ -5931,11 +5928,9 @@ copy_main (int argc, char *argv[])
+ output_target, input_arch);
+ if (status == 0)
+ {
+- if (preserve_dates)
+- set_times (tmpname, &statbuf);
+ if (tmpname != output_filename)
+ status = (smart_rename (tmpname, input_filename,
+- preserve_dates) != 0);
++ preserve_dates ? &statbuf : NULL) != 0);
+ }
+ else
+ unlink_if_ordinary (tmpname);
+diff --git a/binutils/rename.c b/binutils/rename.c
+index 65ad5bf52c4..72a9323d72c 100644
+--- a/binutils/rename.c
++++ b/binutils/rename.c
+@@ -24,14 +24,9 @@
+
+ #ifdef HAVE_GOOD_UTIME_H
+ #include <utime.h>
+-#else /* ! HAVE_GOOD_UTIME_H */
+-#ifdef HAVE_UTIMES
++#elif defined HAVE_UTIMES
+ #include <sys/time.h>
+-#endif /* HAVE_UTIMES */
+-#endif /* ! HAVE_GOOD_UTIME_H */
+-
+-#if ! defined (_WIN32) || defined (__CYGWIN32__)
+-static int simple_copy (const char *, const char *);
++#endif
+
+ /* The number of bytes to copy at once. */
+ #define COPY_BUF 8192
+@@ -82,7 +77,6 @@ simple_copy (const char *from, const char *to)
+ }
+ return 0;
+ }
+-#endif /* __CYGWIN32__ or not _WIN32 */
+
+ /* Set the times of the file DESTINATION to be the same as those in
+ STATBUF. */
+@@ -91,122 +85,52 @@ void
+ set_times (const char *destination, const struct stat *statbuf)
+ {
+ int result;
+-
+- {
+ #ifdef HAVE_GOOD_UTIME_H
+- struct utimbuf tb;
+-
+- tb.actime = statbuf->st_atime;
+- tb.modtime = statbuf->st_mtime;
+- result = utime (destination, &tb);
+-#else /* ! HAVE_GOOD_UTIME_H */
+-#ifndef HAVE_UTIMES
+- long tb[2];
+-
+- tb[0] = statbuf->st_atime;
+- tb[1] = statbuf->st_mtime;
+- result = utime (destination, tb);
+-#else /* HAVE_UTIMES */
+- struct timeval tv[2];
+-
+- tv[0].tv_sec = statbuf->st_atime;
+- tv[0].tv_usec = 0;
+- tv[1].tv_sec = statbuf->st_mtime;
+- tv[1].tv_usec = 0;
+- result = utimes (destination, tv);
+-#endif /* HAVE_UTIMES */
+-#endif /* ! HAVE_GOOD_UTIME_H */
+- }
++ struct utimbuf tb;
++
++ tb.actime = statbuf->st_atime;
++ tb.modtime = statbuf->st_mtime;
++ result = utime (destination, &tb);
++#elif defined HAVE_UTIMES
++ struct timeval tv[2];
++
++ tv[0].tv_sec = statbuf->st_atime;
++ tv[0].tv_usec = 0;
++ tv[1].tv_sec = statbuf->st_mtime;
++ tv[1].tv_usec = 0;
++ result = utimes (destination, tv);
++#else
++ long tb[2];
++
++ tb[0] = statbuf->st_atime;
++ tb[1] = statbuf->st_mtime;
++ result = utime (destination, tb);
++#endif
+
+ if (result != 0)
+ non_fatal (_("%s: cannot set time: %s"), destination, strerror (errno));
+ }
+
+-#ifndef S_ISLNK
+-#ifdef S_IFLNK
+-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+-#else
+-#define S_ISLNK(m) 0
+-#define lstat stat
+-#endif
+-#endif
+-
+-/* Rename FROM to TO, copying if TO is a link.
+- Return 0 if ok, -1 if error. */
++/* Copy FROM to TO. TARGET_STAT has the file status that, if non-NULL,
++ is used to fix up timestamps. Return 0 if ok, -1 if error.
++ At one time this function renamed files, but file permissions are
++ tricky to update given the number of different schemes used by
++ various systems. So now we just copy. */
+
+ int
+-smart_rename (const char *from, const char *to, int preserve_dates ATTRIBUTE_UNUSED)
++smart_rename (const char *from, const char *to,
++ struct stat *target_stat)
+ {
+- bfd_boolean exists;
+- struct stat s;
+- int ret = 0;
+-
+- exists = lstat (to, &s) == 0;
+-
+-#if defined (_WIN32) && !defined (__CYGWIN32__)
+- /* Win32, unlike unix, will not erase `to' in `rename(from, to)' but
+- fail instead. Also, chown is not present. */
++ int ret;
+
+- if (exists)
+- remove (to);
+-
+- ret = rename (from, to);
++ ret = simple_copy (from, to);
+ if (ret != 0)
+- {
+- /* We have to clean up here. */
+- non_fatal (_("unable to rename '%s'; reason: %s"), to, strerror (errno));
+- unlink (from);
+- }
+-#else
+- /* Use rename only if TO is not a symbolic link and has
+- only one hard link, and we have permission to write to it. */
+- if (! exists
+- || (!S_ISLNK (s.st_mode)
+- && S_ISREG (s.st_mode)
+- && (s.st_mode & S_IWUSR)
+- && s.st_nlink == 1)
+- )
+- {
+- ret = rename (from, to);
+- if (ret == 0)
+- {
+- if (exists)
+- {
+- /* Try to preserve the permission bits and ownership of
+- TO. First get the mode right except for the setuid
+- bit. Then change the ownership. Then fix the setuid
+- bit. We do the chmod before the chown because if the
+- chown succeeds, and we are a normal user, we won't be
+- able to do the chmod afterward. We don't bother to
+- fix the setuid bit first because that might introduce
+- a fleeting security problem, and because the chown
+- will clear the setuid bit anyhow. We only fix the
+- setuid bit if the chown succeeds, because we don't
+- want to introduce an unexpected setuid file owned by
+- the user running objcopy. */
+- chmod (to, s.st_mode & 0777);
+- if (chown (to, s.st_uid, s.st_gid) >= 0)
+- chmod (to, s.st_mode & 07777);
+- }
+- }
+- else
+- {
+- /* We have to clean up here. */
+- non_fatal (_("unable to rename '%s'; reason: %s"), to, strerror (errno));
+- unlink (from);
+- }
+- }
+- else
+- {
+- ret = simple_copy (from, to);
+- if (ret != 0)
+- non_fatal (_("unable to copy file '%s'; reason: %s"), to, strerror (errno));
++ non_fatal (_("unable to copy file '%s'; reason: %s"),
++ to, strerror (errno));
+
+- if (preserve_dates)
+- set_times (to, &s);
+- unlink (from);
+- }
+-#endif /* _WIN32 && !__CYGWIN32__ */
++ if (target_stat != NULL)
++ set_times (to, target_stat);
++ unlink (from);
+
+ return ret;
+ }
+--
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils_2.36.bb b/poky/meta/recipes-devtools/binutils/binutils_2.36.bb
index a50d2ee7e..ee9617de1 100644
--- a/poky/meta/recipes-devtools/binutils/binutils_2.36.bb
+++ b/poky/meta/recipes-devtools/binutils/binutils_2.36.bb
@@ -25,7 +25,7 @@ EXTRA_OECONF_class-native = "--enable-targets=all \
--disable-sim \
--disable-werror"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils"
# gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target
# So remove -O2 and use -Os as workaround
diff --git a/poky/meta/recipes-devtools/bison/bison_3.7.5.bb b/poky/meta/recipes-devtools/bison/bison_3.7.6.bb
index c8bbea445..a8d57f274 100644
--- a/poky/meta/recipes-devtools/bison/bison_3.7.5.bb
+++ b/poky/meta/recipes-devtools/bison/bison_3.7.6.bb
@@ -5,7 +5,7 @@ grammars ought to work with Bison with no change. Anyone familiar with Yacc shou
little trouble."
HOMEPAGE = "http://www.gnu.org/software/bison/"
LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
SECTION = "devel"
DEPENDS = "bison-native flex-native"
@@ -13,12 +13,27 @@ SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
file://add-with-bisonlocaledir.patch \
file://0001-Use-mapped-file-name-for-symbols.patch \
"
-SRC_URI[sha256sum] = "e8c53bc5bc396d636622d0f25e31ca92fd53f00b09629f13ef540d564a6b31ab"
+SRC_URI[sha256sum] = "67d68ce1e22192050525643fc0a7a22297576682bef6a5c51446903f5aeef3cf"
+
+inherit autotools gettext texinfo
# No point in hardcoding path to m4, just use PATH
-EXTRA_OECONF += "M4=m4"
+CACHED_CONFIGUREVARS = "ac_cv_path_M4=m4"
-inherit autotools gettext texinfo
+PACKAGECONFIG ??= "readline ${@ 'textstyle' if d.getVar('USE_NLS') == 'yes' else ''}"
+PACKAGECONFIG_class-native ??= ""
+
+# Make readline and textstyle optional. There are recipie for these, but leave them
+# disabled for the native recipe. This prevents host contamination of the native tool.
+PACKAGECONFIG[readline] = "--with-libreadline-prefix,--without-libreadline-prefix,readline"
+PACKAGECONFIG[textstyle] = "--with-libtextstyle-prefix,--without-libtextstyle-prefix,gettext"
+
+# Include the cached configure variables, configure is really good at finding
+# libreadline, even if we don't want it.
+CACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'readline', '', ' \
+ ac_cv_header_readline_history_h=no \
+ ac_cv_header_readline_readline_h=no \
+ gl_cv_lib_readline=no', d)}"
# The automatic m4 path detection gets confused, so force the right value
acpaths = "-I ./m4"
diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch
new file mode 100644
index 000000000..d7188881d
--- /dev/null
+++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch
@@ -0,0 +1,42 @@
+From 3d19b0fb882c5e195362a9f0909c474e60070ca0 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@gmail.com>
+Date: Fri, 18 Jun 2021 11:10:36 -0400
+Subject: [PATCH] btrfs-progs: include linux/const.h to fix build with 5.12+
+ headers
+
+btrfs-tools compile fails with mips, musl and 5.12+ headers.
+
+The definition of __ALIGN_KERNEL has moved in 5.12+ kernels, so we
+add an explicit include of const.h to pickup the macro:
+
+ | make: *** [Makefile:595: mkfs.btrfs] Error 1
+ | make: *** Waiting for unfinished jobs....
+ | libbtrfs.a(volumes.o): in function `dev_extent_search_start':
+ | /usr/src/debug/btrfs-tools/5.12.1-r0/git/kernel-shared/volumes.c:464: undefined reference to `__ALIGN_KERNEL'
+ | collect2: error: ld returned 1 exit status
+
+This is safe for older kernel's as well, since the header still
+exists, and is valid to include.
+
+Upstream-status: OE Specific [mips64 + musl + libc-headers]
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ kerncompat.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/kerncompat.h b/kerncompat.h
+index df167fe6..254235bd 100644
+--- a/kerncompat.h
++++ b/kerncompat.h
+@@ -30,6 +30,7 @@
+ #include <linux/types.h>
+ #include <linux/kernel.h>
+ #include <stdint.h>
++#include <linux/const.h>
+
+ #include <features.h>
+
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.10.1.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb
index fca010d4a..d0c9cf2a9 100644
--- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.10.1.bb
+++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb
@@ -7,28 +7,47 @@ btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
HOMEPAGE = "https://btrfs.wiki.kernel.org"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
+LICENSE = "GPLv2 & LGPLv2.1+"
+LIC_FILES_CHKSUM = " \
+ file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067 \
+ file://libbtrfsutil/COPYING;md5=4fbd65380cdd255951079008b364516c \
+"
SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl"
+DEPENDS = "lzo util-linux zlib"
DEPENDS_append_class-target = " udev"
-RDEPENDS_${PN} = "libgcc"
-SRCREV = "f2ffce38b9c1477a7350bfe165f0e34b9bde40f5"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
+ file://0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch \
"
+SRCREV = "96d77fcefdd3b9fd297b5aabbce6dc43e2315ee2"
+S = "${WORKDIR}/git"
-PACKAGECONFIG ??= "python"
+PACKAGECONFIG ??= " \
+ programs \
+ convert \
+ python \
+ crypto-builtin \
+"
PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
+PACKAGECONFIG[programs] = "--enable-programs,--disable-programs"
+PACKAGECONFIG[convert] = "--enable-convert --with-convert=ext2,--disable-convert --without-convert,e2fsprogs"
+PACKAGECONFIG[zoned] = "--enable-zoned,--disable-zoned"
PACKAGECONFIG[python] = "--enable-python,--disable-python,python3-setuptools-native"
PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd"
+# Pick only one crypto provider
+PACKAGECONFIG[crypto-builtin] = "--with-crypto=builtin"
+PACKAGECONFIG[crypto-libgcrypt] = "--with-crypto=libgcrypt,,libgcrypt"
+PACKAGECONFIG[crypto-libsodium] = "--with-crypto=libsodium,,libsodium"
+PACKAGECONFIG[crypto-libkcapi] = "--with-crypto=libkcapi,,libkcapi"
+
inherit autotools-brokensep pkgconfig manpages
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'distutils3-base', '', d)}
CLEANBROKEN = "1"
+EXTRA_OECONF = "--enable-largefile"
EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
EXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}"
EXTRA_PYTHON_CFLAGS_class-native = ""
@@ -41,7 +60,6 @@ do_configure_prepend() {
cp -f $(automake --print-libdir)/install-sh ${S}/config/
}
-S = "${WORKDIR}/git"
do_install_append() {
if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
@@ -49,4 +67,6 @@ do_install_append() {
fi
}
+RDEPENDS_${PN} = "libgcc"
+
BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/ccache/ccache_4.2.bb b/poky/meta/recipes-devtools/ccache/ccache_4.3.bb
index 9957bc7e6..53a0bcf7a 100644
--- a/poky/meta/recipes-devtools/ccache/ccache_4.2.bb
+++ b/poky/meta/recipes-devtools/ccache/ccache_4.3.bb
@@ -7,12 +7,12 @@ HOMEPAGE = "http://ccache.samba.org"
SECTION = "devel"
LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=28afb89f649f309e7ac1aab554564637"
+LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=698a26b57e513d678e1e7727bf56395b"
DEPENDS = "zstd"
SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
-SRC_URI[sha256sum] = "dbf139ff32031b54cb47f2d7983269f328df14b5a427882f89f7721e5c411b7e"
+SRC_URI[sha256sum] = "b9789c42e52c73e99428f311a34def9ffec3462736439afd12dbacc7987c1533"
UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
@@ -21,3 +21,5 @@ inherit cmake
PATCHTOOL = "patch"
BBCLASSEXTEND = "native nativesdk"
+
+PACKAGECONFIG[docs] = "-DENABLE_DOCUMENTATION=ON,-DENABLE_DOCUMENTATION=OFF,asciidoc"
diff --git a/poky/meta/recipes-devtools/cmake/cmake-native_3.19.5.bb b/poky/meta/recipes-devtools/cmake/cmake-native_3.20.3.bb
index d91e42ef9..335097d38 100644
--- a/poky/meta/recipes-devtools/cmake/cmake-native_3.19.5.bb
+++ b/poky/meta/recipes-devtools/cmake/cmake-native_3.20.3.bb
@@ -1,7 +1,7 @@
require cmake.inc
inherit native
-DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native"
+DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native zstd-native"
SRC_URI += "file://OEToolchainConfig.cmake \
file://environment.d-cmake.sh \
diff --git a/poky/meta/recipes-devtools/cmake/cmake.inc b/poky/meta/recipes-devtools/cmake/cmake.inc
index e0f59a6c6..0987c01c8 100644
--- a/poky/meta/recipes-devtools/cmake/cmake.inc
+++ b/poky/meta/recipes-devtools/cmake/cmake.inc
@@ -10,19 +10,18 @@ HOMEPAGE = "http://www.cmake.org/"
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
SECTION = "console/utils"
LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=c721f56fce89ba2eadc2fdd8ba1f4d83 \
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=31023e1d3f51ca90a58f55bcee8e2339 \
file://Source/cmake.h;beginline=1;endline=2;md5=a5f70e1fef8614734eae0d62b4f5891b \
"
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://0002-cmake-Prevent-the-detection-of-Qt5.patch \
file://0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch \
file://0004-Fail-silently-if-system-Qt-installation-is-broken.patch \
"
-SRC_URI[sha256sum] = "c432296eb5dec6d71eae15d140f6297d63df44e9ffe3e453628d1dc8fc4201ce"
+SRC_URI[sha256sum] = "4d008ac3461e271fcfac26a05936f77fc7ab64402156fb371d41284851a651b8"
UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
diff --git a/poky/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch b/poky/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
index 818151032..9609f5f7c 100644
--- a/poky/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
+++ b/poky/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
@@ -1,4 +1,4 @@
-From 66d5b27dc37ef6243f6549e16d0285ba6c064a6e Mon Sep 17 00:00:00 2001
+From e75f76b00cc9c1cfc231c5e731e975552f5dd13e Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Thu, 27 Apr 2017 11:35:05 -0400
Subject: [PATCH] CMakeDetermineSystem: use oe environment vars to load default
@@ -25,7 +25,7 @@ Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
1 file changed, 7 insertions(+)
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
-index bae270d..5bb6bc0 100644
+index bae270de..5bb6bc0d 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -111,6 +111,13 @@ else()
diff --git a/poky/meta/recipes-devtools/cmake/cmake/0002-cmake-Prevent-the-detection-of-Qt5.patch b/poky/meta/recipes-devtools/cmake/cmake/0002-cmake-Prevent-the-detection-of-Qt5.patch
deleted file mode 100644
index 33db07ccf..000000000
--- a/poky/meta/recipes-devtools/cmake/cmake/0002-cmake-Prevent-the-detection-of-Qt5.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 98abade8cc119e076e4c5f1461c5188f6d49c1d8 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Wed, 17 Jan 2018 10:02:14 -0200
-Subject: [PATCH] cmake: Prevent the detection of Qt5
-
-Organization: O.S. Systems Software LTDA.
-
-CMake doesn't have dependency on qt4/qt5, so these tests usually fail
-but still can cause undeterministic results or build failures (when
-OE_QMAKE_PATH_EXTERNAL_HOST_BINS is undefined or native qmake removed
-while running the test in cmake)
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-
----
- Source/QtDialog/CMakeLists.txt | 2 +-
- Tests/CMakeLists.txt | 2 +-
- Tests/Qt4And5Automoc/CMakeLists.txt | 4 ++--
- Tests/QtAutogen/AutogenGuiTest.cmake | 3 +--
- Tests/QtAutogen/MacOsFW/CMakeLists.txt | 2 +-
- Tests/RunCMake/CMakeLists.txt | 2 +-
- Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake | 2 +-
- 7 files changed, 8 insertions(+), 9 deletions(-)
-
-diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
-index 452a303..d0a9fb4 100644
---- a/Source/QtDialog/CMakeLists.txt
-+++ b/Source/QtDialog/CMakeLists.txt
-@@ -3,7 +3,7 @@
-
- project(QtDialog)
- CMake_OPTIONAL_COMPONENT(cmake-gui)
--find_package(Qt5Widgets REQUIRED)
-+#find_package(Qt5Widgets REQUIRED)
-
- set(CMake_QT_EXTRA_LIBRARIES)
-
-diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
-index 1fb47cb..e022229 100644
---- a/Tests/CMakeLists.txt
-+++ b/Tests/CMakeLists.txt
-@@ -251,7 +251,7 @@ if(BUILD_TESTING)
- set(CMake_TEST_Qt5 1)
- endif()
- if(CMake_TEST_Qt5)
-- find_package(Qt5Widgets QUIET NO_MODULE)
-+ #find_package(Qt5Widgets QUIET NO_MODULE)
- endif()
-
- if(NOT CMake_TEST_EXTERNAL_CMAKE)
-diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt
-index ad74961..a9dd74b 100644
---- a/Tests/Qt4And5Automoc/CMakeLists.txt
-+++ b/Tests/Qt4And5Automoc/CMakeLists.txt
-@@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 2.8.12)
- project(Qt4And5Automoc)
-
- if (QT_REVERSE_FIND_ORDER)
-- find_package(Qt5Core REQUIRED)
-+ #find_package(Qt5Core REQUIRED)
- find_package(Qt4 REQUIRED)
- else()
- find_package(Qt4 REQUIRED)
-- find_package(Qt5Core REQUIRED)
-+ #find_package(Qt5Core REQUIRED)
- endif()
-
- set(CMAKE_AUTOMOC ON)
-diff --git a/Tests/QtAutogen/AutogenGuiTest.cmake b/Tests/QtAutogen/AutogenGuiTest.cmake
-index b76d341..a6e0acb 100644
---- a/Tests/QtAutogen/AutogenGuiTest.cmake
-+++ b/Tests/QtAutogen/AutogenGuiTest.cmake
-@@ -22,8 +22,7 @@ if (QT_TEST_VERSION EQUAL 4)
- endmacro()
-
- elseif(QT_TEST_VERSION EQUAL 5)
--
-- find_package(Qt5Widgets REQUIRED)
-+ #find_package(Qt5Widgets REQUIRED)
-
- set(QT_QTCORE_TARGET Qt5::Core)
- set(QT_LIBRARIES Qt5::Widgets)
-diff --git a/Tests/QtAutogen/MacOsFW/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/CMakeLists.txt
-index c08efc4..87e25d9 100644
---- a/Tests/QtAutogen/MacOsFW/CMakeLists.txt
-+++ b/Tests/QtAutogen/MacOsFW/CMakeLists.txt
-@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
- project(MacOsFW)
- include("../AutogenGuiTest.cmake")
-
--find_package(Qt5Test REQUIRED)
-+#find_package(Qt5Test REQUIRED)
-
- set(CMAKE_CXX_STANDARD 11)
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/bin)
-diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
-index 370dd76..6bacbff 100644
---- a/Tests/RunCMake/CMakeLists.txt
-+++ b/Tests/RunCMake/CMakeLists.txt
-@@ -473,7 +473,7 @@ if(NOT WIN32)
- endif ()
-
- find_package(Qt4 QUIET)
--find_package(Qt5Core QUIET)
-+#find_package(Qt5Core QUIET)
- if (QT4_FOUND AND Qt5Core_FOUND AND NOT Qt5Core_VERSION VERSION_LESS 5.1.0)
- add_RunCMake_test(IncompatibleQt)
- endif()
-diff --git a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
-index 4fccdc4..b76e1e5 100644
---- a/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
-+++ b/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake
-@@ -1,6 +1,6 @@
-
- find_package(Qt4 REQUIRED)
--find_package(Qt5Core REQUIRED)
-+#find_package(Qt5Core REQUIRED)
-
- add_executable(mainexe main.cpp)
- target_link_libraries(mainexe Qt4::QtCore Qt5::Core)
diff --git a/poky/meta/recipes-devtools/cmake/cmake_3.19.5.bb b/poky/meta/recipes-devtools/cmake/cmake_3.20.3.bb
index 64c92b89f..64c92b89f 100644
--- a/poky/meta/recipes-devtools/cmake/cmake_3.19.5.bb
+++ b/poky/meta/recipes-devtools/cmake/cmake_3.20.3.bb
diff --git a/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
index d675af4f8..b63fe5394 100644
--- a/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
+++ b/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -1,25 +1,28 @@
-From 218a4760945be7a404df6515ffbc769c92791f9b Mon Sep 17 00:00:00 2001
+From 6f8f6d151b831b60f6e7892aa9294a6361353c72 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:31:02 +0200
Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
+Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
src/python/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
-index 855127f..dff1d97 100644
+index a31b14d..01fd8ca 100644
--- a/src/python/CMakeLists.txt
+++ b/src/python/CMakeLists.txt
@@ -14,7 +14,7 @@ if (NOT SKBUILD)
- FIND_PACKAGE(PythonInterp 3 EXACT REQUIRED)
+ FIND_PACKAGE(PythonLibs 3 REQUIRED)
endif (NOT SKBUILD)
--EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
-+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('platlib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('platlib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.0.bb b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.3.bb
index e0433806b..481c4bff2 100644
--- a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.0.bb
+++ b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.3.bb
@@ -8,7 +8,7 @@ SRC_URI = "git://github.com/rpm-software-management/createrepo_c \
file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
"
-SRCREV = "909a0636665ed96f97babc3b887f9badc88875c3"
+SRCREV = "8196982f0974c268898a5550d61b374bd58103e2"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/dejagnu/dejagnu_1.6.2.bb b/poky/meta/recipes-devtools/dejagnu/dejagnu_1.6.2.bb
index 0a007bb2c..ce242c359 100644
--- a/poky/meta/recipes-devtools/dejagnu/dejagnu_1.6.2.bb
+++ b/poky/meta/recipes-devtools/dejagnu/dejagnu_1.6.2.bb
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SECTION = "devel"
DEPENDS += "expect-native"
+RDEPENDS_${PN} = "expect"
inherit autotools
diff --git a/poky/meta/recipes-devtools/distcc/distcc_3.3.5.bb b/poky/meta/recipes-devtools/distcc/distcc_3.4.bb
index 5c2644199..3bab6d53e 100644
--- a/poky/meta/recipes-devtools/distcc/distcc_3.3.5.bb
+++ b/poky/meta/recipes-devtools/distcc/distcc_3.4.bb
@@ -20,7 +20,7 @@ SRC_URI = "git://github.com/distcc/distcc.git \
file://distcc \
file://distcc.service \
"
-SRCREV = "8572e2a1af39e69b2a2d74622fed6d2dd7dca9b7"
+SRCREV = "50d821efe99cae82c05be0a4ab3b4035ef0d3883"
S = "${WORKDIR}/git"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
diff --git a/poky/meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch b/poky/meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch
new file mode 100644
index 000000000..99afe0984
--- /dev/null
+++ b/poky/meta/recipes-devtools/dnf/dnf/0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch
@@ -0,0 +1,39 @@
+From 2729c00f0060beab8537a9bebc796b170949093d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 4 May 2021 22:03:30 +0200
+Subject: [PATCH 1/2] dnf/rpm/miscutils.py: fix usage of _()
+
+Specifically:
+- an import of _ was missing
+- _ was reused for a different purpose
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/1762]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dnf/rpm/miscutils.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dnf/rpm/miscutils.py b/dnf/rpm/miscutils.py
+index 235aaf28f..7e33d4c42 100644
+--- a/dnf/rpm/miscutils.py
++++ b/dnf/rpm/miscutils.py
+@@ -22,6 +22,7 @@ import subprocess
+ import logging
+
+ from dnf.i18n import ucd
++from dnf.i18n import _
+ from shutil import which
+
+
+@@ -46,7 +47,7 @@ def _verifyPkgUsingRpmkeys(package, installroot):
+ env={'LC_ALL': 'C'},
+ stdout=subprocess.PIPE,
+ cwd='/') as p:
+- data, _ = p.communicate()
++ data, err = p.communicate()
+ if p.returncode != 0 or data != (package.encode('ascii', 'strict') + b': digests signatures OK\n'):
+ return 0
+ else:
+--
+2.31.1
+
diff --git a/poky/meta/recipes-devtools/dnf/dnf/0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch b/poky/meta/recipes-devtools/dnf/dnf/0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch
new file mode 100644
index 000000000..b4c9e074d
--- /dev/null
+++ b/poky/meta/recipes-devtools/dnf/dnf/0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch
@@ -0,0 +1,37 @@
+From dc14022a99dc017c52c484efb32729729baf854c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 4 May 2021 22:07:32 +0200
+Subject: [PATCH 2/2] dnf/rpm/miscutils.py: do not hardcode /usr/bin/rpmkeys
+
+Some build systems (e.g. Yocto) place a specially configured
+rpmkeys executable elsewhere and set up PATH accordingly;
+it's better to always take it from there.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/dnf/pull/1763]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ dnf/rpm/miscutils.py | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/dnf/rpm/miscutils.py b/dnf/rpm/miscutils.py
+index 7e33d4c42..fcd956db9 100644
+--- a/dnf/rpm/miscutils.py
++++ b/dnf/rpm/miscutils.py
+@@ -30,11 +30,9 @@ logger = logging.getLogger('dnf')
+
+
+ def _verifyPkgUsingRpmkeys(package, installroot):
+- rpmkeys_binary = '/usr/bin/rpmkeys'
+- if not os.path.isfile(rpmkeys_binary):
+- rpmkeys_binary = which("rpmkeys")
+- logger.info(_('Using rpmkeys executable from {path} to verify signature for package: {package}.').format(
+- path=rpmkeys_binary, package=package))
++ rpmkeys_binary = which("rpmkeys")
++ logger.info(_('Using rpmkeys executable from {path} to verify signature for package: {package}.').format(
++ path=rpmkeys_binary, package=package))
+
+ if not os.path.isfile(rpmkeys_binary):
+ logger.critical(_('Cannot find rpmkeys executable to verify signatures.'))
+--
+2.31.1
+
diff --git a/poky/meta/recipes-devtools/dnf/dnf_4.6.0.bb b/poky/meta/recipes-devtools/dnf/dnf_4.7.0.bb
index 6651e6435..7314eaf7b 100644
--- a/poky/meta/recipes-devtools/dnf/dnf_4.6.0.bb
+++ b/poky/meta/recipes-devtools/dnf/dnf_4.7.0.bb
@@ -16,9 +16,11 @@ SRC_URI = "git://github.com/rpm-software-management/dnf.git \
file://0030-Run-python-scripts-using-env.patch \
file://0001-set-python-path-for-completion_helper.patch \
file://0001-dnf-write-the-log-lock-to-root.patch \
+ file://0001-dnf-rpm-miscutils.py-fix-usage-of-_.patch \
+ file://0002-dnf-rpm-miscutils.py-do-not-hardcode-usr-bin-rpmkeys.patch \
"
-SRCREV = "c826d7db401ebf9b59b2fa74570a919e4af2673e"
+SRCREV = "395541fbf8f87f81cdca7567f22be1182e55bea7"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg_1.20.7.1.bb b/poky/meta/recipes-devtools/dpkg/dpkg_1.20.9.bb
index 55ac84f72..60ae3ff73 100644
--- a/poky/meta/recipes-devtools/dpkg/dpkg_1.20.7.1.bb
+++ b/poky/meta/recipes-devtools/dpkg/dpkg_1.20.9.bb
@@ -1,7 +1,7 @@
require dpkg.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-SRC_URI = "git://salsa.debian.org/dpkg-team/dpkg.git;protocol=https;branch=sid \
+SRC_URI = "git://salsa.debian.org/dpkg-team/dpkg.git;protocol=https;branch=1.20.x \
file://noman.patch \
file://remove-tar-no-timestamp.patch \
file://arch_pm.patch \
@@ -19,6 +19,6 @@ SRC_URI = "git://salsa.debian.org/dpkg-team/dpkg.git;protocol=https;branch=sid \
SRC_URI_append_class-native = " file://0001-build.c-ignore-return-of-1-from-tar-cf.patch"
-SRCREV = "667bf0aeb92e0e7bb225ee273569c5e2389083bd"
+SRCREV = "2177b782b16e77e97c9643961a5ae3c639bcc4a3"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch
new file mode 100644
index 000000000..26f972b31
--- /dev/null
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch
@@ -0,0 +1,24 @@
+From 42ba67f9a51ef959e7fd8dac29b5398c121c6976 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Apr 2021 23:45:56 +0200
+Subject: [PATCH] lib/ext2fs/unix_io.c: do unlock on error
+
+Upstream-Status: Submitted [https://github.com/tytso/e2fsprogs/pull/68]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/ext2fs/unix_io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
+index 64eee342..528c2fbc 100644
+--- a/lib/ext2fs/unix_io.c
++++ b/lib/ext2fs/unix_io.c
+@@ -398,7 +398,7 @@ static errcode_t raw_write_blk(io_channel channel,
+ mutex_lock(data, BOUNCE_MTX);
+ if (ext2fs_llseek(data->dev, location, SEEK_SET) < 0) {
+ retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+- goto error_out;
++ goto error_unlock;
+ }
+ actual = write(data->dev, buf, size);
+ mutex_unlock(data, BOUNCE_MTX);
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch
new file mode 100644
index 000000000..2452f7e08
--- /dev/null
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch
@@ -0,0 +1,48 @@
+From 3593063f735f453d43f461292e26913436c11ca3 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sat, 1 May 2021 13:06:12 +0200
+Subject: [PATCH] lib/ext2fs/unix_io.c: revert parts of "libext2fs: fix
+ potential races in unix_io"
+
+Upstream-Status: Submitted [https://github.com/tytso/e2fsprogs/pull/68]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/ext2fs/unix_io.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
+index 528c2fbc..f4916b21 100644
+--- a/lib/ext2fs/unix_io.c
++++ b/lib/ext2fs/unix_io.c
+@@ -311,10 +311,10 @@ bounce_read:
+ size += really_read;
+ goto short_read;
+ }
+- actual = size;
+- if (actual > align_size)
+- actual = align_size;
+- actual -= offset;
++ if ((actual + offset) > align_size)
++ actual = align_size - offset;
++ if (actual > size)
++ actual = size;
+ memcpy(buf, data->bounce + offset, actual);
+
+ really_read += actual;
+@@ -455,9 +455,10 @@ bounce_write:
+ }
+ }
+ actual = size;
+- if (actual > align_size)
+- actual = align_size;
+- actual -= offset;
++ if ((actual + offset) > align_size)
++ actual = align_size - offset;
++ if (actual > size)
++ actual = size;
+ memcpy(((char *)data->bounce) + offset, buf, actual);
+ if (ext2fs_llseek(data->dev, aligned_blk * align_size, SEEK_SET) < 0) {
+ retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+--
+2.24.0
+
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
index d7c07c3b0..e8b2aafbf 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
@@ -1,4 +1,4 @@
-From 9263b8764702f2b26ddaaf80808ebab31a1dba3b Mon Sep 17 00:00:00 2001
+From 8957443bcbea43685c76eb3cbc5009f7fd529283 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Wed, 10 Aug 2016 11:19:44 +0800
Subject: [PATCH] Fix missing check for permission denied.
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
index 88d0ae77c..96eb7f20d 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/quiet-debugfs.patch
@@ -1,4 +1,4 @@
-From 6e4c1644a3a8cacf7c1f5953cc378589bb046d5a Mon Sep 17 00:00:00 2001
+From 3b75308cc75adc249db6ca36e42fe93309b9a018 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Mon, 23 Dec 2013 13:38:34 +0000
Subject: [PATCH] e2fsprogs: silence debugfs
@@ -14,10 +14,10 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
-index 132c5f9d..98063727 100644
+index b67a88bc..76dd5556 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
-@@ -2510,7 +2510,7 @@ static int source_file(const char *cmd_file, int ss_idx)
+@@ -2518,7 +2518,7 @@ static int source_file(const char *cmd_file, int ss_idx)
cp = strchr(buf, '\r');
if (cp)
*cp = 0;
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.1.bb b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb
index be8b67c35..fc022f37d 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.1.bb
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.2.bb
@@ -4,6 +4,8 @@ SRC_URI += "file://remove.ldconfig.call.patch \
file://run-ptest \
file://ptest.patch \
file://mkdir_p.patch \
+ file://0001-lib-ext2fs-unix_io.c-do-unlock-on-error.patch \
+ file://0001-lib-ext2fs-unix_io.c-revert-parts-of-libext2fs-fix-p.patch \
"
SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
@@ -11,7 +13,7 @@ SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permissio
"
-SRCREV = "3114c623f56b0d61f5f34b85f7b23d28f6c848c0"
+SRCREV = "1eea0e2bd9a6760ebad834d5d2cf700fffe5ebe2"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.183.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb
index c0833686d..b1ffbc18b 100644
--- a/poky/meta/recipes-devtools/elfutils/elfutils_0.183.bb
+++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb
@@ -21,7 +21,7 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://run-ptest \
file://ptest.patch \
file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
- file://0001-add-support-for-ipkg-to-debuginfod.cxx.patch \
+ file://0001-debuginfod-debuginfod-client.c-correct-string-format.patch \
"
SRC_URI_append_libc-musl = " \
file://0002-musl-libs.patch \
@@ -29,7 +29,7 @@ SRC_URI_append_libc-musl = " \
file://0004-Fix-error-on-musl.patch \
file://0015-config-eu.am-do-not-use-Werror.patch \
"
-SRC_URI[sha256sum] = "c3637c208d309d58714a51e61e63f1958808fead882e9b607506a29e5474f2c5"
+SRC_URI[sha256sum] = "dc8d3e74ab209465e7f568e1b3bb9a5a142f8656e2b57d10049a73da2ae6b5a6"
inherit autotools gettext ptest pkgconfig
@@ -38,13 +38,13 @@ EXTRA_OECONF = "--program-prefix=eu-"
DEPENDS_BZIP2 = "bzip2-replacement-native"
DEPENDS_BZIP2_class-target = "bzip2"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)}"
PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
PACKAGECONFIG[libdebuginfod] = "--enable-libdebuginfod,--disable-libdebuginfod,curl"
PACKAGECONFIG[debuginfod] = "--enable-debuginfod,--disable-debuginfod,libarchive sqlite3 libmicrohttpd"
-RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
+RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils iproute2-ss bsdtar"
EXTRA_OECONF_append_class-target = " --disable-tests-rpath"
@@ -86,6 +86,7 @@ do_install_ptest() {
cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
cp -r ${B}/config.h ${D}${PTEST_PATH}
cp -r ${B}/backends ${D}${PTEST_PATH}
+ cp -r ${B}/debuginfod ${D}${PTEST_PATH}
sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
fi
@@ -142,6 +143,7 @@ INHIBIT_PACKAGE_STRIP_FILES = "\
${PKGD}${PTEST_PATH}/tests/backtrace-data \
${PKGD}${PTEST_PATH}/tests/backtrace-dwarf \
${PKGD}${PTEST_PATH}/tests/deleted \
+ ${PKGD}${PTEST_PATH}/tests/dwfllines \
${PKGD}${PTEST_PATH}/src/strip \
${PKGD}${PTEST_PATH}/src/addr2line \
${PKGD}${PTEST_PATH}/src/elfcmp \
@@ -159,4 +161,4 @@ INHIBIT_PACKAGE_STRIP_FILES = "\
${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \
"
-PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1"
+PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1 libdebuginfod.so.1"
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-add-support-for-ipkg-to-debuginfod.cxx.patch b/poky/meta/recipes-devtools/elfutils/files/0001-add-support-for-ipkg-to-debuginfod.cxx.patch
deleted file mode 100644
index 5f82afef0..000000000
--- a/poky/meta/recipes-devtools/elfutils/files/0001-add-support-for-ipkg-to-debuginfod.cxx.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 571416bf5b5ef319df6d9c79e46680920487e4a7 Mon Sep 17 00:00:00 2001
-From: dorindabassey <dorindabassey@gmail.com>
-Date: Sat, 19 Dec 2020 01:11:46 +0100
-Subject: [PATCH] add support for ipkg to debuginfod.cxx
-
-added support for ipkg to the debuginfod scanner. 0.182 only supports RPM and scan .debs, with this patch, debuginfod scanner would be able to scan .ipk
-
-Upstream-status: Submitted [https://sourceware.org/pipermail/elfutils-devel/2020q4/003357.html]
-
-Signed-off-by: dorindabassey <dorindabassey@gmail.com>
-
----
- debuginfod/debuginfod.cxx | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
-index b34eacc..a8915f2 100644
---- a/debuginfod/debuginfod.cxx
-+++ b/debuginfod/debuginfod.cxx
-@@ -484,11 +484,13 @@ parse_opt (int key, char *arg,
- {
- scan_archives[".deb"]="dpkg-deb --fsys-tarfile";
- scan_archives[".ddeb"]="dpkg-deb --fsys-tarfile";
-+ scan_archives[".ipk"]="dpkg-deb --fsys-tarfile";
- }
- else
- {
- scan_archives[".deb"]="(bsdtar -O -x -f - data.tar.xz)<";
- scan_archives[".ddeb"]="(bsdtar -O -x -f - data.tar.xz)<";
-+ scan_archives[".ipk"]="(bsdtar -O -x -f - data.tar.xz)<";
- }
- // .udeb too?
- break;
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch b/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch
new file mode 100644
index 000000000..5b225c532
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/0001-debuginfod-debuginfod-client.c-correct-string-format.patch
@@ -0,0 +1,63 @@
+From c3055ce9eb32d0d24abc5cea5e1d231c499312a7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 19 Apr 2021 23:29:10 +0200
+Subject: [PATCH] debuginfod/debuginfod-client.c: correct string format on
+ 32bit arches with 64bit time_t
+
+Use intmax_t to print time_t
+
+time_t is platform dependent and some of architectures e.g.
+x32, riscv32, arc use 64bit time_t even while they are 32bit
+architectures, therefore directly using integer printf formats will not
+work portably, use intmax_t to typecast time_t into printf family of
+functions
+
+Upstream-Status: Pending
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ debuginfod/debuginfod-client.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
+index ee7eda2..083ec2c 100644
+--- a/debuginfod/debuginfod-client.c
++++ b/debuginfod/debuginfod-client.c
+@@ -226,7 +226,7 @@ debuginfod_config_cache(char *config_path,
+ if (fd < 0)
+ return -errno;
+
+- if (dprintf(fd, "%ld", cache_config_default_s) < 0)
++ if (dprintf(fd, "%jd", (intmax_t)cache_config_default_s) < 0)
+ return -errno;
+ }
+
+@@ -234,7 +234,7 @@ debuginfod_config_cache(char *config_path,
+ FILE *config_file = fopen(config_path, "r");
+ if (config_file)
+ {
+- if (fscanf(config_file, "%ld", &cache_config) != 1)
++ if (fscanf(config_file, "%jd", (intmax_t*)(&cache_config)) != 1)
+ cache_config = cache_config_default_s;
+ fclose(config_file);
+ }
+@@ -267,7 +267,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
+ if (fd < 0)
+ return -errno;
+
+- if (dprintf(fd, "%ld", cache_clean_default_interval_s) < 0)
++ if (dprintf(fd, "%jd", (intmax_t)cache_clean_default_interval_s) < 0)
+ return -errno;
+
+ /* init max age config file. */
+@@ -275,7 +275,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
+ && (fd = open(maxage_path, O_CREAT | O_RDWR, DEFFILEMODE)) < 0)
+ return -errno;
+
+- if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0)
++ if (dprintf(fd, "%jd", (intmax_t)cache_default_max_unused_age_s) < 0)
+ return -errno;
+
+ return 0;
diff --git a/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch b/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
index b373940d3..c7360da7a 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
@@ -1,4 +1,4 @@
-From 18c527991deee93170a887b6da622560d5606913 Mon Sep 17 00:00:00 2001
+From 0f4667f0bb4b000d74ade07e90bd690b7217a19d Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 23 Aug 2019 10:18:47 +0800
Subject: [PATCH] musl-libs
@@ -82,7 +82,7 @@ index ecb4d01..edc85e3 100644
#include <stdint.h>
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
-index 6edb27f..f331e3c 100644
+index c0f8dfa..aa78033 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -50,6 +50,7 @@
diff --git a/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch b/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
index 65593be32..2e379cdba 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
@@ -1,4 +1,4 @@
-From 2dab1a02a3cfd80629f3e0f380805a5e58dd0ac3 Mon Sep 17 00:00:00 2001
+From 2f94d488bf3daaa6a8548ee77120fc2506a9bbe3 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 23 Aug 2019 10:19:48 +0800
Subject: [PATCH] musl-utils
@@ -39,7 +39,7 @@ index e117166..8326f6c 100644
/* State of -D/-U flags. */
extern bool arlib_deterministic_output;
diff --git a/src/elfcompress.c b/src/elfcompress.c
-index 1b5b1e3..21c9024 100644
+index 2c6d91b..608646e 100644
--- a/src/elfcompress.c
+++ b/src/elfcompress.c
@@ -37,6 +37,13 @@
@@ -57,7 +57,7 @@ index 1b5b1e3..21c9024 100644
ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
diff --git a/src/strip.c b/src/strip.c
-index 7a5d4e4..81a0d57 100644
+index 70fc8c0..d035d9e 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -46,6 +46,13 @@
@@ -75,7 +75,7 @@ index 7a5d4e4..81a0d57 100644
/* Name and version of program. */
diff --git a/src/unstrip.c b/src/unstrip.c
-index 8580329..d547487 100644
+index e488e81..0e44456 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -52,6 +52,15 @@
diff --git a/poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch b/poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
index 8e1e97041..2fa60c333 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
@@ -1,4 +1,4 @@
-From ce3b1403bd88261b5461a9dcb7d6d6be9185703e Mon Sep 17 00:00:00 2001
+From 72819106d0e5666d172d39c24c19e4e7a3b8be0e Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 1 May 2019 22:15:03 +0100
Subject: [PATCH] Fix error on musl:
@@ -19,7 +19,7 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 file changed, 5 insertions(+)
diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
-index abbdf3f..bd90f4d 100644
+index 197c6a5..3683672 100644
--- a/tests/elfstrmerge.c
+++ b/tests/elfstrmerge.c
@@ -33,6 +33,11 @@
diff --git a/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch b/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
index 205362626..5cd6fffc2 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
@@ -1,4 +1,4 @@
-From dfe11e043cd8ea0b0f0252bcff9f5a6b98c0ecd3 Mon Sep 17 00:00:00 2001
+From cfced441d4a6f2eca51d29c52240275bd6f54e49 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 22 Jun 2020 21:35:16 +0000
Subject: [PATCH] config/eu.am: do not use -Werror
@@ -16,22 +16,22 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 2 deletions(-)
diff --git a/config/eu.am b/config/eu.am
-index 6c3c444..3bc0dc9 100644
+index 2c3e457..8fb0411 100644
--- a/config/eu.am
+++ b/config/eu.am
-@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
- -Wold-style-definition -Wstrict-prototypes -Wtrampolines \
+@@ -89,7 +89,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ -Wold-style-definition -Wstrict-prototypes $(TRAMPOLINES_WARNING) \
$(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
$(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
- $(if $($(*F)_no_Werror),,-Werror) \
$(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
$(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \
-@@ -83,7 +82,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
- -Wtrampolines \
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
+@@ -99,7 +98,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
+ $(TRAMPOLINES_WARNING) \
$(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
$(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
- $(if $($(*F)_no_Werror),,-Werror) \
$(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
$(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \
+ $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
diff --git a/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb b/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb
new file mode 100644
index 000000000..d07d5c436
--- /dev/null
+++ b/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Tools for erofs filesystems"
+LICENSE = "GPLv2+"
+SECTION = "base"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94fa01670a2a8f2d3ab2de15004e0848"
+HOMEPAGE = "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/README"
+
+SRCREV = "2cd522105ea771ec30b269cd4c57e2265a4d6349"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git"
+
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "util-linux-libuuid"
+
+inherit pkgconfig autotools
+
+PACKAGECONFIG ??= "lz4"
+PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
+
+EXTRA_OECONF = "${PACKAGECONFIG_CONFARGS} --disable-fuse"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.7.bb b/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb
index a697b74f9..16fe54096 100644
--- a/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.7.bb
+++ b/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb
@@ -10,7 +10,7 @@ DEPENDS = "util-linux"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \
file://0001-gptcurses-correctly-include-curses.h.patch \
"
-SRC_URI[sha256sum] = "754004b7f85b279287c7ac3c0469b1d7e0eae043a97a2e587b0560ca5f3828c0"
+SRC_URI[sha256sum] = "95d19856f004dabc4b8c342b2612e8d0a9eebdd52004297188369f152e9dc6df"
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/"
UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P<pver>(\d+[\.\-_]*)+)/"
diff --git a/poky/meta/recipes-devtools/file/file_5.39.bb b/poky/meta/recipes-devtools/file/file_5.40.bb
index abaa8149a..ec79839bd 100644
--- a/poky/meta/recipes-devtools/file/file_5.39.bb
+++ b/poky/meta/recipes-devtools/file/file_5.40.bb
@@ -11,10 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdd
DEPENDS = "file-replacement-native"
DEPENDS_class-native = "bzip2-replacement-native"
-SRC_URI = "git://github.com/file/file.git \
- file://0001-src-compress.c-correct-header-define-for-xz-lzma.patch"
+SRC_URI = "git://github.com/file/file.git"
-SRCREV = "87731415de945660b00f02207d8e9d986ef9b82e"
+SRCREV = "f49fda6f52a9477d817dbd9c06afab02daf025f8"
S = "${WORKDIR}/git"
inherit autotools update-alternatives
diff --git a/poky/meta/recipes-devtools/file/files/0001-src-compress.c-correct-header-define-for-xz-lzma.patch b/poky/meta/recipes-devtools/file/files/0001-src-compress.c-correct-header-define-for-xz-lzma.patch
deleted file mode 100644
index f8ba2f615..000000000
--- a/poky/meta/recipes-devtools/file/files/0001-src-compress.c-correct-header-define-for-xz-lzma.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From ffb6ebdb42590cb9f7d3f5177b7b820a9edc4c81 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Sun, 18 Oct 2020 23:40:42 +0200
-Subject: [PATCH] src/compress.c: correct header define for xz/lzma
-
-Upstream-Status: Submitted [https://github.com/file/file/pull/98]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- src/compress.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/compress.c b/src/compress.c
-index 67f21583..9670b72c 100644
---- a/src/compress.c
-+++ b/src/compress.c
-@@ -71,7 +71,7 @@ typedef void (*sig_t)(int);
- #include <bzlib.h>
- #endif
-
--#if defined(HAVE_XZLIB_H) && defined(XZLIBSUPPORT)
-+#if defined(HAVE_LZMA_H) && defined(XZLIBSUPPORT)
- #define BUILTIN_XZLIB
- #include <lzma.h>
- #endif
---
-2.28.0
-
diff --git a/poky/meta/recipes-devtools/flex/flex_2.6.4.bb b/poky/meta/recipes-devtools/flex/flex_2.6.4.bb
index 1d43d2228..54e7e0172 100644
--- a/poky/meta/recipes-devtools/flex/flex_2.6.4.bb
+++ b/poky/meta/recipes-devtools/flex/flex_2.6.4.bb
@@ -3,12 +3,14 @@ DESCRIPTION = "Flex is a fast lexical analyser generator. Flex is a tool for ge
lexical patterns in text."
HOMEPAGE = "http://sourceforge.net/projects/flex/"
SECTION = "devel"
-LICENSE = "BSD-2-Clause"
+LICENSE = "BSD-3-Clause & LGPL-2.0+"
+LICENSE_${PN}-libfl = "BSD-3-Clause"
DEPENDS = "${@bb.utils.contains('PTEST_ENABLED', '1', 'bison-native flex-native', '', d)}"
BBCLASSEXTEND = "native nativesdk"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067 \
+ file://src/gettext.h;beginline=1;endline=17;md5=9c05dda2f58d89b850c399cf22e1a00c"
SRC_URI = "https://github.com/westes/flex/releases/download/v${PV}/flex-${PV}.tar.gz \
file://run-ptest \
diff --git a/poky/meta/recipes-devtools/gcc/gcc-10.2.inc b/poky/meta/recipes-devtools/gcc/gcc-11.1.inc
index c0cd8b31d..c21242af5 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-10.2.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-11.1.inc
@@ -2,11 +2,11 @@ require gcc-common.inc
# Third digit in PV should be incremented after a minor release
-PV = "10.2.0"
+PV = "11.1.0"
# BINV should be incremented to a revision after a minor gcc release
-BINV = "10.2.0"
+BINV = "11.1.1"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
@@ -23,9 +23,12 @@ LIC_FILES_CHKSUM = "\
file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
"
-BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz"
-#RELEASE ?= "93a49d2d2292893b9b7f38132df949c70942838c"
+#RELEASE ?= "5b2ac9b40c325e9209c0bd55955db84aad4a0cc5"
#BASEURI ?= "https://github.com/gcc-mirror/gcc/archive/${RELEASE}.zip;downloadfilename=gcc-${PV}-${RELEASE}.zip"
+
+BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz \
+ http://downloads.yoctoproject.org/mirror/sources/gcc-11.1.0-9ee61d2b51df012c659359873637cc2162ecccf3.patch;apply=yes;name=backports \
+ "
SRC_URI = "\
${BASEURI} \
file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
@@ -65,15 +68,16 @@ SRC_URI = "\
file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
file://0036-mingw32-Enable-operation_not_supported.patch \
file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \
- file://0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch \
- file://0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch \
- file://0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch \
- file://0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch \
- file://0001-libatomic-libgomp-libitc-Fix-bootstrap-PR70454.patch \
+ file://0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch \
+ file://0038-arc-Update-64bit-move-split-patterns.patch \
+ file://0039-arc-Fix-u-maddhisi-patterns.patch \
+ file://0040-arc-Update-doloop_end-patterns.patch \
"
-SRC_URI[sha256sum] = "b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c"
+SRC_URI[sha256sum] = "4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf"
+SRC_URI[backports.sha256sum] = "69274bebd6c069a13443d4af61070e854740a639ec4d66eedf3e80070363587b"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+
# For dev release snapshotting
#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${RELEASE}"
#B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc b/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
index a64c4caf0..dc7f458b2 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -40,6 +40,7 @@ EXTRA_OECONF = "\
${@get_gcc_mips_plt_setting(bb, d)} \
${@get_gcc_ppc_plt_settings(bb, d)} \
${@get_gcc_multiarch_setting(bb, d)} \
+ --enable-standard-branch-protection \
"
# glibc version is a minimum controlling whether features are enabled.
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index d3875c94d..1872faee1 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -75,6 +75,7 @@ FILES_${PN} = "\
${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \
+ ${libdir}/bfd-plugins/*.so \
${includedir}/c++/${BINV} \
${prefix}/${TARGET_SYS}/bin/* \
${prefix}/${TARGET_SYS}/lib/* \
@@ -92,6 +93,8 @@ EXEEXT = ""
# Compute how to get from libexecdir to bindir in python (easier than shell)
BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
+# linker plugin path
+LIBRELPATH = "${@os.path.relpath(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${libdir}/bfd-plugins"))}"
do_install () {
( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h )
@@ -121,7 +124,7 @@ do_install () {
dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
install -d $dest
suffix=${EXEEXT}
- 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 g77 gcc cpp gfortran; do
if [ "$t" = "g77" -o "$t" = "gfortran" ] && [ ! -e ${D}${bindir}/${TARGET_PREFIX}$t$suffix ]; then
continue
fi
@@ -136,8 +139,12 @@ do_install () {
cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
+ # install LTO linker plugins where binutils tools can find it
+ install -d ${D}${libdir}/bfd-plugins
+ ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
+
chown -R root:root ${D}
-
+
cross_canadian_bindirlinks
for i in linux ${CANADIANEXTRAOS}
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_10.2.bb b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_11.1.bb
index bf53c5cd7..bf53c5cd7 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_11.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross.inc b/poky/meta/recipes-devtools/gcc/gcc-cross.inc
index e08807afa..dca4036ab 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -83,6 +83,8 @@ INHIBIT_PACKAGE_STRIP = "1"
# Compute how to get from libexecdir to bindir in python (easier than shell)
BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
+# linker plugin path
+LIBRELPATH = "${@os.path.relpath(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/bfd-plugins"))}"
do_install () {
( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h )
@@ -92,7 +94,7 @@ do_install () {
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.
+ # gfortran is fully backwards compatible. This is a safe and practical solution.
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"
@@ -118,6 +120,10 @@ do_install () {
cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
+
+ # install LTO linker plugins where binutils tools can find it
+ install -d ${D}${libdir}/bfd-plugins
+ ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
}
do_package[noexec] = "1"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-cross_10.2.bb b/poky/meta/recipes-devtools/gcc/gcc-cross_11.1.bb
index b43cca0c5..b43cca0c5 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-cross_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-cross_11.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-crosssdk_10.2.bb b/poky/meta/recipes-devtools/gcc/gcc-crosssdk_11.1.bb
index 40a6c4fef..40a6c4fef 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-crosssdk_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-crosssdk_11.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
index 9dcce2653..59d9a2468 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -49,16 +49,18 @@ RUNTIMETARGET_libc-newlib = "libstdc++-v3"
# libiberty
# libgfortran needs separate recipe due to libquadmath dependency
-SLIB = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-SLIB_NEW = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+# Relative path to be repaced into debug info
+REL_S = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
DEBUG_PREFIX_MAP_class-target = " \
-fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \
-fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
- -fdebug-prefix-map=${SLIB}=${SLIB_NEW} \
- -fdebug-prefix-map=${SLIB}/include=${SLIB_NEW}/libstdc++-v3/../include \
- -fdebug-prefix-map=${SLIB}/libiberty=${SLIB_NEW}/libstdc++-v3/../libiberty \
- -fdebug-prefix-map=${B}=${SLIB_NEW} \
+ -fdebug-prefix-map=${S}=${REL_S} \
+ -fdebug-prefix-map=${S}/include=${REL_S}/libstdc++-v3/../include \
+ -fdebug-prefix-map=${S}/libiberty=${REL_S}/libstdc++-v3/../libiberty \
+ -fdebug-prefix-map=${S}/libgcc=${REL_S}/libstdc++-v3/../libgcc \
+ -fdebug-prefix-map=${B}=${REL_S} \
+ -ffile-prefix-map=${B}/${HOST_SYS}/libstdc++-v3/include=${includedir}/c++/${BINV} \
"
do_configure () {
diff --git a/poky/meta/recipes-devtools/gcc/gcc-runtime_10.2.bb b/poky/meta/recipes-devtools/gcc/gcc-runtime_11.1.bb
index dd430b57e..dd430b57e 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-runtime_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-runtime_11.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index d0348c481..59e91daae 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -90,7 +90,9 @@ FILES_libasan-dev += "\
${libdir}/libhwasan.so \
${libdir}/libasan.la \
"
-FILES_libasan-staticdev += "${libdir}/libasan.a"
+FILES_libasan-staticdev += "${libdir}/libasan.a \
+ ${libdir}/libhwasan.a \
+"
FILES_libubsan += "${libdir}/libubsan.so.*"
FILES_libubsan-dev += "\
diff --git a/poky/meta/recipes-devtools/gcc/gcc-sanitizers_10.2.bb b/poky/meta/recipes-devtools/gcc/gcc-sanitizers_11.1.bb
index f3c705811..f3c705811 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-sanitizers_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-sanitizers_11.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-source_10.2.bb b/poky/meta/recipes-devtools/gcc/gcc-source_11.1.bb
index b890fa33e..b890fa33e 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-source_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc-source_11.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/gcc-target.inc b/poky/meta/recipes-devtools/gcc/gcc-target.inc
index 164a669aa..0ee3e83d4 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-target.inc
@@ -54,6 +54,7 @@ FILES_${PN} = "\
${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
${gcclibdir}/${TARGET_SYS}/${BINV}/include \
${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
+ ${libdir}/bfd-plugins/*.so \
"
INSANE_SKIP_${PN} += "dev-so"
RRECOMMENDS_${PN} += "\
@@ -215,7 +216,8 @@ do_install () {
ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
ln -sf g++ c++
ln -sf gcc cc
-
+ install -d ${D}${libdir}/bfd-plugins
+ ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so
chown -R root:root ${D}
}
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch
deleted file mode 100644
index c060accd9..000000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From fd2ec4542fd2975e6d3f2f1c1a2639945a84f9e1 Mon Sep 17 00:00:00 2001
-From: Jakub Jelinek <jakub@redhat.com>
-Date: Mon, 3 Aug 2020 22:55:28 +0200
-Subject: [PATCH] aarch64: Fix up __aarch64_cas16_acq_rel fallback
-
-As mentioned in the PR, the fallback path when LSE is unavailable writes
-incorrect registers to the memory if the previous content compares equal
-to x0, x1 - it writes copy of x0, x1 from the start of function, but it
-should write x2, x3.
-
-2020-08-03 Jakub Jelinek <jakub@redhat.com>
-
- PR target/96402
- * config/aarch64/lse.S (__aarch64_cas16_acq_rel): Use x2, x3 instead
- of x(tmp0), x(tmp1) in STXP arguments.
-
- * gcc.target/aarch64/pr96402.c: New test.
-
-(cherry picked from commit 90b43856fdff7d96d93d22970eca8a86c56e0ddc)
----
- gcc/testsuite/gcc.target/aarch64/pr96402.c | 16 ++++++++++++++++
- libgcc/config/aarch64/lse.S | 2 +-
- 2 files changed, 17 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.target/aarch64/pr96402.c
-
-diff --git a/gcc/testsuite/gcc.target/aarch64/pr96402.c b/gcc/testsuite/gcc.target/aarch64/pr96402.c
-new file mode 100644
-index 00000000000..fa2dddfac15
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/aarch64/pr96402.c
-@@ -0,0 +1,16 @@
-+/* PR target/96402 */
-+/* { dg-do run { target int128 } } */
-+/* { dg-options "-moutline-atomics" } */
-+
-+int
-+main ()
-+{
-+ __int128 a = 0;
-+ __sync_val_compare_and_swap (&a, (__int128) 0, (__int128) 1);
-+ if (a != 1)
-+ __builtin_abort ();
-+ __sync_val_compare_and_swap (&a, (__int128) 1, (((__int128) 0xdeadbeeffeedbac1ULL) << 64) | 0xabadcafe00c0ffeeULL);
-+ if (a != ((((__int128) 0xdeadbeeffeedbac1ULL) << 64) | 0xabadcafe00c0ffeeULL))
-+ __builtin_abort ();
-+ return 0;
-+}
-diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S
-index 64691c601c1..c8fbfbce4fd 100644
---- a/libgcc/config/aarch64/lse.S
-+++ b/libgcc/config/aarch64/lse.S
-@@ -203,7 +203,7 @@ STARTFN NAME(cas)
- cmp x0, x(tmp0)
- ccmp x1, x(tmp1), #0, eq
- bne 1f
-- STXP w(tmp2), x(tmp0), x(tmp1), [x4]
-+ STXP w(tmp2), x2, x3, [x4]
- cbnz w(tmp2), 0b
- 1: ret
-
---
-2.26.2
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch
deleted file mode 100644
index 73de4c759..000000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-CVE: CVE-2020-13844
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 1ff243934ac443b5f58cd02a5012ce58ecc31fb2 Mon Sep 17 00:00:00 2001
-From: Matthew Malcomson <matthew.malcomson@arm.com>
-Date: Thu, 9 Jul 2020 09:11:58 +0100
-Subject: [PATCH 1/3] aarch64: New Straight Line Speculation (SLS) mitigation
- flags
-
-Here we introduce the flags that will be used for straight line speculation.
-
-The new flag introduced is `-mharden-sls=`.
-This flag can take arguments of `none`, `all`, or a comma seperated list of one
-or more of `retbr` or `blr`.
-`none` indicates no special mitigation of the straight line speculation
-vulnerability.
-`all` requests all mitigations currently implemented.
-`retbr` requests that the RET and BR instructions have a speculation barrier
-inserted after them.
-`blr` requests that BLR instructions are replaced by a BL to a function stub
-using a BR with a speculation barrier after it.
-
-Setting this on a per-function basis using attributes or the like is not
-enabled, but may be in the future.
-
-gcc/ChangeLog:
-
-2020-06-02 Matthew Malcomson <matthew.malcomson@arm.com>
-
- * config/aarch64/aarch64-protos.h (aarch64_harden_sls_retbr_p):
- New.
- (aarch64_harden_sls_blr_p): New.
- * config/aarch64/aarch64.c (enum aarch64_sls_hardening_type):
- New.
- (aarch64_harden_sls_retbr_p): New.
- (aarch64_harden_sls_blr_p): New.
- (aarch64_validate_sls_mitigation): New.
- (aarch64_override_options): Parse options for SLS mitigation.
- * config/aarch64/aarch64.opt (-mharden-sls): New option.
- * doc/invoke.texi: Document new option.
----
- gcc/config/aarch64/aarch64-protos.h | 3 ++
- gcc/config/aarch64/aarch64.c | 76 +++++++++++++++++++++++++++++++++++++
- gcc/config/aarch64/aarch64.opt | 4 ++
- gcc/doc/invoke.texi | 12 ++++++
- 4 files changed, 95 insertions(+)
-
-diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
-index 723d9ba..eb5f4b4 100644
---- a/gcc/config/aarch64/aarch64-protos.h
-+++ b/gcc/config/aarch64/aarch64-protos.h
-@@ -781,4 +781,7 @@ extern const atomic_ool_names aarch64_ool_ldeor_names;
-
- tree aarch64_resolve_overloaded_builtin_general (location_t, tree, void *);
-
-+extern bool aarch64_harden_sls_retbr_p (void);
-+extern bool aarch64_harden_sls_blr_p (void);
-+
- #endif /* GCC_AARCH64_PROTOS_H */
-diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
-index b86434a..437a9cf 100644
---- a/gcc/config/aarch64/aarch64.c
-+++ b/gcc/config/aarch64/aarch64.c
-@@ -14494,6 +14494,79 @@ aarch64_validate_mcpu (const char *str, const struct processor **res,
- return false;
- }
-
-+/* Straight line speculation indicators. */
-+enum aarch64_sls_hardening_type
-+{
-+ SLS_NONE = 0,
-+ SLS_RETBR = 1,
-+ SLS_BLR = 2,
-+ SLS_ALL = 3,
-+};
-+static enum aarch64_sls_hardening_type aarch64_sls_hardening;
-+
-+/* Return whether we should mitigatate Straight Line Speculation for the RET
-+ and BR instructions. */
-+bool
-+aarch64_harden_sls_retbr_p (void)
-+{
-+ return aarch64_sls_hardening & SLS_RETBR;
-+}
-+
-+/* Return whether we should mitigatate Straight Line Speculation for the BLR
-+ instruction. */
-+bool
-+aarch64_harden_sls_blr_p (void)
-+{
-+ return aarch64_sls_hardening & SLS_BLR;
-+}
-+
-+/* As of yet we only allow setting these options globally, in the future we may
-+ allow setting them per function. */
-+static void
-+aarch64_validate_sls_mitigation (const char *const_str)
-+{
-+ char *token_save = NULL;
-+ char *str = NULL;
-+
-+ if (strcmp (const_str, "none") == 0)
-+ {
-+ aarch64_sls_hardening = SLS_NONE;
-+ return;
-+ }
-+ if (strcmp (const_str, "all") == 0)
-+ {
-+ aarch64_sls_hardening = SLS_ALL;
-+ return;
-+ }
-+
-+ char *str_root = xstrdup (const_str);
-+ str = strtok_r (str_root, ",", &token_save);
-+ if (!str)
-+ error ("invalid argument given to %<-mharden-sls=%>");
-+
-+ int temp = SLS_NONE;
-+ while (str)
-+ {
-+ if (strcmp (str, "blr") == 0)
-+ temp |= SLS_BLR;
-+ else if (strcmp (str, "retbr") == 0)
-+ temp |= SLS_RETBR;
-+ else if (strcmp (str, "none") == 0 || strcmp (str, "all") == 0)
-+ {
-+ error ("%<%s%> must be by itself for %<-mharden-sls=%>", str);
-+ break;
-+ }
-+ else
-+ {
-+ error ("invalid argument %<%s%> for %<-mharden-sls=%>", str);
-+ break;
-+ }
-+ str = strtok_r (NULL, ",", &token_save);
-+ }
-+ aarch64_sls_hardening = (aarch64_sls_hardening_type) temp;
-+ free (str_root);
-+}
-+
- /* Parses CONST_STR for branch protection features specified in
- aarch64_branch_protect_types, and set any global variables required. Returns
- the parsing result and assigns LAST_STR to the last processed token from
-@@ -14738,6 +14811,9 @@ aarch64_override_options (void)
- selected_arch = NULL;
- selected_tune = NULL;
-
-+ if (aarch64_harden_sls_string)
-+ aarch64_validate_sls_mitigation (aarch64_harden_sls_string);
-+
- if (aarch64_branch_protection_string)
- aarch64_validate_mbranch_protection (aarch64_branch_protection_string);
-
-diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt
-index d99d14c..5170361 100644
---- a/gcc/config/aarch64/aarch64.opt
-+++ b/gcc/config/aarch64/aarch64.opt
-@@ -71,6 +71,10 @@ mgeneral-regs-only
- Target Report RejectNegative Mask(GENERAL_REGS_ONLY) Save
- Generate code which uses only the general registers.
-
-+mharden-sls=
-+Target RejectNegative Joined Var(aarch64_harden_sls_string)
-+Generate code to mitigate against straight line speculation.
-+
- mfix-cortex-a53-835769
- Target Report Var(aarch64_fix_a53_err835769) Init(2) Save
- Workaround for ARM Cortex-A53 Erratum number 835769.
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index a2794a6..bd5b77a 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -696,6 +696,7 @@ Objective-C and Objective-C++ Dialects}.
- -msign-return-address=@var{scope} @gol
- -mbranch-protection=@var{none}|@var{standard}|@var{pac-ret}[+@var{leaf}
- +@var{b-key}]|@var{bti} @gol
-+-mharden-sls=@var{opts} @gol
- -march=@var{name} -mcpu=@var{name} -mtune=@var{name} @gol
- -moverride=@var{string} -mverbose-cost-dump @gol
- -mstack-protector-guard=@var{guard} -mstack-protector-guard-reg=@var{sysreg} @gol
-@@ -17065,6 +17066,17 @@ functions. The optional argument @samp{b-key} can be used to sign the functions
- with the B-key instead of the A-key.
- @samp{bti} turns on branch target identification mechanism.
-
-+@item -mharden-sls=@var{opts}
-+@opindex mharden-sls
-+Enable compiler hardening against straight line speculation (SLS).
-+@var{opts} is a comma-separated list of the following options:
-+@table @samp
-+@item retbr
-+@item blr
-+@end table
-+In addition, @samp{-mharden-sls=all} enables all SLS hardening while
-+@samp{-mharden-sls=none} disables all SLS hardening.
-+
- @item -msve-vector-bits=@var{bits}
- @opindex msve-vector-bits
- Specify the number of bits in an SVE vector register. This option only has
---
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
index 82ae9f8d1..0a108ee51 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -1,4 +1,4 @@
-From f2a5dc3bc7e5727d6bf77e1c6e8a31a6f000883d Mon Sep 17 00:00:00 2001
+From 368eaf1846733a9920c7cf5bc547a377e7167785 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] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
@@ -12,10 +12,10 @@ Upstream-Status: Inappropriate [embedded specific]
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
-index 4cc938ebb7d..226a64939d1 100755
+index 504f6410274..bcebad264ec 100755
--- a/configure
+++ b/configure
-@@ -7722,7 +7722,7 @@ fi
+@@ -9728,7 +9728,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 4cc938ebb7d..226a64939d1 100755
*" newlib "*)
case " $target_configargs " in
diff --git a/configure.ac b/configure.ac
-index c78d9cbea62..f024f4bac9b 100644
+index 088e735c5db..1289fe08760 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -3227,7 +3227,7 @@ fi
+@@ -3240,7 +3240,7 @@ fi
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache ${target_configargs}"
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-libatomic-libgomp-libitc-Fix-bootstrap-PR70454.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-libatomic-libgomp-libitc-Fix-bootstrap-PR70454.patch
deleted file mode 100644
index addecb4bd..000000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0001-libatomic-libgomp-libitc-Fix-bootstrap-PR70454.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-From 2824d2418605e092899117e77bc8ebf332321807 Mon Sep 17 00:00:00 2001
-From: Jakub Jelinek <jakub@redhat.com>
-Date: Fri, 15 Jan 2021 13:12:59 +0100
-Subject: [PATCH] libatomic, libgomp, libitc: Fix bootstrap [PR70454]
-
-The recent changes to error on mixing -march=i386 and -fcf-protection broke
-bootstrap. This patch changes lib{atomic,gomp,itm} configury, so that it
-only adds -march=i486 to flags if really needed (i.e. when 486 or later isn't
-on by default already). Similarly, it will not use ifuncs if -mcx16
-(or -march=i686 for 32-bit) is on by default.
-
-2021-01-15 Jakub Jelinek <jakub@redhat.com>
-
- PR target/70454
-libatomic/
- * configure.tgt: For i?86 and x86_64 determine if -march=i486 needs to
- be added through preprocessor check on
- __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4. Determine if try_ifunc is needed
- based on preprocessor check on __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
- or __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8.
-libgomp/
- * configure.tgt: For i?86 and x86_64 determine if -march=i486 needs to
- be added through preprocessor check on
- __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4.
-libitm/
- * configure.tgt: For i?86 and x86_64 determine if -march=i486 needs to
- be added through preprocessor check on
- __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4.
-
-Upstream-Status: Backport [master post 10.x release]
----
- libatomic/configure.tgt | 56 +++++++++++++++++++++++------------------
- libgomp/configure.tgt | 35 +++++++++++---------------
- libitm/configure.tgt | 37 +++++++++++++--------------
- 3 files changed, 64 insertions(+), 64 deletions(-)
-
-diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
-index 5dd0926d20..6ea082a29b 100644
---- a/libatomic/configure.tgt
-+++ b/libatomic/configure.tgt
-@@ -81,32 +81,40 @@ case "${target_cpu}" in
- ARCH=sparc
- ;;
-
-- i[3456]86)
-- case " ${CC} ${CFLAGS} " in
-- *" -m64 "*|*" -mx32 "*)
-- ;;
-- *)
-- if test -z "$with_arch"; then
-- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
-- XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
-- fi
-- esac
-- ARCH=x86
-- # ??? Detect when -march=i686 is already enabled.
-- try_ifunc=yes
-- ;;
-- x86_64)
-- case " ${CC} ${CFLAGS} " in
-- *" -m32 "*)
-+ i[3456]86 | x86_64)
-+ cat > conftestx.c <<EOF
-+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
-+#error need -march=i486
-+#endif
-+EOF
-+ if ${CC} ${CFLAGS} -E conftestx.c > /dev/null 2>&1; then
-+ :
-+ else
-+ if test "${target_cpu}" = x86_64; then
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
-- XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
-- ;;
-- *)
-- ;;
-- esac
-+ else
-+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
-+ fi
-+ XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
-+ fi
-+ cat > conftestx.c <<EOF
-+#ifdef __x86_64__
-+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
-+#error need -mcx16
-+#endif
-+#else
-+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
-+#error need -march=i686
-+#endif
-+#endif
-+EOF
-+ if ${CC} ${CFLAGS} -E conftestx.c > /dev/null 2>&1; then
-+ try_ifunc=no
-+ else
-+ try_ifunc=yes
-+ fi
-+ rm -f conftestx.c
- ARCH=x86
-- # ??? Detect when -mcx16 is already enabled.
-- try_ifunc=yes
- ;;
-
- *) ARCH="${target_cpu}" ;;
-diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
-index 4790a31e39..761ef2a7db 100644
---- a/libgomp/configure.tgt
-+++ b/libgomp/configure.tgt
-@@ -70,28 +70,23 @@ if test x$enable_linux_futex = xyes; then
- ;;
-
- # Note that bare i386 is not included here. We need cmpxchg.
-- i[456]86-*-linux*)
-+ i[456]86-*-linux* | x86_64-*-linux*)
- config_path="linux/x86 linux posix"
-- case " ${CC} ${CFLAGS} " in
-- *" -m64 "*|*" -mx32 "*)
-- ;;
-- *)
-- if test -z "$with_arch"; then
-- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
-- fi
-- esac
-- ;;
--
-- # Similar jiggery-pokery for x86_64 multilibs, except here we
-- # can't rely on the --with-arch configure option, since that
-- # applies to the 64-bit side.
-- x86_64-*-linux*)
-- config_path="linux/x86 linux posix"
-- case " ${CC} ${CFLAGS} " in
-- *" -m32 "*)
-+ cat > conftestx.c <<EOF
-+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
-+#error need -march=i486
-+#endif
-+EOF
-+ if ${CC} ${CFLAGS} -E conftestx.c > /dev/null 2>&1; then
-+ :
-+ else
-+ if test "${target_cpu}" = x86_64; then
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
-- ;;
-- esac
-+ else
-+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
-+ fi
-+ fi
-+ rm -f conftestx.c
- ;;
-
- # Note that sparcv7 and sparcv8 is not included here. We need cas.
-diff --git a/libitm/configure.tgt b/libitm/configure.tgt
-index 04109160e9..ca62bac627 100644
---- a/libitm/configure.tgt
-+++ b/libitm/configure.tgt
-@@ -58,16 +58,23 @@ case "${target_cpu}" in
-
- arm*) ARCH=arm ;;
-
-- i[3456]86)
-- case " ${CC} ${CFLAGS} " in
-- *" -m64 "*|*" -mx32 "*)
-- ;;
-- *)
-- if test -z "$with_arch"; then
-- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
-- XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
-- fi
-- esac
-+ i[3456]86 | x86_64)
-+ cat > conftestx.c <<EOF
-+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
-+#error need -march=i486
-+#endif
-+EOF
-+ if ${CC} ${CFLAGS} -E conftestx.c > /dev/null 2>&1; then
-+ :
-+ else
-+ if test "${target_cpu}" = x86_64; then
-+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
-+ else
-+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
-+ fi
-+ XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
-+ fi
-+ rm -f conftestx.c
- XCFLAGS="${XCFLAGS} -mrtm"
- ARCH=x86
- ;;
-@@ -102,16 +109,6 @@ case "${target_cpu}" in
- ARCH=sparc
- ;;
-
-- x86_64)
-- case " ${CC} ${CFLAGS} " in
-- *" -m32 "*)
-- XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
-- XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
-- ;;
-- esac
-- XCFLAGS="${XCFLAGS} -mrtm"
-- ARCH=x86
-- ;;
- s390|s390x)
- XCFLAGS="${XCFLAGS} -mzarch -mhtm"
- ARCH=s390
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch
new file mode 100644
index 000000000..d82f533cb
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch
@@ -0,0 +1,57 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From ad4c21f0f59b52357019148ec94d767aa2acd8f2 Mon Sep 17 00:00:00 2001
+From: Jonathan Wakely <jwakely@redhat.com>
+Date: Tue, 1 Jun 2021 11:00:16 +0100
+Subject: [PATCH] libstdc++: Fix installation of python hooks [PR 99453]
+
+When no shared library is installed, the new code to determine the name
+of the -gdb.py file yields an empty string. Use the name of the static
+library in that case.
+
+libstdc++-v3/ChangeLog:
+
+ PR libstdc++/99453
+ * python/Makefile.am: Use archive name for printer hook if no
+ dynamic library name is available.
+ * python/Makefile.in: Regenerate.
+
+(cherry picked from commit 9f7bc160b4a0f27dce248d1226e3ae7104b0e67b)
+---
+ libstdc++-v3/python/Makefile.am | 4 ++++
+ libstdc++-v3/python/Makefile.in | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am
+index 0c2b207b86e..8efefa5725c 100644
+--- a/libstdc++-v3/python/Makefile.am
++++ b/libstdc++-v3/python/Makefile.am
+@@ -48,5 +48,9 @@ install-data-local: gdb.py
+ ## the correct name.
+ @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
+ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
++ if [ -z "$$libname" ]; then \
++ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
++ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
++ fi; \
+ echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
+ $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
+diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
+index 2efe0b96a19..9904a9197de 100644
+--- a/libstdc++-v3/python/Makefile.in
++++ b/libstdc++-v3/python/Makefile.in
+@@ -609,6 +609,10 @@ install-data-local: gdb.py
+ @$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
+ @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
+ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
++ if [ -z "$$libname" ]; then \
++ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
++ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
++ fi; \
+ echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
+ $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
+
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch b/poky/meta/recipes-devtools/gcc/gcc/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch
deleted file mode 100644
index 823cc8b66..000000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch
+++ /dev/null
@@ -1,607 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From b1204d16e1ec96a4aa89e44de8990e2499ffdb22 Mon Sep 17 00:00:00 2001
-From: Matthew Malcomson <matthew.malcomson@arm.com>
-Date: Thu, 9 Jul 2020 09:11:59 +0100
-Subject: [PATCH 2/3] aarch64: Introduce SLS mitigation for RET and BR
- instructions
-
-Instructions following RET or BR are not necessarily executed. In order
-to avoid speculation past RET and BR we can simply append a speculation
-barrier.
-
-Since these speculation barriers will not be architecturally executed,
-they are not expected to add a high performance penalty.
-
-The speculation barrier is to be SB when targeting architectures which
-have this enabled, and DSB SY + ISB otherwise.
-
-We add tests for each of the cases where such an instruction was seen.
-
-This is implemented by modifying each machine description pattern that
-emits either a RET or a BR instruction. We choose not to use something
-like `TARGET_ASM_FUNCTION_EPILOGUE` since it does not affect the
-`indirect_jump`, `jump`, `sibcall_insn` and `sibcall_value_insn`
-patterns and we find it preferable to implement the functionality in the
-same way for every pattern.
-
-There is one particular case which is slightly tricky. The
-implementation of TARGET_ASM_TRAMPOLINE_TEMPLATE uses a BR which needs
-to be mitigated against. The trampoline template is used *once* per
-compilation unit, and the TRAMPOLINE_SIZE is exposed to the user via the
-builtin macro __LIBGCC_TRAMPOLINE_SIZE__.
-In the future we may implement function specific attributes to turn on
-and off hardening on a per-function basis.
-The fixed nature of the trampoline described above implies it will be
-safer to ensure this speculation barrier is always used.
-
-Testing:
- Bootstrap and regtest done on aarch64-none-linux
- Used a temporary hack(1) to use these options on every test in the
- testsuite and a script to check that the output never emitted an
- unmitigated RET or BR.
-
-1) Temporary hack was a change to the testsuite to always use
-`-save-temps` and run a script on the assembly output of those
-compilations which produced one to ensure every RET or BR is immediately
-followed by a speculation barrier.
-
-gcc/ChangeLog:
-
- * config/aarch64/aarch64-protos.h (aarch64_sls_barrier): New.
- * config/aarch64/aarch64.c (aarch64_output_casesi): Emit
- speculation barrier after BR instruction if needs be.
- (aarch64_trampoline_init): Handle ptr_mode value & adjust size
- of code copied.
- (aarch64_sls_barrier): New.
- (aarch64_asm_trampoline_template): Add needed barriers.
- * config/aarch64/aarch64.h (AARCH64_ISA_SB): New.
- (TARGET_SB): New.
- (TRAMPOLINE_SIZE): Account for barrier.
- * config/aarch64/aarch64.md (indirect_jump, *casesi_dispatch,
- simple_return, *do_return, *sibcall_insn, *sibcall_value_insn):
- Emit barrier if needs be, also account for possible barrier using
- "sls_length" attribute.
- (sls_length): New attribute.
- (length): Determine default using any non-default sls_length
- value.
-
-gcc/testsuite/ChangeLog:
-
- * gcc.target/aarch64/sls-mitigation/sls-miti-retbr.c: New test.
- * gcc.target/aarch64/sls-mitigation/sls-miti-retbr-pacret.c:
- New test.
- * gcc.target/aarch64/sls-mitigation/sls-mitigation.exp: New file.
- * lib/target-supports.exp (check_effective_target_aarch64_asm_sb_ok):
- New proc.
----
- gcc/config/aarch64/aarch64-protos.h | 1 +
- gcc/config/aarch64/aarch64.c | 41 ++++++-
- gcc/config/aarch64/aarch64.h | 10 +-
- gcc/config/aarch64/aarch64.md | 76 +++++++++----
- .../aarch64/sls-mitigation/sls-miti-retbr-pacret.c | 21 ++++
- .../aarch64/sls-mitigation/sls-miti-retbr.c | 119 +++++++++++++++++++++
- .../aarch64/sls-mitigation/sls-mitigation.exp | 73 +++++++++++++
- gcc/testsuite/lib/target-supports.exp | 2 +-
- 8 files changed, 318 insertions(+), 25 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-retbr-pacret.c
- create mode 100644 gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-retbr.c
- create mode 100644 gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp
-
-diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
-index eb5f4b4..ee0ffde 100644
---- a/gcc/config/aarch64/aarch64-protos.h
-+++ b/gcc/config/aarch64/aarch64-protos.h
-@@ -781,6 +781,7 @@ extern const atomic_ool_names aarch64_ool_ldeor_names;
-
- tree aarch64_resolve_overloaded_builtin_general (location_t, tree, void *);
-
-+const char *aarch64_sls_barrier (int);
- extern bool aarch64_harden_sls_retbr_p (void);
- extern bool aarch64_harden_sls_blr_p (void);
-
-diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
-index 437a9cf..44e3d1f 100644
---- a/gcc/config/aarch64/aarch64.c
-+++ b/gcc/config/aarch64/aarch64.c
-@@ -10852,8 +10852,8 @@ aarch64_return_addr (int count, rtx frame ATTRIBUTE_UNUSED)
- static void
- aarch64_asm_trampoline_template (FILE *f)
- {
-- int offset1 = 16;
-- int offset2 = 20;
-+ int offset1 = 24;
-+ int offset2 = 28;
-
- if (aarch64_bti_enabled ())
- {
-@@ -10876,6 +10876,17 @@ aarch64_asm_trampoline_template (FILE *f)
- }
- asm_fprintf (f, "\tbr\t%s\n", reg_names [IP1_REGNUM]);
-
-+ /* We always emit a speculation barrier.
-+ This is because the same trampoline template is used for every nested
-+ function. Since nested functions are not particularly common or
-+ performant we don't worry too much about the extra instructions to copy
-+ around.
-+ This is not yet a problem, since we have not yet implemented function
-+ specific attributes to choose between hardening against straight line
-+ speculation or not, but such function specific attributes are likely to
-+ happen in the future. */
-+ asm_fprintf (f, "\tdsb\tsy\n\tisb\n");
-+
- /* The trampoline needs an extra padding instruction. In case if BTI is
- enabled the padding instruction is replaced by the BTI instruction at
- the beginning. */
-@@ -10890,10 +10901,14 @@ static void
- aarch64_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
- {
- rtx fnaddr, mem, a_tramp;
-- const int tramp_code_sz = 16;
-+ const int tramp_code_sz = 24;
-
- /* Don't need to copy the trailing D-words, we fill those in below. */
-- emit_block_move (m_tramp, assemble_trampoline_template (),
-+ /* We create our own memory address in Pmode so that `emit_block_move` can
-+ use parts of the backend which expect Pmode addresses. */
-+ rtx temp = convert_memory_address (Pmode, XEXP (m_tramp, 0));
-+ emit_block_move (gen_rtx_MEM (BLKmode, temp),
-+ assemble_trampoline_template (),
- GEN_INT (tramp_code_sz), BLOCK_OP_NORMAL);
- mem = adjust_address (m_tramp, ptr_mode, tramp_code_sz);
- fnaddr = XEXP (DECL_RTL (fndecl), 0);
-@@ -11084,6 +11099,8 @@ aarch64_output_casesi (rtx *operands)
- output_asm_insn (buf, operands);
- output_asm_insn (patterns[index][1], operands);
- output_asm_insn ("br\t%3", operands);
-+ output_asm_insn (aarch64_sls_barrier (aarch64_harden_sls_retbr_p ()),
-+ operands);
- assemble_label (asm_out_file, label);
- return "";
- }
-@@ -22924,6 +22941,22 @@ aarch64_file_end_indicate_exec_stack ()
- #undef GNU_PROPERTY_AARCH64_FEATURE_1_BTI
- #undef GNU_PROPERTY_AARCH64_FEATURE_1_AND
-
-+/* Helper function for straight line speculation.
-+ Return what barrier should be emitted for straight line speculation
-+ mitigation.
-+ When not mitigating against straight line speculation this function returns
-+ an empty string.
-+ When mitigating against straight line speculation, use:
-+ * SB when the v8.5-A SB extension is enabled.
-+ * DSB+ISB otherwise. */
-+const char *
-+aarch64_sls_barrier (int mitigation_required)
-+{
-+ return mitigation_required
-+ ? (TARGET_SB ? "sb" : "dsb\tsy\n\tisb")
-+ : "";
-+}
-+
- /* Target-specific selftests. */
-
- #if CHECKING_P
-diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
-index 1ce23c6..c21015f 100644
---- a/gcc/config/aarch64/aarch64.h
-+++ b/gcc/config/aarch64/aarch64.h
-@@ -281,6 +281,7 @@ extern unsigned aarch64_architecture_version;
- #define AARCH64_ISA_F32MM (aarch64_isa_flags & AARCH64_FL_F32MM)
- #define AARCH64_ISA_F64MM (aarch64_isa_flags & AARCH64_FL_F64MM)
- #define AARCH64_ISA_BF16 (aarch64_isa_flags & AARCH64_FL_BF16)
-+#define AARCH64_ISA_SB (aarch64_isa_flags & AARCH64_FL_SB)
-
- /* Crypto is an optional extension to AdvSIMD. */
- #define TARGET_CRYPTO (TARGET_SIMD && AARCH64_ISA_CRYPTO)
-@@ -378,6 +379,9 @@ extern unsigned aarch64_architecture_version;
- #define TARGET_FIX_ERR_A53_835769_DEFAULT 1
- #endif
-
-+/* SB instruction is enabled through +sb. */
-+#define TARGET_SB (AARCH64_ISA_SB)
-+
- /* Apply the workaround for Cortex-A53 erratum 835769. */
- #define TARGET_FIX_ERR_A53_835769 \
- ((aarch64_fix_a53_err835769 == 2) \
-@@ -1058,8 +1062,10 @@ typedef struct
-
- #define RETURN_ADDR_RTX aarch64_return_addr
-
--/* BTI c + 3 insns + 2 pointer-sized entries. */
--#define TRAMPOLINE_SIZE (TARGET_ILP32 ? 24 : 32)
-+/* BTI c + 3 insns
-+ + sls barrier of DSB + ISB.
-+ + 2 pointer-sized entries. */
-+#define TRAMPOLINE_SIZE (24 + (TARGET_ILP32 ? 8 : 16))
-
- /* Trampolines contain dwords, so must be dword aligned. */
- #define TRAMPOLINE_ALIGNMENT 64
-diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
-index 8c8be3c..dda04ee 100644
---- a/gcc/config/aarch64/aarch64.md
-+++ b/gcc/config/aarch64/aarch64.md
-@@ -407,10 +407,25 @@
- ;; Attribute that specifies whether the alternative uses MOVPRFX.
- (define_attr "movprfx" "no,yes" (const_string "no"))
-
-+;; Attribute to specify that an alternative has the length of a single
-+;; instruction plus a speculation barrier.
-+(define_attr "sls_length" "none,retbr,casesi" (const_string "none"))
-+
- (define_attr "length" ""
- (cond [(eq_attr "movprfx" "yes")
- (const_int 8)
-- ] (const_int 4)))
-+
-+ (eq_attr "sls_length" "retbr")
-+ (cond [(match_test "!aarch64_harden_sls_retbr_p ()") (const_int 4)
-+ (match_test "TARGET_SB") (const_int 8)]
-+ (const_int 12))
-+
-+ (eq_attr "sls_length" "casesi")
-+ (cond [(match_test "!aarch64_harden_sls_retbr_p ()") (const_int 16)
-+ (match_test "TARGET_SB") (const_int 20)]
-+ (const_int 24))
-+ ]
-+ (const_int 4)))
-
- ;; Strictly for compatibility with AArch32 in pipeline models, since AArch64 has
- ;; no predicated insns.
-@@ -447,8 +462,12 @@
- (define_insn "indirect_jump"
- [(set (pc) (match_operand:DI 0 "register_operand" "r"))]
- ""
-- "br\\t%0"
-- [(set_attr "type" "branch")]
-+ {
-+ output_asm_insn ("br\\t%0", operands);
-+ return aarch64_sls_barrier (aarch64_harden_sls_retbr_p ());
-+ }
-+ [(set_attr "type" "branch")
-+ (set_attr "sls_length" "retbr")]
- )
-
- (define_insn "jump"
-@@ -765,7 +784,7 @@
- "*
- return aarch64_output_casesi (operands);
- "
-- [(set_attr "length" "16")
-+ [(set_attr "sls_length" "casesi")
- (set_attr "type" "branch")]
- )
-
-@@ -844,18 +863,23 @@
- [(return)]
- ""
- {
-+ const char *ret = NULL;
- if (aarch64_return_address_signing_enabled ()
- && TARGET_ARMV8_3
- && !crtl->calls_eh_return)
- {
- if (aarch64_ra_sign_key == AARCH64_KEY_B)
-- return "retab";
-+ ret = "retab";
- else
-- return "retaa";
-+ ret = "retaa";
- }
-- return "ret";
-+ else
-+ ret = "ret";
-+ output_asm_insn (ret, operands);
-+ return aarch64_sls_barrier (aarch64_harden_sls_retbr_p ());
- }
-- [(set_attr "type" "branch")]
-+ [(set_attr "type" "branch")
-+ (set_attr "sls_length" "retbr")]
- )
-
- (define_expand "return"
-@@ -867,8 +891,12 @@
- (define_insn "simple_return"
- [(simple_return)]
- ""
-- "ret"
-- [(set_attr "type" "branch")]
-+ {
-+ output_asm_insn ("ret", operands);
-+ return aarch64_sls_barrier (aarch64_harden_sls_retbr_p ());
-+ }
-+ [(set_attr "type" "branch")
-+ (set_attr "sls_length" "retbr")]
- )
-
- (define_insn "*cb<optab><mode>1"
-@@ -1066,10 +1094,16 @@
- (unspec:DI [(match_operand:DI 2 "const_int_operand")] UNSPEC_CALLEE_ABI)
- (return)]
- "SIBLING_CALL_P (insn)"
-- "@
-- br\\t%0
-- b\\t%c0"
-- [(set_attr "type" "branch, branch")]
-+ {
-+ if (which_alternative == 0)
-+ {
-+ output_asm_insn ("br\\t%0", operands);
-+ return aarch64_sls_barrier (aarch64_harden_sls_retbr_p ());
-+ }
-+ return "b\\t%c0";
-+ }
-+ [(set_attr "type" "branch, branch")
-+ (set_attr "sls_length" "retbr,none")]
- )
-
- (define_insn "*sibcall_value_insn"
-@@ -1080,10 +1114,16 @@
- (unspec:DI [(match_operand:DI 3 "const_int_operand")] UNSPEC_CALLEE_ABI)
- (return)]
- "SIBLING_CALL_P (insn)"
-- "@
-- br\\t%1
-- b\\t%c1"
-- [(set_attr "type" "branch, branch")]
-+ {
-+ if (which_alternative == 0)
-+ {
-+ output_asm_insn ("br\\t%1", operands);
-+ return aarch64_sls_barrier (aarch64_harden_sls_retbr_p ());
-+ }
-+ return "b\\t%c1";
-+ }
-+ [(set_attr "type" "branch, branch")
-+ (set_attr "sls_length" "retbr,none")]
- )
-
- ;; Call subroutine returning any type.
-diff --git a/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-retbr-pacret.c b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-retbr-pacret.c
-new file mode 100644
-index 0000000..fa1887a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-retbr-pacret.c
-@@ -0,0 +1,21 @@
-+/* Avoid ILP32 since pacret is only available for LP64 */
-+/* { dg-do compile { target { ! ilp32 } } } */
-+/* { dg-additional-options "-mharden-sls=retbr -mbranch-protection=pac-ret -march=armv8.3-a" } */
-+
-+/* Testing the do_return pattern for retaa and retab. */
-+long retbr_subcall(void);
-+long retbr_do_return_retaa(void)
-+{
-+ return retbr_subcall()+1;
-+}
-+
-+__attribute__((target("branch-protection=pac-ret+b-key")))
-+long retbr_do_return_retab(void)
-+{
-+ return retbr_subcall()+1;
-+}
-+
-+/* Ensure there are no BR or RET instructions which are not directly followed
-+ by a speculation barrier. */
-+/* { dg-final { scan-assembler-not {\t(br|ret|retaa|retab)\tx[0-9][0-9]?\n\t(?!dsb\tsy\n\tisb)} } } */
-+/* { dg-final { scan-assembler-not {ret\t} } } */
-diff --git a/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-retbr.c b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-retbr.c
-new file mode 100644
-index 0000000..76b8d03
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-retbr.c
-@@ -0,0 +1,119 @@
-+/* We ensure that -Wpedantic is off since it complains about the trampolines
-+ we explicitly want to test. */
-+/* { dg-additional-options "-mharden-sls=retbr -Wno-pedantic " } */
-+/*
-+ Ensure that the SLS hardening of RET and BR leaves no unprotected RET/BR
-+ instructions.
-+ */
-+typedef int (foo) (int, int);
-+typedef void (bar) (int, int);
-+struct sls_testclass {
-+ foo *x;
-+ bar *y;
-+ int left;
-+ int right;
-+};
-+
-+int
-+retbr_sibcall_value_insn (struct sls_testclass x)
-+{
-+ return x.x(x.left, x.right);
-+}
-+
-+void
-+retbr_sibcall_insn (struct sls_testclass x)
-+{
-+ x.y(x.left, x.right);
-+}
-+
-+/* Aim to test two different returns.
-+ One that introduces a tail call in the middle of the function, and one that
-+ has a normal return. */
-+int
-+retbr_multiple_returns (struct sls_testclass x)
-+{
-+ int temp;
-+ if (x.left % 10)
-+ return x.x(x.left, 100);
-+ else if (x.right % 20)
-+ {
-+ return x.x(x.left * x.right, 100);
-+ }
-+ temp = x.left % x.right;
-+ temp *= 100;
-+ temp /= 2;
-+ return temp % 3;
-+}
-+
-+void
-+retbr_multiple_returns_void (struct sls_testclass x)
-+{
-+ if (x.left % 10)
-+ {
-+ x.y(x.left, 100);
-+ }
-+ else if (x.right % 20)
-+ {
-+ x.y(x.left * x.right, 100);
-+ }
-+ return;
-+}
-+
-+/* Testing the casesi jump via register. */
-+__attribute__ ((optimize ("Os")))
-+int
-+retbr_casesi_dispatch (struct sls_testclass x)
-+{
-+ switch (x.left)
-+ {
-+ case -5:
-+ return -2;
-+ case -3:
-+ return -1;
-+ case 0:
-+ return 0;
-+ case 3:
-+ return 1;
-+ case 5:
-+ break;
-+ default:
-+ __builtin_unreachable ();
-+ }
-+ return x.right;
-+}
-+
-+/* Testing the BR in trampolines is mitigated against. */
-+void f1 (void *);
-+void f3 (void *, void (*)(void *));
-+void f2 (void *);
-+
-+int
-+retbr_trampolines (void *a, int b)
-+{
-+ if (!b)
-+ {
-+ f1 (a);
-+ return 1;
-+ }
-+ if (b)
-+ {
-+ void retbr_tramp_internal (void *c)
-+ {
-+ if (c == a)
-+ f2 (c);
-+ }
-+ f3 (a, retbr_tramp_internal);
-+ }
-+ return 0;
-+}
-+
-+/* Testing the indirect_jump pattern. */
-+void
-+retbr_indirect_jump (int *buf)
-+{
-+ __builtin_longjmp(buf, 1);
-+}
-+
-+/* Ensure there are no BR or RET instructions which are not directly followed
-+ by a speculation barrier. */
-+/* { dg-final { scan-assembler-not {\t(br|ret|retaa|retab)\tx[0-9][0-9]?\n\t(?!dsb\tsy\n\tisb|sb)} } } */
-diff --git a/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp
-new file mode 100644
-index 0000000..8122503
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-mitigation.exp
-@@ -0,0 +1,73 @@
-+# Regression driver for SLS mitigation on AArch64.
-+# Copyright (C) 2020 Free Software Foundation, Inc.
-+# Contributed by ARM Ltd.
-+#
-+# This file is part of GCC.
-+#
-+# GCC is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+#
-+# GCC 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 GCC; see the file COPYING3. If not see
-+# <http://www.gnu.org/licenses/>. */
-+
-+# Exit immediately if this isn't an AArch64 target.
-+if {![istarget aarch64*-*-*] } then {
-+ return
-+}
-+
-+# Load support procs.
-+load_lib gcc-dg.exp
-+load_lib torture-options.exp
-+
-+# If a testcase doesn't have special options, use these.
-+global DEFAULT_CFLAGS
-+if ![info exists DEFAULT_CFLAGS] then {
-+ set DEFAULT_CFLAGS " "
-+}
-+
-+# Initialize `dg'.
-+dg-init
-+torture-init
-+
-+# Use different architectures as well as the normal optimisation options.
-+# (i.e. use both SB and DSB+ISB barriers).
-+
-+set save-dg-do-what-default ${dg-do-what-default}
-+# Main loop.
-+# Run with torture tests (i.e. a bunch of different optimisation levels) just
-+# to increase test coverage.
-+set dg-do-what-default assemble
-+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
-+ "-save-temps" $DEFAULT_CFLAGS
-+
-+# Run the same tests but this time with SB extension.
-+# Since not all supported assemblers will support that extension we decide
-+# whether to assemble or just compile based on whether the extension is
-+# supported for the available assembler.
-+
-+set templist {}
-+foreach x $DG_TORTURE_OPTIONS {
-+ lappend templist "$x -march=armv8.3-a+sb "
-+ lappend templist "$x -march=armv8-a+sb "
-+}
-+set-torture-options $templist
-+if { [check_effective_target_aarch64_asm_sb_ok] } {
-+ set dg-do-what-default assemble
-+} else {
-+ set dg-do-what-default compile
-+}
-+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
-+ "-save-temps" $DEFAULT_CFLAGS
-+set dg-do-what-default ${save-dg-do-what-default}
-+
-+# All done.
-+torture-finish
-+dg-finish
-diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
-index 8a186dd..9d2e093 100644
---- a/gcc/testsuite/lib/target-supports.exp
-+++ b/gcc/testsuite/lib/target-supports.exp
-@@ -9432,7 +9432,7 @@ proc check_effective_target_aarch64_tiny { } {
- # various architecture extensions via the .arch_extension pseudo-op.
-
- foreach { aarch64_ext } { "fp" "simd" "crypto" "crc" "lse" "dotprod" "sve"
-- "i8mm" "f32mm" "f64mm" "bf16" } {
-+ "i8mm" "f32mm" "f64mm" "bf16" "sb" } {
- eval [string map [list FUNC $aarch64_ext] {
- proc check_effective_target_aarch64_asm_FUNC_ok { } {
- if { [istarget aarch64*-*-*] } {
---
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch b/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
index 697bdc821..18a9fb870 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
@@ -1,6 +1,6 @@
-From 74cc21f474402cf3578e37e1d7a1a22bbd070f6a Mon Sep 17 00:00:00 2001
+From 118c6f054711d437167ff125a88c9236bfc8099c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
+Date: Mon, 8 Mar 2021 16:04:20 -0800
Subject: [PATCH] gcc: poison-system-directories
Add /sw/include and /opt/include based on the original
@@ -11,11 +11,9 @@ aborted.
Instead, we add the two missing items to the current scan. If the user
wants this to be a failure, they can add "-Werror=poison-system-directories".
+Upstream-Status: Pending
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
-
-Upstream-Status: Pending
---
gcc/common.opt | 4 ++++
gcc/config.in | 10 ++++++++++
@@ -27,10 +25,10 @@ Upstream-Status: Pending
7 files changed, 86 insertions(+), 2 deletions(-)
diff --git a/gcc/common.opt b/gcc/common.opt
-index 3ec7743ea..d3c3e51dc 100644
+index c75dd36843e..49acbd6ed44 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
-@@ -682,6 +682,10 @@ Wreturn-local-addr
+@@ -683,6 +683,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.
@@ -42,10 +40,10 @@ index 3ec7743ea..d3c3e51dc 100644
Common Var(warn_shadow) Warning
Warn when one variable shadows another. Same as -Wshadow=global.
diff --git a/gcc/config.in b/gcc/config.in
-index 364eba477..7d2c3bbf1 100644
+index 10a13cde586..8848284da41 100644
--- a/gcc/config.in
+++ b/gcc/config.in
-@@ -224,6 +224,16 @@
+@@ -218,6 +218,16 @@
#endif
@@ -63,18 +61,18 @@ index 364eba477..7d2c3bbf1 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 2a9d646b4..a848792f2 100755
+index 9bb436ce7bd..3f0734bff11 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -1010,6 +1010,7 @@ with_system_zlib
- enable_maintainer_mode
+@@ -1020,6 +1020,7 @@ enable_maintainer_mode
enable_link_mutex
+ enable_link_serialization
enable_version_specific_runtime_libs
+enable_poison_system_directories
enable_plugin
enable_host_shared
enable_libquadmath_support
-@@ -1766,6 +1767,8 @@ Optional Features:
+@@ -1782,6 +1783,8 @@ Optional Features:
--enable-version-specific-runtime-libs
specify that runtime libraries should be installed
in a compiler-specific directory
@@ -83,7 +81,7 @@ index 2a9d646b4..a848792f2 100755
--enable-plugin enable plugin support
--enable-host-shared build host code as shared libraries
--disable-libquadmath-support
-@@ -30280,6 +30283,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+@@ -31325,6 +31328,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
fi
@@ -107,16 +105,16 @@ index 2a9d646b4..a848792f2 100755
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 51cce36ce..66ffde305 100644
+index caa611933df..54e21764b3e 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -6614,6 +6614,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+@@ -7123,6 +7123,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[specify that runtime libraries should be
installed in a compiler-specific directory])])
+AC_ARG_ENABLE([poison-system-directories],
+ AS_HELP_STRING([--enable-poison-system-directories],
-+ [warn for use of native system header directories (no/yes/error)]),,
++ [warn for use of native system header directories (no/yes/error)]),,
+ [enable_poison_system_directories=no])
+AC_MSG_NOTICE([poisoned directories $enable_poison_system_directories])
+if test "x${enable_poison_system_directories}" != "xno"; then
@@ -134,10 +132,10 @@ index 51cce36ce..66ffde305 100644
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index d929eb109..aa5ff88b1 100644
+index 7a368959e5e..6659a903bf0 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
-@@ -351,6 +351,7 @@ Objective-C and Objective-C++ Dialects}.
+@@ -369,6 +369,7 @@ Objective-C and Objective-C++ Dialects}.
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
-Wparentheses -Wno-pedantic-ms-format @gol
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol
@@ -145,7 +143,7 @@ index d929eb109..aa5ff88b1 100644
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
-Wrestrict -Wno-return-local-addr -Wreturn-type @gol
-Wno-scalar-storage-order -Wsequence-point @gol
-@@ -6928,6 +6929,14 @@ made up of data only and thus requires no special treatment. But, for
+@@ -7735,6 +7736,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.
@@ -161,10 +159,10 @@ index d929eb109..aa5ff88b1 100644
@opindex Wfloat-equal
@opindex Wno-float-equal
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 49c9c6c17..24a92bf27 100644
+index 7837553958b..19c75b6e20d 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -1044,6 +1044,8 @@ proper position among the other output files. */
+@@ -1152,6 +1152,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:%{!r:%{!nostartfiles:%S}}} \
@@ -173,7 +171,7 @@ index 49c9c6c17..24a92bf27 100644
%{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
-@@ -1138,8 +1140,11 @@ static const char *cpp_unique_options =
+@@ -1247,8 +1249,11 @@ static const char *cpp_unique_options =
static const char *cpp_options =
"%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
%{f*} %{g*:%{%:debug-level-gt(0):%{g*}\
@@ -185,10 +183,10 @@ index 49c9c6c17..24a92bf27 100644
+#endif
+ " %{undef} %{save-temps*:-fpch-preprocess}";
- /* This contains cpp options which are not passed when the preprocessor
- output will be used by another program. */
+ /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
+
diff --git a/gcc/incpath.c b/gcc/incpath.c
-index 94eaba7b1..bfad4ebe3 100644
+index 446d280321d..fbfc0ce03b8 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
@@ -26,6 +26,7 @@
@@ -199,7 +197,7 @@ index 94eaba7b1..bfad4ebe3 100644
/* Microsoft Windows does not natively support inodes.
VMS has non-numeric inodes. */
-@@ -393,6 +394,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
+@@ -395,6 +396,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
}
fprintf (stderr, _("End of search list.\n"));
}
@@ -226,6 +224,3 @@ index 94eaba7b1..bfad4ebe3 100644
}
/* Use given -I paths for #include "..." but not #include <...>, and
---
-2.25.1
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch b/poky/meta/recipes-devtools/gcc/gcc/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch
deleted file mode 100644
index 716a36717..000000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch
+++ /dev/null
@@ -1,658 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From a5e7efc40ed841934c1d913f39476afa17d8e5f7 Mon Sep 17 00:00:00 2001
-From: Matthew Malcomson <matthew.malcomson@arm.com>
-Date: Thu, 9 Jul 2020 09:11:59 +0100
-Subject: [PATCH 3/3] aarch64: Mitigate SLS for BLR instruction
-
-This patch introduces the mitigation for Straight Line Speculation past
-the BLR instruction.
-
-This mitigation replaces BLR instructions with a BL to a stub which uses
-a BR to jump to the original value. These function stubs are then
-appended with a speculation barrier to ensure no straight line
-speculation happens after these jumps.
-
-When optimising for speed we use a set of stubs for each function since
-this should help the branch predictor make more accurate predictions
-about where a stub should branch.
-
-When optimising for size we use one set of stubs for all functions.
-This set of stubs can have human readable names, and we are using
-`__call_indirect_x<N>` for register x<N>.
-
-When BTI branch protection is enabled the BLR instruction can jump to a
-`BTI c` instruction using any register, while the BR instruction can
-only jump to a `BTI c` instruction using the x16 or x17 registers.
-Hence, in order to ensure this transformation is safe we mov the value
-of the original register into x16 and use x16 for the BR.
-
-As an example when optimising for size:
-a
- BLR x0
-instruction would get transformed to something like
- BL __call_indirect_x0
-where __call_indirect_x0 labels a thunk that contains
-__call_indirect_x0:
- MOV X16, X0
- BR X16
- <speculation barrier>
-
-The first version of this patch used local symbols specific to a
-compilation unit to try and avoid relocations.
-This was mistaken since functions coming from the same compilation unit
-can still be in different sections, and the assembler will insert
-relocations at jumps between sections.
-
-On any relocation the linker is permitted to emit a veneer to handle
-jumps between symbols that are very far apart. The registers x16 and
-x17 may be clobbered by these veneers.
-Hence the function stubs cannot rely on the values of x16 and x17 being
-the same as just before the function stub is called.
-
-Similar can be said for the hot/cold partitioning of single functions,
-so function-local stubs have the same restriction.
-
-This updated version of the patch never emits function stubs for x16 and
-x17, and instead forces other registers to be used.
-
-Given the above, there is now no benefit to local symbols (since they
-are not enough to avoid dealing with linker intricacies). This patch
-now uses global symbols with hidden visibility each stored in their own
-COMDAT section. This means stubs can be shared between compilation
-units while still avoiding the PLT indirection.
-
-This patch also removes the `__call_indirect_x30` stub (and
-function-local equivalent) which would simply jump back to the original
-location.
-
-The function-local stubs are emitted to the assembly output file in one
-chunk, which means we need not add the speculation barrier directly
-after each one.
-This is because we know for certain that the instructions directly after
-the BR in all but the last function stub will be from another one of
-these stubs and hence will not contain a speculation gadget.
-Instead we add a speculation barrier at the end of the sequence of
-stubs.
-
-The global stubs are emitted in COMDAT/.linkonce sections by
-themselves so that the linker can remove duplicates from multiple object
-files. This means they are not emitted in one chunk, and each one must
-include the speculation barrier.
-
-Another difference is that since the global stubs are shared across
-compilation units we do not know that all functions will be targeting an
-architecture supporting the SB instruction.
-Rather than provide multiple stubs for each architecture, we provide a
-stub that will work for all architectures -- using the DSB+ISB barrier.
-
-This mitigation does not apply for BLR instructions in the following
-places:
-- Some accesses to thread-local variables use a code sequence with a BLR
- instruction. This code sequence is part of the binary interface between
- compiler and linker. If this BLR instruction needs to be mitigated, it'd
- probably be best to do so in the linker. It seems that the code sequence
- for thread-local variable access is unlikely to lead to a Spectre Revalation
- Gadget.
-- PLT stubs are produced by the linker and each contain a BLR instruction.
- It seems that at most only after the last PLT stub a Spectre Revalation
- Gadget might appear.
-
-Testing:
- Bootstrap and regtest on AArch64
- (with BOOT_CFLAGS="-mharden-sls=retbr,blr")
- Used a temporary hack(1) in gcc-dg.exp to use these options on every
- test in the testsuite, a slight modification to emit the speculation
- barrier after every function stub, and a script to check that the
- output never emitted a BLR, or unmitigated BR or RET instruction.
- Similar on an aarch64-none-elf cross-compiler.
-
-1) Temporary hack emitted a speculation barrier at the end of every stub
-function, and used a script to ensure that:
- a) Every RET or BR is immediately followed by a speculation barrier.
- b) No BLR instruction is emitted by compiler.
-
-gcc/ChangeLog:
-
- * config/aarch64/aarch64-protos.h (aarch64_indirect_call_asm):
- New declaration.
- * config/aarch64/aarch64.c (aarch64_regno_regclass): Handle new
- stub registers class.
- (aarch64_class_max_nregs): Likewise.
- (aarch64_register_move_cost): Likewise.
- (aarch64_sls_shared_thunks): Global array to store stub labels.
- (aarch64_sls_emit_function_stub): New.
- (aarch64_create_blr_label): New.
- (aarch64_sls_emit_blr_function_thunks): New.
- (aarch64_sls_emit_shared_blr_thunks): New.
- (aarch64_asm_file_end): New.
- (aarch64_indirect_call_asm): New.
- (TARGET_ASM_FILE_END): Use aarch64_asm_file_end.
- (TARGET_ASM_FUNCTION_EPILOGUE): Use
- aarch64_sls_emit_blr_function_thunks.
- * config/aarch64/aarch64.h (STB_REGNUM_P): New.
- (enum reg_class): Add STUB_REGS class.
- (machine_function): Introduce `call_via` array for
- function-local stub labels.
- * config/aarch64/aarch64.md (*call_insn, *call_value_insn): Use
- aarch64_indirect_call_asm to emit code when hardening BLR
- instructions.
- * config/aarch64/constraints.md (Ucr): New constraint
- representing registers for indirect calls. Is GENERAL_REGS
- usually, and STUB_REGS when hardening BLR instruction against
- SLS.
- * config/aarch64/predicates.md (aarch64_general_reg): STUB_REGS class
- is also a general register.
-
-gcc/testsuite/ChangeLog:
-
- * gcc.target/aarch64/sls-mitigation/sls-miti-blr-bti.c: New test.
- * gcc.target/aarch64/sls-mitigation/sls-miti-blr.c: New test.
----
- gcc/config/aarch64/aarch64-protos.h | 1 +
- gcc/config/aarch64/aarch64.c | 225 ++++++++++++++++++++-
- gcc/config/aarch64/aarch64.h | 15 ++
- gcc/config/aarch64/aarch64.md | 11 +-
- gcc/config/aarch64/constraints.md | 9 +
- gcc/config/aarch64/predicates.md | 3 +-
- .../aarch64/sls-mitigation/sls-miti-blr-bti.c | 40 ++++
- .../aarch64/sls-mitigation/sls-miti-blr.c | 33 +++
- 8 files changed, 328 insertions(+), 9 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-blr-bti.c
- create mode 100644 gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-blr.c
-
-diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
-index ee0ffde..839f801 100644
---- a/gcc/config/aarch64/aarch64-protos.h
-+++ b/gcc/config/aarch64/aarch64-protos.h
-@@ -782,6 +782,7 @@ extern const atomic_ool_names aarch64_ool_ldeor_names;
- tree aarch64_resolve_overloaded_builtin_general (location_t, tree, void *);
-
- const char *aarch64_sls_barrier (int);
-+const char *aarch64_indirect_call_asm (rtx);
- extern bool aarch64_harden_sls_retbr_p (void);
- extern bool aarch64_harden_sls_blr_p (void);
-
-diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
-index 2389d49..0f7bba3 100644
---- a/gcc/config/aarch64/aarch64.c
-+++ b/gcc/config/aarch64/aarch64.c
-@@ -10605,6 +10605,9 @@ aarch64_label_mentioned_p (rtx x)
- enum reg_class
- aarch64_regno_regclass (unsigned regno)
- {
-+ if (STUB_REGNUM_P (regno))
-+ return STUB_REGS;
-+
- if (GP_REGNUM_P (regno))
- return GENERAL_REGS;
-
-@@ -10939,6 +10942,7 @@ aarch64_class_max_nregs (reg_class_t regclass, machine_mode mode)
- unsigned int nregs, vec_flags;
- switch (regclass)
- {
-+ case STUB_REGS:
- case TAILCALL_ADDR_REGS:
- case POINTER_REGS:
- case GENERAL_REGS:
-@@ -13155,10 +13159,12 @@ aarch64_register_move_cost (machine_mode mode,
- = aarch64_tune_params.regmove_cost;
-
- /* Caller save and pointer regs are equivalent to GENERAL_REGS. */
-- if (to == TAILCALL_ADDR_REGS || to == POINTER_REGS)
-+ if (to == TAILCALL_ADDR_REGS || to == POINTER_REGS
-+ || to == STUB_REGS)
- to = GENERAL_REGS;
-
-- if (from == TAILCALL_ADDR_REGS || from == POINTER_REGS)
-+ if (from == TAILCALL_ADDR_REGS || from == POINTER_REGS
-+ || from == STUB_REGS)
- from = GENERAL_REGS;
-
- /* Make RDFFR very expensive. In particular, if we know that the FFR
-@@ -22957,6 +22963,215 @@ aarch64_sls_barrier (int mitigation_required)
- : "";
- }
-
-+static GTY (()) tree aarch64_sls_shared_thunks[30];
-+static GTY (()) bool aarch64_sls_shared_thunks_needed = false;
-+const char *indirect_symbol_names[30] = {
-+ "__call_indirect_x0",
-+ "__call_indirect_x1",
-+ "__call_indirect_x2",
-+ "__call_indirect_x3",
-+ "__call_indirect_x4",
-+ "__call_indirect_x5",
-+ "__call_indirect_x6",
-+ "__call_indirect_x7",
-+ "__call_indirect_x8",
-+ "__call_indirect_x9",
-+ "__call_indirect_x10",
-+ "__call_indirect_x11",
-+ "__call_indirect_x12",
-+ "__call_indirect_x13",
-+ "__call_indirect_x14",
-+ "__call_indirect_x15",
-+ "", /* "__call_indirect_x16", */
-+ "", /* "__call_indirect_x17", */
-+ "__call_indirect_x18",
-+ "__call_indirect_x19",
-+ "__call_indirect_x20",
-+ "__call_indirect_x21",
-+ "__call_indirect_x22",
-+ "__call_indirect_x23",
-+ "__call_indirect_x24",
-+ "__call_indirect_x25",
-+ "__call_indirect_x26",
-+ "__call_indirect_x27",
-+ "__call_indirect_x28",
-+ "__call_indirect_x29",
-+};
-+
-+/* Function to create a BLR thunk. This thunk is used to mitigate straight
-+ line speculation. Instead of a simple BLR that can be speculated past,
-+ we emit a BL to this thunk, and this thunk contains a BR to the relevant
-+ register. These thunks have the relevant speculation barries put after
-+ their indirect branch so that speculation is blocked.
-+
-+ We use such a thunk so the speculation barriers are kept off the
-+ architecturally executed path in order to reduce the performance overhead.
-+
-+ When optimizing for size we use stubs shared by the linked object.
-+ When optimizing for performance we emit stubs for each function in the hope
-+ that the branch predictor can better train on jumps specific for a given
-+ function. */
-+rtx
-+aarch64_sls_create_blr_label (int regnum)
-+{
-+ gcc_assert (STUB_REGNUM_P (regnum));
-+ if (optimize_function_for_size_p (cfun))
-+ {
-+ /* For the thunks shared between different functions in this compilation
-+ unit we use a named symbol -- this is just for users to more easily
-+ understand the generated assembly. */
-+ aarch64_sls_shared_thunks_needed = true;
-+ const char *thunk_name = indirect_symbol_names[regnum];
-+ if (aarch64_sls_shared_thunks[regnum] == NULL)
-+ {
-+ /* Build a decl representing this function stub and record it for
-+ later. We build a decl here so we can use the GCC machinery for
-+ handling sections automatically (through `get_named_section` and
-+ `make_decl_one_only`). That saves us a lot of trouble handling
-+ the specifics of different output file formats. */
-+ tree decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
-+ get_identifier (thunk_name),
-+ build_function_type_list (void_type_node,
-+ NULL_TREE));
-+ DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
-+ NULL_TREE, void_type_node);
-+ TREE_PUBLIC (decl) = 1;
-+ TREE_STATIC (decl) = 1;
-+ DECL_IGNORED_P (decl) = 1;
-+ DECL_ARTIFICIAL (decl) = 1;
-+ make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
-+ resolve_unique_section (decl, 0, false);
-+ aarch64_sls_shared_thunks[regnum] = decl;
-+ }
-+
-+ return gen_rtx_SYMBOL_REF (Pmode, thunk_name);
-+ }
-+
-+ if (cfun->machine->call_via[regnum] == NULL)
-+ cfun->machine->call_via[regnum]
-+ = gen_rtx_LABEL_REF (Pmode, gen_label_rtx ());
-+ return cfun->machine->call_via[regnum];
-+}
-+
-+/* Helper function for aarch64_sls_emit_blr_function_thunks and
-+ aarch64_sls_emit_shared_blr_thunks below. */
-+static void
-+aarch64_sls_emit_function_stub (FILE *out_file, int regnum)
-+{
-+ /* Save in x16 and branch to that function so this transformation does
-+ not prevent jumping to `BTI c` instructions. */
-+ asm_fprintf (out_file, "\tmov\tx16, x%d\n", regnum);
-+ asm_fprintf (out_file, "\tbr\tx16\n");
-+}
-+
-+/* Emit all BLR stubs for this particular function.
-+ Here we emit all the BLR stubs needed for the current function. Since we
-+ emit these stubs in a consecutive block we know there will be no speculation
-+ gadgets between each stub, and hence we only emit a speculation barrier at
-+ the end of the stub sequences.
-+
-+ This is called in the TARGET_ASM_FUNCTION_EPILOGUE hook. */
-+void
-+aarch64_sls_emit_blr_function_thunks (FILE *out_file)
-+{
-+ if (! aarch64_harden_sls_blr_p ())
-+ return;
-+
-+ bool any_functions_emitted = false;
-+ /* We must save and restore the current function section since this assembly
-+ is emitted at the end of the function. This means it can be emitted *just
-+ after* the cold section of a function. That cold part would be emitted in
-+ a different section. That switch would trigger a `.cfi_endproc` directive
-+ to be emitted in the original section and a `.cfi_startproc` directive to
-+ be emitted in the new section. Switching to the original section without
-+ restoring would mean that the `.cfi_endproc` emitted as a function ends
-+ would happen in a different section -- leaving an unmatched
-+ `.cfi_startproc` in the cold text section and an unmatched `.cfi_endproc`
-+ in the standard text section. */
-+ section *save_text_section = in_section;
-+ switch_to_section (function_section (current_function_decl));
-+ for (int regnum = 0; regnum < 30; ++regnum)
-+ {
-+ rtx specu_label = cfun->machine->call_via[regnum];
-+ if (specu_label == NULL)
-+ continue;
-+
-+ targetm.asm_out.print_operand (out_file, specu_label, 0);
-+ asm_fprintf (out_file, ":\n");
-+ aarch64_sls_emit_function_stub (out_file, regnum);
-+ any_functions_emitted = true;
-+ }
-+ if (any_functions_emitted)
-+ /* Can use the SB if needs be here, since this stub will only be used
-+ by the current function, and hence for the current target. */
-+ asm_fprintf (out_file, "\t%s\n", aarch64_sls_barrier (true));
-+ switch_to_section (save_text_section);
-+}
-+
-+/* Emit shared BLR stubs for the current compilation unit.
-+ Over the course of compiling this unit we may have converted some BLR
-+ instructions to a BL to a shared stub function. This is where we emit those
-+ stub functions.
-+ This function is for the stubs shared between different functions in this
-+ compilation unit. We share when optimizing for size instead of speed.
-+
-+ This function is called through the TARGET_ASM_FILE_END hook. */
-+void
-+aarch64_sls_emit_shared_blr_thunks (FILE *out_file)
-+{
-+ if (! aarch64_sls_shared_thunks_needed)
-+ return;
-+
-+ for (int regnum = 0; regnum < 30; ++regnum)
-+ {
-+ tree decl = aarch64_sls_shared_thunks[regnum];
-+ if (!decl)
-+ continue;
-+
-+ const char *name = indirect_symbol_names[regnum];
-+ switch_to_section (get_named_section (decl, NULL, 0));
-+ ASM_OUTPUT_ALIGN (out_file, 2);
-+ targetm.asm_out.globalize_label (out_file, name);
-+ /* Only emits if the compiler is configured for an assembler that can
-+ handle visibility directives. */
-+ targetm.asm_out.assemble_visibility (decl, VISIBILITY_HIDDEN);
-+ ASM_OUTPUT_TYPE_DIRECTIVE (out_file, name, "function");
-+ ASM_OUTPUT_LABEL (out_file, name);
-+ aarch64_sls_emit_function_stub (out_file, regnum);
-+ /* Use the most conservative target to ensure it can always be used by any
-+ function in the translation unit. */
-+ asm_fprintf (out_file, "\tdsb\tsy\n\tisb\n");
-+ ASM_DECLARE_FUNCTION_SIZE (out_file, name, decl);
-+ }
-+}
-+
-+/* Implement TARGET_ASM_FILE_END. */
-+void
-+aarch64_asm_file_end ()
-+{
-+ aarch64_sls_emit_shared_blr_thunks (asm_out_file);
-+ /* Since this function will be called for the ASM_FILE_END hook, we ensure
-+ that what would be called otherwise (e.g. `file_end_indicate_exec_stack`
-+ for FreeBSD) still gets called. */
-+#ifdef TARGET_ASM_FILE_END
-+ TARGET_ASM_FILE_END ();
-+#endif
-+}
-+
-+const char *
-+aarch64_indirect_call_asm (rtx addr)
-+{
-+ gcc_assert (REG_P (addr));
-+ if (aarch64_harden_sls_blr_p ())
-+ {
-+ rtx stub_label = aarch64_sls_create_blr_label (REGNO (addr));
-+ output_asm_insn ("bl\t%0", &stub_label);
-+ }
-+ else
-+ output_asm_insn ("blr\t%0", &addr);
-+ return "";
-+}
-+
- /* Target-specific selftests. */
-
- #if CHECKING_P
-@@ -23507,6 +23722,12 @@ aarch64_libgcc_floating_mode_supported_p
- #undef TARGET_MD_ASM_ADJUST
- #define TARGET_MD_ASM_ADJUST arm_md_asm_adjust
-
-+#undef TARGET_ASM_FILE_END
-+#define TARGET_ASM_FILE_END aarch64_asm_file_end
-+
-+#undef TARGET_ASM_FUNCTION_EPILOGUE
-+#define TARGET_ASM_FUNCTION_EPILOGUE aarch64_sls_emit_blr_function_thunks
-+
- struct gcc_target targetm = TARGET_INITIALIZER;
-
- #include "gt-aarch64.h"
-diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
-index 8e0fc37..7331450 100644
---- a/gcc/config/aarch64/aarch64.h
-+++ b/gcc/config/aarch64/aarch64.h
-@@ -643,6 +643,16 @@ extern unsigned aarch64_architecture_version;
- #define GP_REGNUM_P(REGNO) \
- (((unsigned) (REGNO - R0_REGNUM)) <= (R30_REGNUM - R0_REGNUM))
-
-+/* Registers known to be preserved over a BL instruction. This consists of the
-+ GENERAL_REGS without x16, x17, and x30. The x30 register is changed by the
-+ BL instruction itself, while the x16 and x17 registers may be used by
-+ veneers which can be inserted by the linker. */
-+#define STUB_REGNUM_P(REGNO) \
-+ (GP_REGNUM_P (REGNO) \
-+ && (REGNO) != R16_REGNUM \
-+ && (REGNO) != R17_REGNUM \
-+ && (REGNO) != R30_REGNUM) \
-+
- #define FP_REGNUM_P(REGNO) \
- (((unsigned) (REGNO - V0_REGNUM)) <= (V31_REGNUM - V0_REGNUM))
-
-@@ -667,6 +677,7 @@ enum reg_class
- {
- NO_REGS,
- TAILCALL_ADDR_REGS,
-+ STUB_REGS,
- GENERAL_REGS,
- STACK_REG,
- POINTER_REGS,
-@@ -689,6 +700,7 @@ enum reg_class
- { \
- "NO_REGS", \
- "TAILCALL_ADDR_REGS", \
-+ "STUB_REGS", \
- "GENERAL_REGS", \
- "STACK_REG", \
- "POINTER_REGS", \
-@@ -708,6 +720,7 @@ enum reg_class
- { \
- { 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \
- { 0x00030000, 0x00000000, 0x00000000 }, /* TAILCALL_ADDR_REGS */\
-+ { 0x3ffcffff, 0x00000000, 0x00000000 }, /* STUB_REGS */ \
- { 0x7fffffff, 0x00000000, 0x00000003 }, /* GENERAL_REGS */ \
- { 0x80000000, 0x00000000, 0x00000000 }, /* STACK_REG */ \
- { 0xffffffff, 0x00000000, 0x00000003 }, /* POINTER_REGS */ \
-@@ -862,6 +875,8 @@ typedef struct GTY (()) machine_function
- struct aarch64_frame frame;
- /* One entry for each hard register. */
- bool reg_is_wrapped_separately[LAST_SAVED_REGNUM];
-+ /* One entry for each general purpose register. */
-+ rtx call_via[SP_REGNUM];
- bool label_is_assembled;
- } machine_function;
- #endif
-diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
-index dda04ee..43da754 100644
---- a/gcc/config/aarch64/aarch64.md
-+++ b/gcc/config/aarch64/aarch64.md
-@@ -1022,16 +1022,15 @@
- )
-
- (define_insn "*call_insn"
-- [(call (mem:DI (match_operand:DI 0 "aarch64_call_insn_operand" "r, Usf"))
-+ [(call (mem:DI (match_operand:DI 0 "aarch64_call_insn_operand" "Ucr, Usf"))
- (match_operand 1 "" ""))
- (unspec:DI [(match_operand:DI 2 "const_int_operand")] UNSPEC_CALLEE_ABI)
- (clobber (reg:DI LR_REGNUM))]
- ""
- "@
-- blr\\t%0
-+ * return aarch64_indirect_call_asm (operands[0]);
- bl\\t%c0"
-- [(set_attr "type" "call, call")]
--)
-+ [(set_attr "type" "call, call")])
-
- (define_expand "call_value"
- [(parallel
-@@ -1050,13 +1049,13 @@
-
- (define_insn "*call_value_insn"
- [(set (match_operand 0 "" "")
-- (call (mem:DI (match_operand:DI 1 "aarch64_call_insn_operand" "r, Usf"))
-+ (call (mem:DI (match_operand:DI 1 "aarch64_call_insn_operand" "Ucr, Usf"))
- (match_operand 2 "" "")))
- (unspec:DI [(match_operand:DI 3 "const_int_operand")] UNSPEC_CALLEE_ABI)
- (clobber (reg:DI LR_REGNUM))]
- ""
- "@
-- blr\\t%1
-+ * return aarch64_indirect_call_asm (operands[1]);
- bl\\t%c1"
- [(set_attr "type" "call, call")]
- )
-diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md
-index d993268..8cc6f50 100644
---- a/gcc/config/aarch64/constraints.md
-+++ b/gcc/config/aarch64/constraints.md
-@@ -24,6 +24,15 @@
- (define_register_constraint "Ucs" "TAILCALL_ADDR_REGS"
- "@internal Registers suitable for an indirect tail call")
-
-+(define_register_constraint "Ucr"
-+ "aarch64_harden_sls_blr_p () ? STUB_REGS : GENERAL_REGS"
-+ "@internal Registers to be used for an indirect call.
-+ This is usually the general registers, but when we are hardening against
-+ Straight Line Speculation we disallow x16, x17, and x30 so we can use
-+ indirection stubs. These indirection stubs cannot use the above registers
-+ since they will be reached by a BL that may have to go through a linker
-+ veneer.")
-+
- (define_register_constraint "w" "FP_REGS"
- "Floating point and SIMD vector registers.")
-
-diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md
-index 215fcec..1754b1e 100644
---- a/gcc/config/aarch64/predicates.md
-+++ b/gcc/config/aarch64/predicates.md
-@@ -32,7 +32,8 @@
-
- (define_predicate "aarch64_general_reg"
- (and (match_operand 0 "register_operand")
-- (match_test "REGNO_REG_CLASS (REGNO (op)) == GENERAL_REGS")))
-+ (match_test "REGNO_REG_CLASS (REGNO (op)) == STUB_REGS
-+ || REGNO_REG_CLASS (REGNO (op)) == GENERAL_REGS")))
-
- ;; Return true if OP a (const_int 0) operand.
- (define_predicate "const0_operand"
-diff --git a/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-blr-bti.c b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-blr-bti.c
-new file mode 100644
-index 0000000..b1fb754
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-blr-bti.c
-@@ -0,0 +1,40 @@
-+/* { dg-do compile } */
-+/* { dg-additional-options "-mharden-sls=blr -mbranch-protection=bti" } */
-+/*
-+ Ensure that the SLS hardening of BLR leaves no BLR instructions.
-+ Here we also check that there are no BR instructions with anything except an
-+ x16 or x17 register. This is because a `BTI c` instruction can be branched
-+ to using a BLR instruction using any register, but can only be branched to
-+ with a BR using an x16 or x17 register.
-+ */
-+typedef int (foo) (int, int);
-+typedef void (bar) (int, int);
-+struct sls_testclass {
-+ foo *x;
-+ bar *y;
-+ int left;
-+ int right;
-+};
-+
-+/* We test both RTL patterns for a call which returns a value and a call which
-+ does not. */
-+int blr_call_value (struct sls_testclass x)
-+{
-+ int retval = x.x(x.left, x.right);
-+ if (retval % 10)
-+ return 100;
-+ return 9;
-+}
-+
-+int blr_call (struct sls_testclass x)
-+{
-+ x.y(x.left, x.right);
-+ if (x.left % 10)
-+ return 100;
-+ return 9;
-+}
-+
-+/* { dg-final { scan-assembler-not {\tblr\t} } } */
-+/* { dg-final { scan-assembler-not {\tbr\tx(?!16|17)} } } */
-+/* { dg-final { scan-assembler {\tbr\tx(16|17)} } } */
-+
-diff --git a/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-blr.c b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-blr.c
-new file mode 100644
-index 0000000..88bafff
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/aarch64/sls-mitigation/sls-miti-blr.c
-@@ -0,0 +1,33 @@
-+/* { dg-additional-options "-mharden-sls=blr -save-temps" } */
-+/* Ensure that the SLS hardening of BLR leaves no BLR instructions.
-+ We only test that all BLR instructions have been removed, not that the
-+ resulting code makes sense. */
-+typedef int (foo) (int, int);
-+typedef void (bar) (int, int);
-+struct sls_testclass {
-+ foo *x;
-+ bar *y;
-+ int left;
-+ int right;
-+};
-+
-+/* We test both RTL patterns for a call which returns a value and a call which
-+ does not. */
-+int blr_call_value (struct sls_testclass x)
-+{
-+ int retval = x.x(x.left, x.right);
-+ if (retval % 10)
-+ return 100;
-+ return 9;
-+}
-+
-+int blr_call (struct sls_testclass x)
-+{
-+ x.y(x.left, x.right);
-+ if (x.left % 10)
-+ return 100;
-+ return 9;
-+}
-+
-+/* { dg-final { scan-assembler-not {\tblr\t} } } */
-+/* { dg-final { scan-assembler {\tbr\tx[0-9][0-9]?} } } */
---
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/poky/meta/recipes-devtools/gcc/gcc/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
index 27237feb5..7a6765455 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -1,4 +1,4 @@
-From 6e3395c0bc933bdc3242d1dead4896d0aa4e11a8 Mon Sep 17 00:00:00 2001
+From 274a27da6fe355c4c49953b3b69c8949d2412c62 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] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
@@ -26,10 +26,10 @@ Upstream-Status: Pending
1 file changed, 32 insertions(+)
diff --git a/configure b/configure
-index 226a64939d1..b31dc137fc9 100755
+index bcebad264ec..86e4ee7c383 100755
--- a/configure
+++ b/configure
-@@ -6971,6 +6971,38 @@ fi
+@@ -8977,6 +8977,38 @@ fi
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch b/poky/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch
index 7c751bef6..8184e6874 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch
@@ -1,4 +1,4 @@
-From 85a7c5aeb82ed61e6ef6d8e061b9da9e6a4a652c Mon Sep 17 00:00:00 2001
+From 2fa5c93641b75a662839c1b6eee172b6c481c70e 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] 64-bit multilib hack.
@@ -19,7 +19,7 @@ and be able to patch these entries with a complete set of correct paths but this
don't have such code at this point. This is something the target gcc recipe should do
and override these platform defaults in its build config.
-Do same for riscv64 and aarch64
+Do same for riscv64, aarch64 & arc
RP 15/8/11
@@ -30,14 +30,15 @@ Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
gcc/config/aarch64/t-aarch64-linux | 8 ++++----
+ gcc/config/arc/t-multilib-linux | 4 ++--
gcc/config/i386/t-linux64 | 6 ++----
gcc/config/mips/t-linux64 | 10 +++-------
gcc/config/riscv/t-linux | 6 ++++--
gcc/config/rs6000/t-linux64 | 5 ++---
- 5 files changed, 15 insertions(+), 20 deletions(-)
+ 6 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
-index 83e59e33b85..b1356be1fb4 100644
+index 241b0ef20b6..a7dadb2d64f 100644
--- a/gcc/config/aarch64/t-aarch64-linux
+++ b/gcc/config/aarch64/t-aarch64-linux
@@ -21,8 +21,8 @@
@@ -53,8 +54,24 @@ index 83e59e33b85..b1356be1fb4 100644
-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
+diff --git a/gcc/config/arc/t-multilib-linux b/gcc/config/arc/t-multilib-linux
+index fc3fff640a2..d58e28f6df8 100644
+--- a/gcc/config/arc/t-multilib-linux
++++ b/gcc/config/arc/t-multilib-linux
+@@ -16,9 +16,9 @@
+ # along with GCC; see the file COPYING3. If not see
+ # <http://www.gnu.org/licenses/>.
+
+-MULTILIB_OPTIONS = mcpu=hs/mcpu=archs/mcpu=hs38/mcpu=hs38_linux/mcpu=arc700/mcpu=nps400
++#MULTILIB_OPTIONS = mcpu=hs/mcpu=archs/mcpu=hs38/mcpu=hs38_linux/mcpu=arc700/mcpu=nps400
+
+-MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400
++#MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400
+
+ # Aliases:
+ MULTILIB_MATCHES += mcpu?arc700=mA7
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index 1171e218578..5e057b7e5db 100644
+index d288b093522..7b5980a9d21 100644
--- a/gcc/config/i386/t-linux64
+++ b/gcc/config/i386/t-linux64
@@ -32,7 +32,5 @@
@@ -68,7 +85,7 @@ index 1171e218578..5e057b7e5db 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 ceb58d3b5f3..43fe2bf28ab 100644
+index 130e1f04707..3b7eb6b2a2f 100644
--- a/gcc/config/mips/t-linux64
+++ b/gcc/config/mips/t-linux64
@@ -17,10 +17,6 @@
@@ -98,7 +115,7 @@ index 216d2776a18..e4d817621fc 100644
+#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
-index 264a7e27524..dc9d440f66b 100644
+index e11a118cb5f..4eaffb416fe 100644
--- a/gcc/config/rs6000/t-linux64
+++ b/gcc/config/rs6000/t-linux64
@@ -26,10 +26,9 @@
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0005-optional-libstdc.patch b/poky/meta/recipes-devtools/gcc/gcc/0005-optional-libstdc.patch
index 4020c9e3c..c921ac334 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0005-optional-libstdc.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0005-optional-libstdc.patch
@@ -1,4 +1,4 @@
-From 6ddfb0bfcd1eea71acd37ab06f7a4510b9f1d12b Mon Sep 17 00:00:00 2001
+From 57e2c5e35732988c0b287289eb0997b4e9769371 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] optional libstdc
@@ -25,10 +25,10 @@ Upstream-Status: Inappropriate [embedded specific]
4 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index c49da99d395..35f712e2c84 100644
+index 64e46e7573e..1824380f27a 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
-@@ -2025,6 +2025,10 @@ nostdinc++
+@@ -2166,6 +2166,10 @@ nostdinc++
C++ ObjC++
Do not search standard system include directories for C++.
@@ -40,10 +40,10 @@ index c49da99d395..35f712e2c84 100644
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 0ab63bcd211..7b081e9e4f0 100644
+index 3c9bd1490b4..818beb61cee 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,
+@@ -159,6 +159,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
switch (decoded_options[i].opt_index)
{
case OPT_nostdlib:
@@ -52,10 +52,10 @@ index 0ab63bcd211..7b081e9e4f0 100644
library = -1;
break;
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index f12d8d12150..cf6cb428e7d 100644
+index 6659a903bf0..9ee63dbe52f 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
-@@ -230,6 +230,9 @@ in the following sections.
+@@ -239,6 +239,9 @@ in the following sections.
-fno-weak -nostdinc++ @gol
-fvisibility-inlines-hidden @gol
-fvisibility-ms-compat @gol
@@ -63,9 +63,9 @@ index f12d8d12150..cf6cb428e7d 100644
+-fvtv-counts -fvtv-debug @gol
+-nostdlib++ @gol
-fext-numeric-literals @gol
- -Wabi-tag -Wcatch-value -Wcatch-value=@var{n} @gol
- -Wno-class-conversion -Wclass-memaccess @gol
-@@ -599,7 +602,7 @@ Objective-C and Objective-C++ Dialects}.
+ -flang-info-include-translate@r{[}=@var{header}@r{]} @gol
+ -flang-info-include-translate-not @gol
+@@ -632,7 +635,7 @@ Objective-C and Objective-C++ Dialects}.
-pie -pthread -r -rdynamic @gol
-s -static -static-pie -static-libgcc -static-libstdc++ @gol
-static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
@@ -74,7 +74,7 @@ index f12d8d12150..cf6cb428e7d 100644
-T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
-u @var{symbol} -z @var{keyword}}
-@@ -14407,6 +14410,33 @@ Specify that the program entry point is @var{entry}. The argument is
+@@ -15708,6 +15711,33 @@ Specify that the program entry point is @var{entry}. The argument is
interpreted by the linker; the GNU linker accepts either a symbol name
or an address.
@@ -109,10 +109,10 @@ index f12d8d12150..cf6cb428e7d 100644
@opindex pie
Produce a dynamically linked position independent executable on targets
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index b2200c5185a..f8be58ce0a6 100644
+index 19c75b6e20d..be7630ffd8c 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -1051,6 +1051,7 @@ proper position among the other output files. */
+@@ -1162,6 +1162,7 @@ proper position among the other output files. */
%(mflib) " STACK_SPLIT_SPEC "\
%{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
%{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}}\
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch b/poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch
index 9fbbe8070..265ca0e21 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0006-COLLECT_GCC_OPTIONS.patch
@@ -1,4 +1,4 @@
-From a6c90d3a9c5010b4aa7cc30467cf81ca7e0f430e Mon Sep 17 00:00:00 2001
+From 127716a32a11ca2a6b3aac068054bfc69c4dcfd8 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] COLLECT_GCC_OPTIONS
@@ -14,10 +14,10 @@ Upstream-Status: Pending
1 file changed, 9 insertions(+)
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index f8be58ce0a6..48b0f9dde81 100644
+index be7630ffd8c..1bc45285384 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -4806,6 +4806,15 @@ set_collect_gcc_options (void)
+@@ -5383,6 +5383,15 @@ set_collect_gcc_options (void)
sizeof ("COLLECT_GCC_OPTIONS=") - 1);
first_time = TRUE;
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/poky/meta/recipes-devtools/gcc/gcc/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
index a764bdd0f..9844c2ae8 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -1,4 +1,4 @@
-From 5670d4489f119d2da661734895ac0be99b606d1b Mon Sep 17 00:00:00 2001
+From e64342df647829d3e1c52fd480a5be7c1281ced0 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] Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}
@@ -26,10 +26,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 543b477ff18..a67d2cc18d6 100644
+index 8a5fb3fd99c..7da6f439fff 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -540,7 +540,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+@@ -552,7 +552,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
xmake_file=@xmake_file@
@@ -39,10 +39,10 @@ index 543b477ff18..a67d2cc18d6 100644
TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
diff --git a/gcc/configure b/gcc/configure
-index 8de766a942c..b26e8fc7fee 100755
+index 3f0734bff11..c5d3bc4ee2d 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -12705,8 +12705,8 @@ for f in $tm_file; do
+@@ -13090,8 +13090,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -54,10 +54,10 @@ index 8de766a942c..b26e8fc7fee 100755
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 8bfd6feb780..26fa46802c7 100644
+index 54e21764b3e..f83420326d6 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -2138,8 +2138,8 @@ for f in $tm_file; do
+@@ -2263,8 +2263,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -69,7 +69,7 @@ index 8bfd6feb780..26fa46802c7 100644
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index d2c677a4a42..d03852481cb 100644
+index c49acd8f7e4..a0a657bdbb9 100644
--- a/gcc/mkconfig.sh
+++ b/gcc/mkconfig.sh
@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch b/poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch
index 714db3bef..47f611e37 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0008-fortran-cross-compile-hack.patch
@@ -1,4 +1,4 @@
-From f05062625e7a4751be723595a2f7a4b7fbeff311 Mon Sep 17 00:00:00 2001
+From 904d102e3ccb93296b16ceb2e283a6ccf3c1d718 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] fortran cross-compile hack.
@@ -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 b4cf854ddb3..e8e0ac3b1cf 100755
+index f3634389cf8..f974e874b8e 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
-@@ -13090,7 +13090,7 @@ esac
+@@ -13102,7 +13102,7 @@ esac
# We need gfortran to compile parts of the library
#AC_PROG_FC(gfortran)
@@ -29,10 +29,10 @@ index b4cf854ddb3..e8e0ac3b1cf 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 711dc60ff78..3c9bbfbf47d 100644
+index 8961e314d82..49c8221cb6b 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
-@@ -258,7 +258,7 @@ AC_SUBST(enable_static)
+@@ -271,7 +271,7 @@ AC_SUBST(enable_static)
# We need gfortran to compile parts of the library
#AC_PROG_FC(gfortran)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0009-cpp-honor-sysroot.patch b/poky/meta/recipes-devtools/gcc/gcc/0009-cpp-honor-sysroot.patch
index 8ad6853d8..c720defa3 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0009-cpp-honor-sysroot.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0009-cpp-honor-sysroot.patch
@@ -1,4 +1,4 @@
-From 1d76de7f1f5c99f1fa1a4b14aedad3d702e4e136 Mon Sep 17 00:00:00 2001
+From 33a7a55d39c040ba09af2d69f7fa9cf8e6f84c91 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] cpp: honor sysroot.
@@ -26,21 +26,23 @@ 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 0ad4a33b93e..16c744f4f90 100644
+index 8902ae1d2ed..e99e2fcd6ad 100644
--- a/gcc/cp/lang-specs.h
+++ b/gcc/cp/lang-specs.h
-@@ -66,5 +66,5 @@ along with GCC; see the file COPYING3. If not see
+@@ -116,7 +116,7 @@ along with GCC; see the file COPYING3. If not see
{".ii", "@c++-cpp-output", 0, 0, 0},
{"@c++-cpp-output",
"%{!E:%{!M:%{!MM:"
- " cc1plus -fpreprocessed %i %(cc1_options) %2"
+ " cc1plus -fpreprocessed %i %I %(cc1_options) %2"
- " %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ " %{!fsyntax-only:"
+ " %{fmodule-only:%{!S:-o %g.s%V}}"
+ " %{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}"
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 48b0f9dde81..c87f603955f 100644
+index 1bc45285384..8737bae5353 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -1348,7 +1348,7 @@ static const struct compiler default_compilers[] =
+@@ -1470,7 +1470,7 @@ static const struct compiler default_compilers[] =
%W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
{".i", "@cpp-output", 0, 0, 0},
{"@cpp-output",
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch b/poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch
index 625e2d870..f385f8c5a 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0010-MIPS64-Default-to-N64-ABI.patch
@@ -1,4 +1,4 @@
-From 4fad4433c96bc9d0d9d124f9674fb3389f6f426e Mon Sep 17 00:00:00 2001
+From a2dc2fa4cc7e5d54544d4a7b6601eef79bc26cad 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] MIPS64: Default 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 cf1a87e2efd..37c4221a39f 100644
+index 3ec7582f5dd..a046fa6945c 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -2511,29 +2511,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
+@@ -2543,29 +2543,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
default_mips_arch=mips32
;;
mips64el-st-linux-gnu)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/poky/meta/recipes-devtools/gcc/gcc/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index e35797633..4726267a8 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -1,4 +1,4 @@
-From 8fc016a53c22c19feccbfa13ebdf19090dc67058 Mon Sep 17 00:00:00 2001
+From 8e9d6efecdc8c42f47e3a012dee764b13c3dad59 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] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
@@ -31,7 +31,7 @@ Upstream-Status: Inappropriate [OE configuration]
12 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index e25fcac3c59..01aca0c6542 100644
+index c1dae8ca2cf..3ce2b76c1a4 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
@@ -46,7 +46,7 @@ index e25fcac3c59..01aca0c6542 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 5bdcfa0c5d3..0c0332f317f 100644
+index 85d0136e76e..6bd95855827 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -65,8 +65,8 @@
@@ -61,7 +61,7 @@ index 5bdcfa0c5d3..0c0332f317f 100644
#define GLIBC_DYNAMIC_LINKER \
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index 0ec3aa53189..abfa9566d74 100644
+index 0c1c4e70b6b..6bd643ade11 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -60,7 +60,7 @@
@@ -74,7 +74,7 @@ index 0ec3aa53189..abfa9566d74 100644
#define LINUX_TARGET_LINK_SPEC "%{h*} \
%{static:-Bstatic} \
diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index 9f823f125ed..e0390b7d5e3 100644
+index 04b274f1654..7aafcf3ac2d 100644
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
@@ -87,7 +87,7 @@ index 9f823f125ed..e0390b7d5e3 100644
#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 6cb68d1ccfa..7de09ec857c 100644
+index b3822ced528..92d303e80d6 100644
--- a/gcc/config/i386/linux64.h
+++ b/gcc/config/i386/linux64.h
@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -104,7 +104,7 @@ index 6cb68d1ccfa..7de09ec857c 100644
#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 95654bcdb5a..0c1a8118a26 100644
+index 4e1db60fced..87efc5f69fe 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -94,10 +94,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -123,7 +123,7 @@ index 95654bcdb5a..0c1a8118a26 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 54446e58e5f..4786ee304c1 100644
+index 44a85e410d9..8d41b5574f6 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
@@ -154,7 +154,7 @@ index 54446e58e5f..4786ee304c1 100644
#undef MUSL_DYNAMIC_LINKER32
#define MUSL_DYNAMIC_LINKER32 \
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
-index 4afef7c228c..01997330741 100644
+index 9238de5bc92..7136a83260a 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see
@@ -167,10 +167,10 @@ index 4afef7c228c..01997330741 100644
#define MUSL_ABI_SUFFIX \
"%{mabi=ilp32:-sf}" \
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 34776c8421e..967c1c43c63 100644
+index e3f2cd254f6..a11e01faa3d 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
-@@ -419,24 +419,19 @@ extern int dot_symbols;
+@@ -336,24 +336,19 @@ extern int dot_symbols;
#undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
@@ -201,7 +201,7 @@ index 34776c8421e..967c1c43c63 100644
#undef DEFAULT_ASM_ENDIAN
#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index c1d0441d488..81373eb8336 100644
+index 7558d2f7195..3aaa6c3a078 100644
--- a/gcc/config/sh/linux.h
+++ b/gcc/config/sh/linux.h
@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see
@@ -214,10 +214,10 @@ index c1d0441d488..81373eb8336 100644
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 81201e67a2f..8b6fc577594 100644
+index 2550d7ee8f0..a94f4cd8ba2 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
-@@ -84,7 +84,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
+@@ -78,7 +78,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
When the -shared link option is used a final link is not being
done. */
@@ -227,10 +227,10 @@ index 81201e67a2f..8b6fc577594 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 a1a0efd8f28..85d1084afc2 100644
+index 95af8afa9b5..63127afb074 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
+@@ -78,8 +78,8 @@ along with GCC; see the file COPYING3. If not see
When the -shared link option is used a final link is not being
done. */
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch b/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch
index 88e1715b5..814ce18b9 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0012-gcc-Fix-argument-list-too-long-error.patch
@@ -1,4 +1,4 @@
-From a22d1264049d29b90663cf5667049ae6f9b7a5ce Mon Sep 17 00:00:00 2001
+From 12646c0899dec1b127ce71ebacf2571c1c7360f4 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] gcc: Fix argument list too long error.
@@ -22,17 +22,18 @@ fix. Add the sort to the original gcc code, leaving the tr+sort to fix the origi
issue but include the new files too as reported by Zhuang <qiuguang.zqg@alibaba-inc.com>
Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gcc/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index a67d2cc18d6..480c9366418 100644
+index 7da6f439fff..59c45c81393 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -3606,7 +3606,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.
+@@ -3678,7 +3678,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+ # We keep the directory structure for files in config, common/config or
+ # c-family and .def files. All other files are flattened to a single directory.
$(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
+ headers=`echo $(sort $(PLUGIN_HEADERS)) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0013-Disable-sdt.patch b/poky/meta/recipes-devtools/gcc/gcc/0013-Disable-sdt.patch
index 207cdb57a..1e657666d 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0013-Disable-sdt.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0013-Disable-sdt.patch
@@ -1,4 +1,4 @@
-From fa47586935a18ecfc2ad5586802e326e21741b7b Mon Sep 17 00:00:00 2001
+From 7928a4eddc4a6d821a6aa6eaaea1fd60d54e3da9 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] Disable sdt.
@@ -25,10 +25,10 @@ Upstream-Status: Inappropriate [hack]
4 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/gcc/configure b/gcc/configure
-index b26e8fc7fee..6080f86145e 100755
+index c5d3bc4ee2d..5160917d73e 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -29789,12 +29789,12 @@ fi
+@@ -30812,12 +30812,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,10 +48,10 @@ index b26e8fc7fee..6080f86145e 100755
$as_echo "$have_sys_sdt_h" >&6; }
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 26fa46802c7..42be5252778 100644
+index f83420326d6..50f78308e8a 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -6190,15 +6190,15 @@ fi
+@@ -6653,15 +6653,15 @@ fi
AC_SUBST([enable_default_ssp])
# Test for <sys/sdt.h> on the target.
@@ -77,10 +77,10 @@ index 26fa46802c7..42be5252778 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 9f9c5a2419a..71ed13b815b 100755
+index a310e9feb6c..c879445b8a6 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
-@@ -22615,11 +22615,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -22014,11 +22014,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,10 +96,10 @@ index 9f9c5a2419a..71ed13b815b 100755
$as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 699e55fd829..5c7a7bda439 100644
+index 3c799be82b1..3f63a8ec9ce 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
-@@ -241,7 +241,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
+@@ -240,7 +240,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
GLIBCXX_CHECK_SC_NPROC_ONLN
GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
GLIBCXX_CHECK_SYSCTL_HW_NCPU
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0014-libtool.patch b/poky/meta/recipes-devtools/gcc/gcc/0014-libtool.patch
index f4e70c3b1..f2b8924eb 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0014-libtool.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0014-libtool.patch
@@ -1,4 +1,4 @@
-From 6ecd478881468934444ff85611fd43f7033b1e81 Mon Sep 17 00:00:00 2001
+From a5b984db9669cf38a7bd76c3fcdb41c086f740db 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] libtool
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/poky/meta/recipes-devtools/gcc/gcc/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
index bc2674abc..1ccf39ceb 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -1,4 +1,4 @@
-From de4427fa49c07dc651ee6ceaf5c5078700ca3b08 Mon Sep 17 00:00:00 2001
+From 0ae7090dec149cb2ff0c87eef87c043d4000ece1 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] gcc: armv4: pass fix-v4bx to linker to support EABI.
@@ -19,7 +19,7 @@ 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 0c0332f317f..7b3769e8459 100644
+index 6bd95855827..77befab5da8 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -91,10 +91,14 @@
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/poky/meta/recipes-devtools/gcc/gcc/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
index 1dc4bb859..bde7ec660 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch
@@ -1,4 +1,4 @@
-From 6b363c2c1c089ee900efa6013aefba1003840a37 Mon Sep 17 00:00:00 2001
+From 5ce8aa4615a3816d12c43752323154744517ae9f 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] Use the multilib config files from ${B} instead of using the
@@ -18,10 +18,10 @@ Upstream-Status: Inappropriate [configuration]
2 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/gcc/configure b/gcc/configure
-index 6080f86145e..825a9652329 100755
+index 5160917d73e..e663052cad2 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -12685,10 +12685,20 @@ done
+@@ -13070,10 +13070,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
@@ -46,7 +46,7 @@ index 6080f86145e..825a9652329 100755
done
tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
-@@ -12699,6 +12709,10 @@ tm_file_list="options.h"
+@@ -13084,6 +13094,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 6080f86145e..825a9652329 100755
f=`echo $f | sed 's/^..//'`
tm_file_list="${tm_file_list} $f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 42be5252778..6099eb3251f 100644
+index 50f78308e8a..2b84875b028 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -2118,10 +2118,20 @@ done
+@@ -2243,10 +2243,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
@@ -86,7 +86,7 @@ index 42be5252778..6099eb3251f 100644
done
tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
-@@ -2132,6 +2142,10 @@ tm_file_list="options.h"
+@@ -2257,6 +2267,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h"
for f in $tm_file; do
case $f in
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/poky/meta/recipes-devtools/gcc/gcc/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
index 05f12847e..3e0a1b413 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
@@ -1,4 +1,4 @@
-From 08752c2f1d21553301bee5757c453c6a36cbe03c Mon Sep 17 00:00:00 2001
+From 75a1ce0265ca123f74f17a40ad8bd8f26d9c2ab3 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] Avoid using libdir from .la which usually points to a host
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0018-export-CPP.patch b/poky/meta/recipes-devtools/gcc/gcc/0018-export-CPP.patch
index 886a1221d..e6596da5c 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0018-export-CPP.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0018-export-CPP.patch
@@ -1,4 +1,4 @@
-From 5c3d66378c7ff60ca11a875aa4aa6f8a8529d43a Mon Sep 17 00:00:00 2001
+From b6e229a13aebfbb3fe38c216fd51b68bf71cfa9c 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] export CPP
@@ -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 36e369df6e7..c717903bb13 100644
+index 047be0255e2..af19589fa95 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch b/poky/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch
index 2797b2c22..120d5a29b 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0019-Ensure-target-gcc-headers-can-be-included.patch
@@ -1,4 +1,4 @@
-From 378b752c5d9a3dba4e58cdadf8b4b4f34ea99a76 Mon Sep 17 00:00:00 2001
+From 6f410ed8fb7eee11ba7a25634c2257666b98ef52 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] Ensure target gcc headers can be included
@@ -11,20 +11,24 @@ found by gcc with the existing search paths. Add support for
picking up these headers under the sysroot supplied on the gcc
command line in order to resolve this.
+Extend target gcc headers search to musl too
+
Upstream-Status: Pending
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- gcc/Makefile.in | 2 ++
- gcc/cppdefault.c | 4 ++++
- 2 files changed, 6 insertions(+)
+ gcc/Makefile.in | 2 ++
+ gcc/config/linux.h | 8 ++++++++
+ gcc/config/rs6000/sysv4.h | 8 ++++++++
+ gcc/cppdefault.c | 4 ++++
+ 4 files changed, 22 insertions(+)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 480c9366418..011c7ac2db6 100644
+index 59c45c81393..9b17d120aa1 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -618,6 +618,7 @@ libexecdir = @libexecdir@
+@@ -630,6 +630,7 @@ libexecdir = @libexecdir@
# Directory in which the compiler finds libraries etc.
libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
@@ -32,7 +36,7 @@ index 480c9366418..011c7ac2db6 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
-@@ -2946,6 +2947,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
+@@ -3016,6 +3017,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
PREPROCESSOR_DEFINES = \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
@@ -40,11 +44,63 @@ index 480c9366418..011c7ac2db6 100644
-DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
+diff --git a/gcc/config/linux.h b/gcc/config/linux.h
+index 87efc5f69fe..b525bcd56b3 100644
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -165,6 +165,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define INCLUDE_DEFAULTS_MUSL_TOOL
+ #endif
+
++#ifdef GCC_INCLUDE_SUBDIR_TARGET
++#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
++#endif
++
+ #ifdef NATIVE_SYSTEM_HEADER_DIR
+ #define INCLUDE_DEFAULTS_MUSL_NATIVE \
+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
+@@ -191,6 +198,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ INCLUDE_DEFAULTS_MUSL_PREFIX \
+ INCLUDE_DEFAULTS_MUSL_CROSS \
+ INCLUDE_DEFAULTS_MUSL_TOOL \
++ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
+ INCLUDE_DEFAULTS_MUSL_NATIVE \
+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
+ { 0, 0, 0, 0, 0, 0 } \
+diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
+index 510abe169c5..0c2bba5ea32 100644
+--- a/gcc/config/rs6000/sysv4.h
++++ b/gcc/config/rs6000/sysv4.h
+@@ -995,6 +995,13 @@ ncrtn.o%s"
+ #define INCLUDE_DEFAULTS_MUSL_TOOL
+ #endif
+
++#ifdef GCC_INCLUDE_SUBDIR_TARGET
++#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
++#endif
++
+ #ifdef NATIVE_SYSTEM_HEADER_DIR
+ #define INCLUDE_DEFAULTS_MUSL_NATIVE \
+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
+@@ -1021,6 +1028,7 @@ ncrtn.o%s"
+ INCLUDE_DEFAULTS_MUSL_PREFIX \
+ INCLUDE_DEFAULTS_MUSL_CROSS \
+ INCLUDE_DEFAULTS_MUSL_TOOL \
++ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
+ INCLUDE_DEFAULTS_MUSL_NATIVE \
+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
+ { 0, 0, 0, 0, 0, 0 } \
diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index af38cc494ea..2f43b88a0c3 100644
+index c503d14fc3f..d54d6ce0076 100644
--- a/gcc/cppdefault.c
+++ b/gcc/cppdefault.c
-@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
+@@ -64,6 +64,10 @@ const struct default_include cpp_include_defaults[]
/* This is the dir for gcc's private headers. */
{ GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
#endif
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0020-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/poky/meta/recipes-devtools/gcc/gcc/0020-Don-t-search-host-directory-during-relink-if-inst_pr.patch
index c3baf8b45..bb2a3671f 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0020-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0020-Don-t-search-host-directory-during-relink-if-inst_pr.patch
@@ -1,4 +1,4 @@
-From 870e805d705d99d9b9d7dbd09727f9c1d2ad9c1d Mon Sep 17 00:00:00 2001
+From cd09adb1e7f2a7e81a9f595a17c36f24911b90ac 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] Don't search host directory during "relink" if $inst_prefix
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0021-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/poky/meta/recipes-devtools/gcc/gcc/0021-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
index abee48669..0f3b3869b 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0021-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0021-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
@@ -1,4 +1,4 @@
-From aba42de763a619355471efd1573561b0cbf51162 Mon Sep 17 00:00:00 2001
+From 7faad21154a76b200efcced9e12945057c94dff3 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] Use SYSTEMLIBS_DIR replacement instead of hardcoding
@@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index e587e2e9ad6..ddc62895693 100644
+index 7f2529a2a1d..5303b39186f 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -21,7 +21,7 @@
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0022-aarch64-Add-support-for-musl-ldso.patch b/poky/meta/recipes-devtools/gcc/gcc/0022-aarch64-Add-support-for-musl-ldso.patch
index c55b66d4b..41536a8a3 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0022-aarch64-Add-support-for-musl-ldso.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0022-aarch64-Add-support-for-musl-ldso.patch
@@ -1,4 +1,4 @@
-From d63820a78d92f302410358293546f01c7ad17bd8 Mon Sep 17 00:00:00 2001
+From 96aa24a874331a318693e4fccc4bc4e7d3fbad2b 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] aarch64: Add support for musl ldso
@@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index ddc62895693..b301825313a 100644
+index 5303b39186f..4bcae7f3110 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -24,7 +24,7 @@
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0023-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/poky/meta/recipes-devtools/gcc/gcc/0023-libcc1-fix-libcc1-s-install-path-and-rpath.patch
index 80c4d2292..fb4511cc1 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0023-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0023-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -1,4 +1,4 @@
-From 3474e16ad4ea8cf4e0e330568e3bc9039e723dce Mon Sep 17 00:00:00 2001
+From 2cfc5ee38b3f5ec1d7965aae0991bcd48b5dc2e6 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] libcc1: fix libcc1's install path and rpath
@@ -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 c005b0dad4a..ec31d35b7b9 100644
+index f148fdd7aa2..0b6eb8f2855 100644
--- a/libcc1/Makefile.am
+++ b/libcc1/Makefile.am
-@@ -37,8 +37,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+@@ -40,8 +40,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
$(Wc)$(libiberty_normal)))
libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
@@ -35,10 +35,10 @@ index c005b0dad4a..ec31d35b7b9 100644
if ENABLE_PLUGIN
plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
-index 7104b649026..2103c477468 100644
+index 753d435c9cb..455627b0a3b 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
-@@ -393,8 +393,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+@@ -398,8 +398,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
$(Wc)$(libiberty_normal)))
libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch b/poky/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
index dc3e6da65..b1054fa74 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0024-handle-sysroot-support-for-nativesdk-gcc.patch
@@ -1,4 +1,4 @@
-From 702daf2e9cb97337e0e594fcd435b1b61a917d14 Mon Sep 17 00:00:00 2001
+From 354682ad8f71f62643dcd83f64b51b5979615a0c 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] handle sysroot support for nativesdk-gcc
@@ -23,6 +23,9 @@ b) Add other paths which need relocation into a .gccrelocprefix section
Upstream-Status: Inappropriate
RP 2015/7/28
+Extend the gccrelocprefix support to musl config too, this ensures
+that gcc will get right bits in SDK installations
+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Added PREFIXVAR and EXEC_PREFIXVAR to support runtime relocation. Without
@@ -32,19 +35,21 @@ implementation.)
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
---
- gcc/c-family/c-opts.c | 4 +--
- gcc/cppdefault.c | 63 ++++++++++++++++++++++++++-----------------
- gcc/cppdefault.h | 13 ++++-----
- gcc/gcc.c | 20 +++++++++-----
- gcc/incpath.c | 12 ++++-----
- gcc/prefix.c | 6 +++--
- 6 files changed, 70 insertions(+), 48 deletions(-)
+ gcc/c-family/c-opts.c | 4 +--
+ gcc/config/linux.h | 24 +++++++--------
+ gcc/config/rs6000/sysv4.h | 24 +++++++--------
+ gcc/cppdefault.c | 63 ++++++++++++++++++++++++---------------
+ gcc/cppdefault.h | 13 ++++----
+ gcc/gcc.c | 20 +++++++++----
+ gcc/incpath.c | 12 ++++----
+ gcc/prefix.c | 6 ++--
+ 8 files changed, 94 insertions(+), 72 deletions(-)
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
-index 58ba0948e79..806bbcfb7a5 100644
+index 89e05a4c551..5577383665d 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
-@@ -1409,8 +1409,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain)
+@@ -1436,8 +1436,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain)
size_t prefix_len, suffix_len;
suffix_len = strlen (suffix);
@@ -55,8 +60,164 @@ index 58ba0948e79..806bbcfb7a5 100644
path = (char *) xmalloc (prefix_len + suffix_len + 1);
memcpy (path, prefix, prefix_len);
+diff --git a/gcc/config/linux.h b/gcc/config/linux.h
+index b525bcd56b3..ba02c013e30 100644
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -129,53 +129,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ * 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_DIRVAR, "G++", 1, 1, \
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
+- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
++ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, \
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
+- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
++ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "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 },
++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, \
++ { LOCAL_INCLUDE_DIRVAR, 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},
++ { PREFIX_INCLUDE_DIRVAR, 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},
++ { CROSS_INCLUDE_DIRVAR, "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},
++ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0},
+ #else
+ #define INCLUDE_DEFAULTS_MUSL_TOOL
+ #endif
+
+ #ifdef GCC_INCLUDE_SUBDIR_TARGET
+ #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
+- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
++ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0},
+ #else
+ #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
+ #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 },
++ { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 2 }, \
++ { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 0 },
+ #else
+ #define INCLUDE_DEFAULTS_MUSL_NATIVE
+ #endif
+@@ -200,7 +200,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ INCLUDE_DEFAULTS_MUSL_TOOL \
+ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
+ INCLUDE_DEFAULTS_MUSL_NATIVE \
+- { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
++ { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \
+ { 0, 0, 0, 0, 0, 0 } \
+ }
+ #endif
+diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
+index 0c2bba5ea32..313a8de4417 100644
+--- a/gcc/config/rs6000/sysv4.h
++++ b/gcc/config/rs6000/sysv4.h
+@@ -959,53 +959,53 @@ ncrtn.o%s"
+ /* Include order changes for musl, same as in generic linux.h. */
+ #if DEFAULT_LIBC == LIBC_MUSL
+ #define INCLUDE_DEFAULTS_MUSL_GPP \
+- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
++ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, \
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
+- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
++ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, \
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
+- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
++ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "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 },
++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, \
++ { LOCAL_INCLUDE_DIRVAR, 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},
++ { PREFIX_INCLUDE_DIRVAR, 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},
++ { CROSS_INCLUDE_DIRVAR, "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},
++ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0},
+ #else
+ #define INCLUDE_DEFAULTS_MUSL_TOOL
+ #endif
+
+ #ifdef GCC_INCLUDE_SUBDIR_TARGET
+ #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
+- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0},
++ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0},
+ #else
+ #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET
+ #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 },
++ { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 2 }, \
++ { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 0 },
+ #else
+ #define INCLUDE_DEFAULTS_MUSL_NATIVE
+ #endif
+@@ -1030,7 +1030,7 @@ ncrtn.o%s"
+ INCLUDE_DEFAULTS_MUSL_TOOL \
+ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
+ INCLUDE_DEFAULTS_MUSL_NATIVE \
+- { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
++ { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \
+ { 0, 0, 0, 0, 0, 0 } \
+ }
+ #endif
diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 2f43b88a0c3..6b6be04686c 100644
+index d54d6ce0076..784a92a0c24 100644
--- a/gcc/cppdefault.c
+++ b/gcc/cppdefault.c
@@ -35,6 +35,30 @@
@@ -90,7 +251,7 @@ index 2f43b88a0c3..6b6be04686c 100644
const struct default_include cpp_include_defaults[]
#ifdef INCLUDE_DEFAULTS
= INCLUDE_DEFAULTS;
-@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
+@@ -42,17 +66,17 @@ const struct default_include cpp_include_defaults[]
= {
#ifdef GPLUSPLUS_INCLUDE_DIR
/* Pick up GNU C++ generic include files. */
@@ -110,6 +271,9 @@ index 2f43b88a0c3..6b6be04686c 100644
+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
#endif
+ #ifdef GPLUSPLUS_LIBCXX_INCLUDE_DIR
+@@ -62,23 +86,23 @@ const struct default_include cpp_include_defaults[]
+ #endif
#ifdef GCC_INCLUDE_DIR
/* This is the dir for gcc's private headers. */
- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
@@ -138,7 +302,7 @@ index 2f43b88a0c3..6b6be04686c 100644
/* A multilib suffix needs adding if different multilibs use
different headers. */
#ifdef SYSROOT_HEADERS_SUFFIX_SPEC
-@@ -85,33 +109,24 @@ const struct default_include cpp_include_defaults[]
+@@ -90,33 +114,24 @@ const struct default_include cpp_include_defaults[]
#endif
#ifdef CROSS_INCLUDE_DIR
/* One place the target system's headers might be. */
@@ -179,7 +343,7 @@ index 2f43b88a0c3..6b6be04686c 100644
/* This value is set by cpp_relocated at runtime */
const char *gcc_exec_prefix;
diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
-index a681264f75e..5e10a2fa140 100644
+index fd3c655db1c..20669ac427d 100644
--- a/gcc/cppdefault.h
+++ b/gcc/cppdefault.h
@@ -33,7 +33,8 @@
@@ -191,8 +355,8 @@ index a681264f75e..5e10a2fa140 100644
+
const char *const component; /* The component containing the directory
(see update_path in prefix.c) */
- const char cplusplus; /* Only look here if we're compiling C++. */
-@@ -50,17 +51,13 @@ struct default_include
+ const char cplusplus; /* When this is non-zero, we should only
+@@ -55,17 +56,13 @@ struct default_include
};
extern const struct default_include cpp_include_defaults[];
@@ -214,7 +378,7 @@ index a681264f75e..5e10a2fa140 100644
subdirectory of the actual installation. */
extern const char *gcc_exec_prefix;
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index c87f603955f..535d5c3bb65 100644
+index 8737bae5353..aa6fbe43965 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -252,6 +252,8 @@ FILE *report_times_to_file = NULL;
@@ -226,7 +390,7 @@ index c87f603955f..535d5c3bb65 100644
/* Nonzero means pass the updated target_system_root to the compiler. */
static int target_system_root_changed;
-@@ -526,6 +528,7 @@ or with constant text in a single argument.
+@@ -568,6 +570,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.
@@ -234,7 +398,7 @@ index c87f603955f..535d5c3bb65 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.
-@@ -1499,10 +1502,10 @@ static const char *gcc_libexec_prefix;
+@@ -1621,10 +1624,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. */
@@ -249,7 +413,7 @@ index c87f603955f..535d5c3bb65 100644
/* For native compilers, these are well-known paths containing
components that may be provided by the system. For cross
-@@ -1510,9 +1513,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+@@ -1632,9 +1635,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;
@@ -261,7 +425,7 @@ index c87f603955f..535d5c3bb65 100644
= STANDARD_STARTFILE_PREFIX_2;
/* A relative path to be used in finding the location of tools
-@@ -5952,6 +5955,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
+@@ -6564,6 +6567,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
}
break;
@@ -274,7 +438,7 @@ index c87f603955f..535d5c3bb65 100644
value = do_spec_1 (startfile_spec, 0, NULL);
if (value != 0)
diff --git a/gcc/incpath.c b/gcc/incpath.c
-index 9098ab044ab..bfad4ebe382 100644
+index fbfc0ce03b8..a82e543428b 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
@@ -131,7 +131,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
@@ -286,7 +450,7 @@ index 9098ab044ab..bfad4ebe382 100644
{
/* Look for directories that start with the standard prefix.
"Translate" them, i.e. replace /usr/local/lib/gcc... with
-@@ -145,7 +145,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
+@@ -146,7 +146,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
now. */
if (sysroot && p->add_sysroot)
continue;
@@ -295,7 +459,7 @@ index 9098ab044ab..bfad4ebe382 100644
{
char *str = concat (iprefix, p->fname + len, NULL);
if (p->multilib == 1 && imultilib)
-@@ -185,7 +185,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
+@@ -187,7 +187,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
free (sysroot_no_trailing_dir_separator);
}
else if (!p->add_sysroot && relocated
@@ -304,7 +468,7 @@ index 9098ab044ab..bfad4ebe382 100644
{
static const char *relocated_prefix;
char *ostr;
-@@ -202,12 +202,12 @@ add_standard_paths (const char *sysroot, const char *iprefix,
+@@ -204,12 +204,12 @@ add_standard_paths (const char *sysroot, const char *iprefix,
dummy = concat (gcc_exec_prefix, "dummy", NULL);
relocated_prefix
= make_relative_prefix (dummy,
@@ -321,7 +485,7 @@ index 9098ab044ab..bfad4ebe382 100644
str = update_path (ostr, p->component);
free (ostr);
diff --git a/gcc/prefix.c b/gcc/prefix.c
-index 1a403e535bd..c26d07bde12 100644
+index 747c09de638..f728638dc65 100644
--- a/gcc/prefix.c
+++ b/gcc/prefix.c
@@ -72,7 +72,9 @@ License along with GCC; see the file COPYING3. If not see
@@ -344,6 +508,3 @@ index 1a403e535bd..c26d07bde12 100644
/* We used to strip trailing DIR_SEPARATORs here, but that can
sometimes yield a result with no separator when one was coded
---
-2.29.2
-
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0025-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/poky/meta/recipes-devtools/gcc/gcc/0025-Search-target-sysroot-gcc-version-specific-dirs-with.patch
index abf1f8491..ff622b105 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0025-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0025-Search-target-sysroot-gcc-version-specific-dirs-with.patch
@@ -1,4 +1,4 @@
-From 9c0c73ee48dbee2aad57f4dcdad1b7b74e77b944 Mon Sep 17 00:00:00 2001
+From c55e24459370ad96577496ecd87475e3a9de7dad 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] Search target sysroot gcc version specific dirs with
@@ -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 535d5c3bb65..04647ae812d 100644
+index aa6fbe43965..f8a71a13826 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -2616,7 +2616,7 @@ for_each_path (const struct path_prefix *paths,
+@@ -2811,7 +2811,7 @@ for_each_path (const struct path_prefix *paths,
if (path == NULL)
{
len = paths->max_len + extra_space + 1;
@@ -63,7 +63,7 @@ index 535d5c3bb65..04647ae812d 100644
path = XNEWVEC (char, len);
}
-@@ -2628,6 +2628,33 @@ for_each_path (const struct path_prefix *paths,
+@@ -2823,6 +2823,33 @@ for_each_path (const struct path_prefix *paths,
/* Look first in MACHINE/VERSION subdirectory. */
if (!skip_multi_dir)
{
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0026-Fix-various-_FOR_BUILD-and-related-variables.patch b/poky/meta/recipes-devtools/gcc/gcc/0026-Fix-various-_FOR_BUILD-and-related-variables.patch
index 97bf2f3a7..c2698f9ee 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0026-Fix-various-_FOR_BUILD-and-related-variables.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0026-Fix-various-_FOR_BUILD-and-related-variables.patch
@@ -1,4 +1,4 @@
-From 3a003af8804dda90fdf4862eca5f66cb12faaf02 Mon Sep 17 00:00:00 2001
+From cd5db101e3c4e72248f988a67ce28be8e24f66d4 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] Fix various _FOR_BUILD and related variables
@@ -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 c717903bb13..5abc649868d 100644
+index af19589fa95..d0116a23e1a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
@@ -64,7 +64,7 @@ index c717903bb13..5abc649868d 100644
"FLEX=$(FLEX)" \
"INSTALL=$(INSTALL)" \
diff --git a/Makefile.tpl b/Makefile.tpl
-index efed1511750..778beb705b4 100644
+index 6e0337fb48f..4fcac93d3d8 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
@@ -94,10 +94,10 @@ index efed1511750..778beb705b4 100644
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 011c7ac2db6..2f1165f7b5e 100644
+index 9b17d120aa1..3053d05903c 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -805,7 +805,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@
+@@ -820,7 +820,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) \
@@ -107,10 +107,10 @@ index 011c7ac2db6..2f1165f7b5e 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 825a9652329..ff46cf58960 100755
+index e663052cad2..b0906aa3e96 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -12314,7 +12314,7 @@ else
+@@ -12699,7 +12699,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 825a9652329..ff46cf58960 100755
--enable-languages=${enable_languages-all} \
${enable_obsolete+--enable-obsolete="$enable_obsolete"} \
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 6099eb3251f..b3c345b61dc 100644
+index 2b84875b028..bfbd8946e8a 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -1898,7 +1898,7 @@ else
+@@ -2023,7 +2023,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}" \
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0027-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/poky/meta/recipes-devtools/gcc/gcc/0027-nios2-Define-MUSL_DYNAMIC_LINKER.patch
index 3cd75b718..2e65740ec 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0027-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0027-nios2-Define-MUSL_DYNAMIC_LINKER.patch
@@ -1,4 +1,4 @@
-From 4e53d0ae70af85af0e112a48a3e4dfe4c39f4a8d Mon Sep 17 00:00:00 2001
+From 9bbce1b5a10caf636eee137e5a229e5434a6c8f5 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] nios2: Define MUSL_DYNAMIC_LINKER
@@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
-index 4bdcdcca1f0..e7943a9d640 100644
+index 08edf1521f6..15696d86241 100644
--- a/gcc/config/nios2/linux.h
+++ b/gcc/config/nios2/linux.h
@@ -30,6 +30,7 @@
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/poky/meta/recipes-devtools/gcc/gcc/0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
index 2a6769a82..9c616d24d 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
@@ -1,4 +1,4 @@
-From 5db0404eb770ac477fd99d444226bcf021067584 Mon Sep 17 00:00:00 2001
+From 745a2ac7825c73102b888226c54397d21512f86b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 27 Jun 2017 18:10:54 -0700
Subject: [PATCH] Add ssp_nonshared to link commandline for musl targets
@@ -22,12 +22,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
gcc/config/rs6000/linux64.h | 10 ++++++++++
3 files changed, 27 insertions(+)
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 0c1a8118a26..bdc2a2d0659 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
-@@ -195,6 +195,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
+@@ -203,6 +203,13 @@ see the files COPYING3 and COPYING.RUNTI
+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \
{ 0, 0, 0, 0, 0, 0 } \
}
+#ifdef TARGET_LIBC_PROVIDES_SSP
@@ -40,8 +38,6 @@ index 0c1a8118a26..bdc2a2d0659 100644
#endif
#if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
-diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
-index b7026fcbee7..dd54d6c393e 100644
--- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h
@@ -94,6 +94,16 @@
@@ -61,11 +57,9 @@ index b7026fcbee7..dd54d6c393e 100644
#undef LINK_OS_LINUX_SPEC
#define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \
%{!static-pie: \
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 967c1c43c63..dc5e4d97975 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
-@@ -452,6 +452,16 @@ extern int dot_symbols;
+@@ -369,6 +369,16 @@ extern int dot_symbols;
" -m elf64ppc")
#endif
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/poky/meta/recipes-devtools/gcc/gcc/0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
index 767cba038..b74aeb8bb 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
@@ -1,4 +1,4 @@
-From fbc926dbf6a47fa623b9c94cd9b09a0e90448fdc Mon Sep 17 00:00:00 2001
+From 695adb4dffb23c6f5cbc757e05cf4187a2bd6528 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] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
@@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
-index c997553447c..330352c2c81 100644
+index c59b43b7b69..ca4c141f526 100644
--- a/libgcc/config/t-slibgcc
+++ b/libgcc/config/t-slibgcc
@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch b/poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch
index 4f18907a1..86f75d0d5 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0030-sync-gcc-stddef.h-with-musl.patch
@@ -1,4 +1,4 @@
-From 24dc04dc8d69e3bf61322615b3ef18e02ccd311e Mon Sep 17 00:00:00 2001
+From a9173429ae256c4b4a3ab4d758a6adf42f8c4239 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] sync gcc stddef.h with musl
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 9 insertions(+)
diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
-index 9d67eac4947..6cb5edbedb4 100644
+index 66619fe43b1..3f843d6f365 100644
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
@@ -128,6 +128,7 @@ _TYPE_wchar_t;
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch b/poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
index 702279af0..70afa4f9e 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
@@ -1,4 +1,4 @@
-From 27b8ba5555ada2dab076988529bfb84d00a4b901 Mon Sep 17 00:00:00 2001
+From 3d59f763b824ac11f8360931092baf0bc1719562 Mon Sep 17 00:00:00 2001
From: Juro Bystricky <juro.bystricky@intel.com>
Date: Mon, 19 Mar 2018 22:31:20 -0700
Subject: [PATCH] fix segmentation fault in precompiled header generation
@@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/libcpp/lex.c b/libcpp/lex.c
-index 56ac3a1dd73..73a951148b3 100644
+index 06bcc31c87e..24bed9a35fa 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
-@@ -3311,11 +3311,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token,
+@@ -3531,11 +3531,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token,
spell_ident:
case SPELL_IDENT:
if (forstring)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0032-Fix-for-testsuite-failure.patch b/poky/meta/recipes-devtools/gcc/gcc/0032-Fix-for-testsuite-failure.patch
index 0a0767b44..0be03e652 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0032-Fix-for-testsuite-failure.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0032-Fix-for-testsuite-failure.patch
@@ -1,4 +1,4 @@
-From 2512aacf023c679d86d8f40caff4f6ff412b32ff Mon Sep 17 00:00:00 2001
+From bb171ef618f8892bd56e57ae41ecb6e02caa8173 Mon Sep 17 00:00:00 2001
From: RAGHUNATH LOLUR <raghunath.lolur@kpit.com>
Date: Wed, 6 Dec 2017 22:52:26 -0800
Subject: [PATCH] Fix for testsuite failure
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0033-Re-introduce-spe-commandline-options.patch b/poky/meta/recipes-devtools/gcc/gcc/0033-Re-introduce-spe-commandline-options.patch
index ba7c2b8fd..129f555a4 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0033-Re-introduce-spe-commandline-options.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0033-Re-introduce-spe-commandline-options.patch
@@ -1,4 +1,4 @@
-From 3fc06241ce37e2e4b3ed21ace28d347eb511448d Mon Sep 17 00:00:00 2001
+From 0b900d6410b7c1938e86eceb87b032fd538566a9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 6 Jun 2018 12:10:22 -0700
Subject: [PATCH] Re-introduce spe commandline options
@@ -10,17 +10,18 @@ Upstream-Status: Inappropriate [SPE port is removed from rs600 port]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- gcc/config/rs6000/rs6000.opt | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
+ gcc/config/rs6000/rs6000.opt | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
-index f95b8279270..0e52d51409d 100644
+index 0dbdf753673..b273eb65c35 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
-@@ -344,6 +344,18 @@ mdebug=
+@@ -352,6 +352,19 @@ mdebug=
Target RejectNegative Joined
-mdebug= Enable debug output.
++; PPC SPE ABI
+mspe
+Target Var(rs6000_spe) Save
+Generate SPE SIMD instructions on E500.
@@ -33,6 +34,6 @@ index f95b8279270..0e52d51409d 100644
+Target RejectNegative Var(rs6000_spe_abi, 0)
+Do not use the SPE ABI extensions.
+
+ ; Altivec ABI
mabi=altivec
Target RejectNegative Var(rs6000_altivec_abi) Save
- Use the AltiVec ABI extensions.
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/poky/meta/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
index 4ce9dc6de..3f666dc7b 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
@@ -1,4 +1,4 @@
-From b42ff59c3fe2967d37815c8db72a47b9b7f585b4 Mon Sep 17 00:00:00 2001
+From ea9154338cb3acbd75945fddde4202e73c20dd1a Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 24 Oct 2015 20:09:53 +0000
Subject: [PATCH] libgcc_s: Use alias for __cpu_indicator_init instead of
@@ -39,10 +39,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c
-index 48f00c5fcfc..468f5f71fac 100644
+index ac69eed4d32..ffaa44a16fc 100644
--- a/gcc/config/i386/i386-expand.c
+++ b/gcc/config/i386/i386-expand.c
-@@ -10941,10 +10941,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
+@@ -11038,10 +11038,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
{
case IX86_BUILTIN_CPU_INIT:
{
@@ -56,11 +56,11 @@ index 48f00c5fcfc..468f5f71fac 100644
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
}
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
-index 00322c58622..f42bbb8af98 100644
+index ef463848f9d..1a3de052c80 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
-@@ -508,7 +508,7 @@ __cpu_indicator_init (void)
- return 0;
+@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
+ __cpu_features2);
}
-#if defined SHARED && defined USE_ELF_SYMVER
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch b/poky/meta/recipes-devtools/gcc/gcc/0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
index dd1bf6ded..874cd7798 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch
@@ -1,4 +1,4 @@
-From 0395060a7dcf98c5f5a65103f6aaa71d6b862259 Mon Sep 17 00:00:00 2001
+From 520411cf364ee4b0b5a8f0857498aaabd790afb3 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Tue, 10 Mar 2020 08:26:53 -0700
Subject: [PATCH] gentypes/genmodes: Do not use __LINE__ for maintaining
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
-index 981577481af..d5700fff401 100644
+index 5f50242e857..cbaca9b8cd0 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -991,7 +991,7 @@ create_field_at (pair_p next, type_p type, const char *name, options_p opt,
@@ -38,7 +38,7 @@ index 981577481af..d5700fff401 100644
/* Reverse a linked list of 'struct pair's in place. */
pair_p
-@@ -5187,7 +5187,7 @@ main (int argc, char **argv)
+@@ -5189,7 +5189,7 @@ main (int argc, char **argv)
/* These types are set up with #define or else outside of where
we can see them. We should initialize them before calling
read_input_list. */
@@ -48,10 +48,10 @@ index 981577481af..d5700fff401 100644
POS_HERE (do_scalar_typedef ("CUMULATIVE_ARGS", &pos));
POS_HERE (do_scalar_typedef ("REAL_VALUE_TYPE", &pos));
diff --git a/gcc/genmodes.c b/gcc/genmodes.c
-index bd78310ea24..dbd02c51a4c 100644
+index c268ebc4c6e..4361f3f1563 100644
--- a/gcc/genmodes.c
+++ b/gcc/genmodes.c
-@@ -430,7 +430,7 @@ complete_all_modes (void)
+@@ -438,7 +438,7 @@ complete_all_modes (void)
}
/* For each mode in class CLASS, construct a corresponding complex mode. */
@@ -60,7 +60,7 @@ index bd78310ea24..dbd02c51a4c 100644
static void
make_complex_modes (enum mode_class cl,
const char *file, unsigned int line)
-@@ -489,7 +489,7 @@ make_complex_modes (enum mode_class cl,
+@@ -497,7 +497,7 @@ make_complex_modes (enum mode_class cl,
having as many components as necessary. ORDER is the sorting order
of the mode, with smaller numbers indicating a higher priority. */
#define VECTOR_MODES_WITH_PREFIX(PREFIX, C, W, ORDER) \
@@ -69,7 +69,7 @@ index bd78310ea24..dbd02c51a4c 100644
#define VECTOR_MODES(C, W) VECTOR_MODES_WITH_PREFIX (V, C, W, 0)
static void ATTRIBUTE_UNUSED
make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
-@@ -541,7 +541,7 @@ make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
+@@ -549,7 +549,7 @@ make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
/* Create a vector of booleans called NAME with COUNT elements and
BYTESIZE bytes in total. */
#define VECTOR_BOOL_MODE(NAME, COUNT, BYTESIZE) \
@@ -78,7 +78,7 @@ index bd78310ea24..dbd02c51a4c 100644
static void ATTRIBUTE_UNUSED
make_vector_bool_mode (const char *name, unsigned int count,
unsigned int bytesize, const char *file,
-@@ -563,7 +563,7 @@ make_vector_bool_mode (const char *name, unsigned int count,
+@@ -571,7 +571,7 @@ make_vector_bool_mode (const char *name, unsigned int count,
/* Input. */
#define _SPECIAL_MODE(C, N) \
@@ -87,7 +87,7 @@ index bd78310ea24..dbd02c51a4c 100644
#define RANDOM_MODE(N) _SPECIAL_MODE (RANDOM, N)
#define CC_MODE(N) _SPECIAL_MODE (CC, N)
-@@ -576,7 +576,7 @@ make_special_mode (enum mode_class cl, const char *name,
+@@ -584,7 +584,7 @@ make_special_mode (enum mode_class cl, const char *name,
#define INT_MODE(N, Y) FRACTIONAL_INT_MODE (N, -1U, Y)
#define FRACTIONAL_INT_MODE(N, B, Y) \
@@ -96,7 +96,7 @@ index bd78310ea24..dbd02c51a4c 100644
static void
make_int_mode (const char *name,
-@@ -589,16 +589,16 @@ make_int_mode (const char *name,
+@@ -611,16 +611,16 @@ make_opaque_mode (const char *name,
}
#define FRACT_MODE(N, Y, F) \
@@ -117,7 +117,7 @@ index bd78310ea24..dbd02c51a4c 100644
/* Create a fixed-point mode by setting CL, NAME, BYTESIZE, IBIT, FBIT,
FILE, and LINE. */
-@@ -619,7 +619,7 @@ make_fixed_point_mode (enum mode_class cl,
+@@ -641,7 +641,7 @@ make_fixed_point_mode (enum mode_class cl,
#define FLOAT_MODE(N, Y, F) FRACTIONAL_FLOAT_MODE (N, -1U, Y, F)
#define FRACTIONAL_FLOAT_MODE(N, B, Y, F) \
@@ -126,7 +126,7 @@ index bd78310ea24..dbd02c51a4c 100644
static void
make_float_mode (const char *name,
-@@ -636,7 +636,7 @@ make_float_mode (const char *name,
+@@ -658,7 +658,7 @@ make_float_mode (const char *name,
#define DECIMAL_FLOAT_MODE(N, Y, F) \
FRACTIONAL_DECIMAL_FLOAT_MODE (N, -1U, Y, F)
#define FRACTIONAL_DECIMAL_FLOAT_MODE(N, B, Y, F) \
@@ -135,7 +135,7 @@ index bd78310ea24..dbd02c51a4c 100644
static void
make_decimal_float_mode (const char *name,
-@@ -651,7 +651,7 @@ make_decimal_float_mode (const char *name,
+@@ -673,7 +673,7 @@ make_decimal_float_mode (const char *name,
}
#define RESET_FLOAT_FORMAT(N, F) \
@@ -144,7 +144,7 @@ index bd78310ea24..dbd02c51a4c 100644
static void ATTRIBUTE_UNUSED
reset_float_format (const char *name, const char *format,
const char *file, unsigned int line)
-@@ -672,7 +672,7 @@ reset_float_format (const char *name, const char *format,
+@@ -694,7 +694,7 @@ reset_float_format (const char *name, const char *format,
/* __intN support. */
#define INT_N(M,PREC) \
@@ -153,7 +153,7 @@ index bd78310ea24..dbd02c51a4c 100644
static void ATTRIBUTE_UNUSED
make_int_n (const char *m, int bitsize,
const char *file, unsigned int line)
-@@ -701,7 +701,7 @@ make_int_n (const char *m, int bitsize,
+@@ -723,7 +723,7 @@ make_int_n (const char *m, int bitsize,
/* Partial integer modes are specified by relation to a full integer
mode. */
#define PARTIAL_INT_MODE(M,PREC,NAME) \
@@ -162,7 +162,7 @@ index bd78310ea24..dbd02c51a4c 100644
static void ATTRIBUTE_UNUSED
make_partial_integer_mode (const char *base, const char *name,
unsigned int precision,
-@@ -728,7 +728,7 @@ make_partial_integer_mode (const char *base, const char *name,
+@@ -750,7 +750,7 @@ make_partial_integer_mode (const char *base, const char *name,
/* A single vector mode can be specified by naming its component
mode and the number of components. */
#define VECTOR_MODE(C, M, N) \
@@ -171,7 +171,7 @@ index bd78310ea24..dbd02c51a4c 100644
static void ATTRIBUTE_UNUSED
make_vector_mode (enum mode_class bclass,
const char *base,
-@@ -771,7 +771,7 @@ make_vector_mode (enum mode_class bclass,
+@@ -793,7 +793,7 @@ make_vector_mode (enum mode_class bclass,
/* Adjustability. */
#define _ADD_ADJUST(A, M, X, C1, C2) \
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0036-mingw32-Enable-operation_not_supported.patch b/poky/meta/recipes-devtools/gcc/gcc/0036-mingw32-Enable-operation_not_supported.patch
index de82a3a53..3a7618c82 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0036-mingw32-Enable-operation_not_supported.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0036-mingw32-Enable-operation_not_supported.patch
@@ -1,4 +1,4 @@
-From 6f87a095f0e696bec07a50df789c9db8bdbca43d Mon Sep 17 00:00:00 2001
+From 96d895c8d5dc895d24fe37aa2b4f201a2566b4cc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 12 May 2020 10:39:09 -0700
Subject: [PATCH] mingw32: Enable operation_not_supported
@@ -12,15 +12,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/config/os/mingw32/error_constants.h b/libstdc++-v3/config/os/mingw32/error_constants.h
-index 68ac72a78fb..71cd5815b81 100644
+index eca06a97014..933cfab49cf 100644
--- a/libstdc++-v3/config/os/mingw32/error_constants.h
+++ b/libstdc++-v3/config/os/mingw32/error_constants.h
@@ -107,7 +107,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- #ifdef _GLIBCXX_HAVE_EPERM
+ #ifdef EPERM
operation_not_permitted = EPERM,
#endif
-// operation_not_supported = EOPNOTSUPP,
+ operation_not_supported = EOPNOTSUPP,
- #ifdef _GLIBCXX_HAVE_EWOULDBLOCK
+ #ifdef EWOULDBLOCK
operation_would_block = EWOULDBLOCK,
#endif
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0037-libatomic-Do-not-enforce-march-on-aarch64.patch b/poky/meta/recipes-devtools/gcc/gcc/0037-libatomic-Do-not-enforce-march-on-aarch64.patch
index 3946acea1..4c9a79cb6 100644
--- a/poky/meta/recipes-devtools/gcc/gcc/0037-libatomic-Do-not-enforce-march-on-aarch64.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc/0037-libatomic-Do-not-enforce-march-on-aarch64.patch
@@ -1,4 +1,4 @@
-From 38d262bfe7c0c894c364dc6e4dc7971e78a73974 Mon Sep 17 00:00:00 2001
+From 36d4fdbc99e69f9d70a29e2bada40cc3c1534557 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 May 2020 15:10:38 -0700
Subject: [PATCH] libatomic: Do not enforce march on aarch64
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 deletions(-)
diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index 133fbbca77e..ac1ca645876 100644
+index 0f3cd6f7121..c8124c1d5aa 100644
--- a/libatomic/Makefile.am
+++ b/libatomic/Makefile.am
@@ -125,7 +125,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS)))
@@ -29,10 +29,10 @@ index 133fbbca77e..ac1ca645876 100644
endif
if ARCH_ARM_LINUX
diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index a51807e95c9..97df2d7ff03 100644
+index 0a51bd55f01..6d5b1581706 100644
--- a/libatomic/Makefile.in
+++ b/libatomic/Makefile.in
-@@ -431,7 +431,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files)))
+@@ -432,7 +432,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files)))
libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
_$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \
$(am__append_3) $(am__append_4)
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0038-arc-Update-64bit-move-split-patterns.patch b/poky/meta/recipes-devtools/gcc/gcc/0038-arc-Update-64bit-move-split-patterns.patch
new file mode 100644
index 000000000..37fe95d71
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0038-arc-Update-64bit-move-split-patterns.patch
@@ -0,0 +1,290 @@
+From 0061fabeb9393c362601486105202cfe837a5a68 Mon Sep 17 00:00:00 2001
+From: Claudiu Zissulescu <claziss@synopsys.com>
+Date: Wed, 9 Jun 2021 12:12:57 +0300
+Subject: [PATCH] arc: Update 64bit move split patterns.
+
+ARCv2HS can use a limited number of instructions to implement 64bit
+moves. The VADD2 is used as a 64bit move, the LDD/STD are 64 bit loads
+and stores. All those instructions are not baseline, hence we need to
+provide alternatives when they are not available or cannot be generate
+due to instruction restriction.
+
+This patch is cleaning up those move patterns, and updates splits
+instruction lengths.
+
+This is a backport from mainline gcc.
+
+gcc/
+2021-06-09 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/arc-protos.h (arc_split_move_p): New prototype.
+ * config/arc/arc.c (arc_split_move_p): New function.
+ (arc_split_move): Clean up.
+ * config/arc/arc.md (movdi_insn): Clean up, use arc_split_move_p.
+ (movdf_insn): Likewise.
+ * config/arc/simdext.md (mov<VWH>_insn): Likewise.
+
+Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0061fabeb9393c362601486105202cfe837a5a68]
+
+Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
+(cherry picked from commit c0ba7a8af5366c37241f20e8be41e362f7260389)
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ gcc/config/arc/arc-protos.h | 1 +
+ gcc/config/arc/arc.c | 44 ++++++++++++----------
+ gcc/config/arc/arc.md | 91 +++++++++------------------------------------
+ gcc/config/arc/simdext.md | 38 ++++---------------
+ 4 files changed, 52 insertions(+), 122 deletions(-)
+
+diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
+index 1f56a0d82e4..62d7e45d29d 100644
+--- a/gcc/config/arc/arc-protos.h
++++ b/gcc/config/arc/arc-protos.h
+@@ -50,6 +50,7 @@ extern void arc_split_ior (rtx *);
+ extern bool arc_check_mov_const (HOST_WIDE_INT );
+ extern bool arc_split_mov_const (rtx *);
+ extern bool arc_can_use_return_insn (void);
++extern bool arc_split_move_p (rtx *);
+ #endif /* RTX_CODE */
+
+ extern bool arc_ccfsm_branch_deleted_p (void);
+diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
+index 3201c3fefd7..db541bc11f5 100644
+--- a/gcc/config/arc/arc.c
++++ b/gcc/config/arc/arc.c
+@@ -10129,6 +10129,31 @@ arc_process_double_reg_moves (rtx *operands)
+ return true;
+ }
+
++
++/* Check if we need to split a 64bit move. We do not need to split it if we can
++ use vadd2 or ldd/std instructions. */
++
++bool
++arc_split_move_p (rtx *operands)
++{
++ machine_mode mode = GET_MODE (operands[0]);
++
++ if (TARGET_LL64
++ && ((memory_operand (operands[0], mode)
++ && (even_register_operand (operands[1], mode)
++ || satisfies_constraint_Cm3 (operands[1])))
++ || (memory_operand (operands[1], mode)
++ && even_register_operand (operands[0], mode))))
++ return false;
++
++ if (TARGET_PLUS_QMACW
++ && even_register_operand (operands[0], mode)
++ && even_register_operand (operands[1], mode))
++ return false;
++
++ return true;
++}
++
+ /* operands 0..1 are the operands of a 64 bit move instruction.
+ split it into two moves with operands 2/3 and 4/5. */
+
+@@ -10146,25 +10171,6 @@ arc_split_move (rtx *operands)
+ return;
+ }
+
+- if (TARGET_LL64
+- && ((memory_operand (operands[0], mode)
+- && (even_register_operand (operands[1], mode)
+- || satisfies_constraint_Cm3 (operands[1])))
+- || (memory_operand (operands[1], mode)
+- && even_register_operand (operands[0], mode))))
+- {
+- emit_move_insn (operands[0], operands[1]);
+- return;
+- }
+-
+- if (TARGET_PLUS_QMACW
+- && even_register_operand (operands[0], mode)
+- && even_register_operand (operands[1], mode))
+- {
+- emit_move_insn (operands[0], operands[1]);
+- return;
+- }
+-
+ if (TARGET_PLUS_QMACW
+ && GET_CODE (operands[1]) == CONST_VECTOR)
+ {
+diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
+index 7a52551eef5..91a838a38e4 100644
+--- a/gcc/config/arc/arc.md
++++ b/gcc/config/arc/arc.md
+@@ -1329,47 +1329,20 @@ core_3, archs4x, archs4xd, archs4xd_slow"
+ "register_operand (operands[0], DImode)
+ || register_operand (operands[1], DImode)
+ || (satisfies_constraint_Cm3 (operands[1])
+- && memory_operand (operands[0], DImode))"
+- "*
+-{
+- switch (which_alternative)
+- {
+- default:
+- return \"#\";
+-
+- case 0:
+- if (TARGET_PLUS_QMACW
+- && even_register_operand (operands[0], DImode)
+- && even_register_operand (operands[1], DImode))
+- return \"vadd2%?\\t%0,%1,0\";
+- return \"#\";
+-
+- case 2:
+- if (TARGET_LL64
+- && memory_operand (operands[1], DImode)
+- && even_register_operand (operands[0], DImode))
+- return \"ldd%U1%V1 %0,%1%&\";
+- return \"#\";
+-
+- case 3:
+- if (TARGET_LL64
+- && memory_operand (operands[0], DImode)
+- && (even_register_operand (operands[1], DImode)
+- || satisfies_constraint_Cm3 (operands[1])))
+- return \"std%U0%V0 %1,%0\";
+- return \"#\";
+- }
+-}"
+- "&& reload_completed"
++ && memory_operand (operands[0], DImode))"
++ "@
++ vadd2\\t%0,%1,0
++ #
++ ldd%U1%V1\\t%0,%1
++ std%U0%V0\\t%1,%0"
++ "&& reload_completed && arc_split_move_p (operands)"
+ [(const_int 0)]
+ {
+ arc_split_move (operands);
+ DONE;
+ }
+ [(set_attr "type" "move,move,load,store")
+- ;; ??? The ld/st values could be 4 if it's [reg,bignum].
+- (set_attr "length" "8,16,*,*")])
+-
++ (set_attr "length" "8,16,16,16")])
+
+ ;; Floating point move insns.
+
+@@ -1408,50 +1381,22 @@ core_3, archs4x, archs4xd, archs4xd_slow"
+ (define_insn_and_split "*movdf_insn"
+ [(set (match_operand:DF 0 "move_dest_operand" "=D,r,r,r,r,m")
+ (match_operand:DF 1 "move_double_src_operand" "r,D,r,E,m,r"))]
+- "register_operand (operands[0], DFmode)
+- || register_operand (operands[1], DFmode)"
+- "*
+-{
+- switch (which_alternative)
+- {
+- default:
+- return \"#\";
+-
+- case 2:
+- if (TARGET_PLUS_QMACW
+- && even_register_operand (operands[0], DFmode)
+- && even_register_operand (operands[1], DFmode))
+- return \"vadd2%?\\t%0,%1,0\";
+- return \"#\";
+-
+- case 4:
+- if (TARGET_LL64
+- && ((even_register_operand (operands[0], DFmode)
+- && memory_operand (operands[1], DFmode))
+- || (memory_operand (operands[0], DFmode)
+- && even_register_operand (operands[1], DFmode))))
+- return \"ldd%U1%V1 %0,%1%&\";
+- return \"#\";
+-
+- case 5:
+- if (TARGET_LL64
+- && ((even_register_operand (operands[0], DFmode)
+- && memory_operand (operands[1], DFmode))
+- || (memory_operand (operands[0], DFmode)
+- && even_register_operand (operands[1], DFmode))))
+- return \"std%U0%V0 %1,%0\";
+- return \"#\";
+- }
+-}"
+- "reload_completed"
++ "(register_operand (operands[0], DFmode)
++ || register_operand (operands[1], DFmode))"
++ "@
++ #
++ #
++ vadd2\\t%0,%1,0
++ #
++ ldd%U1%V1\\t%0,%1
++ std%U0%V0\\t%1,%0"
++ "&& reload_completed && arc_split_move_p (operands)"
+ [(const_int 0)]
+ {
+ arc_split_move (operands);
+ DONE;
+ }
+ [(set_attr "type" "move,move,move,move,load,store")
+- (set_attr "predicable" "no,no,no,yes,no,no")
+- ;; ??? The ld/st values could be 16 if it's [reg,bignum].
+ (set_attr "length" "4,16,8,16,16,16")])
+
+ (define_insn_and_split "*movdf_insn_nolrsr"
+diff --git a/gcc/config/arc/simdext.md b/gcc/config/arc/simdext.md
+index f0900757452..36f41a5c3d0 100644
+--- a/gcc/config/arc/simdext.md
++++ b/gcc/config/arc/simdext.md
+@@ -1402,41 +1402,19 @@
+ (match_operand:VWH 1 "general_operand" "i,r,m,r"))]
+ "(register_operand (operands[0], <MODE>mode)
+ || register_operand (operands[1], <MODE>mode))"
+- "*
+-{
+- switch (which_alternative)
+- {
+- default:
+- return \"#\";
+-
+- case 1:
+- if (TARGET_PLUS_QMACW
+- && even_register_operand (operands[0], <MODE>mode)
+- && even_register_operand (operands[1], <MODE>mode))
+- return \"vadd2%?\\t%0,%1,0\";
+- return \"#\";
+-
+- case 2:
+- if (TARGET_LL64)
+- return \"ldd%U1%V1 %0,%1\";
+- return \"#\";
+-
+- case 3:
+- if (TARGET_LL64)
+- return \"std%U0%V0 %1,%0\";
+- return \"#\";
+- }
+-}"
+- "reload_completed"
++ "@
++ #
++ vadd2\\t%0,%1,0
++ ldd%U1%V1\\t%0,%1
++ std%U0%V0\\t%1,%0"
++ "&& reload_completed && arc_split_move_p (operands)"
+ [(const_int 0)]
+ {
+ arc_split_move (operands);
+ DONE;
+ }
+- [(set_attr "type" "move,multi,load,store")
+- (set_attr "predicable" "no,no,no,no")
+- (set_attr "iscompact" "false,false,false,false")
+- ])
++ [(set_attr "type" "move,move,load,store")
++ (set_attr "length" "16,8,16,16")])
+
+ (define_expand "movmisalign<mode>"
+ [(set (match_operand:VWH 0 "general_operand" "")
+--
+2.16.2
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0039-arc-Fix-u-maddhisi-patterns.patch b/poky/meta/recipes-devtools/gcc/gcc/0039-arc-Fix-u-maddhisi-patterns.patch
new file mode 100644
index 000000000..9c5a2b8b3
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0039-arc-Fix-u-maddhisi-patterns.patch
@@ -0,0 +1,127 @@
+From 4186b7e93be73f8d68dc0fcc00a4cc8cc83e99a8 Mon Sep 17 00:00:00 2001
+From: Claudiu Zissulescu <claziss@synopsys.com>
+Date: Wed, 9 Jun 2021 12:12:57 +0300
+Subject: [PATCH] arc: Fix (u)maddhisi patterns
+
+Rework the (u)maddhisi4 patterns and use VMAC2H(U) instruction instead
+of the 64bit MAC(U) instruction.
+This fixes the next execute.exp failures:
+ arith-rand-ll.c -O2 execution test
+ arith-rand-ll.c -O3 execution test
+ pr78726.c -O2 execution test
+ pr78726.c -O3 execution test
+
+gcc/
+2021-06-09 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/arc.md (maddhisi4): Use VMAC2H instruction.
+ (machi): New pattern.
+ (umaddhisi4): Use VMAC2HU instruction.
+ (umachi): New pattern.
+
+Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=4186b7e93be73f8d68dc0fcc00a4cc8cc83e99a8]
+
+Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
+(cherry picked from commit dd4778a59b4693777c732075021375e19eee6a76)
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ gcc/config/arc/arc.md | 66 ++++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 41 insertions(+), 25 deletions(-)
+
+diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
+index 91a838a38e4..2a7e087ff72 100644
+--- a/gcc/config/arc/arc.md
++++ b/gcc/config/arc/arc.md
+@@ -6053,48 +6053,64 @@ core_3, archs4x, archs4xd, archs4xd_slow"
+
+ ;; MAC and DMPY instructions
+
+-; Use MAC instruction to emulate 16bit mac.
++; Use VMAC2H(U) instruction to emulate scalar 16bit mac.
+ (define_expand "maddhisi4"
+ [(match_operand:SI 0 "register_operand" "")
+ (match_operand:HI 1 "register_operand" "")
+ (match_operand:HI 2 "extend_operand" "")
+ (match_operand:SI 3 "register_operand" "")]
+- "TARGET_PLUS_DMPY"
++ "TARGET_PLUS_MACD"
+ "{
+- rtx acc_reg = gen_rtx_REG (DImode, ACC_REG_FIRST);
+- rtx tmp1 = gen_reg_rtx (SImode);
+- rtx tmp2 = gen_reg_rtx (SImode);
+- rtx accl = gen_lowpart (SImode, acc_reg);
+-
+- emit_move_insn (accl, operands[3]);
+- emit_insn (gen_rtx_SET (tmp1, gen_rtx_SIGN_EXTEND (SImode, operands[1])));
+- emit_insn (gen_rtx_SET (tmp2, gen_rtx_SIGN_EXTEND (SImode, operands[2])));
+- emit_insn (gen_mac (tmp1, tmp2));
+- emit_move_insn (operands[0], accl);
++ rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST);
++
++ emit_move_insn (acc_reg, operands[3]);
++ emit_insn (gen_machi (operands[1], operands[2]));
++ emit_move_insn (operands[0], acc_reg);
+ DONE;
+ }")
+
+-; The same for the unsigned variant, but using MACU instruction.
++(define_insn "machi"
++ [(set (reg:SI ARCV2_ACC)
++ (plus:SI
++ (mult:SI (sign_extend:SI (match_operand:HI 0 "register_operand" "%r"))
++ (sign_extend:SI (match_operand:HI 1 "register_operand" "r")))
++ (reg:SI ARCV2_ACC)))]
++ "TARGET_PLUS_MACD"
++ "vmac2h\\t0,%0,%1"
++ [(set_attr "length" "4")
++ (set_attr "type" "multi")
++ (set_attr "predicable" "no")
++ (set_attr "cond" "nocond")])
++
++; The same for the unsigned variant, but using VMAC2HU instruction.
+ (define_expand "umaddhisi4"
+ [(match_operand:SI 0 "register_operand" "")
+ (match_operand:HI 1 "register_operand" "")
+- (match_operand:HI 2 "extend_operand" "")
++ (match_operand:HI 2 "register_operand" "")
+ (match_operand:SI 3 "register_operand" "")]
+- "TARGET_PLUS_DMPY"
++ "TARGET_PLUS_MACD"
+ "{
+- rtx acc_reg = gen_rtx_REG (DImode, ACC_REG_FIRST);
+- rtx tmp1 = gen_reg_rtx (SImode);
+- rtx tmp2 = gen_reg_rtx (SImode);
+- rtx accl = gen_lowpart (SImode, acc_reg);
+-
+- emit_move_insn (accl, operands[3]);
+- emit_insn (gen_rtx_SET (tmp1, gen_rtx_ZERO_EXTEND (SImode, operands[1])));
+- emit_insn (gen_rtx_SET (tmp2, gen_rtx_ZERO_EXTEND (SImode, operands[2])));
+- emit_insn (gen_macu (tmp1, tmp2));
+- emit_move_insn (operands[0], accl);
++ rtx acc_reg = gen_rtx_REG (SImode, ACC_REG_FIRST);
++
++ emit_move_insn (acc_reg, operands[3]);
++ emit_insn (gen_umachi (operands[1], operands[2]));
++ emit_move_insn (operands[0], acc_reg);
+ DONE;
+ }")
+
++(define_insn "umachi"
++ [(set (reg:SI ARCV2_ACC)
++ (plus:SI
++ (mult:SI (zero_extend:SI (match_operand:HI 0 "register_operand" "%r"))
++ (zero_extend:SI (match_operand:HI 1 "register_operand" "r")))
++ (reg:SI ARCV2_ACC)))]
++ "TARGET_PLUS_MACD"
++ "vmac2hu\\t0,%0,%1"
++ [(set_attr "length" "4")
++ (set_attr "type" "multi")
++ (set_attr "predicable" "no")
++ (set_attr "cond" "nocond")])
++
+ (define_expand "maddsidi4"
+ [(match_operand:DI 0 "register_operand" "")
+ (match_operand:SI 1 "register_operand" "")
+--
+2.16.2
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc/0040-arc-Update-doloop_end-patterns.patch b/poky/meta/recipes-devtools/gcc/gcc/0040-arc-Update-doloop_end-patterns.patch
new file mode 100644
index 000000000..5f0bf8df8
--- /dev/null
+++ b/poky/meta/recipes-devtools/gcc/gcc/0040-arc-Update-doloop_end-patterns.patch
@@ -0,0 +1,105 @@
+From 5a9b6a004f89fdd95b0470e1324dc4dee8c41d24 Mon Sep 17 00:00:00 2001
+From: Claudiu Zissulescu <claziss@synopsys.com>
+Date: Wed, 9 Jun 2021 12:12:57 +0300
+Subject: [PATCH] arc: Update doloop_end patterns
+
+ARC processor can use LP instruction to implement zero overlay loops.
+The current inplementation doesn't handle the unlikely situation when
+the loop iterator is located in memory. Refurbish the loop_end insn
+pattern into a define_insn_and_split pattern.
+
+gcc/
+2021-07-09 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/arc.md (loop_end): Change it to
+ define_insn_and_split.
+
+Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5a9b6a004f89fdd95b0470e1324dc4dee8c41d24]
+
+Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
+(cherry picked from commit 174e75a210753b68de0f2c398a13ace0f512e35b)
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ gcc/config/arc/arc.md | 46 ++++++++++++++++++++--------------------------
+ 1 file changed, 20 insertions(+), 26 deletions(-)
+
+diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
+index 2a7e087ff72..d704044c13f 100644
+--- a/gcc/config/arc/arc.md
++++ b/gcc/config/arc/arc.md
+@@ -4986,7 +4986,7 @@ core_3, archs4x, archs4xd, archs4xd_slow"
+ (define_expand "doloop_end"
+ [(parallel [(set (pc)
+ (if_then_else
+- (ne (match_operand 0 "" "")
++ (ne (match_operand 0 "nonimmediate_operand")
+ (const_int 1))
+ (label_ref (match_operand 1 "" ""))
+ (pc)))
+@@ -5012,44 +5012,38 @@ core_3, archs4x, archs4xd, archs4xd_slow"
+
+ ;; if by any chance the lp_count is not used, then use an 'r'
+ ;; register, instead of going to memory.
+-(define_insn "loop_end"
+- [(set (pc)
+- (if_then_else (ne (match_operand:SI 2 "nonimmediate_operand" "0,m")
+- (const_int 1))
+- (label_ref (match_operand 1 "" ""))
+- (pc)))
+- (set (match_operand:SI 0 "nonimmediate_operand" "=r,m")
+- (plus (match_dup 2) (const_int -1)))
+- (unspec [(const_int 0)] UNSPEC_ARC_LP)
+- (clobber (match_scratch:SI 3 "=X,&r"))]
+- ""
+- "; ZOL_END, begins @%l1"
+- [(set_attr "length" "0")
+- (set_attr "predicable" "no")
+- (set_attr "type" "loop_end")])
+-
+ ;; split pattern for the very slim chance when the loop register is
+ ;; memory.
+-(define_split
++(define_insn_and_split "loop_end"
+ [(set (pc)
+- (if_then_else (ne (match_operand:SI 0 "memory_operand")
++ (if_then_else (ne (match_operand:SI 0 "nonimmediate_operand" "+r,!m")
+ (const_int 1))
+- (label_ref (match_operand 1 ""))
++ (label_ref (match_operand 1 "" ""))
+ (pc)))
+ (set (match_dup 0) (plus (match_dup 0) (const_int -1)))
+ (unspec [(const_int 0)] UNSPEC_ARC_LP)
+- (clobber (match_scratch:SI 2))]
+- "memory_operand (operands[0], SImode)"
++ (clobber (match_scratch:SI 2 "=X,&r"))]
++ ""
++ "@
++ ; ZOL_END, begins @%l1
++ #"
++ "reload_completed && memory_operand (operands[0], Pmode)"
+ [(set (match_dup 2) (match_dup 0))
+- (set (match_dup 2) (plus:SI (match_dup 2) (const_int -1)))
++ (parallel
++ [(set (reg:CC_ZN CC_REG)
++ (compare:CC_ZN (plus:SI (match_dup 2) (const_int -1))
++ (const_int 0)))
++ (set (match_dup 2) (plus:SI (match_dup 2) (const_int -1)))])
+ (set (match_dup 0) (match_dup 2))
+- (set (reg:CC CC_REG) (compare:CC (match_dup 2) (const_int 0)))
+ (set (pc)
+- (if_then_else (ne (reg:CC CC_REG)
++ (if_then_else (ne (reg:CC_ZN CC_REG)
+ (const_int 0))
+ (label_ref (match_dup 1))
+ (pc)))]
+- "")
++ ""
++ [(set_attr "length" "0,24")
++ (set_attr "predicable" "no")
++ (set_attr "type" "loop_end")])
+
+ (define_insn "loop_fail"
+ [(set (reg:SI LP_COUNT)
+--
+2.16.2
+
diff --git a/poky/meta/recipes-devtools/gcc/gcc_10.2.bb b/poky/meta/recipes-devtools/gcc/gcc_11.1.bb
index 7d9359058..7d9359058 100644
--- a/poky/meta/recipes-devtools/gcc/gcc_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/gcc_11.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgcc-initial_10.2.bb b/poky/meta/recipes-devtools/gcc/libgcc-initial_11.1.bb
index 0c698c26e..0c698c26e 100644
--- a/poky/meta/recipes-devtools/gcc/libgcc-initial_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/libgcc-initial_11.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgcc_10.2.bb b/poky/meta/recipes-devtools/gcc/libgcc_11.1.bb
index ea210a113..ea210a113 100644
--- a/poky/meta/recipes-devtools/gcc/libgcc_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/libgcc_11.1.bb
diff --git a/poky/meta/recipes-devtools/gcc/libgfortran_10.2.bb b/poky/meta/recipes-devtools/gcc/libgfortran_11.1.bb
index 71dd8b4bd..71dd8b4bd 100644
--- a/poky/meta/recipes-devtools/gcc/libgfortran_10.2.bb
+++ b/poky/meta/recipes-devtools/gcc/libgfortran_11.1.bb
diff --git a/poky/meta/recipes-devtools/gdb/gdb-10.1.inc b/poky/meta/recipes-devtools/gdb/gdb-10.2.inc
index 07de17f84..0d275075e 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-10.1.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-10.2.inc
@@ -15,5 +15,9 @@ SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \
file://0009-resolve-restrict-keyword-conflict.patch \
file://0010-Fix-invalid-sigprocmask-call.patch \
file://0011-gdbserver-ctrl-c-handling.patch \
+ file://0012-arc-Add-support-for-signal-handlers.patch \
+ file://0013-arc-Add-support-for-signal-frames-for-Linux-targets.patch \
+ file://0014-arc-Take-into-account-the-REGNUM-in-supply-collect-g.patch \
+ file://0015-gdb-Add-native-support-for-ARC-in-GNU-Linux.patch \
"
-SRC_URI[sha256sum] = "f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0"
+SRC_URI[sha256sum] = "aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29"
diff --git a/poky/meta/recipes-devtools/gdb/gdb-common.inc b/poky/meta/recipes-devtools/gdb/gdb-common.inc
index 6e0455203..a2a6364da 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-common.inc
@@ -29,7 +29,7 @@ EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \
--disable-gprof \
"
-PACKAGECONFIG ??= "readline"
+PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
# Use --without-system-readline to compile with readline 5.
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index c9daf25a4..edb05b6f1 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -11,12 +11,13 @@ DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext \
GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
# Overrides PACKAGECONFIG variables in gdb-common.inc
-PACKAGECONFIG ??= "python readline"
+PACKAGECONFIG ??= "python readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
nativesdk-python3-core \
nativesdk-python3-codecs nativesdk-python3-netclient \
"
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
+PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, nativesdk-elfutils"
SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_10.1.bb b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_10.2.bb
index 301035940..301035940 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_10.1.bb
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian_10.2.bb
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross.inc b/poky/meta/recipes-devtools/gdb/gdb-cross.inc
index ebe329f6d..f8a113da8 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -5,9 +5,10 @@ DEPENDS = "expat-native ncurses-native flex-native bison-native"
inherit python3native
# Overrides PACKAGECONFIG variables in gdb-common.inc
-PACKAGECONFIG ??= "python readline"
+PACKAGECONFIG ??= "python readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3-native"
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline-native"
+PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils-native"
do_compile_prepend() {
export STAGING_LIBDIR="${STAGING_LIBDIR_NATIVE}"
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross_10.1.bb b/poky/meta/recipes-devtools/gdb/gdb-cross_10.2.bb
index 50cf159fd..50cf159fd 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross_10.1.bb
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross_10.2.bb
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0012-arc-Add-support-for-signal-handlers.patch b/poky/meta/recipes-devtools/gdb/gdb/0012-arc-Add-support-for-signal-handlers.patch
new file mode 100644
index 000000000..6a98b6576
--- /dev/null
+++ b/poky/meta/recipes-devtools/gdb/gdb/0012-arc-Add-support-for-signal-handlers.patch
@@ -0,0 +1,218 @@
+From bfee93403b46ae4f050282b7721ba39073905c69 Mon Sep 17 00:00:00 2001
+From: Anton Kolesov <Anton.Kolesov@synopsys.com>
+Date: Mon, 22 Aug 2016 19:39:46 +0300
+Subject: [PATCH 1/4] arc: Add support for signal handlers
+
+This patch adds the necessary infrastructure to handle signal frames for
+ARC architecture. It is fairly similar to what any other architecture
+would have. Linux specific parts will be in a separate patch.
+
+v2 [1]:
+- Make the logic of "arc_sigtramp_frame_sniffer ()" simpler.
+
+[1] Tom's remark for the first version
+https://sourceware.org/pipermail/gdb-patches/2020-November/173221.html
+
+gdb/ChangeLog:
+
+ * arc-tdep.c (arc_make_sigtramp_frame_cache): New function.
+ (arc_sigtramp_frame_this_id): Likewise.
+ (arc_sigtramp_frame_prev_register): Likewise.
+ (arc_sigtramp_frame_sniffer): Likewise.
+ (arc_siftramp_frame_unwind): New global variable.
+ (arc_gdbarch_init): Use sigtramp capabilities.
+ (arc_dump_tdep): Print sigtramp fields.
+ * arc-tdep.h (gdbarch_tdep): Add sigtramp fields.
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=b4e3cd0440109d0a5552d3313ccbd35c8103335b]
+
+Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
+Signed-off-by: Shahab Vahedi <shahab@synopsys.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ gdb/arc-tdep.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gdb/arc-tdep.h | 13 ++++++
+ 2 files changed, 136 insertions(+)
+
+diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
+index 93e2fd88a9a..3356252525d 100644
+--- a/gdb/arc-tdep.c
++++ b/gdb/arc-tdep.c
+@@ -1843,6 +1843,104 @@ arc_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
+ reg->how = DWARF2_FRAME_REG_CFA;
+ }
+
++/* Signal trampoline frame unwinder. Allows frame unwinding to happen
++ from within signal handlers. */
++
++static struct arc_frame_cache *
++arc_make_sigtramp_frame_cache (struct frame_info *this_frame)
++{
++ if (arc_debug)
++ debug_printf ("arc: sigtramp_frame_cache\n");
++
++ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
++
++ /* Allocate new frame cache instance and space for saved register info. */
++ struct arc_frame_cache *cache = FRAME_OBSTACK_ZALLOC (struct arc_frame_cache);
++ cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
++
++ /* Get the stack pointer and use it as the frame base. */
++ cache->prev_sp = arc_frame_base_address (this_frame, NULL);
++
++ /* If the ARC-private target-dependent info doesn't have a table of
++ offsets of saved register contents within an OS signal context
++ structure, then there is nothing to analyze. */
++ if (tdep->sc_reg_offset == NULL)
++ return cache;
++
++ /* Find the address of the sigcontext structure. */
++ CORE_ADDR addr = tdep->sigcontext_addr (this_frame);
++
++ /* For each register, if its contents have been saved within the
++ sigcontext structure, determine the address of those contents. */
++ gdb_assert (tdep->sc_num_regs <= (ARC_LAST_REGNUM + 1));
++ for (int i = 0; i < tdep->sc_num_regs; i++)
++ {
++ if (tdep->sc_reg_offset[i] != ARC_OFFSET_NO_REGISTER)
++ cache->saved_regs[i].addr = addr + tdep->sc_reg_offset[i];
++ }
++
++ return cache;
++}
++
++/* Implement the "this_id" frame_unwind method for signal trampoline
++ frames. */
++
++static void
++arc_sigtramp_frame_this_id (struct frame_info *this_frame,
++ void **this_cache, struct frame_id *this_id)
++{
++ if (arc_debug)
++ debug_printf ("arc: sigtramp_frame_this_id\n");
++
++ if (*this_cache == NULL)
++ *this_cache = arc_make_sigtramp_frame_cache (this_frame);
++
++ struct gdbarch *gdbarch = get_frame_arch (this_frame);
++ struct arc_frame_cache *cache = (struct arc_frame_cache *) *this_cache;
++ CORE_ADDR stack_addr = cache->prev_sp;
++ CORE_ADDR code_addr
++ = get_frame_register_unsigned (this_frame, gdbarch_pc_regnum (gdbarch));
++ *this_id = frame_id_build (stack_addr, code_addr);
++}
++
++/* Get a register from a signal handler frame. */
++
++static struct value *
++arc_sigtramp_frame_prev_register (struct frame_info *this_frame,
++ void **this_cache, int regnum)
++{
++ if (arc_debug)
++ debug_printf ("arc: sigtramp_frame_prev_register (regnum = %d)\n", regnum);
++
++ /* Make sure we've initialized the cache. */
++ if (*this_cache == NULL)
++ *this_cache = arc_make_sigtramp_frame_cache (this_frame);
++
++ struct arc_frame_cache *cache = (struct arc_frame_cache *) *this_cache;
++ return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
++}
++
++/* Frame sniffer for signal handler frame. Only recognize a frame if we
++ have a sigcontext_addr handler in the target dependency. */
++
++static int
++arc_sigtramp_frame_sniffer (const struct frame_unwind *self,
++ struct frame_info *this_frame,
++ void **this_cache)
++{
++ struct gdbarch_tdep *tdep;
++
++ if (arc_debug)
++ debug_printf ("arc: sigtramp_frame_sniffer\n");
++
++ tdep = gdbarch_tdep (get_frame_arch (this_frame));
++
++ /* If we have a sigcontext_addr handler, then just return 1 (same as the
++ "default_frame_sniffer ()"). */
++ return (tdep->sigcontext_addr != NULL && tdep->is_sigtramp != NULL
++ && tdep->is_sigtramp (this_frame));
++}
++
+ /* Structure defining the ARC ordinary frame unwind functions. Since we are
+ the fallback unwinder, we use the default frame sniffer, which always
+ accepts the frame. */
+@@ -1858,6 +1956,21 @@ static const struct frame_unwind arc_frame_unwind = {
+ NULL
+ };
+
++/* Structure defining the ARC signal frame unwind functions. Custom
++ sniffer is used, because this frame must be accepted only in the right
++ context. */
++
++static const struct frame_unwind arc_sigtramp_frame_unwind = {
++ SIGTRAMP_FRAME,
++ default_frame_unwind_stop_reason,
++ arc_sigtramp_frame_this_id,
++ arc_sigtramp_frame_prev_register,
++ NULL,
++ arc_sigtramp_frame_sniffer,
++ NULL,
++ NULL
++};
++
+
+ static const struct frame_base arc_normal_base = {
+ &arc_frame_unwind,
+@@ -2272,6 +2385,7 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+ /* Frame unwinders and sniffers. */
+ dwarf2_frame_set_init_reg (gdbarch, arc_dwarf2_frame_init_reg);
+ dwarf2_append_unwinders (gdbarch);
++ frame_unwind_append_unwinder (gdbarch, &arc_sigtramp_frame_unwind);
+ frame_unwind_append_unwinder (gdbarch, &arc_frame_unwind);
+ frame_base_set_default (gdbarch, &arc_normal_base);
+
+@@ -2350,6 +2464,15 @@ arc_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ fprintf_unfiltered (file, "arc_dump_tdep: jb_pc = %i\n", tdep->jb_pc);
++
++ fprintf_unfiltered (file, "arc_dump_tdep: is_sigtramp = <%s>\n",
++ host_address_to_string (tdep->is_sigtramp));
++ fprintf_unfiltered (file, "arc_dump_tdep: sigcontext_addr = <%s>\n",
++ host_address_to_string (tdep->sigcontext_addr));
++ fprintf_unfiltered (file, "arc_dump_tdep: sc_reg_offset = <%s>\n",
++ host_address_to_string (tdep->sc_reg_offset));
++ fprintf_unfiltered (file, "arc_dump_tdep: sc_num_regs = %d\n",
++ tdep->sc_num_regs);
+ }
+
+ /* This command accepts single argument - address of instruction to
+diff --git a/gdb/arc-tdep.h b/gdb/arc-tdep.h
+index 50b14905134..70fc3d95c48 100644
+--- a/gdb/arc-tdep.h
++++ b/gdb/arc-tdep.h
+@@ -124,6 +124,19 @@ struct gdbarch_tdep
+
+ /* Whether target has hardware (aka zero-delay) loops. */
+ bool has_hw_loops;
++
++ /* Detect sigtramp. */
++ bool (*is_sigtramp) (struct frame_info *);
++
++ /* Get address of sigcontext for sigtramp. */
++ CORE_ADDR (*sigcontext_addr) (struct frame_info *);
++
++ /* Offset of registers in `struct sigcontext'. */
++ const int *sc_reg_offset;
++
++ /* Number of registers in sc_reg_offsets. Most likely a ARC_LAST_REGNUM,
++ but in theory it could be less, so it is kept separate. */
++ int sc_num_regs;
+ };
+
+ /* Utility functions used by other ARC-specific modules. */
+--
+2.16.2
+
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0013-arc-Add-support-for-signal-frames-for-Linux-targets.patch b/poky/meta/recipes-devtools/gdb/gdb/0013-arc-Add-support-for-signal-frames-for-Linux-targets.patch
new file mode 100644
index 000000000..f699a5888
--- /dev/null
+++ b/poky/meta/recipes-devtools/gdb/gdb/0013-arc-Add-support-for-signal-frames-for-Linux-targets.patch
@@ -0,0 +1,232 @@
+From 16ddc17b4f403a38701e0108b02aff967900cc66 Mon Sep 17 00:00:00 2001
+From: Anton Kolesov <Anton.Kolesov@synopsys.com>
+Date: Thu, 22 Dec 2016 21:52:16 +0300
+Subject: [PATCH 2/4] arc: Add support for signal frames for Linux targets
+
+Implement functions needed to unwind signal frames on ARC Linux targets.
+
+gdb/ChangeLog
+
+ * arc-linux-tdep.c (arc_linux_sc_reg_offsets): New static variable.
+ (arc_linux_is_sigtramp): New function.
+ (arc_linux_sigcontext_addr): Likewise.
+ (arc_linux_init_osabi): Use them.
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d4af727286e3a9f177ba11677fbd3a012d36558a]
+
+Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
+Signed-off-by: Shahab Vahedi <shahab@synopsys.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ gdb/arc-linux-tdep.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 181 insertions(+)
+
+diff --git a/gdb/arc-linux-tdep.c b/gdb/arc-linux-tdep.c
+index a7bace12623..17bb3e7b276 100644
+--- a/gdb/arc-linux-tdep.c
++++ b/gdb/arc-linux-tdep.c
+@@ -33,6 +33,60 @@
+
+ #define REGOFF(offset) (offset * ARC_REGISTER_SIZE)
+
++/* arc_linux_sc_reg_offsets[i] is the offset of register i in the `struct
++ sigcontext'. Array index is an internal GDB register number, as defined in
++ arc-tdep.h:arc_regnum.
++
++ From <include/uapi/asm/sigcontext.h> and <include/uapi/asm/ptrace.h>.
++
++ The layout of this struct is tightly bound to "arc_regnum" enum
++ in arc-tdep.h. Any change of order in there, must be reflected
++ here as well. */
++static const int arc_linux_sc_reg_offsets[] = {
++ /* R0 - R12. */
++ REGOFF (22), REGOFF (21), REGOFF (20), REGOFF (19),
++ REGOFF (18), REGOFF (17), REGOFF (16), REGOFF (15),
++ REGOFF (14), REGOFF (13), REGOFF (12), REGOFF (11),
++ REGOFF (10),
++
++ /* R13 - R25. */
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER,
++
++ REGOFF (9), /* R26 (GP) */
++ REGOFF (8), /* FP */
++ REGOFF (23), /* SP */
++ ARC_OFFSET_NO_REGISTER, /* ILINK */
++ ARC_OFFSET_NO_REGISTER, /* R30 */
++ REGOFF (7), /* BLINK */
++
++ /* R32 - R59. */
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER, ARC_OFFSET_NO_REGISTER,
++ ARC_OFFSET_NO_REGISTER,
++
++ REGOFF (4), /* LP_COUNT */
++ ARC_OFFSET_NO_REGISTER, /* RESERVED */
++ ARC_OFFSET_NO_REGISTER, /* LIMM */
++ ARC_OFFSET_NO_REGISTER, /* PCL */
++
++ REGOFF (6), /* PC */
++ REGOFF (5), /* STATUS32 */
++ REGOFF (2), /* LP_START */
++ REGOFF (3), /* LP_END */
++ REGOFF (1), /* BTA */
++};
++
+ /* arc_linux_core_reg_offsets[i] is the offset in the .reg section of GDB
+ regnum i. Array index is an internal GDB register number, as defined in
+ arc-tdep.h:arc_regnum.
+@@ -87,6 +141,127 @@ static const int arc_linux_core_reg_offsets[] = {
+ REGOFF (6) /* ERET */
+ };
+
++/* Is THIS_FRAME a sigtramp function - the function that returns from
++ signal handler into normal execution flow? This is the case if the PC is
++ either at the start of, or in the middle of the two instructions:
++
++ mov r8, __NR_rt_sigreturn ; __NR_rt_sigreturn == 139
++ trap_s 0 ; `swi' for ARC700
++
++ On ARC uClibc Linux this function is called __default_rt_sa_restorer.
++
++ Returns TRUE if this is a sigtramp frame. */
++
++static bool
++arc_linux_is_sigtramp (struct frame_info *this_frame)
++{
++ struct gdbarch *gdbarch = get_frame_arch (this_frame);
++ CORE_ADDR pc = get_frame_pc (this_frame);
++
++ if (arc_debug)
++ {
++ debug_printf ("arc-linux: arc_linux_is_sigtramp, pc=%s\n",
++ paddress(gdbarch, pc));
++ }
++
++ static const gdb_byte insns_be_hs[] = {
++ 0x20, 0x8a, 0x12, 0xc2, /* mov r8,nr_rt_sigreturn */
++ 0x78, 0x1e /* trap_s 0 */
++ };
++ static const gdb_byte insns_be_700[] = {
++ 0x20, 0x8a, 0x12, 0xc2, /* mov r8,nr_rt_sigreturn */
++ 0x22, 0x6f, 0x00, 0x3f /* swi */
++ };
++
++ gdb_byte arc_sigtramp_insns[sizeof (insns_be_700)];
++ size_t insns_sz;
++ if (arc_mach_is_arcv2 (gdbarch))
++ {
++ insns_sz = sizeof (insns_be_hs);
++ memcpy (arc_sigtramp_insns, insns_be_hs, insns_sz);
++ }
++ else
++ {
++ insns_sz = sizeof (insns_be_700);
++ memcpy (arc_sigtramp_insns, insns_be_700, insns_sz);
++ }
++ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
++ {
++ /* On little endian targets, ARC code section is in what is called
++ "middle endian", where half-words are in the big-endian order,
++ only bytes inside the halfwords are in the little endian order.
++ As a result it is very easy to convert big endian instruction to
++ little endian, since it is needed to swap bytes in the halfwords,
++ so there is no need to have information on whether that is a
++ 4-byte instruction or 2-byte. */
++ gdb_assert ((insns_sz % 2) == 0);
++ for (int i = 0; i < insns_sz; i += 2)
++ std::swap (arc_sigtramp_insns[i], arc_sigtramp_insns[i+1]);
++ }
++
++ gdb_byte buf[insns_sz];
++
++ /* Read the memory at the PC. Since we are stopped, any breakpoint must
++ have been removed. */
++ if (!safe_frame_unwind_memory (this_frame, pc, buf, insns_sz))
++ {
++ /* Failed to unwind frame. */
++ return FALSE;
++ }
++
++ /* Is that code the sigtramp instruction sequence? */
++ if (memcmp (buf, arc_sigtramp_insns, insns_sz) == 0)
++ return TRUE;
++
++ /* No - look one instruction earlier in the code... */
++ if (!safe_frame_unwind_memory (this_frame, pc - 4, buf, insns_sz))
++ {
++ /* Failed to unwind frame. */
++ return FALSE;
++ }
++
++ return (memcmp (buf, arc_sigtramp_insns, insns_sz) == 0);
++}
++
++/* Get sigcontext structure of sigtramp frame - it contains saved
++ registers of interrupted frame.
++
++ Stack pointer points to the rt_sigframe structure, and sigcontext can
++ be found as in:
++
++ struct rt_sigframe {
++ struct siginfo info;
++ struct ucontext uc;
++ ...
++ };
++
++ struct ucontext {
++ unsigned long uc_flags;
++ struct ucontext *uc_link;
++ stack_t uc_stack;
++ struct sigcontext uc_mcontext;
++ sigset_t uc_sigmask;
++ };
++
++ sizeof (struct siginfo) == 0x80
++ offsetof (struct ucontext, uc_mcontext) == 0x14
++
++ GDB cannot include linux headers and use offsetof () because those are
++ target headers and GDB might be built for a different run host. There
++ doesn't seem to be an established mechanism to figure out those offsets
++ via gdbserver, so the only way is to hardcode values in the GDB,
++ meaning that GDB will be broken if values will change. That seems to
++ be a very unlikely scenario and other arches (aarch64, alpha, amd64,
++ etc) in GDB hardcode values. */
++
++static CORE_ADDR
++arc_linux_sigcontext_addr (struct frame_info *this_frame)
++{
++ const int ucontext_offset = 0x80;
++ const int sigcontext_offset = 0x14;
++ return get_frame_sp (this_frame) + ucontext_offset + sigcontext_offset;
++}
++
+ /* Implement the "cannot_fetch_register" gdbarch method. */
+
+ static int
+@@ -504,6 +679,12 @@ arc_linux_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
+ if (arc_debug)
+ debug_printf ("arc-linux: GNU/Linux OS/ABI initialization.\n");
+
++ /* Fill in target-dependent info in ARC-private structure. */
++ tdep->is_sigtramp = arc_linux_is_sigtramp;
++ tdep->sigcontext_addr = arc_linux_sigcontext_addr;
++ tdep->sc_reg_offset = arc_linux_sc_reg_offsets;
++ tdep->sc_num_regs = ARRAY_SIZE (arc_linux_sc_reg_offsets);
++
+ /* If we are using Linux, we have in uClibc
+ (libc/sysdeps/linux/arc/bits/setjmp.h):
+
+--
+2.16.2
+
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0014-arc-Take-into-account-the-REGNUM-in-supply-collect-g.patch b/poky/meta/recipes-devtools/gdb/gdb/0014-arc-Take-into-account-the-REGNUM-in-supply-collect-g.patch
new file mode 100644
index 000000000..a7256065c
--- /dev/null
+++ b/poky/meta/recipes-devtools/gdb/gdb/0014-arc-Take-into-account-the-REGNUM-in-supply-collect-g.patch
@@ -0,0 +1,104 @@
+From 5eb97d5e92ad23ee81cebc1ebd5eafe0aa55fc17 Mon Sep 17 00:00:00 2001
+From: Shahab Vahedi <shahab@synopsys.com>
+Date: Tue, 10 Nov 2020 19:34:57 +0100
+Subject: [PATCH 3/4] arc: Take into account the REGNUM in supply/collect gdb
+ hooks
+
+All the arc_linux_supply_*() target operations and the
+arc_linux_collect_v2_regset() in arc-linux-tdep.c were
+supplying/collecting all the registers in regcache as if the
+REGNUM was set to -1.
+
+The more efficient behavior is to examine the REGNUM and act
+accordingly. That is what this patch does.
+
+gdb/ChangeLog:
+
+ * arc-linux-tdep.c (supply_register): New.
+ (arc_linux_supply_gregset, arc_linux_supply_v2_regset,
+ arc_linux_collect_v2_regset): Consider REGNUM.
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=46023bbe81355230b4e7b76d3084337823d02362]
+
+Signed-off-by: Shahab Vahedi <shahab@synopsys.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ gdb/arc-linux-tdep.c | 41 ++++++++++++++++++++++++++++++++---------
+ 1 file changed, 32 insertions(+), 9 deletions(-)
+
+diff --git a/gdb/arc-linux-tdep.c b/gdb/arc-linux-tdep.c
+index 17bb3e7b276..e83d82b6f5c 100644
+--- a/gdb/arc-linux-tdep.c
++++ b/gdb/arc-linux-tdep.c
+@@ -535,6 +535,18 @@ arc_linux_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
+ }
+ }
+
++/* Populate REGCACHE with register REGNUM from BUF. */
++
++static void
++supply_register (struct regcache *regcache, int regnum, const gdb_byte *buf)
++{
++ /* Skip non-existing registers. */
++ if ((arc_linux_core_reg_offsets[regnum] == ARC_OFFSET_NO_REGISTER))
++ return;
++
++ regcache->raw_supply (regnum, buf + arc_linux_core_reg_offsets[regnum]);
++}
++
+ void
+ arc_linux_supply_gregset (const struct regset *regset,
+ struct regcache *regcache,
+@@ -545,9 +557,14 @@ arc_linux_supply_gregset (const struct regset *regset,
+
+ const bfd_byte *buf = (const bfd_byte *) gregs;
+
+- for (int reg = 0; reg <= ARC_LAST_REGNUM; reg++)
+- if (arc_linux_core_reg_offsets[reg] != ARC_OFFSET_NO_REGISTER)
+- regcache->raw_supply (reg, buf + arc_linux_core_reg_offsets[reg]);
++ /* regnum == -1 means writing all the registers. */
++ if (regnum == -1)
++ for (int reg = 0; reg <= ARC_LAST_REGNUM; reg++)
++ supply_register (regcache, reg, buf);
++ else if (regnum <= ARC_LAST_REGNUM)
++ supply_register (regcache, regnum, buf);
++ else
++ gdb_assert_not_reached ("Invalid regnum in arc_linux_supply_gregset.");
+ }
+
+ void
+@@ -558,9 +575,12 @@ arc_linux_supply_v2_regset (const struct regset *regset,
+ const bfd_byte *buf = (const bfd_byte *) v2_regs;
+
+ /* user_regs_arcv2 is defined in linux arch/arc/include/uapi/asm/ptrace.h. */
+- regcache->raw_supply (ARC_R30_REGNUM, buf);
+- regcache->raw_supply (ARC_R58_REGNUM, buf + REGOFF (1));
+- regcache->raw_supply (ARC_R59_REGNUM, buf + REGOFF (2));
++ if (regnum == -1 || regnum == ARC_R30_REGNUM)
++ regcache->raw_supply (ARC_R30_REGNUM, buf);
++ if (regnum == -1 || regnum == ARC_R58_REGNUM)
++ regcache->raw_supply (ARC_R58_REGNUM, buf + REGOFF (1));
++ if (regnum == -1 || regnum == ARC_R59_REGNUM)
++ regcache->raw_supply (ARC_R59_REGNUM, buf + REGOFF (2));
+ }
+
+ /* Populate BUF with register REGNUM from the REGCACHE. */
+@@ -618,9 +638,12 @@ arc_linux_collect_v2_regset (const struct regset *regset,
+ {
+ bfd_byte *buf = (bfd_byte *) v2_regs;
+
+- regcache->raw_collect (ARC_R30_REGNUM, buf);
+- regcache->raw_collect (ARC_R58_REGNUM, buf + REGOFF (1));
+- regcache->raw_collect (ARC_R59_REGNUM, buf + REGOFF (2));
++ if (regnum == -1 || regnum == ARC_R30_REGNUM)
++ regcache->raw_collect (ARC_R30_REGNUM, buf);
++ if (regnum == -1 || regnum == ARC_R58_REGNUM)
++ regcache->raw_collect (ARC_R58_REGNUM, buf + REGOFF (1));
++ if (regnum == -1 || regnum == ARC_R59_REGNUM)
++ regcache->raw_collect (ARC_R59_REGNUM, buf + REGOFF (2));
+ }
+
+ /* Linux regset definitions. */
+--
+2.16.2
+
diff --git a/poky/meta/recipes-devtools/gdb/gdb/0015-gdb-Add-native-support-for-ARC-in-GNU-Linux.patch b/poky/meta/recipes-devtools/gdb/gdb/0015-gdb-Add-native-support-for-ARC-in-GNU-Linux.patch
new file mode 100644
index 000000000..31cf0b0be
--- /dev/null
+++ b/poky/meta/recipes-devtools/gdb/gdb/0015-gdb-Add-native-support-for-ARC-in-GNU-Linux.patch
@@ -0,0 +1,414 @@
+From 32b366249fd42d74cbc4a91039431554ebadcfd0 Mon Sep 17 00:00:00 2001
+From: Anton Kolesov <anton.kolesov@synopsys.com>
+Date: Fri, 14 Feb 2014 11:56:23 +0400
+Subject: [PATCH 4/4] gdb: Add native support for ARC in GNU/Linux
+
+With this patch in place it is possible to build a GDB that
+can run on ARC (GNU/Linux) hosts for debugging ARC targets.
+
+The "arc-linux-nat.c" is a rather small one that mostly deals
+with registers and a few thread related hooks.
+
+v2 [1]:
+- Remove "void" from the input of "_initialize_arc_linux_nat ()"
+
+[1] Tom's remark after the first patch
+https://sourceware.org/pipermail/gdb-patches/2020-November/173223.html
+
+gdb/ChangeLog:
+
+ * Makefile.in (ALLDEPFILES): Add arc-linux-nat.c.
+ * configure.host (host to gdb names): Add arc*-*-linux*.
+ * configure.nat (gdb_host_cpu): Add arc.
+ * arc-linux-nat.c: New.
+
+Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=04c9f85efcd8df5fc482ce97c0104cc7dd5d19e6]
+
+Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
+Signed-off-by: Shahab Vahedi <shahab@synopsys.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ gdb/Makefile.in | 1 +
+ gdb/arc-linux-nat.c | 320 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gdb/configure.host | 3 +
+ gdb/configure.nat | 4 +
+ 4 files changed, 328 insertions(+)
+ create mode 100644 gdb/arc-linux-nat.c
+
+diff --git a/gdb/Makefile.in b/gdb/Makefile.in
+index ec371fc7e52..c76136907ae 100644
+--- a/gdb/Makefile.in
++++ b/gdb/Makefile.in
+@@ -2136,6 +2136,7 @@ ALLDEPFILES = \
+ amd64-obsd-tdep.c \
+ amd64-sol2-tdep.c \
+ amd64-tdep.c \
++ arc-linux-nat.c \
+ arc-tdep.c \
+ arm.c \
+ arm-bsd-tdep.c \
+diff --git a/gdb/arc-linux-nat.c b/gdb/arc-linux-nat.c
+new file mode 100644
+index 00000000000..41301fd4fed
+--- /dev/null
++++ b/gdb/arc-linux-nat.c
+@@ -0,0 +1,320 @@
++/* Native-dependent code for GNU/Linux ARC.
++
++ Copyright 2020 Free Software Foundation, Inc.
++
++ This file is part of GDB.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>. */
++
++#include "defs.h"
++#include "frame.h"
++#include "inferior.h"
++#include "gdbcore.h"
++#include "regcache.h"
++#include "gdbsupport/gdb_assert.h"
++#include "target.h"
++#include "linux-nat.h"
++#include "nat/gdb_ptrace.h"
++
++#include <stdint.h>
++#include <sys/types.h>
++#include <sys/param.h>
++#include <signal.h>
++#include <sys/user.h>
++#include <sys/ioctl.h>
++#include "gdbsupport/gdb_wait.h"
++#include <fcntl.h>
++#include <sys/procfs.h>
++#include <linux/elf.h>
++
++#include "gregset.h"
++#include "arc-tdep.h"
++#include "arc-linux-tdep.h"
++#include "arch/arc.h"
++
++/* Defines ps_err_e, struct ps_prochandle. */
++#include "gdb_proc_service.h"
++
++/* Linux starting with 4.12 supports NT_ARC_V2 note type, which adds R30,
++ R58 and R59 registers, which are specific to ARC HS and aren't
++ available in ARC 700. */
++#if defined (NT_ARC_V2) && defined (__ARCHS__)
++#define ARC_HAS_V2_REGSET
++#endif
++
++class arc_linux_nat_target final : public linux_nat_target
++{
++public:
++ /* Add ARC register access methods. */
++ void fetch_registers (struct regcache *, int) override;
++ void store_registers (struct regcache *, int) override;
++
++ const struct target_desc *read_description () override;
++
++ /* Handle threads */
++ void low_prepare_to_resume (struct lwp_info *lp) override;
++};
++
++static arc_linux_nat_target the_arc_linux_nat_target;
++
++/* Read general registers from target process/thread (via ptrace)
++ into REGCACHE. */
++
++static void
++fetch_gregs (struct regcache *regcache, int regnum)
++{
++ const int tid = get_ptrace_pid (regcache->ptid ());
++ struct iovec iov;
++ gdb_gregset_t regs;
++
++ iov.iov_base = &regs;
++ iov.iov_len = sizeof (gdb_gregset_t);
++
++ if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, (void *) &iov) < 0)
++ perror_with_name (_("Couldn't get general registers"));
++ else
++ arc_linux_supply_gregset (NULL, regcache, regnum, &regs, 0);
++}
++
++#ifdef ARC_HAS_V2_REGSET
++/* Read ARC v2 registers from target process/thread (via ptrace)
++ into REGCACHE. */
++
++static void
++fetch_v2_regs (struct regcache *regcache, int regnum)
++{
++ const int tid = get_ptrace_pid (regcache->ptid ());
++ struct iovec iov;
++ bfd_byte v2_buffer[ARC_LINUX_SIZEOF_V2_REGSET];
++
++ iov.iov_base = &v2_buffer;
++ iov.iov_len = ARC_LINUX_SIZEOF_V2_REGSET;
++
++ if (ptrace (PTRACE_GETREGSET, tid, NT_ARC_V2, (void *) &iov) < 0)
++ perror_with_name (_("Couldn't get ARC HS registers"));
++ else
++ arc_linux_supply_v2_regset (NULL, regcache, regnum, v2_buffer, 0);
++}
++#endif
++
++/* Store general registers from REGCACHE into the target process/thread. */
++
++static void
++store_gregs (const struct regcache *regcache, int regnum)
++{
++ const int tid = get_ptrace_pid (regcache->ptid ());
++ struct iovec iov;
++ gdb_gregset_t regs;
++
++ iov.iov_base = &regs;
++ iov.iov_len = sizeof (gdb_gregset_t);
++
++ if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, (void *) &iov) < 0)
++ perror_with_name (_("Couldn't get general registers"));
++ else
++ {
++ arc_linux_collect_gregset (NULL, regcache, regnum, regs, 0);
++
++ if (ptrace (PTRACE_SETREGSET, tid, NT_PRSTATUS, (void *) &iov) < 0)
++ perror_with_name (_("Couldn't write general registers"));
++ }
++}
++
++#ifdef ARC_HAS_V2_REGSET
++/* Store ARC v2 registers from REGCACHE into the target process/thread. */
++
++static void
++store_v2_regs (const struct regcache *regcache, int regnum)
++{
++ const int tid = get_ptrace_pid (regcache->ptid ());
++ struct iovec iov;
++ bfd_byte v2_buffer[ARC_LINUX_SIZEOF_V2_REGSET];
++
++ iov.iov_base = &v2_buffer;
++ iov.iov_len = ARC_LINUX_SIZEOF_V2_REGSET;
++
++ if (ptrace (PTRACE_GETREGSET, tid, NT_ARC_V2, (void *) &iov) < 0)
++ perror_with_name (_("Couldn't get ARC HS registers"));
++ else
++ {
++ arc_linux_collect_v2_regset (NULL, regcache, regnum, v2_buffer, 0);
++
++ if (ptrace (PTRACE_SETREGSET, tid, NT_ARC_V2, (void *) &iov) < 0)
++ perror_with_name (_("Couldn't write ARC HS registers"));
++ }
++}
++#endif
++
++/* Target operation: Read REGNUM register (all registers if REGNUM == -1)
++ from target process into REGCACHE. */
++
++void
++arc_linux_nat_target::fetch_registers (struct regcache *regcache, int regnum)
++{
++
++ if (regnum == -1 || regnum <= ARC_LAST_REGNUM)
++ fetch_gregs (regcache, regnum);
++
++#ifdef ARC_HAS_V2_REGSET
++ if (regnum == -1
++ || regnum == ARC_R30_REGNUM
++ || regnum == ARC_R58_REGNUM
++ || regnum == ARC_R59_REGNUM)
++ fetch_v2_regs (regcache, regnum);
++#endif
++}
++
++/* Target operation: Store REGNUM register (all registers if REGNUM == -1)
++ to the target process from REGCACHE. */
++
++void
++arc_linux_nat_target::store_registers (struct regcache *regcache, int regnum)
++{
++ if (regnum == -1 || regnum <= ARC_LAST_REGNUM)
++ store_gregs (regcache, regnum);
++
++#ifdef ARC_HAS_V2_REGSET
++ if (regnum == -1
++ || regnum == ARC_R30_REGNUM
++ || regnum == ARC_R58_REGNUM
++ || regnum == ARC_R59_REGNUM)
++ store_v2_regs (regcache, regnum);
++#endif
++}
++
++/* Copy general purpose register(s) from REGCACHE into regset GREGS.
++ This function is exported to proc-service.c */
++
++void
++fill_gregset (const struct regcache *regcache,
++ gdb_gregset_t *gregs, int regnum)
++{
++ arc_linux_collect_gregset (NULL, regcache, regnum, gregs, 0);
++}
++
++/* Copy all the general purpose registers from regset GREGS into REGCACHE.
++ This function is exported to proc-service.c. */
++
++void
++supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregs)
++{
++ arc_linux_supply_gregset (NULL, regcache, -1, gregs, 0);
++}
++
++/* ARC doesn't have separate FP registers. This function is exported
++ to proc-service.c. */
++
++void
++fill_fpregset (const struct regcache *regcache,
++ gdb_fpregset_t *fpregsetp, int regnum)
++{
++ if (arc_debug)
++ debug_printf ("arc-linux-nat: fill_fpregset called.");
++ return;
++}
++
++/* ARC doesn't have separate FP registers. This function is exported
++ to proc-service.c. */
++
++void
++supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
++{
++ if (arc_debug)
++ debug_printf ("arc-linux-nat: supply_fpregset called.");
++ return;
++}
++
++/* Implement the "read_description" method of linux_nat_target. */
++
++const struct target_desc *
++arc_linux_nat_target::read_description ()
++{
++ /* This is a native target, hence description is hardcoded. */
++#ifdef __ARCHS__
++ arc_arch_features features (4, ARC_ISA_ARCV2);
++#else
++ arc_arch_features features (4, ARC_ISA_ARCV1);
++#endif
++ return arc_lookup_target_description (features);
++}
++
++/* As described in arc_linux_collect_gregset(), we need to write resume-PC
++ to ERET. However by default GDB for native targets doesn't write
++ registers if they haven't been changed. This is a callback called by
++ generic GDB, and in this callback we have to rewrite PC value so it
++ would force rewrite of register on target. It seems that the only
++ other arch that utilizes this hook is x86/x86-64 for HW breakpoint
++ support. But then, AFAIK no other arch has this stop_pc/eret
++ complexity.
++
++ No better way was found, other than this fake write of register value,
++ to force GDB into writing register to target. Is there any? */
++
++void
++arc_linux_nat_target::low_prepare_to_resume (struct lwp_info *lwp)
++{
++ /* When new processes and threads are created we do not have the address
++ space for them and calling get_thread_regcache will cause an internal
++ error in GDB. It looks like that checking for last_resume_kind is the
++ sensible way to determine processes for which we cannot get regcache.
++ Ultimately, a better way would be removing the need for
++ low_prepare_to_resume in the first place. */
++ if (lwp->last_resume_kind == resume_stop)
++ return;
++
++ struct regcache *regcache = get_thread_regcache (this, lwp->ptid);
++ struct gdbarch *gdbarch = regcache->arch ();
++
++ /* Read current PC value, then write it back. It is required to call
++ invalidate(), otherwise GDB will note that new value is equal to old
++ value and will skip write. */
++ ULONGEST new_pc;
++ regcache_cooked_read_unsigned (regcache, gdbarch_pc_regnum (gdbarch),
++ &new_pc);
++ regcache->invalidate (gdbarch_pc_regnum (gdbarch));
++ regcache_cooked_write_unsigned (regcache, gdbarch_pc_regnum (gdbarch),
++ new_pc);
++}
++
++/* Fetch the thread-local storage pointer for libthread_db. Note that
++ this function is not called from GDB, but is called from libthread_db.
++ This is required to debug multithreaded applications with NPTL. */
++
++ps_err_e
++ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx,
++ void **base)
++{
++ if (arc_debug >= 2)
++ debug_printf ("arc-linux-nat: ps_get_thread_area called");
++
++ if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
++ return PS_ERR;
++
++ /* IDX is the bias from the thread pointer to the beginning of the
++ thread descriptor. It has to be subtracted due to implementation
++ quirks in libthread_db. */
++ *base = (void *) ((char *) *base - idx);
++
++ return PS_OK;
++}
++
++/* Suppress warning from -Wmissing-prototypes. */
++void _initialize_arc_linux_nat ();
++void
++_initialize_arc_linux_nat ()
++{
++ /* Register the target. */
++ linux_target = &the_arc_linux_nat_target;
++ add_inf_child_target (&the_arc_linux_nat_target);
++}
+diff --git a/gdb/configure.host b/gdb/configure.host
+index ce528237291..e94a19b0332 100644
+--- a/gdb/configure.host
++++ b/gdb/configure.host
+@@ -60,6 +60,7 @@ case "${host_cpu}" in
+
+ aarch64*) gdb_host_cpu=aarch64 ;;
+ alpha*) gdb_host_cpu=alpha ;;
++arc*) gdb_host_cpu=arc ;;
+ arm*) gdb_host_cpu=arm ;;
+ hppa*) gdb_host_cpu=pa ;;
+ i[34567]86*) gdb_host_cpu=i386 ;;
+@@ -91,6 +92,8 @@ alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
+ gdb_host=nbsd ;;
+ alpha*-*-openbsd*) gdb_host=nbsd ;;
+
++arc*-*-linux*) gdb_host=linux ;;
++
+ arm*-*-freebsd*) gdb_host=fbsd ;;
+ arm*-*-linux*) gdb_host=linux ;;
+ arm*-*-netbsdelf* | arm*-*-knetbsd*-gnu)
+diff --git a/gdb/configure.nat b/gdb/configure.nat
+index bb70e303384..cd11bc86dca 100644
+--- a/gdb/configure.nat
++++ b/gdb/configure.nat
+@@ -238,6 +238,10 @@ case ${gdb_host} in
+ nat/aarch64-linux.o \
+ nat/aarch64-sve-linux-ptrace.o"
+ ;;
++ arc)
++ # Host: ARC based machine running GNU/Linux
++ NATDEPFILES="${NATDEPFILES} arc-linux-nat.o"
++ ;;
+ arm)
+ # Host: ARM based machine running GNU/Linux
+ NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \
+--
+2.16.2
+
diff --git a/poky/meta/recipes-devtools/gdb/gdb_10.1.bb b/poky/meta/recipes-devtools/gdb/gdb_10.2.bb
index d70757a15..d70757a15 100644
--- a/poky/meta/recipes-devtools/gdb/gdb_10.1.bb
+++ b/poky/meta/recipes-devtools/gdb/gdb_10.2.bb
diff --git a/poky/meta/recipes-devtools/git/git_2.31.1.bb b/poky/meta/recipes-devtools/git/git_2.32.0.bb
index 6bfa1f7a1..f45737b09 100644
--- a/poky/meta/recipes-devtools/git/git_2.31.1.bb
+++ b/poky/meta/recipes-devtools/git/git_2.32.0.bb
@@ -5,5 +5,5 @@ EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
"
EXTRA_OEMAKE += "NO_GETTEXT=1"
-SRC_URI[tarball.sha256sum] = "46d37c229e9d786510e0c53b60065704ce92d5aedc16f2c5111e3ed35093bfa7"
-SRC_URI[manpages.sha256sum] = "d330498aaaea6928b0abbbbb896f6f605efd8d35f23cbbb2de38c87a737d4543"
+SRC_URI[tarball.sha256sum] = "6038f06d396ba9dab2eee541c7db6e7f9f847f181ec62f3d8441893f8c469398"
+SRC_URI[manpages.sha256sum] = "b5533c40ea1688231c0e2df51cc0d1c0272e17fe78a45ba6e60cb8f61fa4a53c"
diff --git a/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index c41177c72..8d7d6ac3e 100644
--- a/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -9,8 +9,8 @@ DEPENDS_class-native = "hostperl-runtime-native"
INHIBIT_DEFAULT_DEPS = "1"
-SRCREV = "6faca61810d335c7837f320733fe8e15a1431fc2"
-PV = "20210125+git${SRCPV}"
+SRCREV = "92fac9b5ceb9f111a04d7f8f98831570e77886c6"
+PV = "20210522+git${SRCPV}"
SRC_URI = "git://git.savannah.gnu.org/config.git \
file://gnu-configize.in"
diff --git a/poky/meta/recipes-devtools/go/go-1.16.2.inc b/poky/meta/recipes-devtools/go/go-1.16.5.inc
index e65caf819..bd928e44f 100644
--- a/poky/meta/recipes-devtools/go/go-1.16.2.inc
+++ b/poky/meta/recipes-devtools/go/go-1.16.5.inc
@@ -1,7 +1,7 @@
require go-common.inc
GO_BASEVERSION = "1.16"
-PV = "1.16.2"
+PV = "1.16.5"
FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
@@ -17,4 +17,4 @@ SRC_URI += "\
file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \
"
-SRC_URI[main.sha256sum] = "37ca14287a23cb8ba2ac3f5c3dd8adbc1f7a54b9701a57824bf19a0b271f83ea"
+SRC_URI[main.sha256sum] = "7bfa7e5908c7cc9e75da5ddf3066d7cbcf3fd9fa51945851325eebc17f50ba80"
diff --git a/poky/meta/recipes-devtools/go/go-binary-native_1.16.2.bb b/poky/meta/recipes-devtools/go/go-binary-native_1.16.5.bb
index 4fb060173..b3e2b6a60 100644
--- a/poky/meta/recipes-devtools/go/go-binary-native_1.16.2.bb
+++ b/poky/meta/recipes-devtools/go/go-binary-native_1.16.5.bb
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
PROVIDES = "go-native"
SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
-SRC_URI[go_linux_amd64.sha256sum] = "542e936b19542e62679766194364f45141fde55169db2d8d01046555ca9eb4b8"
-SRC_URI[go_linux_arm64.sha256sum] = "6924601d998a0917694fd14261347e3798bd2ad6b13c4d7f2edd70c9d57f62ab"
+SRC_URI[go_linux_amd64.sha256sum] = "b12c23023b68de22f74c0524f10b753e7b08b1504cb7e417eccebdd3fae49061"
+SRC_URI[go_linux_arm64.sha256sum] = "d5446b46ef6f36fdffa852f73dfbbe78c1ddf010b99fa4964944b9ae8b4d6799"
UPSTREAM_CHECK_URI = "https://golang.org/dl/"
UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
diff --git a/poky/meta/recipes-devtools/go/go-common.inc b/poky/meta/recipes-devtools/go/go-common.inc
index f18d928c7..39a681a71 100644
--- a/poky/meta/recipes-devtools/go/go-common.inc
+++ b/poky/meta/recipes-devtools/go/go-common.inc
@@ -14,7 +14,7 @@ LICENSE = "BSD-3-Clause"
inherit goarch
-SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz;name=main"
+SRC_URI = "https://golang.org/dl/go${PV}.src.tar.gz;name=main"
S = "${WORKDIR}/go"
B = "${S}"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.src\.tar"
diff --git a/poky/meta/recipes-devtools/go/go-cross-canadian_1.16.2.bb b/poky/meta/recipes-devtools/go/go-cross-canadian_1.16.5.bb
index 7ac9449e4..7ac9449e4 100644
--- a/poky/meta/recipes-devtools/go/go-cross-canadian_1.16.2.bb
+++ b/poky/meta/recipes-devtools/go/go-cross-canadian_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go-cross_1.16.2.bb b/poky/meta/recipes-devtools/go/go-cross_1.16.5.bb
index 80b5a03f6..80b5a03f6 100644
--- a/poky/meta/recipes-devtools/go/go-cross_1.16.2.bb
+++ b/poky/meta/recipes-devtools/go/go-cross_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go-crosssdk_1.16.2.bb b/poky/meta/recipes-devtools/go/go-crosssdk_1.16.5.bb
index 1857c8a57..1857c8a57 100644
--- a/poky/meta/recipes-devtools/go/go-crosssdk_1.16.2.bb
+++ b/poky/meta/recipes-devtools/go/go-crosssdk_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go-native_1.16.2.bb b/poky/meta/recipes-devtools/go/go-native_1.16.5.bb
index f14892cdb..f14892cdb 100644
--- a/poky/meta/recipes-devtools/go/go-native_1.16.2.bb
+++ b/poky/meta/recipes-devtools/go/go-native_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go-runtime_1.16.2.bb b/poky/meta/recipes-devtools/go/go-runtime_1.16.5.bb
index 63464a150..63464a150 100644
--- a/poky/meta/recipes-devtools/go/go-runtime_1.16.2.bb
+++ b/poky/meta/recipes-devtools/go/go-runtime_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go_1.16.2.bb b/poky/meta/recipes-devtools/go/go_1.16.5.bb
index 4e9e0ebec..4e9e0ebec 100644
--- a/poky/meta/recipes-devtools/go/go_1.16.2.bb
+++ b/poky/meta/recipes-devtools/go/go_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/help2man/help2man_1.48.2.bb b/poky/meta/recipes-devtools/help2man/help2man_1.48.3.bb
index 3e9b509ed..a612c0896 100644
--- a/poky/meta/recipes-devtools/help2man/help2man_1.48.2.bb
+++ b/poky/meta/recipes-devtools/help2man/help2man_1.48.3.bb
@@ -6,7 +6,7 @@ LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "20cb36111df91d61741a20680912ab0e4c59da479c3fb05837c6f0a8cb7cb467"
+SRC_URI[sha256sum] = "8361ff3c643fbd391064e97e5f54592ca28b880eaffbf566a68e0ad800d1a8ac"
inherit autotools
diff --git a/poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb b/poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
index 231c1c20e..61b8487c7 100644
--- a/poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
+++ b/poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb
@@ -11,6 +11,7 @@ PR = "r2"
DEPENDS = ""
INHIBIT_DEFAULT_DEPS = "1"
+ICECC_DISABLED = "1"
# This is needed, because otherwise there is dependency loop from quilt-native
# Dependency loop #1 found:
diff --git a/poky/meta/recipes-devtools/jquery/jquery_3.6.0.bb b/poky/meta/recipes-devtools/jquery/jquery_3.6.0.bb
index 65905966c..03792730f 100644
--- a/poky/meta/recipes-devtools/jquery/jquery_3.6.0.bb
+++ b/poky/meta/recipes-devtools/jquery/jquery_3.6.0.bb
@@ -19,6 +19,11 @@ SRC_URI[map.sha256sum] = "399548fb0e7b146c12f5ba18099a47d594a970fee96212eee0ab48
UPSTREAM_CHECK_REGEX = "jquery-(?P<pver>\d+(\.\d+)+)\.js"
+# https://github.com/jquery/jquery/issues/3927
+# There are ways jquery can expose security issues but any issues are in the apps exposing them
+# and there is little we can directly do
+CVE_CHECK_WHITELIST += "CVE-2007-2379"
+
inherit allarch
do_install() {
diff --git a/poky/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch b/poky/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch
index f4fb6d3b2..76fce1976 100644
--- a/poky/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch
+++ b/poky/meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch
@@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libcomps/src/python/src/CMakeLists.txt b/libcomps/src/python/src/CMakeLists.txt
-index adabb31..b9b96ab 100644
+index 89b9c91..08cd6b5 100644
--- a/libcomps/src/python/src/CMakeLists.txt
+++ b/libcomps/src/python/src/CMakeLists.txt
@@ -9,13 +9,13 @@ set (pycomps_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR})
@@ -23,7 +23,7 @@ index adabb31..b9b96ab 100644
- pycomps_hash.c pycomps_exc.c pycomps_lbw.c)
+ pycomps_hash.c pycomps_exc.c pycomps_lbw.c crc32.c)
- set (pycomps_HEADERS pycomps_23macros.h pycomps_sequence.h
+ set (pycomps_HEADERS pycomps_macros.h pycomps_sequence.h
pycomps_envs.h pycomps_categories.h pycomps_groups.h
pycomps_gids.h pycomps_utils.h pycomps_dict.h pycomps_mdict.h
pycomps_hash.h pycomps_exc.h pycomps_lbw.h
@@ -46,5 +46,5 @@ index d8f5e34..f266067 100644
static uint32_t crc32_tab[] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
--
-2.26.2
+2.25.1
diff --git a/poky/meta/recipes-devtools/libcomps/libcomps/0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/poky/meta/recipes-devtools/libcomps/libcomps/0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
index 3e9102605..6cd052889 100644
--- a/poky/meta/recipes-devtools/libcomps/libcomps/0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
+++ b/poky/meta/recipes-devtools/libcomps/libcomps/0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -10,18 +10,18 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcomps/src/python/src/CMakeLists.txt b/libcomps/src/python/src/CMakeLists.txt
-index b9b96ab..6d44567 100644
+index f813af4..9eebb6c 100644
--- a/libcomps/src/python/src/CMakeLists.txt
+++ b/libcomps/src/python/src/CMakeLists.txt
-@@ -115,7 +115,7 @@ IF (SKBUILD)
+@@ -85,7 +85,7 @@ IF (SKBUILD)
INSTALL(FILES libcomps/__init__.py DESTINATION libcomps/src/python/src/libcomps)
INSTALL(TARGETS pycomps LIBRARY DESTINATION libcomps/src/python/src/libcomps)
ELSE ()
-- EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
-+ #EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+- EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('platlib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++ #EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('platlib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
INSTALL(FILES ${pycomps_SRCDIR}/libcomps/__init__.py DESTINATION ${PYTHON_INSTALL_DIR}/libcomps)
#INSTALL(FILES ${pycomps_SRCDIR}/tests/__test.py DESTINATION
--
-2.26.2
+2.25.1
diff --git a/poky/meta/recipes-devtools/libcomps/libcomps_0.1.15.bb b/poky/meta/recipes-devtools/libcomps/libcomps_0.1.17.bb
index 58d2dee89..502bc4688 100644
--- a/poky/meta/recipes-devtools/libcomps/libcomps_0.1.15.bb
+++ b/poky/meta/recipes-devtools/libcomps/libcomps_0.1.17.bb
@@ -9,7 +9,7 @@ SRC_URI = "git://github.com/rpm-software-management/libcomps.git \
file://0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
"
-SRCREV = "b213f749405d84e989b25e183bcf28ce701696dd"
+SRCREV = "dfaffdce1969042bda4a184865861573bb07a5a3"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch
new file mode 100644
index 000000000..d483dd410
--- /dev/null
+++ b/poky/meta/recipes-devtools/libdnf/libdnf/0001-drop-FindPythonInstDir.cmake.patch
@@ -0,0 +1,42 @@
+From c0a465ccae395871ab10932975e37894220bc6a1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 1 Jun 2021 10:23:59 +0800
+Subject: [PATCH] drop FindPythonInstDir.cmake
+
+Since commit [1] applied, PYTHON_INSTALL_DIR is not right
+on nativesdk build
+...
+|Building for python3
+|-- Python install dir is
+|tmp-glibc/work/x86_64-nativesdk-wrlinuxsdk-linux/nativesdk-libdnf/0.63.0-r0/
+recipe-sysroot-native/usr/lib/python3.9/site-packages
+...
+
+Yocto manually set PYTHON_INSTALL_DIR from recipe, it is not
+necessary to call FindPythonInstDir.cmake which will override
+Yocto setting
+
+[1] https://github.com/rpm-software-management/libdnf/commit/f1cffbfb9f338da827e233c2d8ac3a25a6a59a69
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ cmake/modules/FindPythonInstDir.cmake | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/cmake/modules/FindPythonInstDir.cmake b/cmake/modules/FindPythonInstDir.cmake
+index ed098ded..8b137891 100644
+--- a/cmake/modules/FindPythonInstDir.cmake
++++ b/cmake/modules/FindPythonInstDir.cmake
+@@ -1,6 +1 @@
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+-from sys import stdout
+-from sysconfig import get_path
+-path=get_path(name='platlib', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'})
+-stdout.write(path)"
+-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++
+--
+2.18.1
+
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-config.h-avoid-the-use-of-non-portable-__WORD.patch b/poky/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-config.h-avoid-the-use-of-non-portable-__WORD.patch
index f8d256e01..b740521fd 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-config.h-avoid-the-use-of-non-portable-__WORD.patch
+++ b/poky/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-config.h-avoid-the-use-of-non-portable-__WORD.patch
@@ -1,23 +1,26 @@
-From 8aa5402393fabaf4fff51be3af4868e8dfab6da7 Mon Sep 17 00:00:00 2001
+From fc0b81bb717db3f41513f09f6661676a7aea6dd4 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 9 Mar 2021 19:30:42 +0000
Subject: [PATCH] libdnf/config.h: avoid the use of non-portable __WORDSIZE
Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/1159]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
---
- libdnf/config.h | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
+ libdnf/config.h | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/libdnf/config.h b/libdnf/config.h
-index 16121f6f..2925923e 100644
+index 01b330b4..dbd53f5e 100644
--- a/libdnf/config.h
+++ b/libdnf/config.h
-@@ -18,12 +18,10 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
+@@ -20,14 +20,11 @@
+ #ifdef __APPLE__
+ #include <stdint.h>
+-#else
-#include <bits/wordsize.h>
+ #endif
+#include <limits.h>
-#if __WORDSIZE == 32
diff --git a/poky/meta/recipes-devtools/libdnf/libdnf_0.58.0.bb b/poky/meta/recipes-devtools/libdnf/libdnf_0.63.0.bb
index dbe68d5a1..a26ee55cb 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf_0.58.0.bb
+++ b/poky/meta/recipes-devtools/libdnf/libdnf_0.63.0.bb
@@ -12,10 +12,11 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master \
file://0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch \
file://enable_test_data_dir_set.patch \
file://0001-libdnf-config.h-avoid-the-use-of-non-portable-__WORD.patch \
+ file://0001-drop-FindPythonInstDir.cmake.patch \
"
-SRCREV = "85278894f21bc1957dc47a2a09ddacf59bc3cda8"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+SRCREV = "669a5c691acba91693d238d6262ac99a440aa9b3"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(?!4\.90)\d+(\.\d+)+)"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/libedit/libedit_20210216-3.1.bb b/poky/meta/recipes-devtools/libedit/libedit_20210522-3.1.bb
index 97aceaf71..43e6f2244 100644
--- a/poky/meta/recipes-devtools/libedit/libedit_20210216-3.1.bb
+++ b/poky/meta/recipes-devtools/libedit/libedit_20210522-3.1.bb
@@ -13,7 +13,7 @@ inherit autotools
SRC_URI = "http://www.thrysoee.dk/editline/${BP}.tar.gz \
file://stdc-predef.patch \
"
-SRC_URI[sha256sum] = "2283f741d2aab935c8c52c04b57bf952d02c2c02e651172f8ac811f77b1fc77a"
+SRC_URI[sha256sum] = "0220bc2047e927c0c1984ef5f7b4eb2a9469a5b7bf12ba573ca3b23ca02bbb6f"
BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb b/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
index 2f60ce8e0..771b2c094 100644
--- a/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
+++ b/poky/meta/recipes-devtools/libmodulemd/libmodulemd_git.bb
@@ -8,8 +8,8 @@ SRC_URI = "git://github.com/fedora-modularity/libmodulemd;protocol=https;branch=
file://0001-modulemd-generate-the-manpage-only-if-the-feature-is.patch \
"
-PV = "2.12.0"
-SRCREV = "aaed38c899a958a88a6a368a70510e350ebe336c"
+PV = "2.12.1"
+SRCREV = "c0897fa0e9d7d1305fd4813b1010c1d4cca42346"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch b/poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
index 46ab9a113..2ea50f00f 100644
--- a/poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
+++ b/poky/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
@@ -5,13 +5,13 @@ Subject: [PATCH] Do not try to obtain PYTHON_INSTALL_DIR by running python.
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
+Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
librepo/python/CMakeLists.txt | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/librepo/python/CMakeLists.txt b/librepo/python/CMakeLists.txt
-index 52fc39e..2024407 100644
+index 8523ca7..06e5f7b 100644
--- a/librepo/python/CMakeLists.txt
+++ b/librepo/python/CMakeLists.txt
@@ -16,12 +16,12 @@ SET (librepomodule_SRCS
@@ -20,16 +20,19 @@ index 52fc39e..2024407 100644
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
-from sys import stdout
--from distutils import sysconfig
--path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+-from sysconfig import get_path
+-path=get_path(name='platlib', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'})
-stdout.write(path)"
-OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+#from sys import stdout
-+#from distutils import sysconfig
-+#path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
++#from sysconfig import get_path
++#path=get_path(name='platlib', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'})
+#stdout.write(path)"
+#OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
MESSAGE(STATUS "Python3 install dir is ${PYTHON_INSTALL_DIR}")
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/librepo/librepo_1.13.0.bb b/poky/meta/recipes-devtools/librepo/librepo_1.14.1.bb
index 0a68e0ac4..867645258 100644
--- a/poky/meta/recipes-devtools/librepo/librepo_1.13.0.bb
+++ b/poky/meta/recipes-devtools/librepo/librepo_1.14.1.bb
@@ -10,7 +10,7 @@ SRC_URI = "git://github.com/rpm-software-management/librepo.git \
file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
"
-SRCREV = "a244d78bab11510408fb9413f1c78c2f56c69fa5"
+SRCREV = "c5fe6b85b47f2e4f7a37cff3f3214205d1b54db5"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc b/poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc
index 19a03d473..e9225e140 100644
--- a/poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc
+++ b/poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc
@@ -22,6 +22,7 @@ SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
file://0001-libtool-Fix-support-for-NIOS2-processor.patch \
file://0001-libtool-Check-for-static-libs-for-internal-compiler-.patch \
file://0001-Makefile.am-make-sure-autoheader-run-before-autoconf.patch \
+ file://0001-Makefile.am-make-sure-autoheader-run-before-automake.patch \
"
SRC_URI[md5sum] = "addf44b646ddb4e3919805aa88fa7c5e"
diff --git a/poky/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch b/poky/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch
new file mode 100644
index 000000000..87f849234
--- /dev/null
+++ b/poky/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch
@@ -0,0 +1,35 @@
+From e82c06584f02e3e4487aa73aa05981e2a35dc6d1 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Tue, 13 Apr 2021 07:17:29 +0000
+Subject: [PATCH] Makefile.am: make sure autoheader run before automake
+
+When use automake to generate Makefile.in from Makefile.am, there
+comes below race:
+ | configure.ac:45: error: required file 'config-h.in' not found
+
+It is because the file config-h.in in updating process by autoheader,
+so make automake run after autoheader to avoid the above race.
+
+Upstream-Status: Submitted [libtool-patches@gnu.org maillist]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 2752ecc..29950db 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -328,7 +328,7 @@ EXTRA_DIST += $(lt_aclocal_m4) \
+ $(lt_obsolete_m4) \
+ $(stamp_mk)
+
+-$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4)
++$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4) $(lt_config_h_in)
+ $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOMAKE) Makefile
+
+ # Don't let unused scripts leak into the libltdl Makefile
+--
+2.29.2
+
diff --git a/poky/meta/recipes-devtools/llvm/llvm/0001-nfc-Fix-missing-include.patch b/poky/meta/recipes-devtools/llvm/llvm/0001-nfc-Fix-missing-include.patch
deleted file mode 100644
index f6dee77ab..000000000
--- a/poky/meta/recipes-devtools/llvm/llvm/0001-nfc-Fix-missing-include.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3b7e611bd58ba842470d17374c550e14bceca5c7 Mon Sep 17 00:00:00 2001
-From: serge-sans-paille <sguelton@redhat.com>
-Date: Tue, 10 Nov 2020 14:55:25 +0100
-Subject: [PATCH] [nfc] Fix missing include
-
-Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- llvm/utils/benchmark/src/benchmark_register.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h
-index 0705e219f2fa..4caa5ad4da07 100644
---- a/llvm/utils/benchmark/src/benchmark_register.h
-+++ b/llvm/utils/benchmark/src/benchmark_register.h
-@@ -1,6 +1,7 @@
- #ifndef BENCHMARK_REGISTER_H
- #define BENCHMARK_REGISTER_H
-
-+#include <limits>
- #include <vector>
-
- #include "check.h"
---
-2.30.1
-
diff --git a/poky/meta/recipes-devtools/llvm/llvm_git.bb b/poky/meta/recipes-devtools/llvm/llvm_git.bb
index db6694339..8a5d3dc9b 100644
--- a/poky/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/poky/meta/recipes-devtools/llvm/llvm_git.bb
@@ -19,8 +19,8 @@ inherit cmake pkgconfig
PROVIDES += "llvm${PV}"
-MAJOR_VERSION = "11"
-MINOR_VERSION = "1"
+MAJOR_VERSION = "12"
+MINOR_VERSION = "0"
PATCH_VERSION = "0"
PV = "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"
@@ -29,12 +29,11 @@ LLVM_RELEASE = "${PV}"
LLVM_DIR = "llvm${LLVM_RELEASE}"
BRANCH = "release/${MAJOR_VERSION}.x"
-SRCREV = "1fdec59bffc11ae37eb51a1b9869f0696bfd5312"
+SRCREV = "fa0971b87fb2c9d14d1bba2551e61f02f18f329b"
SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH} \
file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \
file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
- file://0001-nfc-Fix-missing-include.patch;striplevel=2 \
"
UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)"
diff --git a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc b/poky/meta/recipes-devtools/m4/m4-1.4.19.inc
index a9b63c1bf..5f3d59226 100644
--- a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
+++ b/poky/meta/recipes-devtools/m4/m4-1.4.19.inc
@@ -4,24 +4,21 @@ DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro process
compatible although it has some extensions (for example, handling more than 9 positional parameters to macros). \
GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc."
-inherit autotools texinfo ptest
+inherit autotools texinfo ptest gettext
SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
file://ac_config_links.patch \
- file://m4-1.4.18-glibc-change-work-around.patch \
"
-SRC_URI_append_class-target = " file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://run-ptest \
+SRC_URI_append_class-target = " file://run-ptest \
file://serial-tests-config.patch \
- file://0001-test-getopt-posix-fix.patch \
"
-SRC_URI[md5sum] = "a077779db287adf4e12a035029002d28"
-SRC_URI[sha256sum] = "ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab"
+SRC_URI[md5sum] = "f4a2b0284d80353b995f8ef2385ed73c"
+SRC_URI[sha256sum] = "3be4a26d825ffdfda52a56fc43246456989a3630093cced3fbddf4771ee58a70"
LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
+LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464\
file://examples/COPYING;md5=4031593b2166d6c47cae282d944a7ede"
# Fix "Argument list too long" error when len(TMPDIR) = 410
@@ -49,6 +46,8 @@ do_install_ptest() {
chmod 0755 ${D}${PTEST_PATH}/tests/test-mbrtowc-w32-1.sh ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \
${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \
${D}${PTEST_PATH}/tests/test-xalloc-die
+
+ ln -s ptest ${D}${libdir}/${BPN}/${BP}
}
diff --git a/poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb b/poky/meta/recipes-devtools/m4/m4-native_1.4.19.bb
index 407ad8933..407ad8933 100644
--- a/poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
+++ b/poky/meta/recipes-devtools/m4/m4-native_1.4.19.bb
diff --git a/poky/meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4..000000000
--- a/poky/meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/gnulib.mk b/lib/gnulib.mk
-index e1d74db..c0e92dd 100644
---- a/lib/gnulib.mk
-+++ b/lib/gnulib.mk
-@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
---
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch b/poky/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch
deleted file mode 100644
index 11508ee0e..000000000
--- a/poky/meta/recipes-devtools/m4/m4/0001-test-getopt-posix-fix.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 75bea7c72a919859674f493548653de88f96c798 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Mon, 22 Apr 2019 10:36:13 +0800
-Subject: [PATCH] test-getopt-posix fix
-
-fix below problem:
-test-getopt.h:754: assertion 'strcmp (argv[1], "donald") == 0' failed
-
-get this patch from
-https://github.com/habitat-sh/core-plans/blob/master/m4/fix-test-getopt-posix-with-glibc-2.26.patch
-
-Upstream-Status: Pending
-
-have report this bug to m4-discuss@gnu.org
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- tests/test-getopt-posix.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/tests/test-getopt-posix.c b/tests/test-getopt-posix.c
-index 5532271..2a3d511 100644
---- a/tests/test-getopt-posix.c
-+++ b/tests/test-getopt-posix.c
-@@ -22,6 +22,13 @@
- ftell link warning if we are not using the gnulib ftell module. */
- #define _GL_NO_LARGE_FILES
-
-+/*
-+ * Glibc 2.26 does hard include bits/getopt_posix.h which causes the system
-+ * to use glibc's getopt but the tests expect gnulib behavior. Until a better
-+ * fix is available this avoids that mis-resolution.
-+ */
-+#include <getopt.h>
-+
- /* POSIX and glibc provide the getopt() function in <unistd.h>, see
- http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
- https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
---
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/m4/m4/ac_config_links.patch b/poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
index 71edf5951..39fcd9189 100644
--- a/poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
+++ b/poky/meta/recipes-devtools/m4/m4/ac_config_links.patch
@@ -12,20 +12,26 @@ source, and what we want is to is to not touch it.
Tested on x86_64_linux (Ubuntu 8.04 and 9.10).
-2009-11-10 Esben Haabendal <eha@doredevelopment.dk>
+2009-11-10 Esben Haabendal <eha@doredevelopment.dk>
+---
+ configure | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
-Index: m4-1.4.18/configure
-===================================================================
---- m4-1.4.18.orig/configure
-+++ m4-1.4.18/configure
-@@ -24415,8 +24415,8 @@ $as_echo "#define GNULIB_TEST_GETTIMEOFD
+diff --git a/configure b/configure
+index 883336a..6343a34 100755
+--- a/configure
++++ b/configure
+@@ -37061,8 +37061,8 @@ printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
# only, it does not matter if we skip the link with older autoconf.
# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
# builds, so use a shell variable to bypass this.
- GNUmakefile=GNUmakefile
- ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
-+ # GNUmakefile=GNUmakefile
-+ # ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
++# GNUmakefile=GNUmakefile
++# ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
- :
+ LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch b/poky/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch
deleted file mode 100644
index c10bcbf69..000000000
--- a/poky/meta/recipes-devtools/m4/m4/m4-1.4.18-glibc-change-work-around.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-update for glibc libio.h removal in 2.28+
-
-see
-https://src.fedoraproject.org/rpms/m4/c/814d592134fad36df757f9a61422d164ea2c6c9b?branch=master
-
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a718]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: m4-1.4.18/lib/fflush.c
-===================================================================
---- m4-1.4.18.orig/lib/fflush.c
-+++ m4-1.4.18/lib/fflush.c
-@@ -33,7 +33,7 @@
- #undef fflush
-
-
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-
- /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
- static void
-@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
-
- #endif
-
--#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
-+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
-
- # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
-@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
- if (stream == NULL || ! freading (stream))
- return fflush (stream);
-
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-
- clear_ungetc_buffer_preserving_position (stream);
-
-Index: m4-1.4.18/lib/fpending.c
-===================================================================
---- m4-1.4.18.orig/lib/fpending.c
-+++ m4-1.4.18/lib/fpending.c
-@@ -32,7 +32,7 @@ __fpending (FILE *fp)
- /* Most systems provide FILE as a struct and the necessary bitmask in
- <stdio.h>, because they need it for implementing getc() and putc() as
- fast macros. */
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- return fp->_IO_write_ptr - fp->_IO_write_base;
- #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
-Index: m4-1.4.18/lib/fpurge.c
-===================================================================
---- m4-1.4.18.orig/lib/fpurge.c
-+++ m4-1.4.18/lib/fpurge.c
-@@ -62,7 +62,7 @@ fpurge (FILE *fp)
- /* Most systems provide FILE as a struct and the necessary bitmask in
- <stdio.h>, because they need it for implementing getc() and putc() as
- fast macros. */
--# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- fp->_IO_read_end = fp->_IO_read_ptr;
- fp->_IO_write_ptr = fp->_IO_write_base;
- /* Avoid memory leak when there is an active ungetc buffer. */
-Index: m4-1.4.18/lib/freadahead.c
-===================================================================
---- m4-1.4.18.orig/lib/freadahead.c
-+++ m4-1.4.18/lib/freadahead.c
-@@ -25,7 +25,7 @@
- size_t
- freadahead (FILE *fp)
- {
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- if (fp->_IO_write_ptr > fp->_IO_write_base)
- return 0;
- return (fp->_IO_read_end - fp->_IO_read_ptr)
-Index: m4-1.4.18/lib/freading.c
-===================================================================
---- m4-1.4.18.orig/lib/freading.c
-+++ m4-1.4.18/lib/freading.c
-@@ -31,7 +31,7 @@ freading (FILE *fp)
- /* Most systems provide FILE as a struct and the necessary bitmask in
- <stdio.h>, because they need it for implementing getc() and putc() as
- fast macros. */
--# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- return ((fp->_flags & _IO_NO_WRITES) != 0
- || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
- && fp->_IO_read_base != NULL));
-Index: m4-1.4.18/lib/fseeko.c
-===================================================================
---- m4-1.4.18.orig/lib/fseeko.c
-+++ m4-1.4.18/lib/fseeko.c
-@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when
- #endif
-
- /* These tests are based on fpurge.c. */
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- if (fp->_IO_read_end == fp->_IO_read_ptr
- && fp->_IO_write_ptr == fp->_IO_write_base
- && fp->_IO_save_base == NULL)
-@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when
- return -1;
- }
-
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
- fp->_flags &= ~_IO_EOF_SEEN;
- fp->_offset = pos;
- #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
-Index: m4-1.4.18/lib/stdio-impl.h
-===================================================================
---- m4-1.4.18.orig/lib/stdio-impl.h
-+++ m4-1.4.18/lib/stdio-impl.h
-@@ -18,6 +18,12 @@
- the same implementation of stdio extension API, except that some fields
- have different naming conventions, or their access requires some casts. */
-
-+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
-+ problem by defining it ourselves. FIXME: Do not rely on glibc
-+ internals. */
-+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
-+# define _IO_IN_BACKUP 0x100
-+#endif
-
- /* BSD stdio derived implementations. */
-
diff --git a/poky/meta/recipes-devtools/m4/m4_1.4.18.bb b/poky/meta/recipes-devtools/m4/m4_1.4.19.bb
index b12c0adf3..b12c0adf3 100644
--- a/poky/meta/recipes-devtools/m4/m4_1.4.18.bb
+++ b/poky/meta/recipes-devtools/m4/m4_1.4.19.bb
diff --git a/poky/meta/recipes-devtools/meson/meson.inc b/poky/meta/recipes-devtools/meson/meson.inc
index e186dede9..7ddfccf2d 100644
--- a/poky/meta/recipes-devtools/meson/meson.inc
+++ b/poky/meta/recipes-devtools/meson/meson.inc
@@ -12,21 +12,12 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
file://0003-native_bindir.patch \
file://0001-python-module-do-not-manipulate-the-environment-when.patch \
file://disable-rpath-handling.patch \
- file://cross-prop-default.patch \
file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
- file://0001-minstall-Correctly-set-uid-gid-of-installed-files.patch \
file://gi-target-dep.patch \
+ file://0001-Make-CPU-family-warnings-fatal.patch \
+ file://0002-Support-building-allarch-recipes-again.patch \
"
-SRC_URI[sha256sum] = "72e1c782ba9bda204f4a1ed57f98d027d7b6eb9414c723eebbd6ec7f1955c8a6"
-
-SRC_URI_append_class-native = " \
- file://0001-Make-CPU-family-warnings-fatal.patch \
- file://0002-Support-building-allarch-recipes-again.patch \
-"
-
-# remove at next version upgrade or when output changes
-PR = "r1"
-HASHEQUIV_HASH_VERSION .= ".1"
+SRC_URI[sha256sum] = "3144a3da662fcf79f1e5602fa929f2821cba4eba28c2c923fe0a7d3e3db04d5d"
UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
index 48941c97f..bcccfabd1 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
@@ -1,41 +1,43 @@
-From 76934bcbf2cfa7304e8864e28c51f58adda0392f Mon Sep 17 00:00:00 2001
+From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Tue, 3 Jul 2018 13:59:09 +0100
-Subject: [PATCH] Make CPU family warnings fatal
+Subject: [PATCH 1/2] Make CPU family warnings fatal
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Ross Burton <ross.burton@intel.com>
-
---
mesonbuild/envconfig.py | 2 +-
mesonbuild/environment.py | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index ba35d16..2d3c34c 100644
+index c6a4df3..4d58c91 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
-@@ -254,7 +254,7 @@ class MachineInfo:
-
+@@ -266,7 +266,7 @@ class MachineInfo:
+
cpu_family = literal['cpu_family']
if cpu_family not in known_cpu_families:
-- mlog.warning('Unknown CPU family {}, please report this at https://github.com/mesonbuild/meson/issues/new'.format(cpu_family))
+- mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new')
+ raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
-
+
endian = literal['endian']
if endian not in ('little', 'big'):
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 756dd81..4d2c2b6 100644
+index fc9b703..eea8345 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
-@@ -434,9 +434,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
+@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
trial = 'ppc64'
-
+
if trial not in known_cpu_families:
- mlog.warning('Unknown CPU family {!r}, please report this at '
- 'https://github.com/mesonbuild/meson/issues/new with the '
- 'output of `uname -a` and `cat /proc/cpuinfo`'.format(trial))
+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
-
+
return trial
+
+--
+2.24.0
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
index 471f1500d..ce90e515d 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
@@ -1,4 +1,4 @@
-From d3ef01a4208a801acad380a4aaceb6a21f8fa603 Mon Sep 17 00:00:00 2001
+From 2f9c59e0489e569c5382404667c10f5c200a72ad Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 4 Aug 2017 16:16:41 +0300
Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling
@@ -20,11 +20,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
-index bcf77b9..6a4b472 100644
+index dc2979e..c9ff9bd 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
-@@ -974,6 +974,10 @@ This will become a hard error in the future.''')
- args.append('--{}={}'.format(program_name, path))
+@@ -1053,6 +1053,10 @@ class GnomeModule(ExtensionModule):
+ args.append(f'--{program_name}={path}')
if namespace:
args.append('--namespace=' + namespace)
+ gtkdoc_exe_wrapper = state.environment.properties.host.get('gtkdoc_exe_wrapper', None)
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch b/poky/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch
deleted file mode 100644
index d55b7cc7c..000000000
--- a/poky/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3f6f4964dc79ae986f44afe1687922381f237edd Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <pkj@axis.com>
-Date: Wed, 3 Mar 2021 12:47:28 +0100
-Subject: [PATCH] minstall: Correctly set uid/gid of installed files
-
-In commit caab4d3d, the uid and gid arguments passed to os.chown() by
-set_chown() were accidentally swapped, causing files to end up with
-incorrect owner/group if the owner and group are not the same.
-
-Upstream-Status: Backport [https://github.com/mesonbuild/meson/commit/6226ac26ef63335bfb817db02b3f295c78214a82]
-Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
----
- mesonbuild/minstall.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
-index 785ff5869..07da408aa 100644
---- a/mesonbuild/minstall.py
-+++ b/mesonbuild/minstall.py
-@@ -148,7 +148,7 @@ def set_chown(path: str, user: T.Optional[str] = None, group: T.Optional[str] =
- Use a real function rather than a lambda to help mypy out. Also real
- functions are faster.
- """
-- real_os_chown(path, gid, uid, dir_fd=dir_fd, follow_symlinks=follow_symlinks)
-+ real_os_chown(path, uid, gid, dir_fd=dir_fd, follow_symlinks=follow_symlinks)
-
- try:
- os.chown = chown
diff --git a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
index eb0e90dbd..fdadc6869 100644
--- a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
@@ -1,4 +1,4 @@
-From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001
+From 2264e67d7c2c22ca634fd26ea8ada6f0344ab280 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 19 Nov 2018 14:24:26 +0100
Subject: [PATCH] python module: do not manipulate the environment when calling
@@ -12,10 +12,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 12 deletions(-)
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
-index 07be318..b770603 100644
+index 422155b..aaf5844 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
-@@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency):
+@@ -70,11 +70,6 @@ class PythonDependency(ExternalDependency):
old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
@@ -26,9 +26,9 @@ index 07be318..b770603 100644
-
try:
self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs)
- mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir))
-@@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency):
- mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir))
+ mlog.debug(f'Found "{pkg_name}" via pkgconfig lookup in LIBPC ({pkg_libdir})')
+@@ -83,13 +78,6 @@ class PythonDependency(ExternalDependency):
+ mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir})')
mlog.debug(e)
- if old_pkg_path is not None:
@@ -39,5 +39,5 @@ index 07be318..b770603 100644
- else:
- os.environ.pop('PKG_CONFIG_LIBDIR', None)
else:
- mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir))
+ mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir}), this is likely due to a relocated python installation')
diff --git a/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
index d0fe1126f..dcc1ce9c2 100644
--- a/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch
@@ -1,26 +1,28 @@
-From 6efb6114836fd4a1e012aa03b37f3beeeb22b466 Mon Sep 17 00:00:00 2001
+From 656bf55fed01df2d2e2ad6d9d9887173cb16b85c Mon Sep 17 00:00:00 2001
From: Peter Kjellerstedt <pkj@axis.com>
Date: Thu, 26 Jul 2018 16:32:49 +0200
-Subject: [PATCH] Support building allarch recipes again
+Subject: [PATCH 2/2] Support building allarch recipes again
This registers "allarch" as a known CPU family.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
-
---
mesonbuild/envconfig.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index 2d3c34c..b9e7908 100644
+index 4d58c91..ff01ad1 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
-@@ -38,6 +38,7 @@ _T = T.TypeVar('_T')
-
-
+@@ -36,6 +36,7 @@ from pathlib import Path
+
+
known_cpu_families = (
+ 'allarch',
'aarch64',
'alpha',
'arc',
+--
+2.24.0
+
diff --git a/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
index ed85116c4..89257b9e0 100644
--- a/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
+++ b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
@@ -1,4 +1,4 @@
-From 1546e1f95a119175b7a4e4272a26dd85505e5ede Mon Sep 17 00:00:00 2001
+From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001
From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Date: Wed, 15 Nov 2017 15:05:01 +0100
Subject: [PATCH] native_bindir
@@ -18,23 +18,22 @@ Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
mesonbuild/dependencies/base.py | 19 +++++++++++--------
- mesonbuild/dependencies/ui.py | 6 +++---
- 2 files changed, 14 insertions(+), 11 deletions(-)
+ 1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
-index cd77b4b..7e3f338 100644
+index 14380d4..d0c443f 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
-@@ -192,7 +192,7 @@ class Dependency:
+@@ -179,7 +179,7 @@ class Dependency:
def get_exe_args(self, compiler):
return []
- def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
+ def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
- raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
+ raise DependencyException(f'{self.name!r} is not a pkgconfig dependency')
def get_configtool_variable(self, variable_name):
-@@ -280,7 +280,7 @@ class InternalDependency(Dependency):
+@@ -267,7 +267,7 @@ class InternalDependency(Dependency):
return True
return any(d.is_built() for d in self.ext_deps)
@@ -43,7 +42,7 @@ index cd77b4b..7e3f338 100644
raise DependencyException('Method "get_pkgconfig_variable()" is '
'invalid for an internal dependency')
-@@ -658,8 +658,11 @@ class PkgConfigDependency(ExternalDependency):
+@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency):
return s.format(self.__class__.__name__, self.name, self.is_found,
self.version_reqs)
@@ -57,16 +56,16 @@ index cd77b4b..7e3f338 100644
p, out, err = Popen_safe(cmd, env=env)
rc, out, err = p.returncode, out.strip(), err.strip()
call = ' '.join(cmd)
-@@ -685,7 +688,7 @@ class PkgConfigDependency(ExternalDependency):
- env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir
- mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir)
+@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency):
+ if key.startswith('PKG_'):
+ mlog.debug(f'env[{key}]: {value}')
- def _call_pkgbin(self, args, env=None):
+ def _call_pkgbin(self, args, env=None, use_native=False):
# Always copy the environment since we're going to modify it
# with pkg-config variables
if env is None:
-@@ -699,7 +702,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency):
targs = tuple(args)
cache = PkgConfigDependency.pkgbin_cache
if (self.pkgbin, targs, fenv) not in cache:
@@ -75,7 +74,7 @@ index cd77b4b..7e3f338 100644
return cache[(self.pkgbin, targs, fenv)]
def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
-@@ -905,7 +908,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency):
(self.name, out_raw))
self.link_args, self.raw_link_args = self._search_libs(out, out_raw)
@@ -84,7 +83,7 @@ index cd77b4b..7e3f338 100644
options = ['--variable=' + variable_name, self.name]
if 'define_variable' in kwargs:
-@@ -918,7 +921,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
options = ['--define-variable=' + '='.join(definition)] + options
@@ -93,34 +92,3 @@ index cd77b4b..7e3f338 100644
variable = ''
if ret != 0:
if self.required:
-diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
-index d897d76..a598d2e 100644
---- a/mesonbuild/dependencies/ui.py
-+++ b/mesonbuild/dependencies/ui.py
-@@ -325,7 +325,7 @@ class QtBaseDependency(ExternalDependency):
- self.bindir = self.get_pkgconfig_host_bins(core)
- if not self.bindir:
- # If exec_prefix is not defined, the pkg-config file is broken
-- prefix = core.get_pkgconfig_variable('exec_prefix', {})
-+ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True)
- if prefix:
- self.bindir = os.path.join(prefix, 'bin')
-
-@@ -528,7 +528,7 @@ class Qt4Dependency(QtBaseDependency):
- applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
- for application in applications:
- try:
-- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}))
-+ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True))
- except MesonException:
- pass
-
-@@ -538,7 +538,7 @@ class Qt5Dependency(QtBaseDependency):
- QtBaseDependency.__init__(self, 'qt5', env, kwargs)
-
- def get_pkgconfig_host_bins(self, core):
-- return core.get_pkgconfig_variable('host_bins', {})
-+ return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
-
- def get_private_includes(self, mod_inc_dir, module):
- return _qt_get_private_includes(mod_inc_dir, module, self.version)
diff --git a/poky/meta/recipes-devtools/meson/meson/cross-prop-default.patch b/poky/meta/recipes-devtools/meson/meson/cross-prop-default.patch
deleted file mode 100644
index 772395e87..000000000
--- a/poky/meta/recipes-devtools/meson/meson/cross-prop-default.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-meson.build files that use cc.run() in native builds can silently fallback to
-meson.get_cross_property() in cross builds without an exe-wrapper, but there's
-no way to know that this is happening.
-
-As the defaults may be pessimistic (for example, disabling the support for a
-feature that should be enabled) emit a warning when the default is used, so that
-the recipe can explicitly set the cross property as relevant.
-
-Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/5071]
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
-index 3c3cfae0..10e741ae 100644
---- a/mesonbuild/interpreter.py
-+++ b/mesonbuild/interpreter.py
-@@ -1890,6 +1890,7 @@ class MesonMain(InterpreterObject):
- return props[propname]
- except Exception:
- if len(args) == 2:
-+ mlog.warning('Cross property %s is using default value %s' % (propname, args[1]))
- return args[1]
- raise InterpreterException('Unknown cross property: %s.' % propname)
-
diff --git a/poky/meta/recipes-devtools/meson/meson/gi-target-dep.patch b/poky/meta/recipes-devtools/meson/meson/gi-target-dep.patch
index 25b30ca27..29e164ccc 100644
--- a/poky/meta/recipes-devtools/meson/meson/gi-target-dep.patch
+++ b/poky/meta/recipes-devtools/meson/meson/gi-target-dep.patch
@@ -3,7 +3,7 @@ to be executed) but *host* gobject-introspection libraries, as otherwise the
native pkg-config can be used and the build will try to link native and host
binaries together.
-Upstream-Status: Pending
+Upstream-Status: Backport [589236226856f591c9e8daf0cb7aa1aef8862388]
Signed-off-by: Ross Burton <ross.burton@arm.com>
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
diff --git a/poky/meta/recipes-devtools/meson/meson_0.57.1.bb b/poky/meta/recipes-devtools/meson/meson_0.58.1.bb
index de9b905c1..de9b905c1 100644
--- a/poky/meta/recipes-devtools/meson/meson_0.57.1.bb
+++ b/poky/meta/recipes-devtools/meson/meson_0.58.1.bb
diff --git a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.57.1.bb b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
index 8778cab12..74e1a7104 100644
--- a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.57.1.bb
+++ b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
@@ -1,21 +1,11 @@
include meson.inc
-inherit siteinfo
+inherit meson-routines
inherit nativesdk
SRC_URI += "file://meson-setup.py \
file://meson-wrapper"
-def meson_endian(prefix, d):
- arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
- sitedata = siteinfo_data_for_machine(arch, os, d)
- if "endian-little" in sitedata:
- return "little"
- elif "endian-big" in sitedata:
- return "big"
- else:
- bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
-
# The cross file logic is similar but not identical to that in meson.bbclass,
# since it's generating for an SDK rather than a cross-compile. Important
# differences are:
@@ -44,7 +34,7 @@ sys_root = @OECORE_TARGET_SYSROOT
[host_machine]
system = '${SDK_OS}'
-cpu_family = '${SDK_ARCH}'
+cpu_family = '${@meson_cpu_family("SDK_ARCH", d)}'
cpu = '${SDK_ARCH}'
endian = '${@meson_endian("SDK", d)}'
EOF
diff --git a/poky/meta/recipes-devtools/mklibs/files/ac_init_fix.patch b/poky/meta/recipes-devtools/mklibs/files/ac_init_fix.patch
deleted file mode 100644
index 422af1042..000000000
--- a/poky/meta/recipes-devtools/mklibs/files/ac_init_fix.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Get the version of mklibs by simpler means. The MKLIBS_VERSION string in the
-configure.ac file is replaced with real version string by the
-do_configure_prepend() function from the recipe .bb file.
-
-Upstream-Status: Inappropriate [configuration]
-
-Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: 2011/01/24
-
-Index: mklibs/configure.ac
-===================================================================
---- mklibs.orig/configure.ac 2010-02-21 17:34:56.000000000 -0800
-+++ mklibs/configure.ac 2011-01-24 18:52:19.943242079 -0800
-@@ -1,4 +1,4 @@
--AC_INIT([mklibs],m4_esyscmd(dpkg-parsechangelog | perl -ne 'print $1 if m/^Version: (.*)$/;'))
-+AC_INIT([mklibs], MKLIBS_VERSION)
- AM_INIT_AUTOMAKE([foreign no-define])
- AC_CONFIG_HEADERS([config.h])
- AM_MAINTAINER_MODE
diff --git a/poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch b/poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
deleted file mode 100644
index 17d9af4de..000000000
--- a/poky/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From dcb45256970b15b672d0004533826c94083356e5 Mon Sep 17 00:00:00 2001
-From: Yuanjie Huang <yuanjie.huang@windriver.com>
-Date: Fri, 17 Apr 2015 14:48:20 +0800
-Subject: [PATCH 4/6] avoid failure on symbol provided by application
-
-Upstream-Status: Pending
-
-Undefined symbols in a library can be provided by the application
-that links to the library, such as `logsink' in libmultipath.so.0.
-This fix checks the type of object in which the symbol is needed
-and the existence of the symbol in application, when a symbol
-cannot be provided by libraries. It prevents false alarm on absence
-of symbols.
-
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
-
----
- src/mklibs | 28 ++++++++++++++++++++++++----
- 1 file changed, 24 insertions(+), 4 deletions(-)
-
-diff --git a/src/mklibs b/src/mklibs
-index a3533c0..66b7a09 100755
---- a/src/mklibs
-+++ b/src/mklibs
-@@ -133,9 +133,9 @@ class Symbol(object):
- return '@'.join(ret)
-
- class UndefinedSymbol(Symbol):
-- def __init__(self, name, weak, version, library):
-+ def __init__(self, name, weak, version, library, object):
- super(UndefinedSymbol, self).__init__(name, version, library)
-- self.weak, self.library = weak, library
-+ self.weak, self.library, self.object = weak, library, object
-
- def symbol_is_blacklisted(name):
- # The ARM Embedded ABI spec states symbols under this namespace as
-@@ -152,6 +152,11 @@ def undefined_symbols(obj):
-
- output = command("mklibs-readelf", "--print-symbols-undefined", obj)
-
-+ if len(obj) > len(dest_path) and obj[:len(dest_path)] == dest_path:
-+ object = obj[len(dest_path) + 1:-len('-so-stripped')]
-+ else:
-+ object = obj
-+
- result = []
- for line in output:
- name, weak_string, version_string, library_string = line.split()[:4]
-@@ -171,7 +176,7 @@ def undefined_symbols(obj):
- if library_string.lower() != 'none':
- library = library_string
-
-- result.append(UndefinedSymbol(name, weak, version, library))
-+ result.append(UndefinedSymbol(name, weak, version, library, object))
-
- return result
-
-@@ -498,12 +503,13 @@ while 1:
- and re.search("^ps_", str(symbol)))
- and not (re.search("ld-linux.so.3$", str(symbol)))
- and not (re.search("^__gnu_local_gp", str(symbol)))):
-- debug(DEBUG_SPAM, "needed_symbols adding %s, weak: %s" % (symbol, symbol.weak))
-+ debug(DEBUG_SPAM, "needed_symbols adding %s, weak: %s, for %s" % (symbol, symbol.weak, obj))
- needed_symbols[str(symbol)] = symbol
- libraries.update(library_depends(obj))
-
- # calculate what symbols are present in small_libs and available_libs
- present_symbols = {}
-+ present_symbol_progs = {}
- checked_libs = small_libs
- checked_libs.extend(available_libs)
- checked_libs.append(sysroot + ldlib)
-@@ -513,6 +519,12 @@ while 1:
- names = symbol.base_names()
- for name in names:
- present_symbols[name] = symbol
-+ if not so_pattern.match(lib):
-+ debug(DEBUG_SPAM, "present_symbol_progs adding %s, from executable %s" % (' '.join(names), lib))
-+ for name in names:
-+ progs = present_symbol_progs.get(name, set())
-+ progs.add(lib)
-+ present_symbol_progs[name] = progs
-
- # are we finished?
- num_unresolved = 0
-@@ -568,6 +580,14 @@ while 1:
- for name in needed_symbols:
- if not name in symbol_provider:
- if not needed_symbols[name].weak:
-+ # WORKAROUND: Undefined symbols in a library can be provided by the application
-+ # that links to the library. So if the object which requires the symbol is a library
-+ # and some application can provide the symbol, the undefined symbol is skipped.
-+ symbol = needed_symbols[name]
-+ if so_pattern.match(symbol.object) and present_symbol_progs.get(name, None):
-+ debug(DEBUG_SPAM, "symbol %s in library %s is provided by executable %s" \
-+ % (name, symbol.object, ' '.join(present_symbol_progs[name])))
-+ continue
- raise Exception("No library provides non-weak %s" % name)
- else:
- lib = symbol_provider[name]
---
-2.16.1
-
diff --git a/poky/meta/recipes-devtools/mklibs/files/fix_STT_GNU_IFUNC.patch b/poky/meta/recipes-devtools/mklibs/files/fix_STT_GNU_IFUNC.patch
deleted file mode 100644
index d27a48916..000000000
--- a/poky/meta/recipes-devtools/mklibs/files/fix_STT_GNU_IFUNC.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-The libc6-dev in Ubuntu 9.04 is so old that the elf.h doesn't
-define STT_GNU_IFUNC, so we have to define it ourselves.
-
-Upstream-Status: Inappropriate [other] - old release specific, maybe removable
-
--- Dexuan Cui (dexuan.cui@intel.com) Feb 16, 2011.
-
-diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp
-index 2444c39..56d93f8 100644
---- a/src/mklibs-readelf/main.cpp
-+++ b/src/mklibs-readelf/main.cpp
-@@ -6,6 +6,14 @@
- #include <vector>
-
- #include <elf.h>
-+/*
-+ * The /usr/include/elf.h in some distributions(like Ubuntu 9.04) doesn't
-+ * define the macro. We need to define it here.
-+ */
-+#ifndef STT_GNU_IFUNC
-+#define STT_GNU_IFUNC 10 /* Symbol is indirect code object */
-+#endif
-+
- #include <getopt.h>
-
- #include "elf.hpp"
diff --git a/poky/meta/recipes-devtools/mklibs/files/fix_cross_compile.patch b/poky/meta/recipes-devtools/mklibs/files/fix_cross_compile.patch
deleted file mode 100644
index 13e4606b8..000000000
--- a/poky/meta/recipes-devtools/mklibs/files/fix_cross_compile.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Remove dependency on dpkg
-
-Upstream-Status: Submitted
-
-Asking the host OS whether it supports multiarch is not useful
-in a cross-compilation environment, or if the user has specified
-a libdir explicitly. So this patch, based on the work of Mentor
-Graphics, removes mklibs's dependency on dpkg package.
-
-Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
- src/mklibs | 30 +++++++++++++++++++-----------
- 1 file changed, 19 insertions(+), 11 deletions(-)
-
-diff --git a/src/mklibs b/src/mklibs
-index d9b784b..c5614ea 100755
---- a/src/mklibs
-+++ b/src/mklibs
-@@ -261,6 +261,11 @@ def extract_soname(so_file):
- return ""
-
- def multiarch(paths):
-+ # Asking the host OS whether it supports multiarch is not useful
-+ # in a cross-compilation environment, or if the user has specified
-+ # a libdir explicitly.
-+ if sysroot != "" or libdir != "":
-+ return paths
- devnull = open('/dev/null', 'w')
- dpkg_architecture = subprocess.Popen(
- ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
-@@ -340,7 +345,7 @@ lib_path = []
- dest_path = "DEST"
- ldlib = "LDLIB"
- include_default_lib_path = "yes"
--default_lib_path = multiarch(["/lib/", "/usr/lib/", "/usr/X11R6/lib/"])
-+default_lib_path = ["/lib/", "/usr/lib/", "/usr/X11R6/lib/"]
- libc_extras_dir = "/usr/lib/libc_pic"
- libc_extras_dir_default = True
- libdir = "lib"
-@@ -386,7 +391,7 @@ for opt, arg in optlist:
- elif opt == "--libdir":
- libdir = arg
- elif opt in ("--help", "-h"):
-- usage(0)
-+ usage(0)
- sys.exit(0)
- elif opt in ("--version", "-V"):
- version(vers)
-@@ -395,6 +400,7 @@ for opt, arg in optlist:
- print "WARNING: unknown option: " + opt + "\targ: " + arg
-
- if include_default_lib_path == "yes":
-+ default_lib_path = multiarch(default_lib_path)
- lib_path.extend([a.replace("/lib/", "/" + libdir + "/") for a in default_lib_path])
-
- if libc_extras_dir_default:
-@@ -661,16 +669,16 @@ ld_path_name = os.path.dirname(ldlib)
- ld_full_path = "../" + ldlib
- ld_file = find_lib(ld_file_name)
-
--if ld_path_name != "/lib":
-- if os.access(dest_path + "/" + ld_file_name, os.F_OK):
-- os.remove(dest_path + "/" + ld_file_name)
-+#if ld_path_name != "/lib":
-+# if os.access(dest_path + "/" + ld_file_name, os.F_OK):
-+# os.remove(dest_path + "/" + ld_file_name)
-
--if not os.path.exists(dest_path + "/../" + ld_path_name):
-- os.mkdir(dest_path + "/../" + ld_path_name)
-+#if not os.path.exists(dest_path + "/../" + ld_path_name):
-+# os.mkdir(dest_path + "/../" + ld_path_name)
-
--if not os.access(dest_path + "/" + ld_full_path, os.F_OK):
-- debug(DEBUG_NORMAL, "I: stripping and copying dynamic linker to " + ld_full_path)
-+if not os.access(dest_path + "/" + ld_file_name, os.F_OK):
-+ debug(DEBUG_NORMAL, "I: stripping and copying dynamic linker to " + ld_file_name)
- command(target + "objcopy", "--strip-unneeded -R .note -R .comment",
-- ld_file, dest_path + "/" + ld_full_path)
-+ ld_file, dest_path + "/" + ld_file_name)
-
--os.chmod(dest_path + "/" + ld_full_path, 0755)
-+os.chmod(dest_path + "/" + ld_file_name, 0755)
diff --git a/poky/meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch b/poky/meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch
deleted file mode 100644
index bc56593e6..000000000
--- a/poky/meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From eddf04c7f8312e9c29cdb24e431b7e4fb2cc70ed Mon Sep 17 00:00:00 2001
-From: Yuanjie Huang <yuanjie.huang@windriver.com>
-Date: Wed, 15 Apr 2015 14:00:06 +0800
-Subject: [PATCH] Show GNU unique symbols as provided symbols
-
-Upstream-Status: Submitted
-
-GNU Unique symbol is a GNU extension employed by new version of GCC
-by default. Even Standard C++ library in GCC 4.9 provides some symbols,
-such as _ZNSs4_Rep20_S_empty_rep_storageE in this binding type instead
-of ELF standard weak binding.
-This patch adds support of this new binding type to mklibs-readelf.
-
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- src/mklibs-readelf/main.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp
-index 56d93f8..0134530 100644
---- a/src/mklibs-readelf/main.cpp
-+++ b/src/mklibs-readelf/main.cpp
-@@ -88,7 +88,7 @@ static void process_symbols_provided (const Elf::section_type<Elf::section_type_
- uint8_t type = symbol->get_type ();
- const std::string &name = symbol->get_name_string ();
-
-- if (bind != STB_GLOBAL && bind != STB_WEAK)
-+ if (bind != STB_GLOBAL && bind != STB_WEAK && bind != STB_GNU_UNIQUE)
- continue;
- if (shndx == SHN_UNDEF || shndx == SHN_ABS)
- continue;
---
-1.8.5.2.233.g932f7e4
-
diff --git a/poky/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch b/poky/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch
deleted file mode 100644
index 75500a029..000000000
--- a/poky/meta/recipes-devtools/mklibs/files/sysrooted-ldso.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-In cross builds we will have to respect sysroot
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: mklibs-0.1.39/src/mklibs
-===================================================================
---- mklibs-0.1.39.orig/src/mklibs 2014-03-01 18:25:36.000000000 +0000
-+++ mklibs-0.1.39/src/mklibs 2014-10-19 00:51:46.813534596 +0000
-@@ -495,7 +495,7 @@
- present_symbols = {}
- checked_libs = small_libs
- checked_libs.extend(available_libs)
-- checked_libs.append(ldlib)
-+ checked_libs.append(sysroot + ldlib)
- for lib in checked_libs:
- for symbol in provided_symbols(lib):
- debug(DEBUG_SPAM, "present_symbols adding %s" % symbol)
diff --git a/poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb b/poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb
deleted file mode 100644
index 1784af1f4..000000000
--- a/poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Shared library optimisation tool"
-DESCRIPTION = "mklibs produces cut-down shared libraries that contain only the routines required by a particular set of executables."
-HOMEPAGE = "https://launchpad.net/mklibs"
-SECTION = "devel"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20180828T214102Z/pool/main/m/mklibs/mklibs_${PV}.tar.xz \
- file://ac_init_fix.patch\
- file://fix_STT_GNU_IFUNC.patch\
- file://sysrooted-ldso.patch \
- file://avoid-failure-on-symbol-provided-by-application.patch \
- file://show-GNU-unique-symbols-as-provided-symbols.patch \
- file://fix_cross_compile.patch \
-"
-
-SRC_URI[md5sum] = "6b6eeb9b4016c6a7317acc28c89e32cc"
-SRC_URI[sha256sum] = "3af0b6bd35e5b6fc58d8b68827fbae2ff6b7e20dd2b238ccb9b49d84722066c2"
-
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/m/mklibs/"
-
-inherit autotools gettext native
diff --git a/poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch b/poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch
deleted file mode 100644
index 12707357b..000000000
--- a/poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 04fbe6ddb5f1e02efbcae3cdf5beb16757a98948 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 10 May 2019 12:58:01 -0700
-Subject: [PATCH] mmc_cmd.c: Use extra braces when initializing subobjects
-
-clang warns with -Werror,-Wmissing-braces, as following error
-| mmc_cmds.c:1886:36: error: suggest braces around initialization of subobject [-Werror,-W
-missing-braces]
-| struct rpmb_frame frame_status = {0};
-| ^
-| {}
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- mmc_cmds.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mmc_cmds.c b/mmc_cmds.c
-index 19a9da1..838e8c3 100644
---- a/mmc_cmds.c
-+++ b/mmc_cmds.c
-@@ -1883,7 +1883,7 @@ static int do_rpmb_op(int fd,
- u_int16_t rpmb_type;
- struct mmc_ioc_multi_cmd *mioc;
- struct mmc_ioc_cmd *ioc;
-- struct rpmb_frame frame_status = {0};
-+ struct rpmb_frame frame_status = {{0}};
-
- if (!frame_in || !frame_out || !out_cnt)
- return -EINVAL;
diff --git a/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 8fe606915..bdd0bf7f1 100644
--- a/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -5,13 +5,11 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
SRCBRANCH ?= "master"
-SRCREV = "73d6c59af8d1bcedf5de4aa1f5d5b7f765f545f5"
+SRCREV = "43282e80e174cc73b09b81a4d17cb3a7b4dc5cfc"
PV = "0.1+git${SRCPV}"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \
- file://0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch \
- "
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH}"
UPSTREAM_CHECK_COMMITS = "1"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/mtools/mtools_4.0.26.bb b/poky/meta/recipes-devtools/mtools/mtools_4.0.29.bb
index 493871306..38de1dd92 100644
--- a/poky/meta/recipes-devtools/mtools/mtools_4.0.26.bb
+++ b/poky/meta/recipes-devtools/mtools/mtools_4.0.29.bb
@@ -24,7 +24,7 @@ RRECOMMENDS_${PN}_libc-glibc = "\
glibc-gconv-ibm866 \
glibc-gconv-ibm869 \
"
-SRC_URI[sha256sum] = "539f1c8b476a16e198d8bcb10a5799e22e69de49d854f7dbd85b64c2a45dea1a"
+SRC_URI[sha256sum] = "c6b50b4603e7afe54ba0109094669373028db9af743f5c541bca4b7664aefec7"
SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
file://mtools-makeinfo.patch \
diff --git a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.5.bb
index ce299d6b6..93d291110 100644
--- a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb
+++ b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.5.bb
@@ -12,8 +12,8 @@ SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV
"
UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
-SRC_URI[md5sum] = "7bbadb3c381f3ea935b21d3bb8cc4671"
-SRC_URI[sha256sum] = "046517600fb0aed6c4645edefe02281f4fa2f1c02f71596152d93172452c0b01"
+SRC_URI[md5sum] = "025b19744e5c7fc1c8380e17df1fcc64"
+SRC_URI[sha256sum] = "528635e674addea5c2b3a3268404ad04a952c4f410d17c3d754f5dd5529770c9"
TARGET_CC_ARCH += "${LDFLAGS}"
diff --git a/poky/meta/recipes-devtools/opkg/opkg/0001-tests-let-the-OS-negotiate-relative-package-dirs.patch b/poky/meta/recipes-devtools/opkg/opkg/0001-tests-let-the-OS-negotiate-relative-package-dirs.patch
deleted file mode 100644
index 33b7280e5..000000000
--- a/poky/meta/recipes-devtools/opkg/opkg/0001-tests-let-the-OS-negotiate-relative-package-dirs.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 4acda6d01c5abd33f1a1a3275fd695363f59473f Mon Sep 17 00:00:00 2001
-From: Alex Stewart <alex.stewart@ni.com>
-Date: Tue, 15 Dec 2020 15:17:54 -0600
-Subject: [opkg][opkg-0.4.4 PATCH] tests: let the OS negotiate relative package
- dirs
-
-In cases where a regression test requires that a package be installed to
-a subdirectory in the test feed, the opk.py module will attempt to
-resolve the subdirectory and rebase it to the root of the test feed.
-
-This is unnecessary, since all operations which make use of the
-subdirectory path do so from the perspective of the test feed already.
-Further, the rebase implementation breaks in cases where the test feed
-is beyond a symlink.
-
-Remove the resolve-and-rebase logic, and allow the OS to negotiate the
-relative path.
-
-Upstream-Status: Submitted [https://groups.google.com/g/opkg-devel/c/dE1o7_OVQSY]
-
-Signed-off-by: Alex Stewart <alex.stewart@ni.com>
----
- tests/opk.py | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/tests/opk.py b/tests/opk.py
-index 692339567f72441766c8e658edc5bdf6a339f77d..711abacaeb328283e31524f6a49305fc7d39696a 100644
---- a/tests/opk.py
-+++ b/tests/opk.py
-@@ -58,9 +58,7 @@ class Opk:
- if 'Version' not in control.keys():
- control['Version'] = '1.0'
- if subdirectory is not None:
-- subdir = Path(subdirectory).resolve()
-- opkdir = Path(cfg.opkdir)
-- self._relative_dir = subdir.relative_to(opkdir)
-+ self._relative_dir = Path(subdirectory)
- else:
- self._relative_dir = None
- self.control = control
---
-2.29.2
-
diff --git a/poky/meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch b/poky/meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch
deleted file mode 100644
index 4578fa33b..000000000
--- a/poky/meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Having CLEAN_DATE come from the current date doesn't allow for build
-reproducibility. Add the option of using SOURCE_DATE_EPOCH if set
-which for OE, it will be.
-
-Upstream-Status: Pending
-RP 2021/2/2
-
-Index: opkg-0.4.4/configure.ac
-===================================================================
---- opkg-0.4.4.orig/configure.ac
-+++ opkg-0.4.4/configure.ac
-@@ -281,7 +281,11 @@ AC_FUNC_UTIME_NULL
- AC_FUNC_VPRINTF
- AC_CHECK_FUNCS([memmove memset mkdir regcomp strchr strcspn strdup strerror strndup strrchr strstr strtol strtoul sysinfo utime])
-
--CLEAN_DATE=`date +"%B %Y" | tr -d '\n'`
-+if ! test -z "$SOURCE_DATE_EPOCH" ; then
-+ CLEAN_DATE=`LC_ALL=C date -d @$SOURCE_DATE_EPOCH +"%B %Y" | tr -d '\n'`
-+else
-+ CLEAN_DATE=`date +"%B %Y" | tr -d '\n'`
-+fi
-
- AC_SUBST([CLEAN_DATE])
-
diff --git a/poky/meta/recipes-devtools/opkg/opkg_0.4.4.bb b/poky/meta/recipes-devtools/opkg/opkg_0.4.5.bb
index 9eca61be2..56d6211ae 100644
--- a/poky/meta/recipes-devtools/opkg/opkg_0.4.4.bb
+++ b/poky/meta/recipes-devtools/opkg/opkg_0.4.5.bb
@@ -15,13 +15,11 @@ PE = "1"
SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
file://opkg.conf \
file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
- file://0001-tests-let-the-OS-negotiate-relative-package-dirs.patch \
- file://sourcedateepoch.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "345900c1d4747d58455867f9fe88ca43"
-SRC_URI[sha256sum] = "2217acc58b8eb31300631ebae75e222ebc700c9c1cf6408088705d19a472c839"
+SRC_URI[md5sum] = "5dc41ad37d88803b5e0f456a9c5a0811"
+SRC_URI[sha256sum] = "a1214a75fa34fb9228db8da47308e0e711b1c93fd8938cf164c10fd28eb50f1e"
# This needs to be before ptest inherit, otherwise all ptest files end packaged
# in libopkg package if OPKGLIBDIR == libdir, because default
@@ -62,6 +60,19 @@ do_install_ptest () {
sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
}
+WARN_QA_append += "openssl-deprecation"
+QAPKGTEST[openssl-deprecation] = "package_qa_check_openssl_deprecation"
+def package_qa_check_openssl_deprecation (package, d, messages):
+ sane = True
+
+ pkgconfig = (d.getVar("PACKAGECONFIG") or "").split()
+ if pkgconfig and 'openssl' in pkgconfig:
+ package_qa_add_message(messages, 'openssl-deprecation', '"openssl" in opkg.bb PACKAGECONFIG. Feed signature checking with OpenSSL will be deprecated in the next opkg release. Consider using GPG checking instead.')
+ sane = False
+
+ return sane
+
+
RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN}_class-nativesdk = ""
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf/6edec83653ce1b5fc201ff6db93b966394766814.patch b/poky/meta/recipes-devtools/patchelf/patchelf/6edec83653ce1b5fc201ff6db93b966394766814.patch
new file mode 100644
index 000000000..ba35ec6ff
--- /dev/null
+++ b/poky/meta/recipes-devtools/patchelf/patchelf/6edec83653ce1b5fc201ff6db93b966394766814.patch
@@ -0,0 +1,44 @@
+From 6edec83653ce1b5fc201ff6db93b966394766814 Mon Sep 17 00:00:00 2001
+From: rmnull <rmnull@users.noreply.github.com>
+Date: Tue, 18 Aug 2020 20:22:52 +0530
+Subject: [PATCH] mark phdrs synced with sections, avoid rechecking it when
+ syncing note sections to segments.
+
+This also serves as a bug fix when a previously synced note segment
+overlaps with another section and creates a false alarm.
+
+Upstream-Status: Backport
+---
+ src/patchelf.cc | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/patchelf.cc b/src/patchelf.cc
+index 05ec793..622f0b6 100644
+--- a/src/patchelf.cc
++++ b/src/patchelf.cc
+@@ -669,6 +669,7 @@ void ElfFile<ElfFileParamNames>::writeReplacedSections(Elf_Off & curOff,
+ memset(contents + rdi(shdr.sh_offset), 'X', rdi(shdr.sh_size));
+ }
+
++ std::set<unsigned int> noted_phdrs = {};
+ for (auto & i : replacedSections) {
+ std::string sectionName = i.first;
+ auto & shdr = findSection(sectionName);
+@@ -721,7 +722,7 @@ void ElfFile<ElfFileParamNames>::writeReplacedSections(Elf_Off & curOff,
+ shdr.sh_addralign = orig_shdr.sh_addralign;
+
+ for (unsigned int j = 0; j < phdrs.size(); ++j)
+- if (rdi(phdrs[j].p_type) == PT_NOTE) {
++ if (rdi(phdrs[j].p_type) == PT_NOTE && noted_phdrs.find(j) == noted_phdrs.end()) {
+ Elf_Off p_start = rdi(phdrs[j].p_offset);
+ Elf_Off p_end = p_start + rdi(phdrs[j].p_filesz);
+ Elf_Off s_start = rdi(orig_shdr.sh_offset);
+@@ -739,6 +740,8 @@ void ElfFile<ElfFileParamNames>::writeReplacedSections(Elf_Off & curOff,
+ phdrs[j].p_offset = shdr.sh_offset;
+ phdrs[j].p_vaddr = phdrs[j].p_paddr = shdr.sh_addr;
+ phdrs[j].p_filesz = phdrs[j].p_memsz = shdr.sh_size;
++
++ noted_phdrs.insert(j);
+ }
+ }
+
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch b/poky/meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch
new file mode 100644
index 000000000..a06876e50
--- /dev/null
+++ b/poky/meta/recipes-devtools/patchelf/patchelf/alignmentfix.patch
@@ -0,0 +1,44 @@
+If a binary has multiple SHT_NOTE sections and corresponding PT_NOTE
+headers, we can see the error:
+
+patchelf: cannot normalize PT_NOTE segment: non-contiguous SHT_NOTE sections
+
+if the SHT_NOTE sections aren't sized to end on aligned boundaries. An example
+would be a binary with:
+
+ [ 2] .note.ABI-tag NOTE 00000000000002f4 000002f4
+ 0000000000000020 0000000000000000 A 0 0 4
+ [ 3] .note.gnu.propert NOTE 0000000000000318 00000318
+ 0000000000000030 0000000000000000 A 0 0 8
+ [ 4] .note.gnu.build-i NOTE 0000000000000348 00000348
+ 0000000000000024 0000000000000000 A 0 0 4
+
+ NOTE 0x0000000000000318 0x0000000000000318 0x0000000000000318
+ 0x0000000000000030 0x0000000000000030 R 0x8
+ NOTE 0x00000000000002f4 0x00000000000002f4 0x00000000000002f4
+ 0x0000000000000078 0x0000000000000074 R 0x4
+
+since the PT_NOTE section at 2f4 covers [2] and [3] but the code
+calclates curr_off should be 314, not the 318 in the binary. This
+is an alignment issue.
+
+To fix this, we need to round curr_off to the next section alignment.
+
+Upstream-Status: Submitted [https://github.com/NixOS/patchelf/pull/274]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: git/src/patchelf.cc
+===================================================================
+--- git.orig/src/patchelf.cc
++++ git/src/patchelf.cc
+@@ -1010,8 +1010,9 @@ void ElfFile<ElfFileParamNames>::normali
+ size_t size = 0;
+ for (const auto & shdr : shdrs) {
+ if (rdi(shdr.sh_type) != SHT_NOTE) continue;
+- if (rdi(shdr.sh_offset) != curr_off) continue;
++ if (rdi(shdr.sh_offset) != roundUp(curr_off, rdi(shdr.sh_addralign))) continue;
+ size = rdi(shdr.sh_size);
++ curr_off = roundUp(curr_off, rdi(shdr.sh_addralign));
+ break;
+ }
+ if (size == 0)
diff --git a/poky/meta/recipes-devtools/patchelf/patchelf_0.12.bb b/poky/meta/recipes-devtools/patchelf/patchelf_0.12.bb
index 95886c6d3..7c97ea078 100644
--- a/poky/meta/recipes-devtools/patchelf/patchelf_0.12.bb
+++ b/poky/meta/recipes-devtools/patchelf/patchelf_0.12.bb
@@ -6,6 +6,8 @@ LICENSE = "GPLv3"
SRC_URI = "git://github.com/NixOS/patchelf;protocol=https \
file://handle-read-only-files.patch \
+ file://6edec83653ce1b5fc201ff6db93b966394766814.patch \
+ file://alignmentfix.patch \
"
SRCREV = "8d3a16e97294e3c5521c61b4c8835499c9918264"
diff --git a/poky/meta/recipes-devtools/perl-cross/files/0001-cnf-configure_func_sel.sh-disable-thread_safe_nl_lan.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-cnf-configure_func_sel.sh-disable-thread_safe_nl_lan.patch
new file mode 100644
index 000000000..744e4e09c
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl-cross/files/0001-cnf-configure_func_sel.sh-disable-thread_safe_nl_lan.patch
@@ -0,0 +1,27 @@
+From d22f2bb5afcd278b68999f5ce0362328fc8c7723 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 3 Jun 2021 18:50:56 +0200
+Subject: [PATCH] cnf/configure_func_sel.sh: disable thread_safe_nl_langinfo_l
+
+Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/115]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ cnf/configure_func_sel.sh | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/cnf/configure_func_sel.sh b/cnf/configure_func_sel.sh
+index f48294f..90d350d 100644
+--- a/cnf/configure_func_sel.sh
++++ b/cnf/configure_func_sel.sh
+@@ -97,5 +97,9 @@ else
+ result "irrelevant"
+ fi
+
+-# Assume nl_langinfo_l is threadsafe if available
+-define d_thread_safe_nl_langinfo_l "$d_nl_langinfo_l"
++# thread_safe_nl_langinfo_l is not enabled by default
++# by upstream, and causes t/Langinfo.t to fail when it is
++# (starting from 5.34.0). This means the configuration is
++# either not well tested, or not at all tested, so we should
++# pick a safer option.
++define d_thread_safe_nl_langinfo_l "undef"
diff --git a/poky/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
index 3b0fc453e..3b0fc453e 100644
--- a/poky/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
+++ b/poky/meta/recipes-devtools/perl-cross/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
diff --git a/poky/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
index 0aaeaa29e..0aaeaa29e 100644
--- a/poky/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
+++ b/poky/meta/recipes-devtools/perl-cross/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
diff --git a/poky/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch b/poky/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
index e7985036a..e7985036a 100644
--- a/poky/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
+++ b/poky/meta/recipes-devtools/perl-cross/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
diff --git a/poky/meta/recipes-devtools/perl-cross/files/README.md b/poky/meta/recipes-devtools/perl-cross/files/README.md
new file mode 100644
index 000000000..93217245c
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl-cross/files/README.md
@@ -0,0 +1,29 @@
+**perl-cross** provides configure script, top-level Makefile
+and some auxiliary files for [perl](http://www.perl.org),
+with the primary emphasis on cross-compiling the source.
+
+ # Get perl and perl-cross sources
+ curl -L -O http://www.cpan.org/src/5.0/perl-5.24.1.tar.gz
+ curl -L -O https://github.com/arsv/perl-cross/releases/download/1.1.3/perl-cross-1.1.3.tar.gz
+
+ # Unpack perl-cross over perl, overwriting Makefile
+ tar -zxf perl-5.24.1.tar.gz
+ cd perl-5.24.1
+ tar --strip-components=1 -zxf ../perl-cross-1.1.3.tar.gz
+
+ # Proceed as usual with most autoconfed packages
+ ./configure --target=arm-linux-gnueabi --prefix=/usr -Duseshrplib
+ make -j4
+ make DESTDIR=/path/to/staging/dir install
+
+Unlike mainline Perl, this configure never runs any target executables,
+relying solely on compile/link tests and pre-defined hints.
+On the flip side, it is only meant to run on resonably sane modern unix systems.
+
+Check [project pages](http://arsv.github.io/perl-cross/) for more info.
+In particular, [configure usage](http://arsv.github.io/perl-cross/usage.html)
+lists available configure options.
+
+Perl-cross is a free software licensed under the same terms
+as the original perl source.
+See LICENSE, Copying and Artistic files.
diff --git a/poky/meta/recipes-devtools/perl-cross/files/determinism.patch b/poky/meta/recipes-devtools/perl-cross/files/determinism.patch
new file mode 100644
index 000000000..e9bf752bc
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl-cross/files/determinism.patch
@@ -0,0 +1,46 @@
+Fixes to make the perl build reproducible:
+
+a) Remove the \n from configure_attr.sh since it gets quoted differently depending on
+ whether the shell is bash or dash which can cause the test result to be incorrect.
+ Reported upstream: https://github.com/arsv/perl-cross/issues/87
+
+b) Sort the order of the module lists from configure_mods.sh since otherwise
+ the result isn't the same leading to makefile differences.
+ Reported upstream: https://github.com/arsv/perl-cross/issues/88
+
+c) Sort the Encode::Byte byte_t.fnm file output (and the makefile depends whilst
+ there for good measure)
+ This needs to go to upstream perl (not done)
+
+d) Use bash for perl-cross configure since otherwise trnl gets set to "\n" with bash
+ and "" with dash
+ Reported upstream: https://github.com/arsv/perl-cross/issues/87
+
+RP 2020/2/7
+
+Upstream-Status: Pending [75% submitted]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
+
+Index: perl-5.30.1/cnf/configure_mods.sh
+===================================================================
+--- perl-5.30.1.orig/cnf/configure_mods.sh
++++ perl-5.30.1/cnf/configure_mods.sh
+@@ -82,7 +82,7 @@ extonlyif() {
+ }
+
+ definetrimspaces() {
+- v=`echo "$2" | sed -r -e 's/\s+/ /g' -e 's/^\s+//' -e 's/\s+$//'`
++ v=`echo "$2" | sed -r -e 's/\s+/ /g' -e 's/^\s+//' -e 's/\s+$//' | xargs -n1 | LANG=C sort | xargs`
+ define $1 "$v"
+ }
+
+Index: perl-5.30.1/cnf/configure
+===================================================================
+--- perl-5.30.1.orig/cnf/configure
++++ perl-5.30.1/cnf/configure
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ base=${0%/*}; test -z "$base" && base=.
+
diff --git a/poky/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb b/poky/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
new file mode 100644
index 000000000..b77bbd1fd
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl-cross/perlcross_1.3.6.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Perl-cross build system"
+HOMEPAGE = "https://github.com/arsv/perl-cross"
+DESCRIPTION = "perl-cross provides configure script, top-level Makefile and some auxiliary files for perl, \
+with the primary emphasis on cross-compiling the source."
+SECTION = "devel"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+# README.md is taken from https://github.com/arsv/perl-cross/blob/master/README.md
+# but is not provided inside the release tarballs
+LIC_FILES_CHKSUM = "file://${WORKDIR}/README.md;md5=252fcce2026b765fee1ad74d2fb07a3b"
+
+inherit allarch
+
+SRC_URI = "https://github.com/arsv/perl-cross/releases/download/${PV}/perl-cross-${PV}.tar.gz;name=perl-cross \
+ file://README.md \
+ file://0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch \
+ file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \
+ file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
+ file://determinism.patch \
+ file://0001-cnf-configure_func_sel.sh-disable-thread_safe_nl_lan.patch \
+ "
+UPSTREAM_CHECK_URI = "https://github.com/arsv/perl-cross/releases/"
+
+SRC_URI[perl-cross.sha256sum] = "4010f41870d64e3957b4b8ce70ebba10a7c4a3e86c5551acb4099c3fcbb37ce5"
+
+S = "${WORKDIR}/perl-cross-${PV}"
+
+do_configure () {
+}
+
+do_compile () {
+}
+
+do_install_class-native() {
+ mkdir -p ${D}/${datadir}/perl-cross/
+ cp -rf ${S}/* ${D}/${datadir}/perl-cross/
+}
+
+BBCLASSEXTEND = "native"
+
diff --git a/poky/meta/recipes-devtools/perl/files/determinism.patch b/poky/meta/recipes-devtools/perl/files/determinism.patch
index ccdd52a0d..aa85ccef1 100644
--- a/poky/meta/recipes-devtools/perl/files/determinism.patch
+++ b/poky/meta/recipes-devtools/perl/files/determinism.patch
@@ -21,19 +21,6 @@ RP 2020/2/7
Upstream-Status: Pending [75% submitted]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
-Index: perl-5.30.1/cnf/configure_mods.sh
-===================================================================
---- perl-5.30.1.orig/cnf/configure_mods.sh
-+++ perl-5.30.1/cnf/configure_mods.sh
-@@ -82,7 +82,7 @@ extonlyif() {
- }
-
- definetrimspaces() {
-- v=`echo "$2" | sed -r -e 's/\s+/ /g' -e 's/^\s+//' -e 's/\s+$//'`
-+ v=`echo "$2" | sed -r -e 's/\s+/ /g' -e 's/^\s+//' -e 's/\s+$//' | xargs -n1 | LANG=C sort | xargs`
- define $1 "$v"
- }
-
Index: perl-5.30.1/cpan/Encode/Byte/Makefile.PL
===================================================================
--- perl-5.30.1.orig/cpan/Encode/Byte/Makefile.PL
@@ -56,13 +43,3 @@ Index: perl-5.30.1/cpan/Encode/Byte/Makefile.PL
{
print FILELIST $self->catfile($dir,$file) . "\n";
}
-Index: perl-5.30.1/cnf/configure
-===================================================================
---- perl-5.30.1.orig/cnf/configure
-+++ perl-5.30.1/cnf/configure
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
-
- base=${0%/*}; test -z "$base" && base=.
-
diff --git a/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb b/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002009.bb
index c44ee6340..2234f6a74 100644
--- a/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb
+++ b/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002009.bb
@@ -17,8 +17,8 @@ DEPENDS += "perl"
SRC_URI = "https://cpan.metacpan.org/authors/id/H/HA/${CPAN_AUTHOR}/${CPAN_NAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "d5c96d51d8d5510f7c0b7f354c49af1c"
-SRC_URI[sha256sum] = "77f9fff0c96c5e09f34d0416b3533c3319f7cd0bb1f7fe8f8072ad59f433f0e5"
+SRC_URI[md5sum] = "5643cd323afb77d20363acbaf9b12bcc"
+SRC_URI[sha256sum] = "571c21193ad16195df58b06b268798796a391b398c443271721d2cc0fb7c4ac3"
S = "${WORKDIR}/${CPAN_NAME}-${PV}"
diff --git a/poky/meta/recipes-devtools/perl/perl_5.32.1.bb b/poky/meta/recipes-devtools/perl/perl_5.34.0.bb
index b28040c7f..7935a5872 100644
--- a/poky/meta/recipes-devtools/perl/perl_5.32.1.bb
+++ b/poky/meta/recipes-devtools/perl/perl_5.34.0.bb
@@ -9,18 +9,14 @@ LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
- https://github.com/arsv/perl-cross/releases/download/1.3.5/perl-cross-1.3.5.tar.gz;name=perl-cross \
file://perl-rdepends.txt \
- file://0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch \
file://0001-ExtUtils-MakeMaker-add-LDFLAGS-when-linking-binary-m.patch \
file://0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch \
file://errno_ver.diff \
file://native-perlinc.patch \
- file://0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch \
file://perl-dynloader.patch \
- file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
file://0002-Constant-Fix-up-shebang.patch \
- file://determinism.patch \
+ file://determinism.patch \
"
SRC_URI_append_class-native = " \
file://perl-configpm-switch.patch \
@@ -29,14 +25,13 @@ SRC_URI_append_class-target = " \
file://encodefix.patch \
"
-SRC_URI[perl.sha256sum] = "03b693901cd8ae807231b1787798cf1f2e0b8a56218d07b7da44f784a7caeb2c"
-SRC_URI[perl-cross.sha256sum] = "91c66f6b2b99fccfd4fee14660b677380b0c98f9456359e91449798c2ad2ef25"
+SRC_URI[perl.sha256sum] = "551efc818b968b05216024fb0b727ef2ad4c100f8cb6b43fab615fa78ae5be9a"
S = "${WORKDIR}/perl-${PV}"
inherit upstream-version-is-even update-alternatives
-DEPENDS += "zlib virtual/crypt"
+DEPENDS += "perlcross-native zlib virtual/crypt"
PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
@@ -47,12 +42,8 @@ PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm"
# Don't generate comments in enc2xs output files. They are not reproducible
export ENC2XS_NO_COMMENTS = "1"
-do_unpack_append() {
- bb.build.exec_func('do_copy_perlcross', d)
-}
-
-do_copy_perlcross() {
- cp -rfp ${WORKDIR}/perl-cross*/* ${S}
+do_configure_prepend() {
+ cp -rfp ${STAGING_DATADIR_NATIVE}/perl-cross/* ${S}
}
do_configure_class-target() {
diff --git a/poky/meta/recipes-devtools/pkgconf/pkgconf_1.7.3.bb b/poky/meta/recipes-devtools/pkgconf/pkgconf_1.7.4.bb
index 12496c384..93832105f 100644
--- a/poky/meta/recipes-devtools/pkgconf/pkgconf_1.7.3.bb
+++ b/poky/meta/recipes-devtools/pkgconf/pkgconf_1.7.4.bb
@@ -20,7 +20,7 @@ SRC_URI = "\
file://pkg-config-native.in \
file://pkg-config-esdk.in \
"
-SRC_URI[sha256sum] = "b846aea51cf696c3392a0ae58bef93e2e72f8e7073ca6ad1ed8b01c85871f9c0"
+SRC_URI[sha256sum] = "d73f32c248a4591139a6b17777c80d4deab6b414ec2b3d21d0a24be348c476ab"
inherit autotools
diff --git a/poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-remove-support-for-the-__int64-type.-See-1.patch b/poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-remove-support-for-the-__int64-type.-See-1.patch
new file mode 100644
index 000000000..bee458572
--- /dev/null
+++ b/poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-remove-support-for-the-__int64-type.-See-1.patch
@@ -0,0 +1,144 @@
+From 7e821441c482917e54435a07893272d87d3ad9e5 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 24 Aug 2018 19:43:04 +0200
+Subject: [PATCH] autotools: remove support for the __int64 type. See #1313
+
+__int64 was the 64bit type for Visual Studio before it added support for
+"long long" with VS2013. I think this was used to build glib with mingw and
+make the result usable for VS 6.0 which didn't support "long long" (??)
+
+Given that newer MSVC links against a different crt and mixing is not supported
+and everything supports "long long" nowadays just remove it.
+
+This is also a cleanup for printf format changes needed for #1497
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/GNOME/glib/commit/7e821441c4]
+---
+ configure.ac | 43 ++++---------------------------------------
+ 1 file changed, 4 insertions(+), 39 deletions(-)
+
+--- a/glib/configure.ac
++++ b/glib/configure.ac
+@@ -550,7 +550,6 @@ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(int)
+ AC_CHECK_SIZEOF(void *)
+ AC_CHECK_SIZEOF(long long)
+-AC_CHECK_SIZEOF(__int64)
+
+ AC_CACHE_CHECK([for sig_atomic_t], ac_cv_type_sig_atomic_t,
+ [AC_TRY_LINK([#include <signal.h>
+@@ -564,7 +563,7 @@ if test x$ac_cv_type_sig_atomic_t = xyes
+ [Define if you have the 'sig_atomic_t' type.])
+ fi
+
+-if test x$ac_cv_sizeof_long = x8 || test x$ac_cv_sizeof_long_long = x8 || test x$ac_cv_sizeof___int64 = x8 ; then
++if test x$ac_cv_sizeof_long = x8 || test x$ac_cv_sizeof_long_long = x8 ; then
+ :
+ else
+ AC_MSG_ERROR([
+@@ -573,7 +572,7 @@ else
+ ])
+ fi
+
+-AS_IF([test x$glib_native_win32 != xyes && test x$ac_cv_sizeof_long_long = x8], [
++AS_IF([test x$ac_cv_sizeof_long_long = x8], [
+ # long long is a 64 bit integer.
+ AC_MSG_CHECKING(for format to printf and scanf a guint64)
+ AC_CACHE_VAL(glib_cv_long_long_format,[
+@@ -599,14 +598,6 @@ AS_IF([test x$glib_native_win32 != xyes
+ AC_DEFINE(HAVE_INT64_AND_I64,1,[define to support printing 64-bit integers with format I64])
+ fi
+ ], [AC_MSG_RESULT(none)])
+-],[ test x$ac_cv_sizeof___int64 = x8], [
+- # __int64 is a 64 bit integer.
+- AC_MSG_CHECKING(for format to printf and scanf a guint64)
+- # We know this is MSVCRT.DLL, and what the formats are
+- glib_cv_long_long_format=I64
+- AC_MSG_RESULT(%${glib_cv_long_long_format}u)
+- AC_DEFINE(HAVE_LONG_LONG_FORMAT,1,[define if system printf can print long long])
+- AC_DEFINE(HAVE_INT64_AND_I64,1,[define to support printing 64-bit integers with format I64])
+ ])
+
+ AC_C_CONST
+@@ -872,9 +863,6 @@ case $ac_cv_sizeof_size_t in
+ $ac_cv_sizeof_long_long)
+ glib_size_type='long long'
+ ;;
+- $ac_cv_sizeof__int64)
+- glib_size_type='__int64'
+- ;;
+ *) AC_MSG_ERROR([No type matching size_t in size])
+ ;;
+ esac
+@@ -931,9 +919,6 @@ case $ac_cv_sizeof_ssize_t in
+ $ac_cv_sizeof_long_long)
+ glib_ssize_type='long long'
+ ;;
+- $ac_cv_sizeof__int64)
+- glib_ssize_type='__int64'
+- ;;
+ *) AC_MSG_ERROR([No type matching ssize_t in size])
+ ;;
+ esac
+@@ -2985,17 +2970,6 @@ $ac_cv_sizeof_long_long)
+ gint64_constant='(G_GNUC_EXTENSION (val##LL))'
+ guint64_constant='(G_GNUC_EXTENSION (val##ULL))'
+ ;;
+-$ac_cv_sizeof___int64)
+- gint64='__int64'
+- if test -n "$glib_cv_long_long_format"; then
+- gint64_modifier='"'$glib_cv_long_long_format'"'
+- gint64_format='"'$glib_cv_long_long_format'i"'
+- guint64_format='"'$glib_cv_long_long_format'u"'
+- fi
+- glib_extension=
+- gint64_constant='(val##i64)'
+- guint64_constant='(val##ui64)'
+- ;;
+ esac
+ glib_size_t=$ac_cv_sizeof_size_t
+ glib_ssize_t=$ac_cv_sizeof_ssize_t
+@@ -3020,7 +2994,7 @@ long)
+ gsize_format='"lu"'
+ glib_msize_type='LONG'
+ ;;
+-"long long"|__int64)
++"long long")
+ gsize_modifier='"I64"'
+ gsize_format='"I64u"'
+ glib_msize_type='INT64'
+@@ -3043,7 +3017,7 @@ long)
+ gssize_format='"li"'
+ glib_mssize_type='LONG'
+ ;;
+-"long long"|__int64)
++"long long")
+ gssize_modifier='"I64"'
+ gssize_format='"I64i"'
+ glib_mssize_type='INT64'
+@@ -3080,14 +3054,6 @@ $ac_cv_sizeof_long_long)
+ glib_gpi_cast='(gint64)'
+ glib_gpui_cast='(guint64)'
+ ;;
+-$ac_cv_sizeof___int64)
+- glib_intptr_type_define=__int64
+- gintptr_modifier='"I64"'
+- gintptr_format='"I64i"'
+- guintptr_format='"I64u"'
+- glib_gpi_cast='(gint64)'
+- glib_gpui_cast='(guint64)'
+- ;;
+ *)
+ glib_unknown_void_p=yes
+ ;;
+@@ -3258,9 +3224,6 @@ $ac_cv_sizeof_long)
+ $ac_cv_sizeof_long_long)
+ gint64='long long'
+ ;;
+-$ac_cv_sizeof___int64)
+- gint64='__int64'
+- ;;
+ esac
+
+ AC_CHECK_TYPE([guint32],,,[typedef unsigned $gint32 guint32;])
diff --git a/poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-use-C99-printf-format-specifiers-on-Window.patch b/poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-use-C99-printf-format-specifiers-on-Window.patch
new file mode 100644
index 000000000..a4e92da34
--- /dev/null
+++ b/poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-use-C99-printf-format-specifiers-on-Window.patch
@@ -0,0 +1,68 @@
+From 3d7cde654c4c6f3bdad32f5521f28f5802a7c377 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 24 Aug 2018 21:46:47 +0200
+Subject: [PATCH] autotools: use C99 printf format specifiers on Windows. Fixes
+ #1497
+
+Since we now require a C99 compatible printf and use gnulib on Windows,
+we also mark our printf functions as gnu_printf. GCC complains about the
+Windows specific I64 specifiers we still write to glibconfig.h with the
+autotools build.
+
+To fix this switch all I64(x) to ll(x).
+
+This also makes the glibconfig.h output for those macros match the ones
+we get when using meson.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/GNOME/glib/commit/3d7cde654c]
+---
+ configure.ac | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/glib/configure.ac
++++ b/glib/configure.ac
+@@ -576,7 +576,7 @@ AS_IF([test x$ac_cv_sizeof_long_long = x
+ # long long is a 64 bit integer.
+ AC_MSG_CHECKING(for format to printf and scanf a guint64)
+ AC_CACHE_VAL(glib_cv_long_long_format,[
+- for format in ll q I64; do
++ for format in ll q; do
+ AC_TRY_RUN([#include <stdio.h>
+ int main()
+ {
+@@ -2995,8 +2995,8 @@ long)
+ glib_msize_type='LONG'
+ ;;
+ "long long")
+- gsize_modifier='"I64"'
+- gsize_format='"I64u"'
++ gsize_modifier='"ll"'
++ gsize_format='"llu"'
+ glib_msize_type='INT64'
+ ;;
+ esac
+@@ -3018,8 +3018,8 @@ long)
+ glib_mssize_type='LONG'
+ ;;
+ "long long")
+- gssize_modifier='"I64"'
+- gssize_format='"I64i"'
++ gssize_modifier='"ll"'
++ gssize_format='"lli"'
+ glib_mssize_type='INT64'
+ ;;
+ esac
+@@ -3048,9 +3048,9 @@ $ac_cv_sizeof_long)
+ ;;
+ $ac_cv_sizeof_long_long)
+ glib_intptr_type_define='long long'
+- gintptr_modifier='"I64"'
+- gintptr_format='"I64i"'
+- guintptr_format='"I64u"'
++ gintptr_modifier='"ll"'
++ gintptr_format='"lli"'
++ guintptr_format='"llu"'
+ glib_gpi_cast='(gint64)'
+ glib_gpui_cast='(guint64)'
+ ;;
diff --git a/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
index 52ef2a977..964d85fa3 100644
--- a/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -11,11 +11,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRCREV = "edf8e6f0ea77ede073f07bff0d2ae1fc7a38103b"
PV = "0.29.2+git${SRCPV}"
-SRC_URI = "git://anongit.freedesktop.org/pkg-config \
+SRC_URI = "git://gitlab.freedesktop.org/pkg-config/pkg-config.git;branch=master;protocol=https \
file://pkg-config-esdk.in \
file://pkg-config-native.in \
file://fix-glib-configure-libtool-usage.patch \
file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \
+ file://0001-autotools-remove-support-for-the-__int64-type.-See-1.patch \
+ file://0001-autotools-use-C99-printf-format-specifiers-on-Window.patch \
"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/pseudo/pseudo_git.bb b/poky/meta/recipes-devtools/pseudo/pseudo_git.bb
index 17bd02c27..4eab13312 100644
--- a/poky/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/poky/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -6,7 +6,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo;branch=oe-core \
file://fallback-group \
"
-SRCREV = "60e25a36558f1f07dcce1a044fe976b475bec42b"
+SRCREV = "ee24ebec9e5a11dd5208c9be2870f35eab3b9e20"
S = "${WORKDIR}/git"
PV = "1.9.0+git${SRCPV}"
diff --git a/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.20.1.bb b/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.20.3.bb
index 6c3b88678..d160fd655 100644
--- a/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.20.1.bb
+++ b/poky/meta/recipes-devtools/python-numpy/python3-numpy_1.20.3.bb
@@ -12,7 +12,7 @@ SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${S
file://0001-numpy-core-Define-RISCV-32-support.patch \
file://run-ptest \
"
-SRC_URI[sha256sum] = "9bf51d69ebb4ca9239e55bedc2185fe2c0ec222da0adee7ece4125414676846d"
+SRC_URI[sha256sum] = "b7340f0628ce1823c151e3d2a2a8cba2a3ff1357fba4475a24b1816e75c21f90"
UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
diff --git a/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch b/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
index 680edbe70..1082fe79b 100644
--- a/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
+++ b/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
@@ -1,4 +1,4 @@
-From 6380cc63f79abe8b8404c9be5ed5f213a70c8c6a Mon Sep 17 00:00:00 2001
+From f6afc18e08a6c428ce8becd114c535a6840f1b9f Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 17 Jul 2018 10:13:38 +0800
Subject: [PATCH] conditionally do not fetch code by easy_install
@@ -15,7 +15,7 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
1 file changed, 5 insertions(+)
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
-index eeb21b5..eca1edd 100644
+index 45adb6a..9ac3342 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -636,6 +636,11 @@ class easy_install(Command):
diff --git a/poky/meta/recipes-devtools/python/python-cython.inc b/poky/meta/recipes-devtools/python/python-cython.inc
index 0e6bac06a..04fd2ec2b 100644
--- a/poky/meta/recipes-devtools/python/python-cython.inc
+++ b/poky/meta/recipes-devtools/python/python-cython.inc
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa"
PYPI_PACKAGE = "Cython"
BBCLASSEXTEND = "native nativesdk"
-SRC_URI[sha256sum] = "df6b83c7a6d1d967ea89a2903e4a931377634a297459652e4551734c48195406"
+SRC_URI[sha256sum] = "6a0d31452f0245daacb14c979c77e093eb1a546c760816b5eed0047686baad8e"
UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar"
inherit pypi
diff --git a/poky/meta/recipes-devtools/python/python-gitdb.inc b/poky/meta/recipes-devtools/python/python-gitdb.inc
index 618d85ff8..53d925a49 100644
--- a/poky/meta/recipes-devtools/python/python-gitdb.inc
+++ b/poky/meta/recipes-devtools/python/python-gitdb.inc
@@ -8,7 +8,7 @@ inherit pypi
PYPI_PACKAGE = "gitdb"
-SRC_URI[sha256sum] = "c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9"
+SRC_URI[sha256sum] = "96bf5c08b157a666fec41129e6d327235284cca4c81e92109260f353ba138005"
DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap"
diff --git a/poky/meta/recipes-devtools/python/python3-attrs_20.3.0.bb b/poky/meta/recipes-devtools/python/python3-attrs_21.2.0.bb
index 55cfda718..e89fbc96f 100644
--- a/poky/meta/recipes-devtools/python/python3-attrs_20.3.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-attrs_21.2.0.bb
@@ -3,8 +3,7 @@ HOMEPAGE = "http://www.attrs.org/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d4ab25949a73fe7d4fdee93bcbdbf8ff"
-SRC_URI[sha256sum] = "832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700"
-SRC_URI[md5sum] = "4fe38f89297b2b446d83190fce189f29"
+SRC_URI[sha256sum] = "ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"
inherit pypi setuptools3
diff --git a/poky/meta/recipes-devtools/python/python3-cython_0.29.22.bb b/poky/meta/recipes-devtools/python/python3-cython_0.29.23.bb
index 2ec4033fa..2ec4033fa 100644
--- a/poky/meta/recipes-devtools/python/python3-cython_0.29.22.bb
+++ b/poky/meta/recipes-devtools/python/python3-cython_0.29.23.bb
diff --git a/poky/meta/recipes-devtools/python/python3-dbusmock_0.22.0.bb b/poky/meta/recipes-devtools/python/python3-dbusmock_0.23.1.bb
index 0b87ab038..b5fa1868b 100644
--- a/poky/meta/recipes-devtools/python/python3-dbusmock_0.22.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-dbusmock_0.23.1.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "https://pypi.org/project/python-dbusmock/"
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02"
-SRC_URI[sha256sum] = "2191919cc411fb94953b36e46bfd55ee5ad4162432ee0d0892bc2c4770ff5d7c"
+SRC_URI[sha256sum] = "b5c36a9c9935d1867cf79d8666b08ad906660e6d4d967e9fded4361ad7eef54f"
PYPI_PACKAGE = "python-dbusmock"
diff --git a/poky/meta/recipes-devtools/python/python3-docutils_0.16.bb b/poky/meta/recipes-devtools/python/python3-docutils_0.16.bb
deleted file mode 100644
index 50547a1b0..000000000
--- a/poky/meta/recipes-devtools/python/python3-docutils_0.16.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-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"
-
-DEPENDS = "python3"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
-SRC_URI[md5sum] = "9ccb6f332e23360f964de72c8ea5f0ed"
-SRC_URI[sha256sum] = "7d4e999cca74a52611773a42912088078363a30912e8822f7a3d38043b767573"
-
-S = "${WORKDIR}/docutils-${PV}"
-
-inherit distutils3
-
-BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/python/python3-docutils_0.17.1.bb b/poky/meta/recipes-devtools/python/python3-docutils_0.17.1.bb
new file mode 100644
index 000000000..54a809847
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-docutils_0.17.1.bb
@@ -0,0 +1,11 @@
+SUMMARY = "Docutils is a modular system for processing documentation into useful formats"
+HOMEPAGE = "http://docutils.sourceforge.net"
+SECTION = "devel/python"
+LICENSE = "PSF & BSD-2-Clause & GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=836a1950177996968a49ff477a4a61c4"
+
+SRC_URI[sha256sum] = "686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/python/python3-git_3.1.14.bb b/poky/meta/recipes-devtools/python/python3-git_3.1.17.bb
index 911c8f148..009cac660 100644
--- a/poky/meta/recipes-devtools/python/python3-git_3.1.14.bb
+++ b/poky/meta/recipes-devtools/python/python3-git_3.1.17.bb
@@ -12,7 +12,7 @@ PYPI_PACKAGE = "GitPython"
inherit pypi setuptools3
-SRC_URI[sha256sum] = "be27633e7509e58391f10207cd32b2a6cf5b908f92d9cd30da2e514e1137af61"
+SRC_URI[sha256sum] = "ee24bdc93dce357630764db659edaf6b8d664d4ff5447ccfeedd2dc5c253f41e"
DEPENDS += " ${PYTHON_PN}-gitdb"
diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.5.bb b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.5.bb
deleted file mode 100644
index fe56bf964..000000000
--- a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.5.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-inherit setuptools3
-require python-gitdb.inc
-
-SRC_URI[md5sum] = "0e2d3f34efece5deda7c55fede6507cc"
diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.7.bb b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.7.bb
new file mode 100644
index 000000000..988d67b5f
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.7.bb
@@ -0,0 +1,4 @@
+inherit setuptools3
+require python-gitdb.inc
+
+SRC_URI[md5sum] = "3f52187435ab0b6e64a15782ffaf29ab"
diff --git a/poky/meta/recipes-devtools/python/python3-hypothesis_6.2.0.bb b/poky/meta/recipes-devtools/python/python3-hypothesis_6.14.0.bb
index be9418386..89071b2a9 100644
--- a/poky/meta/recipes-devtools/python/python3-hypothesis_6.2.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-hypothesis_6.14.0.bb
@@ -7,8 +7,16 @@ PYPI_PACKAGE = "hypothesis"
inherit pypi setuptools3
-SRC_URI[sha256sum] = "c16fbde26b65c98a2464c48209b066c2f6dab5e8e38acd9d959021eb8d58b6c0"
+SRC_URI[sha256sum] = "9bdee01ae260329b16117e9b0229a839b4a77747a985922653f595bd2a6a541a"
-RDEPENDS_${PN} += "python3-attrs python3-core python3-sortedcontainers"
+RDEPENDS_${PN} += " \
+ python3-attrs \
+ python3-compression \
+ python3-core \
+ python3-json \
+ python3-sortedcontainers \
+ python3-statistics \
+ python3-unittest \
+ "
BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-importlib-metadata_3.4.0.bb b/poky/meta/recipes-devtools/python/python3-importlib-metadata_4.5.0.bb
index 81f24e55c..7c156787a 100644
--- a/poky/meta/recipes-devtools/python/python3-importlib-metadata_3.4.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-importlib-metadata_4.5.0.bb
@@ -8,7 +8,7 @@ inherit pypi setuptools3
PYPI_PACKAGE = "importlib_metadata"
UPSTREAM_CHECK_REGEX = "/importlib-metadata/(?P<pver>(\d+[\.\-_]*)+)/"
-SRC_URI[sha256sum] = "fa5daa4477a7414ae34e95942e4dd07f62adf589143c875c133c1e53c4eff38d"
+SRC_URI[sha256sum] = "b142cc1dd1342f31ff04bb7d022492b09920cb64fed867cd3ea6f80fe3ebd139"
S = "${WORKDIR}/importlib_metadata-${PV}"
diff --git a/poky/meta/recipes-devtools/python/python3-jinja2_2.11.3.bb b/poky/meta/recipes-devtools/python/python3-jinja2_3.0.1.bb
index dbdf563f8..b37a043cc 100644
--- a/poky/meta/recipes-devtools/python/python3-jinja2_2.11.3.bb
+++ b/poky/meta/recipes-devtools/python/python3-jinja2_3.0.1.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "https://pypi.org/project/Jinja/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462"
-SRC_URI[sha256sum] = "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"
+SRC_URI[sha256sum] = "703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"
PYPI_PACKAGE = "Jinja2"
@@ -13,8 +13,7 @@ CVE_PRODUCT = "jinja2 jinja"
CLEANBROKEN = "1"
inherit pypi setuptools3
-# ptest disabled in OE-Core for now due to missing dependencies
-
+inherit ${@bb.utils.filter('DISTRO_FEATURES', 'ptest', d)}
SRC_URI += " \
file://run-ptest \
@@ -27,6 +26,7 @@ do_install_ptest() {
RDEPENDS_${PN}-ptest += " \
${PYTHON_PN}-pytest \
+ ${PYTHON_PN}-toml \
${PYTHON_PN}-unixadmin \
"
diff --git a/poky/meta/recipes-devtools/python/python3-libarchive-c_2.9.bb b/poky/meta/recipes-devtools/python/python3-libarchive-c_3.1.bb
index 3a2d8733e..d8f7862f9 100644
--- a/poky/meta/recipes-devtools/python/python3-libarchive-c_2.9.bb
+++ b/poky/meta/recipes-devtools/python/python3-libarchive-c_3.1.bb
@@ -9,13 +9,14 @@ PYPI_PACKAGE = "libarchive-c"
inherit pypi setuptools3
-SRC_URI[md5sum] = "083bd2cb0043c1e22a52cb9a05e31532"
-SRC_URI[sha256sum] = "9919344cec203f5db6596a29b5bc26b07ba9662925a05e24980b84709232ef60"
+SRC_URI[md5sum] = "8c62da42a8b9bd24642e5430427e6f5a"
+SRC_URI[sha256sum] = "618a7ecfbfb58ca15e11e3138d4a636498da3b6bc212811af158298530fbb87e"
RDEPENDS_${PN} += "\
libarchive \
${PYTHON_PN}-ctypes \
${PYTHON_PN}-mmap \
+ ${PYTHON_PN}-logging \
"
BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/python/python3-magic_0.4.22.bb b/poky/meta/recipes-devtools/python/python3-magic_0.4.24.bb
index b82892759..a54bf2431 100644
--- a/poky/meta/recipes-devtools/python/python3-magic_0.4.22.bb
+++ b/poky/meta/recipes-devtools/python/python3-magic_0.4.24.bb
@@ -11,7 +11,7 @@ PYPI_PACKAGE = "python-magic"
inherit pypi setuptools3
-SRC_URI[sha256sum] = "ca884349f2c92ce830e3f498c5b7c7051fe2942c3ee4332f65213b8ebff15a62"
+SRC_URI[sha256sum] = "de800df9fb50f8ec5974761054a708af6e4246b03b4bdaee993f948947b0ebcf"
RDEPENDS_${PN} += "file \
${PYTHON_PN}-ctypes \
diff --git a/poky/meta/recipes-devtools/python/python3-markdown_3.3.4.bb b/poky/meta/recipes-devtools/python/python3-markdown_3.3.4.bb
new file mode 100644
index 000000000..47cccbe5b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-markdown_3.3.4.bb
@@ -0,0 +1,13 @@
+SUMMARY = "A Python implementation of John Gruber's Markdown."
+HOMEPAGE = "https://python-markdown.github.io/"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=745aaad0c69c60039e638bff9ffc59ed"
+
+inherit pypi setuptools3
+
+PYPI_PACKAGE = "Markdown"
+SRC_URI[sha256sum] = "31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"
+
+BBCLASSEXTEND = "native"
+
+RDEPENDS_${PN} += "${PYTHON_PN}-logging ${PYTHON_PN}-setuptools"
diff --git a/poky/meta/recipes-devtools/python/python3-markupsafe_1.1.1.bb b/poky/meta/recipes-devtools/python/python3-markupsafe_2.0.1.bb
index 403a98a43..5be43b6c5 100644
--- a/poky/meta/recipes-devtools/python/python3-markupsafe_1.1.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-markupsafe_2.0.1.bb
@@ -3,12 +3,11 @@ HOMEPAGE = "http://github.com/mitsuhiko/markupsafe"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
-SRC_URI[md5sum] = "43fd756864fe42063068e092e220c57b"
-SRC_URI[sha256sum] = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"
+SRC_URI[sha256sum] = "594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"
PYPI_PACKAGE = "MarkupSafe"
inherit pypi setuptools3
-# ptest disabled in OE-Core for now due to missing dependencies
+inherit ${@bb.utils.filter('DISTRO_FEATURES', 'ptest', d)}
RDEPENDS_${PN} += "${PYTHON_PN}-stringold"
diff --git a/poky/meta/recipes-devtools/python/python3-more-itertools_8.7.0.bb b/poky/meta/recipes-devtools/python/python3-more-itertools_8.8.0.bb
index 0cb61915b..1c0e84d27 100644
--- a/poky/meta/recipes-devtools/python/python3-more-itertools_8.7.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-more-itertools_8.8.0.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/erikrose/more-itertools"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3396ea30f9d21389d7857719816f83b5"
-SRC_URI[sha256sum] = "c5d6da9ca3ff65220c3bfd2a8db06d698f05d4d2b9be57e1deb2be5a45019713"
+SRC_URI[sha256sum] = "83f0308e05477c68f56ea3a888172c78ed5d5b3c282addb67508e7ba6c8f813a"
inherit pypi setuptools3 ptest
@@ -11,9 +11,13 @@ SRC_URI += " \
file://run-ptest \
"
+RDEPENDS_${PN} += " \
+ ${PYTHON_PN}-asyncio \
+ "
+
RDEPENDS_${PN}-ptest += " \
${PYTHON_PN}-pytest \
-"
+ "
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
diff --git a/poky/meta/recipes-devtools/python/python3-pycairo_1.20.0.bb b/poky/meta/recipes-devtools/python/python3-pycairo_1.20.1.bb
index 8987b7a42..d169a3ca7 100644
--- a/poky/meta/recipes-devtools/python/python3-pycairo_1.20.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-pycairo_1.20.1.bb
@@ -13,8 +13,8 @@ DEPENDS = "cairo python3"
SRC_URI = "https://github.com/pygobject/pycairo/releases/download/v${PV}/pycairo-${PV}.tar.gz"
UPSTREAM_CHECK_URI = "https://github.com/pygobject/pycairo/releases/"
-SRC_URI[md5sum] = "a1f9b661a0000c2f42281db933284451"
-SRC_URI[sha256sum] = "5695a10cb7f9ae0d01f665b56602a845b0a8cb17e2123bfece10c2e58552468c"
+SRC_URI[md5sum] = "fa88a28cadbfb34192fe743d32c0ee33"
+SRC_URI[sha256sum] = "1ee72b035b21a475e1ed648e26541b04e5d7e753d75ca79de8c583b25785531b"
S = "${WORKDIR}/pycairo-${PV}"
diff --git a/poky/meta/recipes-devtools/python/python3-pygments_2.8.1.bb b/poky/meta/recipes-devtools/python/python3-pygments_2.9.0.bb
index a2e008348..7fedcb5a8 100644
--- a/poky/meta/recipes-devtools/python/python3-pygments_2.8.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-pygments_2.9.0.bb
@@ -5,7 +5,7 @@ LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=98419e351433ac106a24e3ad435930bc"
inherit setuptools3
-SRC_URI[sha256sum] = "2656e1a6edcdabf4275f9a3640db59fd5de107d88e8663c5d4e9a0fa62f77f94"
+SRC_URI[sha256sum] = "a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f"
DEPENDS += "\
${PYTHON_PN} \
diff --git a/poky/meta/recipes-devtools/python/python3-pygobject_3.38.0.bb b/poky/meta/recipes-devtools/python/python3-pygobject_3.40.1.bb
index 8df3150e3..f5679a4ba 100644
--- a/poky/meta/recipes-devtools/python/python3-pygobject_3.38.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-pygobject_3.40.1.bb
@@ -16,7 +16,7 @@ SRC_URI = " \
http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
file://0001-Do-not-build-tests.patch \
"
-SRC_URI[sha256sum] = "0372d1bb9122fc19f500a249b1f38c2bb67485000f5887497b4b205b3e7084d5"
+SRC_URI[sha256sum] = "00c6d591f4cb40c335ab1fd3e8c17869ba15cfda54416fe363290af766790035"
UNKNOWN_CONFIGURE_WHITELIST = "introspection"
diff --git a/poky/meta/recipes-devtools/python/python3-pytest_6.2.2.bb b/poky/meta/recipes-devtools/python/python3-pytest_6.2.4.bb
index d221cbcd7..fa43e6ebf 100644
--- a/poky/meta/recipes-devtools/python/python3-pytest_6.2.2.bb
+++ b/poky/meta/recipes-devtools/python/python3-pytest_6.2.4.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=81eb9f71d006c6b268cf4388e3c98f7b"
SRC_URI_append = " file://0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch "
-SRC_URI[sha256sum] = "9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"
+SRC_URI[sha256sum] = "50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"
inherit update-alternatives pypi setuptools3
diff --git a/poky/meta/recipes-devtools/python/python3-pyyaml_5.4.1.bb b/poky/meta/recipes-devtools/python/python3-pyyaml_5.4.1.bb
new file mode 100644
index 000000000..dce1ad57d
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pyyaml_5.4.1.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Python support for YAML"
+DEPENDS += "libyaml ${PYTHON_PN}-cython-native"
+HOMEPAGE = "https://pyyaml.org/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6d8242660a8371add5fe547adf083079"
+
+PYPI_PACKAGE = "PyYAML"
+
+inherit pypi setuptools3
+
+SRC_URI[sha256sum] = "607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"
+
+RDEPENDS_${PN} += "\
+ ${PYTHON_PN}-datetime \
+ ${PYTHON_PN}-netclient \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-scons-native_3.1.2.bb b/poky/meta/recipes-devtools/python/python3-scons-native_4.1.0.bb
index 9e127304d..9e127304d 100644
--- a/poky/meta/recipes-devtools/python/python3-scons-native_3.1.2.bb
+++ b/poky/meta/recipes-devtools/python/python3-scons-native_4.1.0.bb
diff --git a/poky/meta/recipes-devtools/python/python3-scons/0001-Fix-man-page-installation.patch b/poky/meta/recipes-devtools/python/python3-scons/0001-Fix-man-page-installation.patch
new file mode 100644
index 000000000..ff212b85e
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-scons/0001-Fix-man-page-installation.patch
@@ -0,0 +1,46 @@
+From 82be2b7b9758a2f62ee11931da674cd541076041 Mon Sep 17 00:00:00 2001
+From: Tim Orling <ticotimo@gmail.com>
+Date: Sat, 22 May 2021 11:20:46 -0700
+Subject: [PATCH] Fix man page installation
+
+Fixes:
+ error: can't copy 'build/doc/man/scons.1': doesn't exist or not a regular file
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Tim Orling <ticotimo@gmail.com>
+---
+ MANIFEST.in | 2 +-
+ setup.cfg | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/MANIFEST.in b/MANIFEST.in
+index 04ec000..937f6f3 100644
+--- a/MANIFEST.in
++++ b/MANIFEST.in
+@@ -4,7 +4,7 @@ recursive-include SCons/Tool/docbook *
+ include LICENSE
+
+ include scons.1 sconsign.1 scons-time.1
+-recursive-include build/doc/man *.1
++#recursive-include build/doc/man *.1
+
+
+
+diff --git a/setup.cfg b/setup.cfg
+index 37e5204..677c00a 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -56,9 +56,9 @@ console_scripts =
+ scons.tool.docbook = *.*
+
+ [options.data_files]
+-. = build/doc/man/scons.1
+- build/doc/man/scons-time.1
+- build/doc/man/sconsign.1
++. = scons.1
++ scons-time.1
++ sconsign.1
+
+ [sdist]
+ dist-dir = build/dist
diff --git a/poky/meta/recipes-devtools/python/python3-scons_3.1.2.bb b/poky/meta/recipes-devtools/python/python3-scons_3.1.2.bb
deleted file mode 100644
index 12122131a..000000000
--- a/poky/meta/recipes-devtools/python/python3-scons_3.1.2.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-HOMEPAGE = "https://github.com/SCons/scons"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-python3-scons-${PV};md5=e14e1b33428df24a40a782ae142785d0"
-
-# pypi package does not have a valid license file
-SRC_URI += "https://raw.githubusercontent.com/SCons/scons/${PV}/LICENSE;downloadfilename=LICENSE-python3-scons-${PV};name=license"
-
-SRC_URI[md5sum] = "f9c4ad06dcf1427be95472eaf380c81a"
-SRC_URI[sha256sum] = "8aaa483c303efeb678e6f7c776c8444a482f8ddc3ad891f8b6cdd35264da9a1f"
-SRC_URI[license.md5sum] = "e14e1b33428df24a40a782ae142785d0"
-SRC_URI[license.sha256sum] = "72ed889165fb28378cadac14552be4a959f1ebab6b148abb5dd2b49712c3c6f6"
-
-S = "${WORKDIR}/scons-${PV}"
-
-UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
-
-inherit pypi setuptools3
-
-do_install_prepend() {
- sed -i -e "1s,#!.*python.*,#!${USRBINPATH}/env python3," ${S}/script/*
-}
-
-RDEPENDS_${PN}_class-target = "\
- python3-core \
- python3-fcntl \
- python3-io \
- python3-json \
- python3-shell \
- python3-pickle \
- python3-pprint \
- "
diff --git a/poky/meta/recipes-devtools/python/python3-scons_4.1.0.bb b/poky/meta/recipes-devtools/python/python3-scons_4.1.0.bb
new file mode 100644
index 000000000..5894a5ef3
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-scons_4.1.0.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+HOMEPAGE = "https://github.com/SCons/scons"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b94c6e2be9670c62b38f7118c12866d2"
+
+SRC_URI += " file://0001-Fix-man-page-installation.patch"
+SRC_URI[sha256sum] = "accb8035be2c9cfbab06471286eaeff86a10037a8064cf4ef4c3df04ea5a7387"
+
+PYPI_PACKAGE = "SCons"
+
+inherit pypi setuptools3
+
+RDEPENDS_${PN}_class-target = "\
+ python3-core \
+ python3-compression \
+ python3-fcntl \
+ python3-importlib-metadata \
+ python3-io \
+ python3-json \
+ python3-shell \
+ python3-pickle \
+ python3-pkg-resources \
+ python3-pprint \
+ "
+
+FILES_${PN}-doc += "${datadir}/scons*.1"
diff --git a/poky/meta/recipes-devtools/python/python3-setuptools-scm_5.0.1.bb b/poky/meta/recipes-devtools/python/python3-setuptools-scm_6.0.1.bb
index ead80da7b..24409eddc 100644
--- a/poky/meta/recipes-devtools/python/python3-setuptools-scm_5.0.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-setuptools-scm_6.0.1.bb
@@ -4,7 +4,7 @@ DESCRIPTION = "setuptools_scm handles managing your Python package versions in S
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
-SRC_URI[sha256sum] = "c85b6b46d0edd40d2301038cdea96bb6adc14d62ef943e75afb08b3e7bcf142a"
+SRC_URI[sha256sum] = "d1925a69cb07e9b29416a275b9fadb009a23c148ace905b2fb220649a6c18e92"
PYPI_PACKAGE = "setuptools_scm"
inherit pypi setuptools3
diff --git a/poky/meta/recipes-devtools/python/python3-setuptools/reproducibility.patch b/poky/meta/recipes-devtools/python/python3-setuptools/reproducibility.patch
new file mode 100644
index 000000000..149d8ad5c
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-setuptools/reproducibility.patch
@@ -0,0 +1,40 @@
+The License-File lines in PKG-INFO change ordering depending on the order on disk,
+for example for python-packaging, one build shows:
+
+License-File: LICENSE
+License-File: LICENSE.APACHE
+License-File: LICENSE.BSD
+
+and the other shows:
+
+License-File: LICENSE
+License-File: LICENSE.BSD
+License-File: LICENSE.APACHE
+
+This is because glob uses os.listdir() which is unsorted. Sort the result to avoid this.
+
+Upstream-Status: Submitted [https://github.com/pypa/setuptools/issues/2691]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: setuptools-57.0.0/setuptools/dist.py
+===================================================================
+--- setuptools-57.0.0.orig/setuptools/dist.py
++++ setuptools-57.0.0/setuptools/dist.py
+@@ -15,7 +15,7 @@ import distutils.command
+ from distutils.util import strtobool
+ from distutils.debug import DEBUG
+ from distutils.fancy_getopt import translate_longopt
+-from glob import iglob
++from glob import glob
+ import itertools
+ import textwrap
+ from typing import List, Optional, TYPE_CHECKING
+@@ -603,7 +603,7 @@ class Distribution(_Distribution):
+ return (
+ path
+ for pattern in patterns
+- for path in iglob(pattern)
++ for path in sorted(glob(pattern))
+ if not path.endswith('~')
+ and os.path.isfile(path)
+ )
diff --git a/poky/meta/recipes-devtools/python/python3-setuptools_54.1.1.bb b/poky/meta/recipes-devtools/python/python3-setuptools_57.0.0.bb
index 74264a381..a15b51e31 100644
--- a/poky/meta/recipes-devtools/python/python3-setuptools_54.1.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-setuptools_57.0.0.bb
@@ -8,9 +8,10 @@ inherit pypi setuptools3
SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
-SRC_URI += "file://0001-change-shebang-to-python3.patch"
+SRC_URI += "file://0001-change-shebang-to-python3.patch \
+ file://reproducibility.patch"
-SRC_URI[sha256sum] = "1ce82798848a978696465866bb3aaab356003c42d6143e1111fcf069ac838274"
+SRC_URI[sha256sum] = "401cbf33a7bf817d08014d51560fc003b895c4cdc1a5b521ad2969e928a07535"
DEPENDS += "${PYTHON_PN}"
diff --git a/poky/meta/recipes-devtools/python/python3-six_1.15.0.bb b/poky/meta/recipes-devtools/python/python3-six_1.15.0.bb
deleted file mode 100644
index 6c6f3f962..000000000
--- a/poky/meta/recipes-devtools/python/python3-six_1.15.0.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-inherit setuptools3
-require python-six.inc
-
-SRC_URI[md5sum] = "9f90a0eaa0ea7747fda01ca79d21ebcb"
-SRC_URI[sha256sum] = "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"
diff --git a/poky/meta/recipes-devtools/python/python3-six_1.16.0.bb b/poky/meta/recipes-devtools/python/python3-six_1.16.0.bb
new file mode 100644
index 000000000..1ba48d4f4
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-six_1.16.0.bb
@@ -0,0 +1,4 @@
+inherit setuptools3
+require python-six.inc
+
+SRC_URI[sha256sum] = "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"
diff --git a/poky/meta/recipes-devtools/python/python3-smartypants_2.0.0.bb b/poky/meta/recipes-devtools/python/python3-smartypants_2.0.0.bb
new file mode 100644
index 000000000..ba3408247
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-smartypants_2.0.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "Translator of plain ASCII punctuation characters into 'smart' typographic punctuation HTML entities"
+HOMEPAGE = "https://pythonhosted.org/smartypants/"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=977036977591ac666c728921ecc54c4f"
+
+inherit pypi setuptools3
+
+PYPI_PACKAGE = "smartypants"
+SRC_URI[sha256sum] = "7812353a32022699a1aa8cd5626e01c94a946dcaeedaee2d0b382bae4c4cbf36"
+
+BBCLASSEXTEND = "native"
+
+UPSTREAM_CHECK_REGEX = "/${PYPI_PACKAGE}/(?P<pver>(?!2\.0\.1)(\d+[\.\-_]*)+)/"
diff --git a/poky/meta/recipes-devtools/python/python3-sortedcontainers_2.3.0.bb b/poky/meta/recipes-devtools/python/python3-sortedcontainers_2.4.0.bb
index 6060c0372..0755d3e17 100644
--- a/poky/meta/recipes-devtools/python/python3-sortedcontainers_2.3.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-sortedcontainers_2.4.0.bb
@@ -4,6 +4,6 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7c7c6a1a12ec816da16c1839137d53ae"
inherit pypi setuptools3
-SRC_URI[sha256sum] = "59cc937650cf60d677c16775597c89a960658a09cf7c1a668f86e1e4464b10a1"
+SRC_URI[sha256sum] = "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"
BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-typogrify_2.0.7.bb b/poky/meta/recipes-devtools/python/python3-typogrify_2.0.7.bb
new file mode 100644
index 000000000..3becb0dd8
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-typogrify_2.0.7.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Filters to enhance web typography, including support for Django & Jinja templates"
+HOMEPAGE = "https://github.com/mintchaos/typogrify"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=12bc792d6f5415dbf421f3fd183c6dd2"
+
+inherit pypi setuptools3
+
+PYPI_PACKAGE = "typogrify"
+SRC_URI[sha256sum] = "8be4668cda434163ce229d87ca273a11922cb1614cb359970b7dc96eed13cb38"
+
+BBCLASSEXTEND = "native"
+
+RDEPENDS_${PN} += "${PYTHON_PN}-smartypants"
+
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch b/poky/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch
index 237645bc6..9ed03858d 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch
@@ -9,8 +9,7 @@ installs python-config there) to race, resulting in a failure due to
attempting to install python-config into a nonexistent BINDIR. Ensure it also
exists in the libainstall target.
-Upstream-Status: Submitted [https://github.com/python/cpython/pull/13186]
-
+Upstream-Status: Backport [https://github.com/python/cpython/commit/a25c46bd7dd47a2f95b32d17ee2f66de214892c6]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
Makefile.pre.in | 2 +-
diff --git a/poky/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch b/poky/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch
new file mode 100644
index 000000000..7d684b3c4
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-test_ctypes.test_find-skip-without-tools-sdk.patch
@@ -0,0 +1,33 @@
+From 7a2bddfa437be633bb6945d0e6b7d6f27da870ad Mon Sep 17 00:00:00 2001
+From: Tim Orling <timothy.t.orling@intel.com>
+Date: Fri, 18 Jun 2021 11:56:50 -0700
+Subject: [PATCH] test_ctypes.test_find: skip without tools-sdk
+
+These tests need full packagegroup-core-buildessential, the
+easiest way to dynamically check for that is looking for
+'tools-sdk' in IMAGE_FEATURES.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Tim Orling <timothy.t.orlign@intel.com>
+---
+ Lib/ctypes/test/test_find.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py
+index 92ac184..0d009d1 100644
+--- a/Lib/ctypes/test/test_find.py
++++ b/Lib/ctypes/test/test_find.py
+@@ -112,10 +112,12 @@ class FindLibraryLinux(unittest.TestCase):
+ # LD_LIBRARY_PATH)
+ self.assertEqual(find_library(libname), 'lib%s.so' % libname)
+
++ @unittest.skip("Needs IMAGE_FEATURE += \"tools-sdk\"")
+ def test_find_library_with_gcc(self):
+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None):
+ self.assertNotEqual(find_library('c'), None)
+
++ @unittest.skip("Needs IMAGE_FEATURE += \"tools-sdk\"")
+ def test_find_library_with_ld(self):
+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \
+ unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None):
diff --git a/poky/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/poky/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
index 35b7e0c48..c3d1e06d0 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
@@ -23,24 +23,24 @@ Before this patch:
Upstream-Status: Submitted [https://github.com/python/cpython/pull/15132]
+
+Rebased for 3.9.4, still not accepted upstream Signed-off-by: Alejandro Hernandez <alejandro@enedino.org>
+
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
Lib/test/test_locale.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
-index e2c2178..558d63c 100644
---- a/Lib/test/test_locale.py
-+++ b/Lib/test/test_locale.py
-@@ -527,7 +527,7 @@ class TestMiscellaneous(unittest.TestCase):
+Index: Python-3.9.4/Lib/test/test_locale.py
+===================================================================
+--- Python-3.9.4.orig/Lib/test/test_locale.py
++++ Python-3.9.4/Lib/test/test_locale.py
+@@ -562,7 +562,7 @@ class TestMiscellaneous(unittest.TestCas
self.skipTest('test needs Turkish locale')
loc = locale.getlocale(locale.LC_CTYPE)
if verbose:
- print('testing with %a' % (loc,), end=' ', flush=True)
+ print('testing with %a...' % (loc,), end=' ', flush=True)
- locale.setlocale(locale.LC_CTYPE, loc)
- self.assertEqual(loc, locale.getlocale(locale.LC_CTYPE))
-
---
-2.7.4
-
+ try:
+ locale.setlocale(locale.LC_CTYPE, loc)
+ except locale.Error as exc:
diff --git a/poky/meta/recipes-devtools/python/python3/create_manifest3.py b/poky/meta/recipes-devtools/python/python3/create_manifest3.py
index 4da02a299..045240ea0 100644
--- a/poky/meta/recipes-devtools/python/python3/create_manifest3.py
+++ b/poky/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -36,7 +36,7 @@
# Tha method to handle cached files does not work when a module includes a folder which
# itself contains the pycache folder, gladly this is almost never the case.
#
-# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29 at gmail dot com>
+# Author: Alejandro Enedino Hernandez Samaniego <alejandro at enedino dot org>
import sys
@@ -45,6 +45,11 @@ import json
import os
import collections
+if '-d' in sys.argv:
+ debugFlag = '-d'
+else:
+ debugFlag = ''
+
# Get python version from ${PYTHON_MAJMIN}
pyversion = str(sys.argv[1])
@@ -84,6 +89,12 @@ def prepend_comments(comments, json_manifest):
manifest.seek(0, 0)
manifest.write(comments + json_contents)
+def print_indent(msg, offset):
+ for l in msg.splitlines():
+ msg = ' ' * offset + l
+ print(msg)
+
+
# Read existing JSON manifest
with open('python3-manifest.json') as manifest:
# The JSON format doesn't allow comments so we hack the call to keep the comments using a marker
@@ -99,7 +110,7 @@ with open('python3-manifest.json') as manifest:
# Not exactly the same so it should not be a function
#
-print ('Getting dependencies for package: core')
+print_indent('Getting dependencies for package: core', 0)
# This special call gets the core dependencies and
@@ -109,7 +120,7 @@ print ('Getting dependencies for package: core')
# on the new core package, they will still find them
# even when checking the old_manifest
-output = subprocess.check_output([sys.executable, 'get_module_deps3.py', 'python-core-package']).decode('utf8')
+output = subprocess.check_output([sys.executable, 'get_module_deps3.py', 'python-core-package', '%s' % debugFlag]).decode('utf8')
for coredep in output.split():
coredep = coredep.replace(pyversion,'${PYTHON_MAJMIN}')
if isCached(coredep):
@@ -149,17 +160,16 @@ for filedep in old_manifest['core']['files']:
# Get actual module name , shouldnt be affected by libdir/bindir, etc.
pymodule = os.path.splitext(os.path.basename(os.path.normpath(filedep)))[0]
-
# We now know that were dealing with a python module, so we can import it
# and check what its dependencies are.
# We launch a separate task for each module for deterministic behavior.
# Each module will only import what is necessary for it to work in specific.
# The output of each task will contain each module's dependencies
- print ('Getting dependencies for module: %s' % pymodule)
- output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule]).decode('utf8')
- print ('The following dependencies were found for module %s:\n' % pymodule)
- print (output)
+ print_indent('Getting dependencies for module: %s' % pymodule, 2)
+ output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule, '%s' % debugFlag]).decode('utf8')
+ print_indent('The following dependencies were found for module %s:\n' % pymodule, 4)
+ print_indent(output, 6)
for pymodule_dep in output.split():
@@ -178,12 +188,13 @@ for filedep in old_manifest['core']['files']:
# all others will use this a base.
+print('\n\nChecking for directories...\n')
# To improve the script speed, we check which packages contain directories
# since we will be looping through (only) those later.
for pypkg in old_manifest:
for filedep in old_manifest[pypkg]['files']:
if isFolder(filedep):
- print ('%s is a folder' % filedep)
+ print_indent('%s is a directory' % filedep, 2)
if pypkg not in hasfolders:
hasfolders.append(pypkg)
if filedep not in allfolders:
@@ -221,14 +232,14 @@ for pypkg in old_manifest:
print('\n')
print('--------------------------')
- print ('Handling package %s' % pypkg)
+ print('Handling package %s' % pypkg)
print('--------------------------')
# Handle special cases, we assume that when they were manually added
# to the manifest we knew what we were doing.
special_packages = ['misc', 'modules', 'dev', 'tests']
if pypkg in special_packages or 'staticdev' in pypkg:
- print('Passing %s package directly' % pypkg)
+ print_indent('Passing %s package directly' % pypkg, 2)
new_manifest[pypkg] = old_manifest[pypkg]
continue
@@ -259,7 +270,7 @@ for pypkg in old_manifest:
# Get actual module name , shouldnt be affected by libdir/bindir, etc.
# We need to check if the imported module comes from another (e.g. sqlite3.dump)
- path,pymodule = os.path.split(filedep)
+ path, pymodule = os.path.split(filedep)
path = os.path.basename(path)
pymodule = os.path.splitext(os.path.basename(pymodule))[0]
@@ -279,10 +290,10 @@ for pypkg in old_manifest:
# Each module will only import what is necessary for it to work in specific.
# The output of each task will contain each module's dependencies
- print ('\nGetting dependencies for module: %s' % pymodule)
- output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule]).decode('utf8')
- print ('The following dependencies were found for module %s:\n' % pymodule)
- print (output)
+ print_indent('\nGetting dependencies for module: %s' % pymodule, 2)
+ output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule, '%s' % debugFlag]).decode('utf8')
+ print_indent('The following dependencies were found for module %s:\n' % pymodule, 4)
+ print_indent(output, 6)
reportFILES = []
reportRDEPS = []
@@ -325,7 +336,7 @@ for pypkg in old_manifest:
# print('Checking folder %s on package %s' % (pymodule_dep,pypkg_with_folder))
for folder_dep in old_manifest[pypkg_with_folder]['files'] or folder_dep in old_manifest[pypkg_with_folder]['cached']:
if folder_dep == folder:
- print ('%s folder found in %s' % (folder, pypkg_with_folder))
+ print ('%s directory found in %s' % (folder, pypkg_with_folder))
folderFound = True
if pypkg_with_folder not in new_manifest[pypkg]['rdepends'] and pypkg_with_folder != pypkg:
new_manifest[pypkg]['rdepends'].append(pypkg_with_folder)
@@ -424,7 +435,7 @@ prepend_comments(comments,'python3-manifest.json.new')
if (repeated):
error_msg = '\n\nERROR:\n'
- error_msg += 'The following files are repeated (contained in more than one package),\n'
+ error_msg += 'The following files were found in more than one package),\n'
error_msg += 'this is likely to happen when new files are introduced after an upgrade,\n'
error_msg += 'please check which package should get it,\n modify the manifest accordingly and re-run the create_manifest task:\n'
error_msg += '\n'.join(repeated)
diff --git a/poky/meta/recipes-devtools/python/python3/get_module_deps3.py b/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
index 6806f2317..1f4c982ae 100644
--- a/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
+++ b/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -3,14 +3,18 @@
# them out, the output of this execution will have all dependencies
# for a specific module, which will be parsed an dealt on create_manifest.py
#
-# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
+# Author: Alejandro Enedino Hernandez Samaniego <alejandro at enedino dot org>
-# We can get a log per module, for all the dependencies that were found, but its messy.
-debug=False
import sys
import os
+# We can get a log per module, for all the dependencies that were found, but its messy.
+if '-d' in sys.argv:
+ debug = True
+else:
+ debug = False
+
# We can get a list of the modules which are currently required to run python
# so we run python-core and get its modules, we then import what we need
# and check what modules are currently running, if we substract them from the
@@ -19,13 +23,13 @@ import os
# We use importlib to achieve this, so we also need to know what modules importlib needs
import importlib
-core_deps=set(sys.modules)
+core_deps = set(sys.modules)
def fix_path(dep_path):
import os
# We DONT want the path on our HOST system
- pivot='recipe-sysroot-native'
- dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
+ pivot = 'recipe-sysroot-native'
+ dep_path = dep_path[dep_path.find(pivot)+len(pivot):]
if '/usr/bin' in dep_path:
dep_path = dep_path.replace('/usr/bin''${bindir}')
@@ -46,8 +50,8 @@ def fix_path(dep_path):
# Module to import was passed as an argument
current_module = str(sys.argv[1]).rstrip()
-if(debug==True):
- log = open('log_%s' % current_module,'w')
+if debug == True:
+ log = open('temp/log_%s' % current_module.strip('.*'),'w')
log.write('Module %s generated the following dependencies:\n' % current_module)
try:
m = importlib.import_module(current_module)
@@ -63,13 +67,13 @@ try:
except:
pass # ignore all import or other exceptions raised during import
except ImportError as e:
- if (debug==True):
- log.write('Module was not found')
+ if debug == True:
+ log.write('Module was not found\n')
pass
# Get current module dependencies, dif will contain a list of specific deps for this module
-module_deps=set(sys.modules)
+module_deps = set(sys.modules)
# We handle the core package (1st pass on create_manifest.py) as a special case
if current_module == 'python-core-package':
@@ -81,14 +85,18 @@ else:
# Check where each dependency came from
for item in dif:
- dep_path=''
+ # Main module returns script filename, __main matches mp_main__ as well
+ if 'main__' in item:
+ continue
+
+ dep_path = ''
try:
- if (debug==True):
- log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
+ if debug == True:
+ log.write('\nCalling: sys.modules[' + '%s' % item + '].__file__\n')
dep_path = sys.modules['%s' % item].__file__
except AttributeError as e:
# Deals with thread (builtin module) not having __file__ attribute
- if debug==True:
+ if debug == True:
log.write(item + ' ')
log.write(str(e))
log.write('\n')
@@ -96,11 +104,16 @@ for item in dif:
except NameError as e:
# Deals with NameError: name 'dep_path' is not defined
# because module is not found (wasn't compiled?), e.g. bddsm
- if (debug==True):
+ if debug == True:
log.write(item+' ')
log.write(str(e))
pass
+ if dep_path == '':
+ continue
+ if debug == True:
+ log.write('Dependency path found:\n%s\n' % dep_path)
+
# Site-customize is a special case since we (OpenEmbedded) put it there manually
if 'sitecustomize' in dep_path:
dep_path = '${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py'
@@ -111,52 +124,51 @@ for item in dif:
dep_path = fix_path(dep_path)
import sysconfig
- soabi=sysconfig.get_config_var('SOABI')
+ soabi = sysconfig.get_config_var('SOABI')
# Check if its a shared library and deconstruct it
if soabi in dep_path:
- if (debug==True):
- log.write('Shared library found in %s' % dep_path)
+ if debug == True:
+ log.write('Shared library found in %s\n' % dep_path)
dep_path = dep_path.replace(soabi,'*')
print (dep_path)
continue
if "_sysconfigdata" in dep_path:
dep_path = dep_path.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
- if (debug==True):
+ if debug == True:
log.write(dep_path+'\n')
# Prints out result, which is what will be used by create_manifest
print (dep_path)
- import imp
- cpython_tag = imp.get_tag()
- cached=''
+ cpython_tag = sys.implementation.cache_tag
+ cached = ''
# Theres no naive way to find *.pyc files on python3
try:
- if (debug==True):
- log.write('Calling: sys.modules[' + '%s' % item + '].__cached__\n')
+ if debug == True:
+ log.write('\nCalling: sys.modules[' + '%s' % item + '].__cached__\n')
cached = sys.modules['%s' % item].__cached__
except AttributeError as e:
# Deals with thread (builtin module) not having __cached__ attribute
- if debug==True:
+ if debug == True:
log.write(item + ' ')
log.write(str(e))
log.write('\n')
pass
except NameError as e:
# Deals with NameError: name 'cached' is not defined
- if (debug==True):
+ if debug == True:
log.write(item+' ')
log.write(str(e))
pass
if cached is not None:
- if (debug==True):
- log.write(cached)
+ if debug == True:
+ log.write(cached + '\n')
cached = fix_path(cached)
cached = cached.replace(cpython_tag,'*')
if "_sysconfigdata" in cached:
cached = cached.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
print (cached)
-if debug==True:
+if debug == True:
log.close()
diff --git a/poky/meta/recipes-devtools/python/python3/python3-manifest.json b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
index 615dc3a5e..d65cf49cb 100644
--- a/poky/meta/recipes-devtools/python/python3/python3-manifest.json
+++ b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -814,6 +814,7 @@
"shell",
"smtpd",
"sqlite3",
+ "statistics",
"stringold",
"syslog",
"terminal",
@@ -1085,6 +1086,20 @@
],
"cached": []
},
+ "statistics": {
+ "summary": "Basic statistics module",
+ "rdepends": [
+ "core",
+ "math",
+ "numbers"
+ ],
+ "files": [
+ "${libdir}/python${PYTHON_MAJMIN}/statistics.py"
+ ],
+ "cached": [
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/statistics.*.pyc"
+ ]
+ },
"stringold": {
"summary": "Python string APIs [deprecated]",
"rdepends": [
diff --git a/poky/meta/recipes-devtools/python/python3_3.9.2.bb b/poky/meta/recipes-devtools/python/python3_3.9.5.bb
index fd1172335..1717ff737 100644
--- a/poky/meta/recipes-devtools/python/python3_3.9.2.bb
+++ b/poky/meta/recipes-devtools/python/python3_3.9.5.bb
@@ -31,6 +31,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \
file://0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch \
file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \
+ ${@bb.utils.contains('IMAGE_FEATURES', 'tools-sdk', '', 'file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch', d)} \
"
SRC_URI_append_class-native = " \
@@ -38,7 +39,7 @@ SRC_URI_append_class-native = " \
file://12-distutils-prefix-is-inside-staging-area.patch \
file://0001-Don-t-search-system-for-headers-libraries.patch \
"
-SRC_URI[sha256sum] = "3c2034c54f811448f516668dce09d24008a0716c3a794dd8639b5388cbde247d"
+SRC_URI[sha256sum] = "0c5a140665436ec3dbfbb79e2dfb6d192655f26ef4a29aeffcb6d1820d716d83"
# exclude pre-releases for both python 2.x and 3.x
UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
@@ -69,7 +70,7 @@ ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config
ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}"
-DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2"
+DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2 autoconf-archive-native"
DEPENDS_append_class-target = " python3-native"
DEPENDS_append_class-nativesdk = " python3-native"
@@ -344,6 +345,7 @@ PACKAGES =+ "libpython3 libpython3-staticdev"
FILES_libpython3 = "${libdir}/libpython*.so.*"
FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}-*/libpython${PYTHON_MAJMIN}.a"
INSANE_SKIP_${PN}-dev += "dev-elf"
+INSANE_SKIP_${PN}-ptest = "dev-deps"
# catch all the rest (unsorted)
PACKAGES += "${PN}-misc"
@@ -367,7 +369,7 @@ FILES_${PN}-man = "${datadir}/man"
# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
RDEPENDS_libpython3_append_libc-glibc = " libgcc"
RDEPENDS_${PN}-ctypes_append_libc-glibc = " ${MLPREFIX}ldconfig"
-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed"
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev unzip bzip2 libgcc tzdata-europe coreutils sed"
RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9"
RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"
RDEPENDS_${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter tcl', '', d)}"
diff --git a/poky/meta/recipes-devtools/qemu/qemu-native_5.2.0.bb b/poky/meta/recipes-devtools/qemu/qemu-native_6.0.0.bb
index c8acff8e1..d23d7a8ad 100644
--- a/poky/meta/recipes-devtools/qemu/qemu-native_5.2.0.bb
+++ b/poky/meta/recipes-devtools/qemu/qemu-native_6.0.0.bb
@@ -6,4 +6,4 @@ require qemu-native.inc
EXTRA_OECONF_append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "pie"
diff --git a/poky/meta/recipes-devtools/qemu/qemu-system-native_5.2.0.bb b/poky/meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb
index 222b55cbc..9d7d0cdce 100644
--- a/poky/meta/recipes-devtools/qemu/qemu-system-native_5.2.0.bb
+++ b/poky/meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb
@@ -1,5 +1,7 @@
BPN = "qemu"
+inherit python3-dir
+
require qemu-native.inc
# As some of the files installed by qemu-native and qemu-system-native
@@ -9,7 +11,7 @@ DEPENDS = "glib-2.0-native zlib-native pixman-native qemu-native bison-native"
EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
-PACKAGECONFIG ??= "fdt alsa kvm \
+PACKAGECONFIG ??= "fdt alsa kvm pie \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '', d)} \
"
@@ -23,4 +25,7 @@ do_install_append() {
rm -f ${D}${datadir}/qemu/trace-events-all
rm -rf ${D}${datadir}/qemu/keymaps
rm -rf ${D}${datadir}/icons/
+
+ # Install qmp.py to be used with testimage
+ install -D ${S}/python/qemu/qmp.py ${D}${PYTHON_SITEPACKAGES_DIR}/qmp.py
}
diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc
index a62580959..6674936fe 100644
--- a/poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu.inc
@@ -25,20 +25,37 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \
file://0001-Add-enable-disable-udev.patch \
file://0001-qemu-Do-not-include-file-if-not-exists.patch \
- file://mingwfix.patch \
- file://mmap.patch \
file://mmap2.patch \
file://determinism.patch \
file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \
- file://CVE-2021-20203.patch \
+ file://0001-configure-fix-detection-of-gdbus-codegen.patch \
+ file://0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch \
+ file://0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch \
+ file://0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch \
+ file://0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch \
+ file://0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch \
+ file://0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch \
+ file://0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch \
+ file://0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch \
"
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
-SRC_URI[sha256sum] = "cb18d889b628fbe637672b0326789d9b0e3b8027e0445b936537c78549df17bc"
+SRC_URI[sha256sum] = "87bc1a471ca24b97e7005711066007d443423d19aacda3d442558ae032fa30b9"
SRC_URI_append_class-target = " file://cross.patch"
SRC_URI_append_class-nativesdk = " file://cross.patch"
+# Applies against virglrender < 0.6.0 and not qemu itself
+CVE_CHECK_WHITELIST += "CVE-2017-5957"
+
+# The VNC server can expose host files uder some circumstances. We don't
+# enable it by default.
+CVE_CHECK_WHITELIST += "CVE-2007-0998"
+
+# 'The issues identified by this CVE were determined to not constitute a vulnerability.'
+# https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11
+CVE_CHECK_WHITELIST += "CVE-2018-18438"
+
COMPATIBLE_HOST_mipsarchn32 = "null"
COMPATIBLE_HOST_mipsarchn64 = "null"
@@ -56,8 +73,6 @@ do_install_ptest() {
find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {}
# Don't check the file genreated by configure
- sed -i -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \
- ${D}/${PTEST_PATH}/tests/qemu-iotests/common.env
sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh
# Strip the paths from the QEMU variable, we can use PATH
@@ -84,7 +99,7 @@ EXTRA_OECONF = " \
--extra-cflags='${CFLAGS}' \
--extra-ldflags='${LDFLAGS}' \
--with-git=/bin/false \
- --disable-git-update \
+ --with-git-submodules=ignore \
--meson=meson \
${PACKAGECONFIG_CONFARGS} \
"
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
index c99adee8a..4b37967e7 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
@@ -12,13 +12,13 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
configure | 4 ++++
1 file changed, 4 insertions(+)
-Index: qemu-5.2.0/configure
+Index: qemu-6.0.0/configure
===================================================================
---- qemu-5.2.0.orig/configure
-+++ qemu-5.2.0/configure
-@@ -1525,6 +1525,10 @@ for opt do
+--- qemu-6.0.0.orig/configure
++++ qemu-6.0.0/configure
+@@ -1565,6 +1565,10 @@ for opt do
;;
- --disable-libdaxctl) libdaxctl=no
+ --disable-gio) gio=no
;;
+ --enable-libudev) libudev="yes"
+ ;;
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch
new file mode 100644
index 000000000..8bffc3129
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch
@@ -0,0 +1,50 @@
+From 464cfc64201b21386030b8f353fe9724a3413a85 Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Wed, 5 May 2021 10:15:34 -0400
+Subject: [PATCH] configure: fix detection of gdbus-codegen
+
+"pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen",
+and it does not pass test -x (which does not walk the path).
+
+Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1
+assignment in tests/qtest/meson.build uses an empty string as the
+command, and fails very eloquently:
+
+../tests/qtest/meson.build:92:2: ERROR: No program name specified.
+
+Use the "has" function instead of test -x, and fix the generation
+of config-host.mak since meson.build expects that GDBUS_CODEGEN
+is absent, rather than empty, if the tool is unavailable.
+
+Reported-by: Sebastian Mitterle <smitterl@redhat.com>
+Fixes: #178
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commitdiff;h=5ecfb76ccc056eb6127e44268e475827ae73b9e0]
+(not in 6.0.0, should be kept when upgrading)
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+Index: qemu-6.0.0/configure
+===================================================================
+--- qemu-6.0.0.orig/configure
++++ qemu-6.0.0/configure
+@@ -3366,7 +3366,7 @@ if ! test "$gio" = "no"; then
+ gio_cflags=$($pkg_config --cflags gio-2.0)
+ gio_libs=$($pkg_config --libs gio-2.0)
+ gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
+- if [ ! -x "$gdbus_codegen" ]; then
++ if ! has "$gdbus_codegen"; then
+ gdbus_codegen=
+ fi
+ # Check that the libraries actually work -- Ubuntu 18.04 ships
+@@ -5704,6 +5704,8 @@ if test "$gio" = "yes" ; then
+ echo "CONFIG_GIO=y" >> $config_host_mak
+ echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
+ echo "GIO_LIBS=$gio_libs" >> $config_host_mak
++fi
++if test "$gdbus_codegen" != "" ; then
+ echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak
+ fi
+ echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch
new file mode 100644
index 000000000..11b6e3c67
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch
@@ -0,0 +1,35 @@
+From c5844a4cdee37268c9b65a65e6968ee129bb742d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 14 Jun 2021 10:27:17 -0700
+Subject: [PATCH] linux-user: Tag vsx with ieee128 fpbits
+
+In OE we need this for ppc64le usermode to work since we generate 128bit
+long doubles and glibc 2.34 is now checking for this in hwcaps at
+runtime and failing to run the binary if machine does not support 128bit
+IEEE fp
+
+Fixes
+Fatal glibc error: CPU lacks float128 support (POWER 9 or later required)
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ linux-user/elfload.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/linux-user/elfload.c b/linux-user/elfload.c
+index 17ab06f612..e7dd18fd40 100644
+--- a/linux-user/elfload.c
++++ b/linux-user/elfload.c
+@@ -830,7 +830,7 @@ static uint32_t get_elf_hwcap2(void)
+ PPC2_ISA207S), QEMU_PPC_FEATURE2_ARCH_2_07 |
+ QEMU_PPC_FEATURE2_VEC_CRYPTO);
+ GET_FEATURE2(PPC2_ISA300, QEMU_PPC_FEATURE2_ARCH_3_00 |
+- QEMU_PPC_FEATURE2_DARN);
++ QEMU_PPC_FEATURE2_DARN | QEMU_PPC_FEATURE2_HAS_IEEE128);
+
+ #undef GET_FEATURE
+ #undef GET_FEATURE2
+--
+2.32.0
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
index 8ce12bdb4..2f2d19f53 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
@@ -20,10 +20,10 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 93 insertions(+), 1 deletion(-)
-Index: qemu-5.2.0/hw/usb/dev-wacom.c
+Index: qemu-6.0.0/hw/usb/dev-wacom.c
===================================================================
---- qemu-5.2.0.orig/hw/usb/dev-wacom.c
-+++ qemu-5.2.0/hw/usb/dev-wacom.c
+--- qemu-6.0.0.orig/hw/usb/dev-wacom.c
++++ qemu-6.0.0/hw/usb/dev-wacom.c
@@ -69,6 +69,89 @@ static const USBDescStrings desc_strings
[STR_SERIALNUMBER] = "1",
};
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch
index 3fe9aa6eb..b8d288d3a 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-qemu-Do-not-include-file-if-not-exists.patch
@@ -15,11 +15,11 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
linux-user/syscall.c | 2 ++
1 file changed, 2 insertions(+)
-Index: qemu-5.2.0/linux-user/syscall.c
+Index: qemu-6.0.0/linux-user/syscall.c
===================================================================
---- qemu-5.2.0.orig/linux-user/syscall.c
-+++ qemu-5.2.0/linux-user/syscall.c
-@@ -109,7 +109,9 @@
+--- qemu-6.0.0.orig/linux-user/syscall.c
++++ qemu-6.0.0/linux-user/syscall.c
+@@ -113,7 +113,9 @@
#include <linux/blkpg.h>
#include <netpacket/packet.h>
#include <linux/netlink.h>
@@ -28,4 +28,4 @@ Index: qemu-5.2.0/linux-user/syscall.c
+#endif
#include <linux/rtc.h>
#include <sound/asound.h>
- #ifdef CONFIG_BTRFS
+ #ifdef HAVE_BTRFS_H
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
index 5cb5757c3..d5e1ab4d5 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -16,19 +16,16 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
tests/meson.build | 2 +-
1 files changed, 1 insertions(+), 1 deletion(-)
-diff --git a/tests/meson.build b/tests/meson.build
-index afeb6be..54684b5 100644
---- a/tests/meson.build
-+++ b/tests/meson.build
-@@ -113,7 +113,7 @@ tests = {
+Index: qemu-6.0.0/tests/unit/meson.build
+===================================================================
+--- qemu-6.0.0.orig/tests/unit/meson.build
++++ qemu-6.0.0/tests/unit/meson.build
+@@ -42,7 +42,7 @@ tests = {
'test-keyval': [testqapi],
'test-logging': [],
'test-uuid': [],
- 'ptimer-test': ['ptimer-test-stubs.c', meson.source_root() / 'hw/core/ptimer.c'],
-+ 'ptimer-test': ['ptimer-test-stubs.c', '../hw/core/ptimer.c'],
++ 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'],
'test-qapi-util': [],
}
---
-2.29.2
-
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch b/poky/meta/recipes-devtools/qemu/qemu/0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch
new file mode 100644
index 000000000..981c23729
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch
@@ -0,0 +1,43 @@
+CVE: CVE-2021-3545
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From 121841b25d72d13f8cad554363138c360f1250ea Mon Sep 17 00:00:00 2001
+From: Li Qiang <liq3ea@163.com>
+Date: Sat, 15 May 2021 20:03:56 -0700
+Subject: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in
+ virgl_cmd_get_capset_info (CVE-2021-3545)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Otherwise some of the 'resp' will be leaked to guest.
+
+Fixes: CVE-2021-3545
+Reported-by: Li Qiang <liq3ea@163.com>
+virtio-gpu fix: 42a8dadc74 ("virtio-gpu: fix information leak
+in getting capset info dispatch")
+
+Signed-off-by: Li Qiang <liq3ea@163.com>
+Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+Message-Id: <20210516030403.107723-2-liq3ea@163.com>
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+---
+ contrib/vhost-user-gpu/virgl.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
+index 9e6660c7ab..6a332d601f 100644
+--- a/contrib/vhost-user-gpu/virgl.c
++++ b/contrib/vhost-user-gpu/virgl.c
+@@ -128,6 +128,7 @@ virgl_cmd_get_capset_info(VuGpu *g,
+
+ VUGPU_FILL_CMD(info);
+
++ memset(&resp, 0, sizeof(resp));
+ if (info.capset_index == 0) {
+ resp.capset_id = VIRTIO_GPU_CAPSET_VIRGL;
+ virgl_renderer_get_cap_set(resp.capset_id,
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch b/poky/meta/recipes-devtools/qemu/qemu/0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch
new file mode 100644
index 000000000..a9aee47e3
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch
@@ -0,0 +1,41 @@
+CVE: CVE-2021-3544
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From 86dd8fac2acc366930a5dc08d3fb1b1e816f4e1e Mon Sep 17 00:00:00 2001
+From: Li Qiang <liq3ea@163.com>
+Date: Sat, 15 May 2021 20:03:57 -0700
+Subject: [PATCH 2/7] vhost-user-gpu: fix resource leak in
+ 'vg_resource_create_2d' (CVE-2021-3544)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Call 'vugbm_buffer_destroy' in error path to avoid resource leak.
+
+Fixes: CVE-2021-3544
+Reported-by: Li Qiang <liq3ea@163.com>
+Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
+Signed-off-by: Li Qiang <liq3ea@163.com>
+Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+Message-Id: <20210516030403.107723-3-liq3ea@163.com>
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+---
+ contrib/vhost-user-gpu/vhost-user-gpu.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c
+index f73f292c9f..b5e153d0d6 100644
+--- a/contrib/vhost-user-gpu/vhost-user-gpu.c
++++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
+@@ -349,6 +349,7 @@ vg_resource_create_2d(VuGpu *g,
+ g_critical("%s: resource creation failed %d %d %d",
+ __func__, c2d.resource_id, c2d.width, c2d.height);
+ g_free(res);
++ vugbm_buffer_destroy(&res->buffer);
+ cmd->error = VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY;
+ return;
+ }
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index fd54f96b0..733789be2 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -18,13 +18,13 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
hw/mips/malta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: qemu-5.2.0/hw/mips/malta.c
+Index: qemu-6.0.0/hw/mips/malta.c
===================================================================
---- qemu-5.2.0.orig/hw/mips/malta.c
-+++ qemu-5.2.0/hw/mips/malta.c
-@@ -62,7 +62,7 @@
-
- #define ENVP_ADDR 0x80002000l
+--- qemu-6.0.0.orig/hw/mips/malta.c
++++ qemu-6.0.0/hw/mips/malta.c
+@@ -65,7 +65,7 @@
+ #define ENVP_PADDR 0x2000
+ #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
#define ENVP_NB_ENTRIES 16
-#define ENVP_ENTRY_SIZE 256
+#define ENVP_ENTRY_SIZE 1024
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch b/poky/meta/recipes-devtools/qemu/qemu/0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch
new file mode 100644
index 000000000..171848640
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch
@@ -0,0 +1,48 @@
+CVE: CVE-2021-3544
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From b9f79858a614d95f5de875d0ca31096eaab72c3b Mon Sep 17 00:00:00 2001
+From: Li Qiang <liq3ea@163.com>
+Date: Sat, 15 May 2021 20:03:58 -0700
+Subject: [PATCH 3/7] vhost-user-gpu: fix memory leak in
+ vg_resource_attach_backing (CVE-2021-3544)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Check whether the 'res' has already been attach_backing to avoid
+memory leak.
+
+Fixes: CVE-2021-3544
+Reported-by: Li Qiang <liq3ea@163.com>
+virtio-gpu fix: 204f01b309 ("virtio-gpu: fix memory leak
+in resource attach backing")
+
+Signed-off-by: Li Qiang <liq3ea@163.com>
+Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+Message-Id: <20210516030403.107723-4-liq3ea@163.com>
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+---
+ contrib/vhost-user-gpu/vhost-user-gpu.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c
+index b5e153d0d6..0437e52b64 100644
+--- a/contrib/vhost-user-gpu/vhost-user-gpu.c
++++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
+@@ -489,6 +489,11 @@ vg_resource_attach_backing(VuGpu *g,
+ return;
+ }
+
++ if (res->iov) {
++ cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
++ return;
++ }
++
+ ret = vg_create_mapping_iov(g, &ab, cmd, &res->iov);
+ if (ret != 0) {
+ cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch b/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
index a0bd1c5eb..330bcaef0 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
@@ -12,11 +12,11 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
configure | 9 ---------
1 file changed, 9 deletions(-)
-Index: qemu-5.2.0/configure
+Index: qemu-6.0.0/configure
===================================================================
---- qemu-5.2.0.orig/configure
-+++ qemu-5.2.0/configure
-@@ -5001,15 +5001,6 @@ fi
+--- qemu-6.0.0.orig/configure
++++ qemu-6.0.0/configure
+@@ -4648,15 +4648,6 @@ fi
# check if we have valgrind/valgrind.h
valgrind_h=no
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch b/poky/meta/recipes-devtools/qemu/qemu/0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch
new file mode 100644
index 000000000..9fc2fafe1
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch
@@ -0,0 +1,50 @@
+CVE: CVE-2021-3544
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From b7afebcf9e6ecf3cf9b5a9b9b731ed04bca6aa3e Mon Sep 17 00:00:00 2001
+From: Li Qiang <liq3ea@163.com>
+Date: Sat, 15 May 2021 20:03:59 -0700
+Subject: [PATCH 4/7] vhost-user-gpu: fix memory leak while calling
+ 'vg_resource_unref' (CVE-2021-3544)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If the guest trigger following sequences, the attach_backing will be leaked:
+
+ vg_resource_create_2d
+ vg_resource_attach_backing
+ vg_resource_unref
+
+This patch fix this by freeing 'res->iov' in vg_resource_destroy.
+
+Fixes: CVE-2021-3544
+Reported-by: Li Qiang <liq3ea@163.com>
+virtio-gpu fix: 5e8e3c4c75 ("virtio-gpu: fix resource leak
+in virgl_cmd_resource_unref")
+
+Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
+Signed-off-by: Li Qiang <liq3ea@163.com>
+Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+Message-Id: <20210516030403.107723-5-liq3ea@163.com>
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+---
+ contrib/vhost-user-gpu/vhost-user-gpu.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c
+index 0437e52b64..770dfad529 100644
+--- a/contrib/vhost-user-gpu/vhost-user-gpu.c
++++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
+@@ -400,6 +400,7 @@ vg_resource_destroy(VuGpu *g,
+ }
+
+ vugbm_buffer_destroy(&res->buffer);
++ g_free(res->iov);
+ pixman_image_unref(res->image);
+ QTAILQ_REMOVE(&g->reslist, res, next);
+ g_free(res);
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch b/poky/meta/recipes-devtools/qemu/qemu/0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch
new file mode 100644
index 000000000..e70f3c02c
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch
@@ -0,0 +1,58 @@
+CVE: CVE-2021-3544
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From f6091d86ba9ea05f4e111b9b42ee0005c37a6779 Mon Sep 17 00:00:00 2001
+From: Li Qiang <liq3ea@163.com>
+Date: Sat, 15 May 2021 20:04:00 -0700
+Subject: [PATCH 5/7] vhost-user-gpu: fix memory leak in
+ 'virgl_cmd_resource_unref' (CVE-2021-3544)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The 'res->iov' will be leaked if the guest trigger following sequences:
+
+ virgl_cmd_create_resource_2d
+ virgl_resource_attach_backing
+ virgl_cmd_resource_unref
+
+This patch fixes this.
+
+Fixes: CVE-2021-3544
+Reported-by: Li Qiang <liq3ea@163.com>
+virtio-gpu fix: 5e8e3c4c75 ("virtio-gpu: fix resource leak
+in virgl_cmd_resource_unref"
+
+Signed-off-by: Li Qiang <liq3ea@163.com>
+Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+Message-Id: <20210516030403.107723-6-liq3ea@163.com>
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+---
+ contrib/vhost-user-gpu/virgl.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
+index 6a332d601f..c669d73a1d 100644
+--- a/contrib/vhost-user-gpu/virgl.c
++++ b/contrib/vhost-user-gpu/virgl.c
+@@ -108,9 +108,16 @@ virgl_cmd_resource_unref(VuGpu *g,
+ struct virtio_gpu_ctrl_command *cmd)
+ {
+ struct virtio_gpu_resource_unref unref;
++ struct iovec *res_iovs = NULL;
++ int num_iovs = 0;
+
+ VUGPU_FILL_CMD(unref);
+
++ virgl_renderer_resource_detach_iov(unref.resource_id,
++ &res_iovs,
++ &num_iovs);
++ g_free(res_iovs);
++
+ virgl_renderer_resource_unref(unref.resource_id);
+ }
+
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch b/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
index 201125c1f..05dc849da 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
@@ -51,11 +51,11 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
qapi/char.json | 5 +++
3 files changed, 109 insertions(+)
-Index: qemu-5.2.0/chardev/char-socket.c
+Index: qemu-6.0.0/chardev/char-socket.c
===================================================================
---- qemu-5.2.0.orig/chardev/char-socket.c
-+++ qemu-5.2.0/chardev/char-socket.c
-@@ -1308,6 +1308,67 @@ static bool qmp_chardev_validate_socket(
+--- qemu-6.0.0.orig/chardev/char-socket.c
++++ qemu-6.0.0/chardev/char-socket.c
+@@ -1362,6 +1362,67 @@ static bool qmp_chardev_validate_socket(
return true;
}
@@ -123,7 +123,7 @@ Index: qemu-5.2.0/chardev/char-socket.c
static void qmp_chardev_open_socket(Chardev *chr,
ChardevBackend *backend,
-@@ -1316,6 +1377,9 @@ static void qmp_chardev_open_socket(Char
+@@ -1370,6 +1431,9 @@ static void qmp_chardev_open_socket(Char
{
SocketChardev *s = SOCKET_CHARDEV(chr);
ChardevSocket *sock = backend->u.socket.data;
@@ -133,7 +133,7 @@ Index: qemu-5.2.0/chardev/char-socket.c
bool do_nodelay = sock->has_nodelay ? sock->nodelay : false;
bool is_listen = sock->has_server ? sock->server : true;
bool is_telnet = sock->has_telnet ? sock->telnet : false;
-@@ -1381,6 +1445,14 @@ static void qmp_chardev_open_socket(Char
+@@ -1446,6 +1510,14 @@ static void qmp_chardev_open_socket(Char
update_disconnected_filename(s);
@@ -148,7 +148,7 @@ Index: qemu-5.2.0/chardev/char-socket.c
if (s->is_listen) {
if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270,
is_waitconnect, errp) < 0) {
-@@ -1400,6 +1472,9 @@ static void qemu_chr_parse_socket(QemuOp
+@@ -1465,6 +1537,9 @@ static void qemu_chr_parse_socket(QemuOp
const char *host = qemu_opt_get(opts, "host");
const char *port = qemu_opt_get(opts, "port");
const char *fd = qemu_opt_get(opts, "fd");
@@ -158,7 +158,7 @@ Index: qemu-5.2.0/chardev/char-socket.c
#ifdef CONFIG_LINUX
bool tight = qemu_opt_get_bool(opts, "tight", true);
bool abstract = qemu_opt_get_bool(opts, "abstract", false);
-@@ -1407,6 +1482,20 @@ static void qemu_chr_parse_socket(QemuOp
+@@ -1472,6 +1547,20 @@ static void qemu_chr_parse_socket(QemuOp
SocketAddressLegacy *addr;
ChardevSocket *sock;
@@ -179,7 +179,7 @@ Index: qemu-5.2.0/chardev/char-socket.c
if ((!!path + !!fd + !!host) != 1) {
error_setg(errp,
"Exactly one of 'path', 'fd' or 'host' required");
-@@ -1448,13 +1537,24 @@ static void qemu_chr_parse_socket(QemuOp
+@@ -1522,13 +1611,24 @@ static void qemu_chr_parse_socket(QemuOp
sock->tls_creds = g_strdup(qemu_opt_get(opts, "tls-creds"));
sock->has_tls_authz = qemu_opt_get(opts, "tls-authz");
sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz"));
@@ -204,11 +204,11 @@ Index: qemu-5.2.0/chardev/char-socket.c
#ifdef CONFIG_LINUX
q_unix->has_tight = true;
q_unix->tight = tight;
-Index: qemu-5.2.0/chardev/char.c
+Index: qemu-6.0.0/chardev/char.c
===================================================================
---- qemu-5.2.0.orig/chardev/char.c
-+++ qemu-5.2.0/chardev/char.c
-@@ -839,6 +839,9 @@ QemuOptsList qemu_chardev_opts = {
+--- qemu-6.0.0.orig/chardev/char.c
++++ qemu-6.0.0/chardev/char.c
+@@ -840,6 +840,9 @@ QemuOptsList qemu_chardev_opts = {
.name = "path",
.type = QEMU_OPT_STRING,
},{
@@ -218,10 +218,10 @@ Index: qemu-5.2.0/chardev/char.c
.name = "host",
.type = QEMU_OPT_STRING,
},{
-Index: qemu-5.2.0/qapi/char.json
+Index: qemu-6.0.0/qapi/char.json
===================================================================
---- qemu-5.2.0.orig/qapi/char.json
-+++ qemu-5.2.0/qapi/char.json
+--- qemu-6.0.0.orig/qapi/char.json
++++ qemu-6.0.0/qapi/char.json
@@ -250,6 +250,10 @@
#
# @addr: socket address to listen on (server=true)
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch b/poky/meta/recipes-devtools/qemu/qemu/0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch
new file mode 100644
index 000000000..5efb87ca3
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch
@@ -0,0 +1,49 @@
+CVE: CVE-2021-3544
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From 63736af5a6571d9def93769431e0d7e38c6677bf Mon Sep 17 00:00:00 2001
+From: Li Qiang <liq3ea@163.com>
+Date: Sat, 15 May 2021 20:04:01 -0700
+Subject: [PATCH 6/7] vhost-user-gpu: fix memory leak in
+ 'virgl_resource_attach_backing' (CVE-2021-3544)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If 'virgl_renderer_resource_attach_iov' failed, the 'res_iovs' will
+be leaked.
+
+Fixes: CVE-2021-3544
+Reported-by: Li Qiang <liq3ea@163.com>
+virtio-gpu fix: 33243031da ("virtio-gpu-3d: fix memory leak
+in resource attach backing")
+
+Signed-off-by: Li Qiang <liq3ea@163.com>
+Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+Message-Id: <20210516030403.107723-7-liq3ea@163.com>
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+---
+ contrib/vhost-user-gpu/virgl.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
+index c669d73a1d..a16a311d80 100644
+--- a/contrib/vhost-user-gpu/virgl.c
++++ b/contrib/vhost-user-gpu/virgl.c
+@@ -287,8 +287,11 @@ virgl_resource_attach_backing(VuGpu *g,
+ return;
+ }
+
+- virgl_renderer_resource_attach_iov(att_rb.resource_id,
++ ret = virgl_renderer_resource_attach_iov(att_rb.resource_id,
+ res_iovs, att_rb.nr_entries);
++ if (ret != 0) {
++ g_free(res_iovs);
++ }
+ }
+
+ static void
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch b/poky/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
index 294cf5129..3491fa8a5 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
@@ -29,11 +29,11 @@ Signed-off-by: He Zhe <zhe.he@windriver.com>
hw/intc/apic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: qemu-5.2.0/hw/intc/apic.c
+Index: qemu-6.0.0/hw/intc/apic.c
===================================================================
---- qemu-5.2.0.orig/hw/intc/apic.c
-+++ qemu-5.2.0/hw/intc/apic.c
-@@ -605,7 +605,7 @@ int apic_accept_pic_intr(DeviceState *de
+--- qemu-6.0.0.orig/hw/intc/apic.c
++++ qemu-6.0.0/hw/intc/apic.c
+@@ -606,7 +606,7 @@ int apic_accept_pic_intr(DeviceState *de
APICCommonState *s = APIC(dev);
uint32_t lvt0;
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch b/poky/meta/recipes-devtools/qemu/qemu/0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch
new file mode 100644
index 000000000..33e6a6619
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch
@@ -0,0 +1,49 @@
+CVE: CVE-2021-3546
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From 9f22893adcb02580aee5968f32baa2cd109b3ec2 Mon Sep 17 00:00:00 2001
+From: Li Qiang <liq3ea@163.com>
+Date: Sat, 15 May 2021 20:04:02 -0700
+Subject: [PATCH 7/7] vhost-user-gpu: fix OOB write in 'virgl_cmd_get_capset'
+ (CVE-2021-3546)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If 'virgl_cmd_get_capset' set 'max_size' to 0,
+the 'virgl_renderer_fill_caps' will write the data after the 'resp'.
+This patch avoid this by checking the returned 'max_size'.
+
+virtio-gpu fix: abd7f08b23 ("display: virtio-gpu-3d: check
+virgl capabilities max_size")
+
+Fixes: CVE-2021-3546
+Reported-by: Li Qiang <liq3ea@163.com>
+Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
+Signed-off-by: Li Qiang <liq3ea@163.com>
+Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+Message-Id: <20210516030403.107723-8-liq3ea@163.com>
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+---
+ contrib/vhost-user-gpu/virgl.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
+index a16a311d80..7172104b19 100644
+--- a/contrib/vhost-user-gpu/virgl.c
++++ b/contrib/vhost-user-gpu/virgl.c
+@@ -177,6 +177,10 @@ virgl_cmd_get_capset(VuGpu *g,
+
+ virgl_renderer_get_cap_set(gc.capset_id, &max_ver,
+ &max_size);
++ if (!max_size) {
++ cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
++ return;
++ }
+ resp = g_malloc0(sizeof(*resp) + max_size);
+
+ resp->hdr.type = VIRTIO_GPU_RESP_OK_CAPSET;
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch b/poky/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
index c5d206b91..cc6a5fe75 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -14,11 +14,11 @@ Signed-off-by: He Zhe <zhe.he@windriver.com>
configure | 48 ++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 40 insertions(+), 8 deletions(-)
-Index: qemu-5.2.0/configure
+Index: qemu-6.0.0/configure
===================================================================
---- qemu-5.2.0.orig/configure
-+++ qemu-5.2.0/configure
-@@ -2956,6 +2956,30 @@ has_libgcrypt() {
+--- qemu-6.0.0.orig/configure
++++ qemu-6.0.0/configure
+@@ -2847,6 +2847,30 @@ has_libgcrypt() {
return 0
}
@@ -49,7 +49,7 @@ Index: qemu-5.2.0/configure
if test "$nettle" != "no"; then
pass="no"
-@@ -2994,7 +3018,14 @@ fi
+@@ -2885,7 +2909,14 @@ fi
if test "$gcrypt" != "no"; then
pass="no"
@@ -65,7 +65,7 @@ Index: qemu-5.2.0/configure
gcrypt_cflags=$(libgcrypt-config --cflags)
gcrypt_libs=$(libgcrypt-config --libs)
# Debian has removed -lgpg-error from libgcrypt-config
-@@ -3004,12 +3035,12 @@ if test "$gcrypt" != "no"; then
+@@ -2895,12 +2926,12 @@ if test "$gcrypt" != "no"; then
then
gcrypt_libs="$gcrypt_libs -lgpg-error"
fi
diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2021-20203.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2021-20203.patch
deleted file mode 100644
index 269c6f129..000000000
--- a/poky/meta/recipes-devtools/qemu/qemu/CVE-2021-20203.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From: Prasad J Pandit <pjp@fedoraproject.org>
-
-While activating device in vmxnet3_acticate_device(), it does not
-validate guest supplied configuration values against predefined
-minimum - maximum limits. This may lead to integer overflow or
-OOB access issues. Add checks to avoid it.
-
-Fixes: CVE-2021-20203
-Buglink: https://bugs.launchpad.net/qemu/+bug/1913873
-Reported-by: Gaoning Pan <pgn@zju.edu.cn>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-
-Upstream-Status: Acepted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg07935.html]
-CVE: CVE-2021-20203
-Signed-off-by: Minjae Kim <flowergom@gmail.com>
----
- hw/net/vmxnet3.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
-index eff299f629..4a910ca971 100644
---- a/hw/net/vmxnet3.c
-+++ b/hw/net/vmxnet3.c
-@@ -1420,6 +1420,7 @@ static void vmxnet3_activate_device(VMXNET3State *s)
- vmxnet3_setup_rx_filtering(s);
- /* Cache fields from shared memory */
- s->mtu = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.misc.mtu);
-+ assert(VMXNET3_MIN_MTU <= s->mtu && s->mtu < VMXNET3_MAX_MTU);
- VMW_CFPRN("MTU is %u", s->mtu);
-
- s->max_rx_frags =
-@@ -1473,6 +1474,9 @@ static void vmxnet3_activate_device(VMXNET3State *s)
- /* Read rings memory locations for TX queues */
- pa = VMXNET3_READ_TX_QUEUE_DESCR64(d, qdescr_pa, conf.txRingBasePA);
- size = VMXNET3_READ_TX_QUEUE_DESCR32(d, qdescr_pa, conf.txRingSize);
-+ if (size > VMXNET3_TX_RING_MAX_SIZE) {
-+ size = VMXNET3_TX_RING_MAX_SIZE;
-+ }
-
- vmxnet3_ring_init(d, &s->txq_descr[i].tx_ring, pa, size,
- sizeof(struct Vmxnet3_TxDesc), false);
-@@ -1483,6 +1487,9 @@ static void vmxnet3_activate_device(VMXNET3State *s)
- /* TXC ring */
- pa = VMXNET3_READ_TX_QUEUE_DESCR64(d, qdescr_pa, conf.compRingBasePA);
- size = VMXNET3_READ_TX_QUEUE_DESCR32(d, qdescr_pa, conf.compRingSize);
-+ if (size > VMXNET3_TC_RING_MAX_SIZE) {
-+ size = VMXNET3_TC_RING_MAX_SIZE;
-+ }
- vmxnet3_ring_init(d, &s->txq_descr[i].comp_ring, pa, size,
- sizeof(struct Vmxnet3_TxCompDesc), true);
- VMXNET3_RING_DUMP(VMW_CFPRN, "TXC", i, &s->txq_descr[i].comp_ring);
-@@ -1524,6 +1531,9 @@ static void vmxnet3_activate_device(VMXNET3State *s)
- /* RX rings */
- pa = VMXNET3_READ_RX_QUEUE_DESCR64(d, qd_pa, conf.rxRingBasePA[j]);
- size = VMXNET3_READ_RX_QUEUE_DESCR32(d, qd_pa, conf.rxRingSize[j]);
-+ if (size > VMXNET3_RX_RING_MAX_SIZE) {
-+ size = VMXNET3_RX_RING_MAX_SIZE;
-+ }
- vmxnet3_ring_init(d, &s->rxq_descr[i].rx_ring[j], pa, size,
- sizeof(struct Vmxnet3_RxDesc), false);
- VMW_CFPRN("RX queue %d:%d: Base: %" PRIx64 ", Size: %d",
-@@ -1533,6 +1543,9 @@ static void vmxnet3_activate_device(VMXNET3State *s)
- /* RXC ring */
- pa = VMXNET3_READ_RX_QUEUE_DESCR64(d, qd_pa, conf.compRingBasePA);
- size = VMXNET3_READ_RX_QUEUE_DESCR32(d, qd_pa, conf.compRingSize);
-+ if (size > VMXNET3_RC_RING_MAX_SIZE) {
-+ size = VMXNET3_RC_RING_MAX_SIZE;
-+ }
- vmxnet3_ring_init(d, &s->rxq_descr[i].comp_ring, pa, size,
- sizeof(struct Vmxnet3_RxCompDesc), true);
- VMW_CFPRN("RXC queue %d: Base: %" PRIx64 ", Size: %d", i, pa, size);
---
-2.29.2
diff --git a/poky/meta/recipes-devtools/qemu/qemu/cross.patch b/poky/meta/recipes-devtools/qemu/qemu/cross.patch
index 438c1ad08..a0fc39e5e 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/cross.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/cross.patch
@@ -6,19 +6,19 @@ Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Index: qemu-5.2.0/configure
+Index: qemu-6.0.0/configure
===================================================================
---- qemu-5.2.0.orig/configure
-+++ qemu-5.2.0/configure
-@@ -6973,7 +6973,6 @@ if has $sdl2_config; then
+--- qemu-6.0.0.orig/configure
++++ qemu-6.0.0/configure
+@@ -6371,7 +6371,6 @@ if has $sdl2_config; then
fi
echo "strip = [$(meson_quote $strip)]" >> $cross
echo "windres = [$(meson_quote $windres)]" >> $cross
--if test -n "$cross_prefix"; then
+-if test "$cross_compile" = "yes"; then
cross_arg="--cross-file config-meson.cross"
echo "[host_machine]" >> $cross
if test "$mingw32" = "yes" ; then
-@@ -6999,9 +6998,6 @@ if test -n "$cross_prefix"; then
+@@ -6403,9 +6402,6 @@ if test "$cross_compile" = "yes"; then
else
echo "endian = 'little'" >> $cross
fi
diff --git a/poky/meta/recipes-devtools/qemu/qemu/determinism.patch b/poky/meta/recipes-devtools/qemu/qemu/determinism.patch
index cb1c90777..330a31204 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/determinism.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/determinism.patch
@@ -4,38 +4,19 @@ qemu build are not reproducible due to either full buildpaths or timestamps.
Replace the full paths with relative ones. I couldn't figure out how to get
meson to pass relative paths but we can fix that in the script.
-For the keymaps, omit the timestamps as they don't matter to us.
-
Upstream-Status: Pending [some version of all/part of this may be accepted]
RP 2021/3/1
-Index: qemu-5.2.0/scripts/decodetree.py
+Index: qemu-6.0.0/scripts/decodetree.py
===================================================================
---- qemu-5.2.0.orig/scripts/decodetree.py
-+++ qemu-5.2.0/scripts/decodetree.py
-@@ -1303,8 +1303,8 @@ def main():
+--- qemu-6.0.0.orig/scripts/decodetree.py
++++ qemu-6.0.0/scripts/decodetree.py
+@@ -1304,7 +1304,7 @@ def main():
toppat = ExcMultiPattern(0)
for filename in args:
- input_file = filename
-- f = open(filename, 'r')
+ input_file = os.path.relpath(filename)
-+ f = open(input_file, 'r')
+ f = open(filename, 'rt', encoding='utf-8')
parse_file(f, toppat)
f.close()
-
-Index: qemu-5.2.0/ui/keycodemapdb/tools/keymap-gen
-===================================================================
---- qemu-5.2.0.orig/ui/keycodemapdb/tools/keymap-gen
-+++ qemu-5.2.0/ui/keycodemapdb/tools/keymap-gen
-@@ -317,9 +317,8 @@ class LanguageGenerator(object):
- raise NotImplementedError()
-
- def generate_header(self, database, args):
-- today = time.strftime("%Y-%m-%d %H:%M")
- self._boilerplate([
-- "This file is auto-generated from keymaps.csv on %s" % today,
-+ "This file is auto-generated from keymaps.csv",
- "Database checksum sha256(%s)" % database.mapchecksum,
- "To re-generate, run:",
- " %s" % args,
diff --git a/poky/meta/recipes-devtools/qemu/qemu/mingwfix.patch b/poky/meta/recipes-devtools/qemu/qemu/mingwfix.patch
deleted file mode 100644
index 8d76cef63..000000000
--- a/poky/meta/recipes-devtools/qemu/qemu/mingwfix.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-OE assumes that mingw files are in a unix like file layout. The
-'flattening' done by configure in qemu for mingw32 breaks things
-for us. We are discussing with upstream but for now, hack this to
-disable it and use the unix like layout everywhere.
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01073.html]
-
-Index: qemu-5.2.0/configure
-===================================================================
---- qemu-5.2.0.orig/configure
-+++ qemu-5.2.0/configure
-@@ -1541,7 +1541,7 @@ libdir="${libdir:-$prefix/lib}"
- libexecdir="${libexecdir:-$prefix/libexec}"
- includedir="${includedir:-$prefix/include}"
-
--if test "$mingw32" = "yes" ; then
-+if test "$mingw32" = "dontwantthis" ; then
- mandir="$prefix"
- datadir="$prefix"
- docdir="$prefix"
diff --git a/poky/meta/recipes-devtools/qemu/qemu/mmap.patch b/poky/meta/recipes-devtools/qemu/qemu/mmap.patch
deleted file mode 100644
index edd9734f3..000000000
--- a/poky/meta/recipes-devtools/qemu/qemu/mmap.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-If mremap() is called without the MREMAP_MAYMOVE flag with a start address
-just before the end of memory (reserved_va) where new_size would exceed
-GUEST_ADD_MAX, the assert(end - 1 <= GUEST_ADDR_MAX) in page_set_flags()
-would trigger.
-
-Add an extra guard to the guest_range_valid() checks to prevent this and
-avoid asserting binaries when reserved_va is set.
-
-This meant a test case now gives the same behaviour regardless of whether
-reserved_va is set or not.
-
-Upstream-Status: Backport [https://github.com/qemu/qemu/commit/ccc5ccc17f8cfbfd87d9aede5d12a2d47c56e712]
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
-
-Index: qemu-5.2.0/linux-user/mmap.c
-===================================================================
---- qemu-5.2.0.orig/linux-user/mmap.c
-+++ qemu-5.2.0/linux-user/mmap.c
-@@ -727,7 +727,9 @@ abi_long target_mremap(abi_ulong old_add
-
- if (!guest_range_valid(old_addr, old_size) ||
- ((flags & MREMAP_FIXED) &&
-- !guest_range_valid(new_addr, new_size))) {
-+ !guest_range_valid(new_addr, new_size)) ||
-+ ((flags & MREMAP_MAYMOVE) == 0 &&
-+ !guest_range_valid(old_addr, new_size))) {
- errno = ENOMEM;
- return -1;
- }
diff --git a/poky/meta/recipes-devtools/qemu/qemu/mmap2.patch b/poky/meta/recipes-devtools/qemu/qemu/mmap2.patch
index 165213175..e115473b7 100644
--- a/poky/meta/recipes-devtools/qemu/qemu/mmap2.patch
+++ b/poky/meta/recipes-devtools/qemu/qemu/mmap2.patch
@@ -13,27 +13,26 @@ rather than ENOMEM so adjust the other part of the test to this.
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
-Index: qemu-5.2.0/linux-user/mmap.c
+Index: qemu-6.0.0/linux-user/mmap.c
===================================================================
---- qemu-5.2.0.orig/linux-user/mmap.c
-+++ qemu-5.2.0/linux-user/mmap.c
-@@ -722,12 +722,14 @@ abi_long target_mremap(abi_ulong old_add
+--- qemu-6.0.0.orig/linux-user/mmap.c
++++ qemu-6.0.0/linux-user/mmap.c
+@@ -733,12 +733,16 @@ abi_long target_mremap(abi_ulong old_add
int prot;
void *host_addr;
-- if (!guest_range_valid(old_addr, old_size) ||
+- if (!guest_range_valid_untagged(old_addr, old_size) ||
- ((flags & MREMAP_FIXED) &&
-- !guest_range_valid(new_addr, new_size)) ||
-- ((flags & MREMAP_MAYMOVE) == 0 &&
-- !guest_range_valid(old_addr, new_size))) {
-- errno = ENOMEM;
-+ if (!guest_range_valid(old_addr, old_size)) {
++ if (!guest_range_valid_untagged(old_addr, old_size)) {
+ errno = EFAULT;
+ return -1;
+ }
-+
-+ if (((flags & MREMAP_FIXED) && !guest_range_valid(new_addr, new_size)) ||
-+ ((flags & MREMAP_MAYMOVE) == 0 && !guest_range_valid(old_addr, new_size))) {
++
++ if (((flags & MREMAP_FIXED) &&
+ !guest_range_valid_untagged(new_addr, new_size)) ||
+ ((flags & MREMAP_MAYMOVE) == 0 &&
+ !guest_range_valid_untagged(old_addr, new_size))) {
+- errno = ENOMEM;
+ errno = EINVAL;
return -1;
}
diff --git a/poky/meta/recipes-devtools/qemu/qemu_5.2.0.bb b/poky/meta/recipes-devtools/qemu/qemu_6.0.0.bb
index 7afa66e39..90b135a61 100644
--- a/poky/meta/recipes-devtools/qemu/qemu_5.2.0.bb
+++ b/poky/meta/recipes-devtools/qemu/qemu_6.0.0.bb
@@ -19,10 +19,11 @@ do_install_append_class-nativesdk() {
}
PACKAGECONFIG ??= " \
- fdt sdl kvm \
+ fdt sdl kvm pie \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
"
-PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm \
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm pie \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer glx', '', d)} \
"
diff --git a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index 38d755205..d8fcc1672 100644
--- a/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ b/poky/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -1,4 +1,4 @@
-From 9bbe3f8564705aafcdcc5f2f033f9241a97f47c6 Mon Sep 17 00:00:00 2001
+From 7b2dd83d8fcd06af8e583b53da79ed0033793d46 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 27 Feb 2017 09:43:30 +0200
Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
@@ -14,7 +14,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 6c78568e4..76b1d40e4 100644
+index fe35a90fa..b2faec6f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -966,7 +966,7 @@ else
@@ -40,7 +40,7 @@ index 35c8cf9df..9d8b2825c 100644
%_infodir %{_datadir}/info
%_mandir %{_datadir}/man
diff --git a/rpm.am b/rpm.am
-index cd40a16be..e6941e09f 100644
+index 8e1dc2184..3d889ec86 100644
--- a/rpm.am
+++ b/rpm.am
@@ -1,10 +1,10 @@
@@ -55,4 +55,4 @@ index cd40a16be..e6941e09f 100644
+rpmconfigdir = $(libdir)/rpm
# Libtool version (current-revision-age) for all our libraries
- rpm_version_info = 10:2:1
+ rpm_version_info = 10:3:1
diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.16.1.2.bb b/poky/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb
index d369c706a..95a6f5cf7 100644
--- a/poky/meta/recipes-devtools/rpm/rpm_4.16.1.2.bb
+++ b/poky/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb
@@ -43,11 +43,11 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.16.x \
"
PE = "1"
-SRCREV = "278883a704ea36c97974d0f2d65d41abe78b0e2a"
+SRCREV = "3659b8a04f5b8bacf6535e0124e7fe23f15286bd"
S = "${WORKDIR}/git"
-DEPENDS = "libgcrypt db file popt xz bzip2 elfutils python3"
+DEPENDS = "libgcrypt file popt xz bzip2 elfutils python3"
DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
inherit autotools gettext pkgconfig python3native
@@ -70,11 +70,12 @@ EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --disable-plugins"
BBCLASSEXTEND = "native nativesdk"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
+PACKAGECONFIG ??= "bdb ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
# The inhibit plugin serves no purpose outside of the target
PACKAGECONFIG_remove_class-native = "inhibit"
PACKAGECONFIG_remove_class-nativesdk = "inhibit"
+PACKAGECONFIG[bdb] = "--enable-bdb,--disable-bdb,db"
PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus"
PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive"
diff --git a/poky/meta/recipes-devtools/rsync/files/0001-rsync-ssl-Verify-the-hostname-in-the-certificate-whe.patch b/poky/meta/recipes-devtools/rsync/files/0001-rsync-ssl-Verify-the-hostname-in-the-certificate-whe.patch
new file mode 100644
index 000000000..2d51ddf96
--- /dev/null
+++ b/poky/meta/recipes-devtools/rsync/files/0001-rsync-ssl-Verify-the-hostname-in-the-certificate-whe.patch
@@ -0,0 +1,31 @@
+From fbe85634d88e82fbb439ae2a5d1aca8b8c309bea Mon Sep 17 00:00:00 2001
+From: Matt McCutchen <matt@mattmccutchen.net>
+Date: Wed, 26 Aug 2020 12:16:08 -0400
+Subject: [PATCH] rsync-ssl: Verify the hostname in the certificate when using
+ openssl.
+
+CVE: CVE-2020-14387
+
+Upstream-Status: Backport [https://git.samba.org/?p=rsync.git;a=commit;h=c3f7414]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ rsync-ssl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rsync-ssl b/rsync-ssl
+index 8101975..46701af 100755
+--- a/rsync-ssl
++++ b/rsync-ssl
+@@ -129,7 +129,7 @@ function rsync_ssl_helper {
+ fi
+
+ if [[ $RSYNC_SSL_TYPE == openssl ]]; then
+- exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -connect $hostname:$port
++ exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -verify_hostname $hostname -connect $hostname:$port
+ elif [[ $RSYNC_SSL_TYPE == gnutls ]]; then
+ exec $RSYNC_SSL_GNUTLS --logfile=/dev/null $gnutls_cert_opt $gnutls_opts $hostname:$port
+ else
+--
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/rsync/rsync_3.2.3.bb b/poky/meta/recipes-devtools/rsync/rsync_3.2.3.bb
index 8b36a8ebd..cb1866775 100644
--- a/poky/meta/recipes-devtools/rsync/rsync_3.2.3.bb
+++ b/poky/meta/recipes-devtools/rsync/rsync_3.2.3.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \
file://rsyncd.conf \
file://makefile-no-rebuild.patch \
file://determism.patch \
+ file://0001-rsync-ssl-Verify-the-hostname-in-the-certificate-whe.patch \
"
SRC_URI[sha256sum] = "becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e"
diff --git a/poky/meta/recipes-devtools/ruby/ruby_3.0.0.bb b/poky/meta/recipes-devtools/ruby/ruby_3.0.1.bb
index 28e12c3cd..944cb81c1 100644
--- a/poky/meta/recipes-devtools/ruby/ruby_3.0.0.bb
+++ b/poky/meta/recipes-devtools/ruby/ruby_3.0.1.bb
@@ -8,7 +8,7 @@ SRC_URI += " \
file://0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch \
"
-SRC_URI[sha256sum] = "a13ed141a1c18eb967aac1e33f4d6ad5f21be1ac543c344e0d6feeee54af8e28"
+SRC_URI[sha256sum] = "369825db2199f6aeef16b408df6a04ebaddb664fb9af0ec8c686b0ce7ab77727"
PACKAGECONFIG ??= ""
PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index 2b1409d78..137e5097f 100644
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -32,7 +32,9 @@ do_compile() {
}
do_install() {
+ install -d "${D}${includedir}"
oe_runmake install INSTALL_DIR=${D}${sbindir}
+ install -m 0644 "${S}"/squashfs_fs.h "${D}${includedir}"
}
ARM_INSTRUCTION_SET_armv4 = "arm"
diff --git a/poky/meta/recipes-devtools/strace/strace_5.11.bb b/poky/meta/recipes-devtools/strace/strace_5.12.bb
index f6a91df1d..6a8996535 100644
--- a/poky/meta/recipes-devtools/strace/strace_5.11.bb
+++ b/poky/meta/recipes-devtools/strace/strace_5.12.bb
@@ -15,7 +15,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
file://uintptr_t.patch \
file://0001-strace-fix-reproducibilty-issues.patch \
"
-SRC_URI[sha256sum] = "ffe340b10c145a0f85734271e9cce56457d23f21a7ea5931ab32f8cf4e793879"
+SRC_URI[sha256sum] = "29171edf9d252f89c988a4c340dfdec662f458cb8c63d85431d64bab5911e7c4"
inherit autotools ptest
diff --git a/poky/meta/recipes-devtools/swig/swig.inc b/poky/meta/recipes-devtools/swig/swig.inc
index e62718c50..292bca393 100644
--- a/poky/meta/recipes-devtools/swig/swig.inc
+++ b/poky/meta/recipes-devtools/swig/swig.inc
@@ -13,6 +13,8 @@ SECTION = "devel"
DEPENDS = "libpcre bison-native"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/swig/files/swig/"
+UPSTREAM_CHECK_REGEX = "swig-(?P<pver>\d+(\.\d+)+)"
inherit autotools python3native pkgconfig
diff --git a/poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch b/poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
deleted file mode 100644
index 885c39561..000000000
--- a/poky/meta/recipes-devtools/swig/swig/0001-Add-Node-7.x-aka-V8-5.2-support.patch
+++ /dev/null
@@ -1,330 +0,0 @@
-From 1a5aadcd66e85c63d228bfd811a521d617c22a38 Mon Sep 17 00:00:00 2001
-From: Patrick Schneider <patrick.schneider@meetnow.eu>
-Date: Thu, 13 Apr 2017 15:02:53 +0200
-Subject: [PATCH] Add Node 7.x aka V8 5.2+ support
-
-* Use WeakCallbackInfo instead of WeakCallbackData
-* Use GetPrivate instead of GetHiddenValue
-* Adopted new signature for SetWeak to support destructor calling
-* SetAccessor deprecation fixed
-* Proper version checks where applicable
-
-Upstream-Status: Submitted [https://github.com/swig/swig/pull/968]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- Lib/javascript/v8/javascriptcode.swg | 27 +++++++++++++++++-----
- Lib/javascript/v8/javascripthelpers.swg | 29 +++++++++++++++++++++---
- Lib/javascript/v8/javascriptinit.swg | 16 +++++++++++--
- Lib/javascript/v8/javascriptrun.swg | 40 ++++++++++++++++++++++++++++-----
- 4 files changed, 95 insertions(+), 17 deletions(-)
-
-diff --git a/Lib/javascript/v8/javascriptcode.swg b/Lib/javascript/v8/javascriptcode.swg
-index fb7d55c..b8c5089 100644
---- a/Lib/javascript/v8/javascriptcode.swg
-+++ b/Lib/javascript/v8/javascriptcode.swg
-@@ -133,10 +133,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
- SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SWIGV8_Proxy *proxy) {
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
- v8::Local<v8::Object> object = data.GetValue();
- SWIGV8_Proxy *proxy = data.GetParameter();
-+#else
-+ static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
-+ SWIGV8_Proxy *proxy = data.GetParameter();
- #endif
-
- if(proxy->swigCMemOwn && proxy->swigCObject) {
-@@ -147,7 +150,9 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
- }
- delete proxy;
-
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- object.Clear();
-+#endif
-
- #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
- object.Dispose();
-@@ -155,7 +160,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
- object.Dispose(isolate);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032100)
- object->Dispose(isolate);
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- object->Dispose();
- #endif
- }
-@@ -177,10 +182,13 @@ static void $jswrapper(v8::Isolate *isolate, v8::Persistent<v8::Value> object, v
- SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- static void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object> *object, SWIGV8_Proxy *proxy) {
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
- v8::Local<v8::Object> object = data.GetValue();
- SWIGV8_Proxy *proxy = data.GetParameter();
-+#else
-+static void $jswrapper(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
-+ SWIGV8_Proxy *proxy = data.GetParameter();
- #endif
-
- if(proxy->swigCMemOwn && proxy->swigCObject) {
-@@ -197,7 +205,7 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
- object->Dispose(isolate);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- object->Dispose();
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- object.Clear();
- #endif
- }
-@@ -211,7 +219,11 @@ static void $jswrapper(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &dat
- * ----------------------------------------------------------------------------- */
- %fragment("js_getter", "templates")
- %{
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- static SwigV8ReturnValue $jswrapper(v8::Local<v8::String> property, const SwigV8PropertyCallbackInfo &info) {
-+#else
-+static SwigV8ReturnValue $jswrapper(v8::Local<v8::Name> property, const SwigV8PropertyCallbackInfo &info) {
-+#endif
- SWIGV8_HANDLESCOPE();
-
- v8::Handle<v8::Value> jsresult;
-@@ -233,8 +245,11 @@ fail:
- * ----------------------------------------------------------------------------- */
- %fragment("js_setter", "templates")
- %{
--static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
-- const SwigV8PropertyCallbackInfoVoid &info) {
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
-+static void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
-+#else
-+static void $jswrapper(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid &info) {
-+#endif
- SWIGV8_HANDLESCOPE();
-
- $jslocals
-diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
-index 091467d..7461079 100644
---- a/Lib/javascript/v8/javascripthelpers.swg
-+++ b/Lib/javascript/v8/javascripthelpers.swg
-@@ -6,11 +6,16 @@ typedef v8::InvocationCallback SwigV8FunctionCallback;
- typedef v8::AccessorGetter SwigV8AccessorGetterCallback;
- typedef v8::AccessorSetter SwigV8AccessorSetterCallback;
- typedef v8::AccessorInfo SwigV8PropertyCallbackInfoVoid;
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- typedef v8::FunctionCallback SwigV8FunctionCallback;
- typedef v8::AccessorGetterCallback SwigV8AccessorGetterCallback;
- typedef v8::AccessorSetterCallback SwigV8AccessorSetterCallback;
- typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
-+#else
-+typedef v8::FunctionCallback SwigV8FunctionCallback;
-+typedef v8::AccessorNameGetterCallback SwigV8AccessorGetterCallback;
-+typedef v8::AccessorNameSetterCallback SwigV8AccessorSetterCallback;
-+typedef v8::PropertyCallbackInfo<void> SwigV8PropertyCallbackInfoVoid;
- #endif
-
- /**
-@@ -65,18 +70,36 @@ SWIGRUNTIME void SWIGV8_AddStaticFunction(v8::Handle<v8::Object> obj, const char
- */
- SWIGRUNTIME void SWIGV8_AddStaticVariable(v8::Handle<v8::Object> obj, const char* symbol,
- SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) {
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- obj->SetAccessor(SWIGV8_SYMBOL_NEW(symbol), getter, setter);
-+#else
-+ obj->SetAccessor(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), getter, setter);
-+#endif
- }
-
--SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value,
-- const SwigV8PropertyCallbackInfoVoid& info)
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
-+SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::String> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
-+#else
-+SWIGRUNTIME void JS_veto_set_variable(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const SwigV8PropertyCallbackInfoVoid& info)
-+#endif
- {
- char buffer[256];
- char msg[512];
- int res;
-
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- property->WriteUtf8(buffer, 256);
- res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
-+#else
-+ v8::Local<v8::String> sproperty;
-+ if (property->ToString(SWIGV8_CURRENT_CONTEXT()).ToLocal(&sproperty)) {
-+ sproperty->WriteUtf8(buffer, 256);
-+ res = sprintf(msg, "Tried to write read-only variable: %s.", buffer);
-+ }
-+ else {
-+ res = -1;
-+ }
-+#endif
-
- if(res<0) {
- SWIG_exception(SWIG_ERROR, "Tried to write read-only variable.");
-diff --git a/Lib/javascript/v8/javascriptinit.swg b/Lib/javascript/v8/javascriptinit.swg
-index 34befa7..86008d9 100644
---- a/Lib/javascript/v8/javascriptinit.swg
-+++ b/Lib/javascript/v8/javascriptinit.swg
-@@ -7,15 +7,27 @@ SWIG_V8_SetModule(void *, swig_module_info *swig_module) {
- v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
- v8::Local<v8::External> mod = SWIGV8_EXTERNAL_NEW(swig_module);
- assert(!mod.IsEmpty());
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- global_obj->SetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"), mod);
-+#else
-+ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
-+ global_obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, mod);
-+#endif
- }
-
- SWIGRUNTIME swig_module_info *
- SWIG_V8_GetModule(void *) {
- v8::Local<v8::Object> global_obj = SWIGV8_CURRENT_CONTEXT()->Global();
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- v8::Local<v8::Value> moduleinfo = global_obj->GetHiddenValue(SWIGV8_STRING_NEW("swig_module_info_data"));
-+#else
-+ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("swig_module_info_data"));
-+ v8::Local<v8::Value> moduleinfo;
-+ if (!global_obj->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&moduleinfo))
-+ return 0;
-+#endif
-
-- if (moduleinfo.IsEmpty())
-+ if (moduleinfo.IsEmpty() || moduleinfo->IsNull() || moduleinfo->IsUndefined())
- {
- // It's not yet loaded
- return 0;
-@@ -23,7 +35,7 @@ SWIG_V8_GetModule(void *) {
-
- v8::Local<v8::External> moduleinfo_extern = v8::Local<v8::External>::Cast(moduleinfo);
-
-- if (moduleinfo_extern.IsEmpty())
-+ if (moduleinfo_extern.IsEmpty() || moduleinfo_extern->IsNull() || moduleinfo_extern->IsUndefined())
- {
- // Something's not right
- return 0;
-diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
-index 5ac52a5..30002c0 100644
---- a/Lib/javascript/v8/javascriptrun.swg
-+++ b/Lib/javascript/v8/javascriptrun.swg
-@@ -193,8 +193,10 @@ public:
- void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Value> object, void *parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- void (*dtor) (v8::Isolate *isolate, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy);
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- void (*dtor) (const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data);
-+#else
-+ void (*dtor) (const v8::WeakCallbackInfo<SWIGV8_Proxy> &data);
- #endif
- };
-
-@@ -241,9 +243,12 @@ SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Val
- SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(v8::Isolate *, v8::Persistent< v8::Object > *object, SWIGV8_Proxy *proxy) {
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
- SWIGV8_Proxy *proxy = data.GetParameter();
-+#else
-+SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackInfo<SWIGV8_Proxy> &data) {
-+ SWIGV8_Proxy *proxy = data.GetParameter();
- #endif
-
- delete proxy;
-@@ -312,12 +317,18 @@ SWIGRUNTIME void SWIGV8_SetPrivateData(v8::Handle<v8::Object> obj, void *ptr, sw
- } else {
- cdata->handle.MakeWeak(cdata, SWIGV8_Proxy_DefaultDtor);
- }
--#else
-+#elifif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
- cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor);
- } else {
- cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor);
- }
-+#else
-+ if(cdata->swigCMemOwn && (SWIGV8_ClientData*)info->clientdata) {
-+ cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor, v8::WeakCallbackType::kParameter);
-+ } else {
-+ cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor, v8::WeakCallbackType::kParameter);
-+ }
- #endif
-
- #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
-@@ -470,7 +481,14 @@ int SwigV8Packed_Check(v8::Handle<v8::Value> valRef) {
-
- v8::Handle<v8::Object> objRef = valRef->ToObject();
- if(objRef->InternalFieldCount() < 1) return false;
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- v8::Handle<v8::Value> flag = objRef->GetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"));
-+#else
-+ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
-+ v8::Local<v8::Value> flag;
-+ if (!objRef->GetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey).ToLocal(&flag))
-+ return false;
-+#endif
- return (flag->IsBoolean() && flag->BooleanValue());
- }
-
-@@ -519,10 +537,13 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persist
- SwigV8PackedData *cdata = static_cast<SwigV8PackedData *>(parameter);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- SWIGRUNTIME void _wrap_SwigV8PackedData_delete(v8::Isolate *isolate, v8::Persistent<v8::Object> *object, SwigV8PackedData *cdata) {
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Object, SwigV8PackedData> &data) {
- v8::Local<v8::Object> object = data.GetValue();
- SwigV8PackedData *cdata = data.GetParameter();
-+#else
-+SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackInfo<SwigV8PackedData> &data) {
-+ SwigV8PackedData *cdata = data.GetParameter();
- #endif
-
- delete cdata;
-@@ -537,7 +558,7 @@ SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Ob
- object->Dispose(isolate);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- object->Dispose();
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- object.Clear();
- #endif
- }
-@@ -550,7 +571,12 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
- // v8::Handle<v8::Object> obj = SWIGV8_OBJECT_NEW();
- v8::Local<v8::Object> obj = SWIGV8_OBJECT_NEW();
-
-+#if (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- obj->SetHiddenValue(SWIGV8_STRING_NEW("__swig__packed_data__"), SWIGV8_BOOLEAN_NEW(true));
-+#else
-+ v8::Local<v8::Private> privateKey = v8::Private::ForApi(v8::Isolate::GetCurrent(), SWIGV8_STRING_NEW("__swig__packed_data__"));
-+ obj->SetPrivate(SWIGV8_CURRENT_CONTEXT(), privateKey, SWIGV8_BOOLEAN_NEW(true));
-+#endif
-
- #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031511)
- obj->SetPointerInInternalField(0, cdata);
-@@ -573,9 +599,11 @@ v8::Handle<v8::Value> SWIGV8_NewPackedObj(void *data, size_t size, swig_type_inf
- cdata->handle.MakeWeak(v8::Isolate::GetCurrent(), cdata, _wrap_SwigV8PackedData_delete);
- #elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < SWIGV8_SETWEAK_VERSION)
- cdata->handle.MakeWeak(cdata, _wrap_SwigV8PackedData_delete);
--#else
-+#elif (V8_MAJOR_VERSION-0) < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 2)
- cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete);
- // v8::V8::SetWeak(&cdata->handle, cdata, _wrap_SwigV8PackedData_delete);
-+#else
-+ cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete, v8::WeakCallbackType::kParameter);
- #endif
-
- #if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031710)
---
-2.9.5
-
diff --git a/poky/meta/recipes-devtools/swig/swig/0001-Fix-generated-code-for-constant-expressions-containi.patch b/poky/meta/recipes-devtools/swig/swig/0001-Fix-generated-code-for-constant-expressions-containi.patch
deleted file mode 100644
index f4ed782a8..000000000
--- a/poky/meta/recipes-devtools/swig/swig/0001-Fix-generated-code-for-constant-expressions-containi.patch
+++ /dev/null
@@ -1,179 +0,0 @@
-From 90ba174fcea1618af57aa594199541d47a89b7f6 Mon Sep 17 00:00:00 2001
-From: William S Fulton <wsf@fultondesigns.co.uk>
-Date: Sun, 17 Sep 2017 19:02:55 +0100
-Subject: [PATCH 1/2] Fix generated code for constant expressions containing
- wchar_t L literals.
-
-Such as:
- # define __WCHAR_MAX (0x7fffffff + L'\0')
-
-Reported on swig-user mailing list.
----
- CHANGES.current | 5 +++++
- Examples/test-suite/csharp/preproc_constants_c_runme.cs | 3 ++-
- Examples/test-suite/csharp/preproc_constants_runme.cs | 2 ++
- Examples/test-suite/d/preproc_constants_c_runme.1.d | 2 ++
- Examples/test-suite/d/preproc_constants_c_runme.2.d | 2 ++
- Examples/test-suite/d/preproc_constants_runme.1.d | 2 ++
- Examples/test-suite/d/preproc_constants_runme.2.d | 2 ++
- Examples/test-suite/php/preproc_constants_c_runme.php | 2 ++
- Examples/test-suite/php/preproc_constants_runme.php | 2 ++
- Examples/test-suite/php5/preproc_constants_c_runme.php | 2 ++
- Examples/test-suite/php5/preproc_constants_runme.php | 2 ++
- Examples/test-suite/preproc_constants.i | 3 +++
- Source/CParse/parser.y | 2 +-
- 13 files changed, 29 insertions(+), 2 deletions(-)
-
-Upstream-Status: Backport
-[https://github.com/swig/swig/commit/90ba174fcea1618af57aa594199541d47a89b7f6]
-Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
-
-diff --git a/Examples/test-suite/csharp/preproc_constants_c_runme.cs b/Examples/test-suite/csharp/preproc_constants_c_runme.cs
-index 76c684d..1c28e49 100644
---- a/Examples/test-suite/csharp/preproc_constants_c_runme.cs
-+++ b/Examples/test-suite/csharp/preproc_constants_c_runme.cs
-@@ -61,7 +61,8 @@ public class runme {
- assert( typeof(int) == preproc_constants_c.EXPR_LAND.GetType() );
- assert( typeof(int) == preproc_constants_c.EXPR_LOR.GetType() );
- assert( typeof(double) == preproc_constants_c.EXPR_CONDITIONAL.GetType() );
--
-+ assert( typeof(int) == preproc_constants_c.EXPR_WCHAR_MAX.GetType() );
-+ assert( typeof(int) == preproc_constants_c.EXPR_WCHAR_MIN.GetType() );
- }
- static void assert(bool assertion) {
- if (!assertion)
-diff --git a/Examples/test-suite/csharp/preproc_constants_runme.cs b/Examples/test-suite/csharp/preproc_constants_runme.cs
-index 9fae591..6b02e30 100644
---- a/Examples/test-suite/csharp/preproc_constants_runme.cs
-+++ b/Examples/test-suite/csharp/preproc_constants_runme.cs
-@@ -60,6 +60,8 @@ public class runme {
- assert( typeof(bool) == preproc_constants.EXPR_LAND.GetType() );
- assert( typeof(bool) == preproc_constants.EXPR_LOR.GetType() );
- assert( typeof(double) == preproc_constants.EXPR_CONDITIONAL.GetType() );
-+ assert( typeof(int) == preproc_constants.EXPR_WCHAR_MAX.GetType() );
-+ assert( typeof(int) == preproc_constants.EXPR_WCHAR_MIN.GetType() );
-
- }
- static void assert(bool assertion) {
-diff --git a/Examples/test-suite/d/preproc_constants_c_runme.1.d b/Examples/test-suite/d/preproc_constants_c_runme.1.d
-index d846c71..2b349af 100644
---- a/Examples/test-suite/d/preproc_constants_c_runme.1.d
-+++ b/Examples/test-suite/d/preproc_constants_c_runme.1.d
-@@ -61,4 +61,6 @@ void main() {
- static assert(is(int == typeof(EXPR_LAND())));
- static assert(is(int == typeof(EXPR_LOR())));
- static assert(is(double == typeof(EXPR_CONDITIONAL())));
-+ static assert(is(int == typeof(EXPR_WCHAR_MAX())));
-+ static assert(is(int == typeof(EXPR_WCHAR_MIN())));
- }
-diff --git a/Examples/test-suite/d/preproc_constants_c_runme.2.d b/Examples/test-suite/d/preproc_constants_c_runme.2.d
-index 9bdbb93..1bac525 100644
---- a/Examples/test-suite/d/preproc_constants_c_runme.2.d
-+++ b/Examples/test-suite/d/preproc_constants_c_runme.2.d
-@@ -61,4 +61,6 @@ void main() {
- static assert(is(int == typeof(EXPR_LAND())));
- static assert(is(int == typeof(EXPR_LOR())));
- static assert(is(double == typeof(EXPR_CONDITIONAL())));
-+ static assert(is(int == typeof(EXPR_WCHAR_MAX())));
-+ static assert(is(int == typeof(EXPR_WCHAR_MIN())));
- }
-diff --git a/Examples/test-suite/d/preproc_constants_runme.1.d b/Examples/test-suite/d/preproc_constants_runme.1.d
-index 009405f..f743f48 100644
---- a/Examples/test-suite/d/preproc_constants_runme.1.d
-+++ b/Examples/test-suite/d/preproc_constants_runme.1.d
-@@ -60,4 +60,6 @@ void main() {
- static assert(is(bool == typeof(EXPR_LAND())));
- static assert(is(bool == typeof(EXPR_LOR())));
- static assert(is(double == typeof(EXPR_CONDITIONAL())));
-+ static assert(is(int == typeof(EXPR_WCHAR_MAX())));
-+ static assert(is(int == typeof(EXPR_WCHAR_MIN())));
- }
-diff --git a/Examples/test-suite/d/preproc_constants_runme.2.d b/Examples/test-suite/d/preproc_constants_runme.2.d
-index 2d92ef0..0d96c37 100644
---- a/Examples/test-suite/d/preproc_constants_runme.2.d
-+++ b/Examples/test-suite/d/preproc_constants_runme.2.d
-@@ -60,4 +60,6 @@ void main() {
- static assert(is(bool == typeof(EXPR_LAND())));
- static assert(is(bool == typeof(EXPR_LOR())));
- static assert(is(double == typeof(EXPR_CONDITIONAL())));
-+ static assert(is(int == typeof(EXPR_WCHAR_MAX())));
-+ static assert(is(int == typeof(EXPR_WCHAR_MIN())));
- }
-diff --git a/Examples/test-suite/php/preproc_constants_c_runme.php b/Examples/test-suite/php/preproc_constants_c_runme.php
-index af9b76e..e59fe18 100644
---- a/Examples/test-suite/php/preproc_constants_c_runme.php
-+++ b/Examples/test-suite/php/preproc_constants_c_runme.php
-@@ -62,5 +62,7 @@ check::equal(gettype(preproc_constants_c::EXPR_OR), "integer", "preproc_constant
- check::equal(gettype(preproc_constants_c::EXPR_LAND), "integer", "preproc_constants.EXPR_LAND has unexpected type");
- check::equal(gettype(preproc_constants_c::EXPR_LOR), "integer", "preproc_constants.EXPR_LOR has unexpected type");
- check::equal(gettype(preproc_constants_c::EXPR_CONDITIONAL), "double", "preproc_constants.EXPR_CONDITIONAL has unexpected type");
-+check::equal(gettype(preproc_constants_c::EXPR_WCHAR_MAX), "integer", "preproc_constants.EXPR_WCHAR_MAX has unexpected type");
-+check::equal(gettype(preproc_constants_c::EXPR_WCHAR_MIN), "integer", "preproc_constants.EXPR_WCHAR_MIN has unexpected type");
-
- ?>
-diff --git a/Examples/test-suite/php/preproc_constants_runme.php b/Examples/test-suite/php/preproc_constants_runme.php
-index 5c9119b..8e117ea 100644
---- a/Examples/test-suite/php/preproc_constants_runme.php
-+++ b/Examples/test-suite/php/preproc_constants_runme.php
-@@ -61,5 +61,7 @@ check::equal(gettype(preproc_constants::EXPR_OR), "integer", "preproc_constants.
- check::equal(gettype(preproc_constants::EXPR_LAND), "boolean", "preproc_constants.EXPR_LAND has unexpected type");
- check::equal(gettype(preproc_constants::EXPR_LOR), "boolean", "preproc_constants.EXPR_LOR has unexpected type");
- check::equal(gettype(preproc_constants::EXPR_CONDITIONAL), "double", "preproc_constants.EXPR_CONDITIONAL has unexpected type");
-+check::equal(gettype(preproc_constants::EXPR_WCHAR_MAX), "integer", "preproc_constants.EXPR_WCHAR_MAX has unexpected type");
-+check::equal(gettype(preproc_constants::EXPR_WCHAR_MIN), "integer", "preproc_constants.EXPR_WCHAR_MIN has unexpected type");
-
- ?>
-diff --git a/Examples/test-suite/php5/preproc_constants_c_runme.php b/Examples/test-suite/php5/preproc_constants_c_runme.php
-index 1ea0195..d978fab 100644
---- a/Examples/test-suite/php5/preproc_constants_c_runme.php
-+++ b/Examples/test-suite/php5/preproc_constants_c_runme.php
-@@ -62,5 +62,7 @@ check::equal(gettype(preproc_constants_c::EXPR_OR), "integer", "preproc_constant
- check::equal(gettype(preproc_constants_c::EXPR_LAND), "integer", "preproc_constants.EXPR_LAND has unexpected type");
- check::equal(gettype(preproc_constants_c::EXPR_LOR), "integer", "preproc_constants.EXPR_LOR has unexpected type");
- check::equal(gettype(preproc_constants_c::EXPR_CONDITIONAL), "double", "preproc_constants.EXPR_CONDITIONAL has unexpected type");
-+check::equal(gettype(preproc_constants_c::EXPR_WCHAR_MAX), "integer", "preproc_constants.EXPR_WCHAR_MAX has unexpected type");
-+check::equal(gettype(preproc_constants_c::EXPR_WCHAR_MIN), "integer", "preproc_constants.EXPR_WCHAR_MIN has unexpected type");
-
- ?>
-diff --git a/Examples/test-suite/php5/preproc_constants_runme.php b/Examples/test-suite/php5/preproc_constants_runme.php
-index fb9ee4f..7527026 100644
---- a/Examples/test-suite/php5/preproc_constants_runme.php
-+++ b/Examples/test-suite/php5/preproc_constants_runme.php
-@@ -70,5 +70,7 @@ check::equal(gettype(preproc_constants::EXPR_LAND), "integer", "preproc_constant
- check::equal(gettype(preproc_constants::EXPR_LOR), "integer", "preproc_constants.EXPR_LOR has unexpected type");
-
- check::equal(gettype(preproc_constants::EXPR_CONDITIONAL), "double", "preproc_constants.EXPR_CONDITIONAL has unexpected type");
-+check::equal(gettype(preproc_constants::EXPR_WCHAR_MAX), "integer", "preproc_constants.EXPR_WCHAR_MAX has unexpected type");
-+check::equal(gettype(preproc_constants::EXPR_WCHAR_MIN), "integer", "preproc_constants.EXPR_WCHAR_MIN has unexpected type");
-
- ?>
-diff --git a/Examples/test-suite/preproc_constants.i b/Examples/test-suite/preproc_constants.i
-index 3a999ad..16b44c9 100644
---- a/Examples/test-suite/preproc_constants.i
-+++ b/Examples/test-suite/preproc_constants.i
-@@ -87,6 +87,9 @@
- #define EXPR_LOR 0xFF || 1
- #define EXPR_CONDITIONAL true ? 2 : 2.2
-
-+#define EXPR_WCHAR_MAX (0x7fffffff + L'\0')
-+#define EXPR_WCHAR_MIN (-EXPR_WCHAR_MAX - 1)
-+
- #define EXPR_CHAR_COMPOUND_ADD 'A' + 12
- #define EXPR_CHAR_COMPOUND_LSHIFT 'B' << 6
- #define H_SUPPRESS_SCALING_MAGIC (('s'<<24) | ('u'<<16) | ('p'<<8) | 'p')
-diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y
-index 2e92cd0..273dadb 100644
---- a/Source/CParse/parser.y
-+++ b/Source/CParse/parser.y
-@@ -194,7 +194,7 @@ int SWIG_cparse_template_reduce(int treduce) {
- * ----------------------------------------------------------------------------- */
-
- static int promote_type(int t) {
-- if (t <= T_UCHAR || t == T_CHAR) return T_INT;
-+ if (t <= T_UCHAR || t == T_CHAR || t == T_WCHAR) return T_INT;
- return t;
- }
-
---
-2.9.5
-
diff --git a/poky/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch b/poky/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch
index 81df3e264..f27f80ea1 100644
--- a/poky/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch
+++ b/poky/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch
@@ -13,13 +13,11 @@ http://sourceforge.net/mailarchive/message.php?msg_id=29179733
Source/Modules/main.cxx | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
-diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
-index d2f5d3b..cbb0a12 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
-@@ -26,6 +26,11 @@ char cvsroot_main_cxx[] = "$Id$";
- #include "cparse.h"
+@@ -25,6 +25,11 @@
#include <ctype.h>
+ #include <errno.h>
#include <limits.h> // for INT_MAX
+#ifndef _WIN32
+#include <cstddef>
@@ -29,7 +27,7 @@ index d2f5d3b..cbb0a12 100644
// Global variables
-@@ -902,9 +907,9 @@ int SWIG_main(int argc, char *argv[], Language *l) {
+@@ -934,9 +939,9 @@ int SWIG_main(int argc, char *argv[], co
// Check for SWIG_LIB environment variable
if ((c = getenv("SWIG_LIB")) == (char *) 0) {
@@ -40,7 +38,7 @@ index d2f5d3b..cbb0a12 100644
if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) {
*(p + 1) = '\0';
SwigLib = NewStringf("%sLib", buf); // Native windows installation path
-@@ -914,7 +919,22 @@ int SWIG_main(int argc, char *argv[], Language *l) {
+@@ -946,7 +951,22 @@ int SWIG_main(int argc, char *argv[], co
if (Len(SWIG_LIB_WIN_UNIX) > 0)
SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw)
#else
@@ -64,6 +62,3 @@ index d2f5d3b..cbb0a12 100644
#endif
} else {
SwigLib = NewString(c);
---
-1.7.9.5
-
diff --git a/poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch b/poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
index 1b1128aca..114de7ed9 100644
--- a/poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
+++ b/poky/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
@@ -9,11 +9,9 @@ Upstream-Status: pending
configure.ac | 38 +++++++-------------------------------
1 file changed, 7 insertions(+), 31 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index 0c984b7..6edcec1 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -70,38 +70,14 @@ AC_MSG_RESULT([$with_pcre])
+@@ -52,38 +52,14 @@ AC_MSG_RESULT([$with_pcre])
dnl To make configuring easier, check for a locally built PCRE using the Tools/pcre-build.sh script
if test x"${with_pcre}" = xyes ; then
@@ -59,6 +57,3 @@ index 0c984b7..6edcec1 100644
dnl CCache
---
-1.9.3
-
diff --git a/poky/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch b/poky/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch
deleted file mode 100644
index a91385916..000000000
--- a/poky/meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-From b6c0ef4b8f6e5c089ac7104b3aaba8f1d17b8b82 Mon Sep 17 00:00:00 2001
-From: Olly Betts <olly@survex.com>
-Date: Mon, 11 Jun 2018 15:51:53 +1200
-Subject: [PATCH] [Python] Fix new GCC8 warnings in generated code
-
-Avoid casts between incompatible function types where possible (when
-keyword args are in use, it is not possible to avoid such warnings as
-they are inherent in the design of Python's C API in that particular
-case). Fixes #1259.
-
-Upstream-Status: Backport
-[https://github.com/swig/swig/commit/7f9883011029674553a2a4b623d459f02b512458]
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- Lib/python/pyinit.swg | 4 ++--
- Lib/python/pyrun.swg | 34 ++++++++++++++++++++++++++--------
- Source/Modules/python.cxx | 26 +++++++++++++-------------
- 3 files changed, 41 insertions(+), 23 deletions(-)
-
-diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg
-index 2cc5828..6bf68c1 100644
---- a/Lib/python/pyinit.swg
-+++ b/Lib/python/pyinit.swg
-@@ -368,8 +368,8 @@ SWIG_init(void) {
- (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
- };
- static SwigPyGetSet thisown_getset_closure = {
-- (PyCFunction) SwigPyObject_own,
-- (PyCFunction) SwigPyObject_own
-+ SwigPyObject_own,
-+ SwigPyObject_own
- };
- static PyGetSetDef thisown_getset_def = {
- (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
-diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg
-index ab1237f..3d0b1b3 100644
---- a/Lib/python/pyrun.swg
-+++ b/Lib/python/pyrun.swg
-@@ -465,6 +465,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
- return repr;
- }
-
-+/* We need a version taking two PyObject* parameters so it's a valid
-+ * PyCFunction to use in swigobject_methods[]. */
-+SWIGRUNTIME PyObject *
-+SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
-+{
-+ return SwigPyObject_repr((SwigPyObject*)v);
-+}
-+
- SWIGRUNTIME int
- SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
- {
-@@ -594,11 +602,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
- }
-
- SWIGRUNTIME PyObject*
--#ifdef METH_NOARGS
--SwigPyObject_next(PyObject* v)
--#else
- SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
--#endif
- {
- SwigPyObject *sobj = (SwigPyObject *) v;
- if (sobj->next) {
-@@ -633,6 +637,20 @@ SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
- return SWIG_Py_Void();
- }
-
-+#ifdef METH_NOARGS
-+static PyObject*
-+SwigPyObject_disown2(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
-+{
-+ return SwigPyObject_disown(v);
-+}
-+
-+static PyObject*
-+SwigPyObject_acquire2(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
-+{
-+ return SwigPyObject_acquire(v);
-+}
-+#endif
-+
- SWIGINTERN PyObject*
- SwigPyObject_own(PyObject *v, PyObject *args)
- {
-@@ -673,12 +691,12 @@ SwigPyObject_own(PyObject *v, PyObject *args)
- #ifdef METH_O
- static PyMethodDef
- swigobject_methods[] = {
-- {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
-- {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
-+ {(char *)"disown", (PyCFunction)SwigPyObject_disown2, METH_NOARGS, (char *)"releases ownership of the pointer"},
-+ {(char *)"acquire", (PyCFunction)SwigPyObject_acquire2,METH_NOARGS, (char *)"acquires ownership of the pointer"},
- {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
- {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
- {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
-- {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
-+ {(char *)"__repr__",(PyCFunction)SwigPyObject_repr2, METH_NOARGS, (char *)"returns object representation"},
- {0, 0, 0, 0}
- };
- #else
-@@ -689,7 +707,7 @@ swigobject_methods[] = {
- {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
- {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
- {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
-- {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
-+ {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
- {0, 0, 0, 0}
- };
- #endif
-diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
-index a6801fc..72eaa77 100644
---- a/Source/Modules/python.cxx
-+++ b/Source/Modules/python.cxx
-@@ -1109,7 +1109,7 @@ public:
- * ------------------------------------------------------------ */
- int add_pyinstancemethod_new() {
- String *name = NewString("SWIG_PyInstanceMethod_New");
-- Printf(methods, "\t { (char *)\"%s\", (PyCFunction)%s, METH_O, NULL},\n", name, name);
-+ Printf(methods, "\t { \"%s\", %s, METH_O, NULL},\n", name, name);
- Delete(name);
- return 0;
- }
-@@ -2479,17 +2479,17 @@ public:
- if (!kw) {
- if (n && funpack) {
- if (num_required == 0 && num_arguments == 0) {
-- Printf(methods, "\t { (char *)\"%s\", (PyCFunction)%s, METH_NOARGS, ", name, function);
-+ Printf(methods, "\t { \"%s\", %s, METH_NOARGS, ", name, function);
- } else if (num_required == 1 && num_arguments == 1) {
-- Printf(methods, "\t { (char *)\"%s\", (PyCFunction)%s, METH_O, ", name, function);
-+ Printf(methods, "\t { \"%s\", %s, METH_O, ", name, function);
- } else {
-- Printf(methods, "\t { (char *)\"%s\", %s, METH_VARARGS, ", name, function);
-+ Printf(methods, "\t { \"%s\", %s, METH_VARARGS, ", name, function);
- }
- } else {
-- Printf(methods, "\t { (char *)\"%s\", %s, METH_VARARGS, ", name, function);
-+ Printf(methods, "\t { \"%s\", %s, METH_VARARGS, ", name, function);
- }
- } else {
-- Printf(methods, "\t { (char *)\"%s\", (PyCFunction) %s, METH_VARARGS | METH_KEYWORDS, ", name, function);
-+ Printf(methods, "\t { \"%s\", (PyCFunction)%s, METH_VARARGS|METH_KEYWORDS, ", name, function);
- }
-
- if (!n) {
-@@ -3857,7 +3857,7 @@ public:
- if (shadow) {
- if (builtin) {
- String *rname = SwigType_namestr(real_classname);
-- Printf(builtin_methods, " { \"__disown__\", (PyCFunction) Swig::Director::swig_pyobj_disown< %s >, METH_NOARGS, \"\" },\n", rname);
-+ Printf(builtin_methods, " { \"__disown__\", Swig::Director::swig_pyobj_disown< %s >, METH_NOARGS, \"\" },\n", rname);
- Delete(rname);
- } else {
- String *symname = Getattr(n, "sym:name");
-@@ -4694,13 +4694,13 @@ public:
- int argcount = Getattr(n, "python:argcount") ? atoi(Char(Getattr(n, "python:argcount"))) : 2;
- String *ds = have_docstring(n) ? cdocstring(n, AUTODOC_FUNC) : NewString("");
- if (check_kwargs(n)) {
-- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_VARARGS|METH_KEYWORDS, (char *) \"%s\" },\n", symname, wname, ds);
-+ Printf(builtin_methods, " { \"%s\", (PyCFunction)%s, METH_VARARGS|METH_KEYWORDS, \"%s\" },\n", symname, wname, ds);
- } else if (argcount == 0) {
-- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_NOARGS, (char *) \"%s\" },\n", symname, wname, ds);
-+ Printf(builtin_methods, " { \"%s\", %s, METH_NOARGS, \"%s\" },\n", symname, wname, ds);
- } else if (argcount == 1) {
-- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_O, (char *) \"%s\" },\n", symname, wname, ds);
-+ Printf(builtin_methods, " { \"%s\", %s, METH_O, \"%s\" },\n", symname, wname, ds);
- } else {
-- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, METH_VARARGS, (char *) \"%s\" },\n", symname, wname, ds);
-+ Printf(builtin_methods, " { \"%s\", %s, METH_VARARGS, \"%s\" },\n", symname, wname, ds);
- }
- Delete(fullname);
- Delete(wname);
-@@ -4801,10 +4801,10 @@ public:
- Append(pyflags, "METH_VARARGS");
- if (have_docstring(n)) {
- String *ds = cdocstring(n, AUTODOC_STATICFUNC);
-- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, %s, (char *) \"%s\" },\n", symname, wname, pyflags, ds);
-+ Printf(builtin_methods, " { \"%s\", (PyCFunction)%s, %s, \"%s\" },\n", symname, wname, pyflags, ds);
- Delete(ds);
- } else {
-- Printf(builtin_methods, " { \"%s\", (PyCFunction) %s, %s, \"\" },\n", symname, wname, pyflags);
-+ Printf(builtin_methods, " { \"%s\", (PyCFunction)%s, %s, \"\" },\n", symname, wname, pyflags);
- }
- Delete(fullname);
- Delete(wname);
---
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/swig/swig/determinism.patch b/poky/meta/recipes-devtools/swig/swig/determinism.patch
index 8ffb4bce8..84c399182 100644
--- a/poky/meta/recipes-devtools/swig/swig/determinism.patch
+++ b/poky/meta/recipes-devtools/swig/swig/determinism.patch
@@ -5,11 +5,9 @@ Upstream-Status: Inappropriate [OE reproducibiity fix upstream unlikely to take]
RP 2021/3/1
-Index: swig-3.0.12/Source/Modules/main.cxx
-===================================================================
---- swig-3.0.12.orig/Source/Modules/main.cxx
-+++ swig-3.0.12/Source/Modules/main.cxx
-@@ -636,7 +636,6 @@ void SWIG_getoptions(int argc, char *arg
+--- a/Source/Modules/main.cxx
++++ b/Source/Modules/main.cxx
+@@ -642,7 +642,6 @@ static void getoptions(int argc, char *a
}
} else if (strcmp(argv[i], "-version") == 0) {
fprintf(stdout, "\nSWIG Version %s\n", Swig_package_version());
diff --git a/poky/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch b/poky/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch
deleted file mode 100644
index 10e4afd1b..000000000
--- a/poky/meta/recipes-devtools/swig/swig/swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 9825fcbab5c4ddd867432f9922bebfbec7b78af0 Mon Sep 17 00:00:00 2001
-From: Mark Dufour <m.dufour@kopano.com>
-Date: Tue, 14 Feb 2017 10:34:37 +0100
-Subject: [PATCH] [Coverity] fix issue reported for SWIG_Python_FixMethods
-
-Fix Coverity issue reported for SWIG_Python_FixMethods:
-
-"buffer_size: Calling strncpy with a source string whose length
-(10 chars) is greater than or equal to the size argument (10)
-will fail to null-terminate buff."
-
-The issue is only reported for the "swig_ptr: " line, but for
-consistency we replace both occurrences of strncpy with memcpy.
----
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport [https://github.com/swig/swig/pull/898]
-
- Lib/python/pyinit.swg | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: swig-3.0.12/Lib/python/pyinit.swg
-===================================================================
---- swig-3.0.12.orig/Lib/python/pyinit.swg
-+++ swig-3.0.12/Lib/python/pyinit.swg
-@@ -306,9 +306,9 @@ SWIG_Python_FixMethods(PyMethodDef *meth
- char *ndoc = (char*)malloc(ldoc + lptr + 10);
- if (ndoc) {
- char *buff = ndoc;
-- strncpy(buff, methods[i].ml_doc, ldoc);
-+ memcpy(buff, methods[i].ml_doc, ldoc);
- buff += ldoc;
-- strncpy(buff, "swig_ptr: ", 10);
-+ memcpy(buff, "swig_ptr: ", 10);
- buff += 10;
- SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
- methods[i].ml_doc = ndoc;
diff --git a/poky/meta/recipes-devtools/swig/swig_3.0.12.bb b/poky/meta/recipes-devtools/swig/swig_3.0.12.bb
deleted file mode 100644
index 090aaa811..000000000
--- a/poky/meta/recipes-devtools/swig/swig_3.0.12.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
- file://0001-configure-use-pkg-config-for-pcre-detection.patch \
- file://0001-Add-Node-7.x-aka-V8-5.2-support.patch \
- file://swig-3.0.12-Coverity-fix-issue-reported-for-SWIG_Python_FixMetho.patch \
- file://Python-Fix-new-GCC8-warnings-in-generated-code.patch \
- file://0001-Fix-generated-code-for-constant-expressions-containi.patch \
- file://determinism.patch \
- "
-SRC_URI[md5sum] = "82133dfa7bba75ff9ad98a7046be687c"
-SRC_URI[sha256sum] = "7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d"
-
diff --git a/poky/meta/recipes-devtools/swig/swig_4.0.2.bb b/poky/meta/recipes-devtools/swig/swig_4.0.2.bb
new file mode 100644
index 000000000..718ad89a5
--- /dev/null
+++ b/poky/meta/recipes-devtools/swig/swig_4.0.2.bb
@@ -0,0 +1,7 @@
+require ${BPN}.inc
+
+SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
+ file://0001-configure-use-pkg-config-for-pcre-detection.patch \
+ file://determinism.patch \
+ "
+SRC_URI[sha256sum] = "d53be9730d8d58a16bf0cbd1f8ac0c0c3e1090573168bfa151b01eb47fa906fc"
diff --git a/poky/meta/recipes-devtools/tcf-agent/tcf-agent/0001-Fixed-copyright-messages.patch b/poky/meta/recipes-devtools/tcf-agent/tcf-agent/0001-Fixed-copyright-messages.patch
new file mode 100644
index 000000000..ed73808e9
--- /dev/null
+++ b/poky/meta/recipes-devtools/tcf-agent/tcf-agent/0001-Fixed-copyright-messages.patch
@@ -0,0 +1,56 @@
+From 20ac1f939a8a97b03abec55d865050fdaa0f343a Mon Sep 17 00:00:00 2001
+From: Eugene Tarassov <eugenet@xilinx.com>
+Date: Tue, 8 Jan 2019 21:56:16 -0800
+Subject: [oe-core][PATCH 1/1] Fixed copyright messages
+
+Upstream-Status: Backport [https://git.eclipse.org/c/tcf/org.eclipse.tcf.agent.git/commit/?id=20ac1f939a8a97b03abec55d865050fdaa0f343a]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ agent/tcf/framework/channel_lws.c | 2 +-
+ agent/tcf/framework/cpudefs-mdep-mux.h | 19 +++++++++++++------
+ 2 files changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/agent/tcf/framework/channel_lws.c b/agent/tcf/framework/channel_lws.c
+index 0cb9585..d9352f3 100644
+--- a/tcf/framework/channel_lws.c
++++ b/tcf/framework/channel_lws.c
+@@ -1,5 +1,5 @@
+ /*******************************************************************************
+- * Copyright (c) 2016-2017 Wind River Systems, Inc.
++ * Copyright (c) 2016-2018 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and Eclipse Distribution License v1.0 which accompany this distribution.
+diff --git a/agent/tcf/framework/cpudefs-mdep-mux.h b/agent/tcf/framework/cpudefs-mdep-mux.h
+index c9e0db7..0397a6a 100644
+--- a/tcf/framework/cpudefs-mdep-mux.h
++++ b/tcf/framework/cpudefs-mdep-mux.h
+@@ -1,10 +1,17 @@
+-/*
+- * Copyright (c) 2013 Wind River Systems, Inc.
++/*******************************************************************************
++ * Copyright (c) 2013 Wind River Systems, Inc. and others.
++ * All rights reserved. This program and the accompanying materials
++ * are made available under the terms of the Eclipse Public License v1.0
++ * and Eclipse Distribution License v1.0 which accompany this distribution.
++ * The Eclipse Public License is available at
++ * http://www.eclipse.org/legal/epl-v10.html
++ * and the Eclipse Distribution License is available at
++ * http://www.eclipse.org/org/documents/edl-v10.php.
++ * You may elect to redistribute this code under either of these licenses.
+ *
+- * The right to copy, distribute, modify or otherwise make use
+- * of this software may be licensed only pursuant to the terms
+- * of an applicable Wind River license agreement.
+- */
++ * Contributors:
++ * Wind River Systems - initial API and implementation
++ *******************************************************************************/
+
+ #include <tcf/config.h>
+
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index 854269a0f..87369c47d 100644
--- a/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -15,6 +15,7 @@ SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent \
file://ldflags.patch \
file://tcf-agent.init \
file://tcf-agent.service \
+ file://0001-Fixed-copyright-messages.patch \
"
DEPENDS = "util-linux openssl"
diff --git a/poky/meta/recipes-devtools/unfs3/unfs3_git.bb b/poky/meta/recipes-devtools/unfs3/unfs3_git.bb
index a21fb5839..f9bae720c 100644
--- a/poky/meta/recipes-devtools/unfs3/unfs3_git.bb
+++ b/poky/meta/recipes-devtools/unfs3/unfs3_git.bb
@@ -37,7 +37,7 @@ BBCLASSEXTEND = "native nativesdk"
inherit autotools
EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
CFLAGS_append = " -I${STAGING_INCDIR}/tirpc"
-LDFLAGS_append = " -ltirpc"
+EXTRA_OECONF_append = " LIBS=-ltirpc"
# Turn off these header detects else the inode search
# will walk entire file systems and this is a real problem
diff --git a/poky/meta/recipes-devtools/vala/vala_0.50.4.bb b/poky/meta/recipes-devtools/vala/vala_0.52.4.bb
index 438163551..8e2869d40 100644
--- a/poky/meta/recipes-devtools/vala/vala_0.50.4.bb
+++ b/poky/meta/recipes-devtools/vala/vala_0.52.4.bb
@@ -2,4 +2,4 @@ require ${BPN}.inc
SRC_URI += " file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch"
-SRC_URI[sha256sum] = "58fc31fa8bf492035b11d1a7d514801710afc65bd458b24c0f8d00280a92a38c"
+SRC_URI[sha256sum] = "ecde520e5160e659ee699f8b1cdc96065edbd44bbd08eb48ef5f2506751fdf31"
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Add-missing-musl.supp.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Add-missing-musl.supp.patch
new file mode 100644
index 000000000..2a73f7e81
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Add-missing-musl.supp.patch
@@ -0,0 +1,72 @@
+From 61bc8664f93cd980831c9da4a3e8a385b089a0ab Mon Sep 17 00:00:00 2001
+From: Yi Fan Yu <yifan.yu@windriver.com>
+Date: Tue, 23 Mar 2021 09:32:22 -0700
+Subject: [PATCH] Add missing musl.supp
+
+3.17 did not ship musl.supp in the tarball.
+
+This is a workaround until next release.
+
+Upstream-Status: Backport [dde556d51f8226a6de564a00bf82536bb7042c54]
+
+Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
+---
+ musl.supp | 46 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 46 insertions(+)
+ create mode 100644 musl.supp
+
+diff --git a/musl.supp b/musl.supp
+new file mode 100644
+index 000000000..864172a24
+--- /dev/null
++++ b/musl.supp
+@@ -0,0 +1,46 @@
++# Suppressions for musl libc
++# See: https://www.openwall.com/lists/musl/2017/06/15/4
++
++{
++ musl-dynlink-false-positive1
++ Memcheck:Leak
++ fun:calloc
++ fun:load_direct_deps
++ fun:load_deps
++ fun:load_deps
++ fun:__dls3
++ fun:__dls2b
++ fun:__dls2
++}
++
++{
++ musl-dynlink-false-positive2
++ Memcheck:Leak
++ fun:calloc
++ fun:load_direct_deps
++ fun:load_deps
++ fun:load_deps
++ fun:__dls3
++ fun:__dls2
++}
++
++{
++ musl-dynlink-false-positive3
++ Memcheck:Leak
++ fun:calloc
++ fun:load_library
++ fun:load_preload
++ fun:__dls3
++ fun:__dls2b
++ fun:__dls2
++}
++
++{
++ musl-dynlink-false-positive4
++ Memcheck:Leak
++ fun:calloc
++ fun:load_library
++ fun:load_preload
++ fun:__dls3
++ fun:__dls2
++}
+--
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-nlcontrolc.vgtest-hanging-on-newer-glibc-and-or-.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-nlcontrolc.vgtest-hanging-on-newer-glibc-and-or-.patch
deleted file mode 100644
index 98cbcd132..000000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-Fix-nlcontrolc.vgtest-hanging-on-newer-glibc-and-or-.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-From 83c24e31df6932a6d4fced179050c6d8d8c6f3b5 Mon Sep 17 00:00:00 2001
-From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
-Date: Sun, 7 Mar 2021 22:29:27 +0100
-Subject: [PATCH] Fix nlcontrolc.vgtest hanging on newer glibc and/or arm64
-
-This test verifies that GDB can interrupt a process with all threads
-blocked in a long select syscall.
-The test used to terminate by having GDB modifying the select argument.
-However, modifying the select argument works only for specific arch
-and/or specific versions of glibc.
-The test then blocks on other architectures/glibc versions.
-
-The previous version of the test was:
- * first launching sleepers so as to have all threads blocked in long select
- * interrupting these threads
- * changing the select time arg so that the threads burn cpu
- * and then change variables to have the program exit.
-
-The new version does:
- * first launches sleepers so that all threads are burning cpu.
- * interrupting these threads
- * change the local variables of sleepers so that the threads will
- block in a long select syscall
- * interrupt these threads
- * kill the program.
-
-With this new version, we still check the behaviour of gdb+vgdbserver
-for both burning and sleep threads, but without having the termination
-depending on modifying select syscall argument.
-
-Tested on debian amd64 and on ubuntu arm64 (to check the test does not hang
-on an arm64 platform).
-
-Upstream-Status: Backport
-
-From commit on master:
-c79180a3afcf65902e578646c3b716cc749db406
-
-Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
----
- gdbserver_tests/nlcontrolc.stderr.exp | 4 +-
- gdbserver_tests/nlcontrolc.stdinB.gdb | 57 +++++++++++++++-----------
- gdbserver_tests/nlcontrolc.stdoutB.exp | 25 ++++++-----
- gdbserver_tests/nlcontrolc.vgtest | 12 +++---
- 4 files changed, 56 insertions(+), 42 deletions(-)
-
-diff --git a/gdbserver_tests/nlcontrolc.stderr.exp b/gdbserver_tests/nlcontrolc.stderr.exp
-index ac75bb3da..b63a9a988 100644
---- a/gdbserver_tests/nlcontrolc.stderr.exp
-+++ b/gdbserver_tests/nlcontrolc.stderr.exp
-@@ -3,9 +3,9 @@ Nulgrind, the minimal Valgrind tool
- (action at startup) vgdb me ...
-
-
--loops/sleep_ms/burn/threads_spec/affinity: 1000000000 1000000000 1000000000 BSBSBSBS 1
-+loops/sleep_ms/burn/threads_spec/affinity: 1000000000 0 100000 BSBSBSBS 1
- Brussels ready to sleep and/or burn
- London ready to sleep and/or burn
- Petaouchnok ready to sleep and/or burn
- main ready to sleep and/or burn
--
-+Gdb request to kill this process
-diff --git a/gdbserver_tests/nlcontrolc.stdinB.gdb b/gdbserver_tests/nlcontrolc.stdinB.gdb
-index 667ece18d..ea4fcd530 100644
---- a/gdbserver_tests/nlcontrolc.stdinB.gdb
-+++ b/gdbserver_tests/nlcontrolc.stdinB.gdb
-@@ -9,32 +9,43 @@ shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep main nl
- #
- continue
- #
--# Here, all tasks should be blocked in a loooonnnng select, all in WaitSys
--info threads
--# We will unblock them by changing their timeout argument
--# To avoid going into the frame where the timeval arg is,
--# it has been defined as global variables, as the nr
--# of calls on the stack differs between 32bits and 64bits,
--# and/or between OS.
--# ensure select finishes in a few milliseconds max:
--p t[0].tv_sec = 0
--p t[1].tv_sec = 0
--p t[2].tv_sec = 0
--p t[3].tv_sec = 0
--#
--# We will change the burning parameters in a few seconds
-+# Threads are burning cpu now
-+# We would like to fully test info threads here, but which thread are Runnable
-+# or Yielding is unpredictable. With a recent enough gdb, check the nr of
-+# threads by state using pipe commands and grep/wc.
-+init-if-undefined $_gdb_major = 0
-+init-if-undefined $_gdb_minor = 0
-+if $_gdb_major >= 9
-+ | info threads | grep VgTs_Runnable | wc -l
-+ | info threads | grep VgTs_Yielding | wc -l
-+else
-+ echo 1\n
-+ echo 3\n
-+end
-+# We change the variables so that all the threads are blocked in a syscall
-+p burn = 0
-+p sleepms = 1000000
-+#
-+#
- shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep changed nlcontrolc.stdoutB.out
- #
--echo changed burning parameters\n
-+echo changed burning parameters to sleeping parameters\n
- continue
-+# Here, all tasks should be blocked in a loooonnnng select, all in WaitSys
-+info threads
-+# We reset the sleepms to 0. The threads should still be blocked in the syscall
-+p sleepms = 0
-+shell ./simulate_control_c --vgdb-prefix=./vgdb-prefix-nlcontrolc 1 grep reset nlcontrolc.stdoutB.out
- #
--# Threads are burning cpu now
--# We would like to test info threads here, but which thread are Runnable or Yielding
--# is unpredictable.
--# info threads
--p burn = 0
--p loops = 0
--p report_finished = 0
-+echo reset to sleeping parameters\n
- continue
--# and the process should stop very quickly now
-+# threads should still be blocked in a loooonnnng select, all in WaitSys
-+info threads
-+if $_gdb_major >= 9
-+ | info threads | grep VgTs_WaitSys | wc -l
-+else
-+ echo 4\n
-+end
-+# Make the process die.
-+kill
- quit
-diff --git a/gdbserver_tests/nlcontrolc.stdoutB.exp b/gdbserver_tests/nlcontrolc.stdoutB.exp
-index e8a5ff8ba..2e8dc8498 100644
---- a/gdbserver_tests/nlcontrolc.stdoutB.exp
-+++ b/gdbserver_tests/nlcontrolc.stdoutB.exp
-@@ -1,18 +1,21 @@
- Continuing.
- Program received signal SIGTRAP, Trace/breakpoint trap.
-+do_burn () at sleepers.c:41
-+41 for (i = 0; i < burn; i++) loopnr++;
-+ > > > > > >1
-+3
-+$1 = 0
-+$2 = 1000000
-+changed burning parameters to sleeping parameters
-+Continuing.
-+Program received signal SIGTRAP, Trace/breakpoint trap.
- 0x........ in syscall ...
- * 1 Thread .... (tid 1 VgTs_WaitSys) 0x........ in syscall ...
--$1 = 0
--$2 = 0
- $3 = 0
--$4 = 0
--changed burning parameters
-+reset to sleeping parameters
- Continuing.
- Program received signal SIGTRAP, Trace/breakpoint trap.
--do_burn () at sleepers.c:41
--41 for (i = 0; i < burn; i++) loopnr++;
--$5 = 0
--$6 = 0
--$7 = 0
--Continuing.
--Program exited normally.
-+0x........ in syscall ...
-+* 1 Thread .... (tid 1 VgTs_WaitSys) 0x........ in syscall ...
-+ > > > >4
-+Kill the program being debugged? (y or n) [answered Y; input not from terminal]
-diff --git a/gdbserver_tests/nlcontrolc.vgtest b/gdbserver_tests/nlcontrolc.vgtest
-index bb5308403..09edfcaba 100644
---- a/gdbserver_tests/nlcontrolc.vgtest
-+++ b/gdbserver_tests/nlcontrolc.vgtest
-@@ -4,16 +4,16 @@
- # and modify some variables
- # the user can control-c an process with all threads in Running/Yielding
- # and modify some variables
--# sleepers is started with argument so that it will compute during ages.
--# The variable modifications means it will exit in a reasonable time.
--# This test is disabled on Solaris because modifying select/poll/ppoll timeout
--# has no effect if a thread is already blocked in that syscall.
-+# sleepers is started so that it burns CPU.
-+# We then interrupt the process.
-+# We modify variables so that instead of burning cpu, sleepers blocks
-+# all threads in a select syscall.
- prog: sleepers
--args: 1000000000 1000000000 1000000000 BSBSBSBS 1
-+args: 1000000000 0 100000 BSBSBSBS 1
- vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-nlcontrolc
- stderr_filter: filter_stderr
- # Bug 338633 nlcontrol hangs on arm64 currently.
--prereq: test -e gdb -a -f vgdb.invoker && ! ../tests/arch_test arm64 && ! ../tests/os_test solaris
-+prereq: test -e gdb -a -f vgdb.invoker && ! ../tests/os_test solaris
- progB: gdb
- argsB: --quiet -l 60 --nx ./sleepers
- stdinB: nlcontrolc.stdinB.gdb
---
-2.29.2
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch
deleted file mode 100644
index 37f6ea667..000000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-Port-to-Fedora-33.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 15330adf7c2471fbaa6a0818db07078d81dbff97 Mon Sep 17 00:00:00 2001
-From: Bart Van Assche <bvanassche@acm.org>
-Date: Sat, 19 Sep 2020 08:08:59 -0700
-Subject: [PATCH] drd: Port to Fedora 33
-
-Apparently on Fedora 33 the POSIX thread functions exist in both libc and
-libpthread. Hence this patch that intercepts the pthread functions in
-libc. See also https://bugs.kde.org/show_bug.cgi?id=426144 .
-
-Signed-off-by: Bart Van Assche <bvanassche@acm.org>
-
-This patch was imported from the valgrind sourceware server
-(https://sourceware.org/git/?p=valgrind.git;a=commit;h=15330adf7c2471fbaa6a0818db07078d81dbff97)
-It was modified to remove the changes to the valgrind NEWS file,
-as these are difficult to maintain and don't impact the valgrind
-code itself.
-
-Upstream-Status: Backport
-
-Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com>
----
- drd/drd_pthread_intercepts.c | 9 +++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c
-index 58c45aaec..c2882e5ab 100644
---- a/drd/drd_pthread_intercepts.c
-+++ b/drd/drd_pthread_intercepts.c
-@@ -174,7 +174,16 @@ static int never_true;
- ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl \
- { return implf argl; }
- #else
-+/*
-+ * On Linux, intercept both the libc and the libpthread functions. At
-+ * least glibc 2.32.9000 (Fedora 34) has an implementation of all pthread
-+ * functions in both libc and libpthread. Older glibc versions only have an
-+ * implementation of the pthread functions in libpthread.
-+ */
- #define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \
-+ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl; \
-+ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl \
-+ { return implf argl; } \
- ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \
- ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \
- { return implf argl; }
---
-2.25.1
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-musl-fix.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-musl-fix.patch
deleted file mode 100644
index e96bf3c61..000000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-musl-fix.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-The changes in 0001-drd-Port-to-Fedora-33.patch break builds on musl. These
-need a __GLIBC__ guard to ensure musl builds continue to work.
-
-Upstream-Status: Pending
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-
-Index: valgrind-3.16.1/drd/drd_pthread_intercepts.c
-===================================================================
---- valgrind-3.16.1.orig/drd/drd_pthread_intercepts.c
-+++ valgrind-3.16.1/drd/drd_pthread_intercepts.c
-@@ -180,6 +180,7 @@ static int never_true;
- * functions in both libc and libpthread. Older glibc versions only have an
- * implementation of the pthread functions in libpthread.
- */
-+#ifdef __GLIBC__
- #define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \
- ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl; \
- ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl \
-@@ -187,6 +188,12 @@ static int never_true;
- ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \
- ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \
- { return implf argl; }
-+#else
-+#define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \
-+ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \
-+ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \
-+ { return implf argl; }
-+#endif
- #endif
-
- /**
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-tests-swapcontext-Add-SIGALRM-handler-to-avoid-s.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-tests-swapcontext-Add-SIGALRM-handler-to-avoid-s.patch
new file mode 100644
index 000000000..371c1701d
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-drd-tests-swapcontext-Add-SIGALRM-handler-to-avoid-s.patch
@@ -0,0 +1,65 @@
+From 4c8c4a9c3a92300e3e6500e5a278ca37514a1fdb Mon Sep 17 00:00:00 2001
+From: Yi Fan Yu <yifan.yu@windriver.com>
+Date: Thu, 1 Apr 2021 15:31:47 -0400
+Subject: [PATCH] drd/tests/swapcontext: Add SIGALRM handler to avoid
+ stacktrace
+
+During testing for oe-core build on QEMU,
+SIGALRM can trigger during nanosleep.
+This results a different stderr output than expected.
+
+```
+==277== Process terminating with default action of signal 14 (SIGALRM)
+==277== at 0x36C74C3943: clock_nanosleep@@GLIBC_2.17 (clock_nanosleep.c:43)
+==277== by 0x36C74C8726: nanosleep (nanosleep.c:25)
+```
+
+This stacktrace printing will not occur
+if we add a handler that simply exits.
+
+https://bugs.kde.org/show_bug.cgi?id=435160
+
+Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
+---
+ drd/tests/swapcontext.c | 5 +++++
+ drd/tests/swapcontext.stderr.exp | 4 ----
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drd/tests/swapcontext.c b/drd/tests/swapcontext.c
+index 622c70bc5..2cb969a5e 100644
+--- a/drd/tests/swapcontext.c
++++ b/drd/tests/swapcontext.c
+@@ -25,6 +25,10 @@ typedef struct thread_local {
+ size_t nrsw;
+ } thread_local_t;
+
++static void sig_alrm_handler(int signo) {
++ _exit(1);
++}
++
+ static void f(void *data, int n)
+ {
+ enum { NR_SWITCHES = 200000 };
+@@ -76,6 +80,7 @@ int main(int argc, char *argv[])
+ pthread_attr_t attr;
+ int i, res;
+
++ signal(SIGALRM, sig_alrm_handler);
+ memset(tlocal, 0, sizeof(tlocal));
+
+ pthread_attr_init(&attr);
+diff --git a/drd/tests/swapcontext.stderr.exp b/drd/tests/swapcontext.stderr.exp
+index fcb5d5ed4..d18786f80 100644
+--- a/drd/tests/swapcontext.stderr.exp
++++ b/drd/tests/swapcontext.stderr.exp
+@@ -1,7 +1,3 @@
+
+
+-Process terminating with default action of signal 14 (SIGALRM)
+- at 0x........: swapcontext (in /...libc...)
+- by 0x........: f (swapcontext.c:?)
+-
+ ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
+--
+2.17.1
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-helgrind-Intercept-libc-functions.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-helgrind-Intercept-libc-functions.patch
deleted file mode 100644
index f66df3d2d..000000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-helgrind-Intercept-libc-functions.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From cdec010444df5a4328e90d07a2024fdeefcc74b5 Mon Sep 17 00:00:00 2001
-From: Paul Floyd <paulf@free.fr>
-Date: Wed, 18 Nov 2020 12:49:20 -0400
-Subject: [PATCH] helgrind: Intercept libc functions
-
-PTH_FUNC definition needs to be modified in order to
-intercept posix thread functions in both libc and
-libpthread. In order to handle this in helgrind, weak alias
-the pthread functions in glibc.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Paul Floyd <paulf@free.fr>
-Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com>
----
- helgrind/hg_intercepts.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c
-index a10c3a4a3..316140ca6 100644
---- a/helgrind/hg_intercepts.c
-+++ b/helgrind/hg_intercepts.c
-@@ -77,6 +77,11 @@
- /*--- ---*/
- /*----------------------------------------------------------------*/
-
-+#define hg_expand(tok) #tok
-+#define hg_str(tok) hg_expand(tok)
-+# define hg_weak_alias(name, aliasname) \
-+ extern __typeof (name) aliasname __attribute__ ((weak, alias(hg_str(name))))
-+
- #if defined(VGO_solaris)
- /* On Solaris, libpthread is just a filter library on top of libc.
- * Threading and synchronization functions in runtime linker are not
-@@ -91,9 +96,16 @@
- #define CREQ_PTHREAD_T Word
- #define SEM_ERROR ret
- #else
-+#ifdef MUSL_LIBC
-+#define PTH_FUNC(ret_ty, f, args...) \
-+ ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args); \
-+ ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args)
-+#else
- #define PTH_FUNC(ret_ty, f, args...) \
- ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args); \
-+ hg_weak_alias(I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f), I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBC_SONAME,f)); \
- ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args)
-+#endif
- #define CREQ_PTHREAD_T pthread_t
- #define SEM_ERROR errno
- #endif /* VGO_solaris */
---
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-lmw-lswi-and-related-PowerPC-insns-aren-t-allowed-on.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-lmw-lswi-and-related-PowerPC-insns-aren-t-allowed-on.patch
deleted file mode 100644
index 7c6214497..000000000
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-lmw-lswi-and-related-PowerPC-insns-aren-t-allowed-on.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 0748ed5403a75c12ad9137b3fabf9d8397206ed8 Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mark@klomp.org>
-Date: Tue, 1 Dec 2020 13:57:39 +0100
-Subject: [PATCH] lmw, lswi and related PowerPC insns aren't allowed on ppc64le
-
-lmw, lswi and related PowerPC insns aren't allowed on ppc64le
-
-Newer binutils produce an error when the assembly contains lmw, stmw,
-lswi, lswx, stswi, or stswx instructions in little-endian mode.
-
-Only build and run the lsw and ldst_multiple testcases on ppc64[be].
-
-https://bugs.kde.org/show_bug.cgi?id=427870
-Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=74b74174d572fee4015b8f4e326db3cd949bcdc3]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- none/tests/ppc64/Makefile.am | 9 ++++++---
- none/tests/ppc64/ldst_multiple.vgtest | 1 +
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/none/tests/ppc64/Makefile.am b/none/tests/ppc64/Makefile.am
-index 9bc0d0a..9d1e8b7 100644
---- a/none/tests/ppc64/Makefile.am
-+++ b/none/tests/ppc64/Makefile.am
-@@ -54,16 +54,20 @@ EXTRA_DIST = \
-
- check_PROGRAMS = \
- allexec \
-- lsw jm-insns round \
-+ jm-insns round \
- test_isa_2_06_part1 test_isa_2_06_part2 test_isa_2_06_part3 \
- test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \
- test_isa_2_07_part1 test_isa_2_07_part2 \
- test_isa_3_0 \
- subnormal_test \
-- test_tm test_touch_tm ldst_multiple data-cache-instructions \
-+ test_tm test_touch_tm data-cache-instructions \
- power6_mf_gpr std_reg_imm \
- twi_tdi tw_td power6_bcmp
-
-+# lmw, stmw, lswi, lswx, stswi, stswx compile (and run) only on big endian.
-+if VGCONF_PLATFORMS_INCLUDE_PPC64BE_LINUX
-+check_PROGRAMS += lsw ldst_multiple
-+endif
-
- AM_CFLAGS += @FLAG_M64@
- AM_CXXFLAGS += @FLAG_M64@
-@@ -175,4 +179,3 @@ test_isa_2_07_part2_LDADD = -lm
- test_tm_LDADD = -lm
- test_touch_tm_LDADD = -lm
- test_isa_3_0_LDADD = -lm
--
-diff --git a/none/tests/ppc64/ldst_multiple.vgtest b/none/tests/ppc64/ldst_multiple.vgtest
-index 87e668e..22dd46c 100644
---- a/none/tests/ppc64/ldst_multiple.vgtest
-+++ b/none/tests/ppc64/ldst_multiple.vgtest
-@@ -1 +1,2 @@
-+prereq: ../../../tests/is_ppc64_BE
- prog: ldst_multiple
---
-2.31.0
-
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
index d641998d7..e421ac6c8 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch
@@ -19,7 +19,7 @@ index 6e5a797b9..0ede1ab18 100644
@@ -25,10 +25,10 @@ Open file descriptor ...: /dev/null
- FILE DESCRIPTORS: 6 open at exit.
+ FILE DESCRIPTORS: 6 open (3 std) at exit.
-Open file descriptor ...: /tmp/data2
+Open file descriptor ...: ...
...
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
index 480fe3324..7f0e38cb9 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
@@ -1,18 +1,58 @@
-From bd4e926e7e14747b3cd4d7b2a1bd5410b22f3ea2 Mon Sep 17 00:00:00 2001
+From 26c104adf6c5162572b7aa2fac89d0835b7f8f0b Mon Sep 17 00:00:00 2001
From: Randy MacLeod <Randy.MacLeod@windriver.com>
Date: Tue, 16 Oct 2018 21:27:46 -0400
Subject: [PATCH] context APIs are not available on musl
-Upstream-Status: Pending
-
Updated patch for valgrind-3.14
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+
+Apply same patch to drd/tests/swapcontext.c
+for valgrind-3.17.
+
+Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=434775]
+
+Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
---
+ drd/tests/swapcontext.c | 6 ++++++
memcheck/tests/linux/stack_changes.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+diff --git a/drd/tests/swapcontext.c b/drd/tests/swapcontext.c
+index 622c70bc5..5e72bb0f3 100644
+--- a/drd/tests/swapcontext.c
++++ b/drd/tests/swapcontext.c
+@@ -20,6 +20,7 @@
+
+ #define STACKSIZE (PTHREAD_STACK_MIN + 4096)
+
++#ifdef __GLIBC__
+ typedef struct thread_local {
+ ucontext_t uc[3];
+ size_t nrsw;
+@@ -67,9 +68,11 @@ void *worker(void *data)
+ swapcontext(&tlocal->uc[0], &tlocal->uc[1]);
+ return NULL;
+ }
++#endif
+
+ int main(int argc, char *argv[])
+ {
++#ifdef __GLIBC__
+ enum { NR = 32 };
+ thread_local_t tlocal[NR];
+ pthread_t thread[NR];
+@@ -94,6 +97,9 @@ int main(int argc, char *argv[])
+
+ for (i = 0; i < NR; i++)
+ pthread_join(thread[i], NULL);
++#else
++ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
++#endif
+
+ return 0;
+ }
diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
index 7f97b90a5..a26cb4ae6 100644
--- a/memcheck/tests/linux/stack_changes.c
@@ -48,5 +88,5 @@ index 7f97b90a5..a26cb4ae6 100644
return 0;
}
--
-2.17.0
+2.17.1
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch b/poky/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
index b431d3356..db6867f62 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch
@@ -1,4 +1,4 @@
-From 67e7a690107efb16d6d5aebfe420b64a552accdf Mon Sep 17 00:00:00 2001
+From d85cc45e0ddeda68adf594dead715964cb32d0e7 Mon Sep 17 00:00:00 2001
From: Qing He <qing.he@intel.com>
Date: Tue, 31 Aug 2010 22:51:58 +0800
Subject: [PATCH] valgrind: fix perl scripts
@@ -22,10 +22,11 @@ Signed-off-by: Maxin B. John <maxin.john@intel.com>
cachegrind/cg_diff.in | 2 +-
massif/ms_print.in | 2 +-
perf/vg_perf.in | 2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
+ tests/vg_regtest.in | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in
-index 69365e8..978265d 100644
+index fea114b..5e814fd 100644
--- a/cachegrind/cg_annotate.in
+++ b/cachegrind/cg_annotate.in
@@ -1,4 +1,4 @@
@@ -35,7 +36,7 @@ index 69365e8..978265d 100644
##--------------------------------------------------------------------##
##--- Cachegrind's annotator. cg_annotate.in ---##
diff --git a/cachegrind/cg_diff.in b/cachegrind/cg_diff.in
-index 395460b..05873cc 100755
+index 9d9258e..d0f0ec7 100755
--- a/cachegrind/cg_diff.in
+++ b/cachegrind/cg_diff.in
@@ -1,4 +1,4 @@
@@ -45,7 +46,7 @@ index 395460b..05873cc 100755
##--------------------------------------------------------------------##
##--- Cachegrind's differencer. cg_diff.in ---##
diff --git a/massif/ms_print.in b/massif/ms_print.in
-index e6fae89..3b85b40 100755
+index a206ce4..df1bc31 100755
--- a/massif/ms_print.in
+++ b/massif/ms_print.in
@@ -1,4 +1,4 @@
@@ -55,7 +56,7 @@ index e6fae89..3b85b40 100755
##--------------------------------------------------------------------##
##--- Massif's results printer ms_print.in ---##
diff --git a/perf/vg_perf.in b/perf/vg_perf.in
-index 7a80cb0..28f6156 100644
+index 90ee1d2..c585096 100644
--- a/perf/vg_perf.in
+++ b/perf/vg_perf.in
@@ -1,4 +1,4 @@
@@ -65,7 +66,7 @@ index 7a80cb0..28f6156 100644
##--- Valgrind performance testing script vg_perf ---##
##--------------------------------------------------------------------##
diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
-index cb05b52..032e947 100755
+index 0fe6341..1b45eb7 100755
--- a/tests/vg_regtest.in
+++ b/tests/vg_regtest.in
@@ -1,4 +1,4 @@
@@ -74,5 +75,6 @@ index cb05b52..032e947 100755
##--------------------------------------------------------------------##
##--- Valgrind regression testing script vg_regtest ---##
##--------------------------------------------------------------------##
----
-2.4.0
+--
+2.29.2
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
index 93bfd45a4..b4fc8af33 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
@@ -31,6 +31,8 @@ drd/tests/annotate_static
drd/tests/annotate_trace_memory
drd/tests/annotate_trace_memory_xml
drd/tests/atomic_var
+drd/tests/bar_bad
+drd/tests/bar_bad_xml
drd/tests/bar_trivial
drd/tests/bug-235681
drd/tests/bug322621
@@ -233,3 +235,4 @@ memcheck/tests/wrapmalloc
memcheck/tests/wrapmallocstatic
memcheck/tests/writev1
memcheck/tests/xml1
+memcheck/tests/linux/stack_changes
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-all b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-all
index d6a85c473..e69de29bb 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-all
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-all
@@ -1,2 +0,0 @@
-drd/tests/bar_bad
-drd/tests/bar_bad_xml
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest b/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
index f37780ef6..caeae84d4 100755
--- a/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
@@ -7,6 +7,7 @@
# Randy MacLeod <Randy.MacLeod@windriver.com>
###############################################################
VALGRIND_LIB=@libdir@/valgrind
+VALGRIND_LIBEXECDIR=@libexecdir@/valgrind
VALGRIND_BIN=@bindir@/valgrind
LOG="${VALGRIND_LIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log"
@@ -31,12 +32,19 @@ if [ "$arch" = "aarch64" ]; then
done
fi
+echo "Run flaky tests using taskset to limit them to a single core."
+for i in `cat taskset_nondeterministic_tests`; do
+ taskset 0x00000001 perl tests/vg_regtest --valgrind=${VALGRIND_BIN} --valgrind-lib=${VALGRIND_LIBEXECDIR} --yocto-ptest $i 2>&1|tee -a ${LOG}
+ mv $i.vgtest $i.IGNORE
+done
+
+
cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \
--valgrind=${VALGRIND_BIN} \
- --valgrind-lib=${VALGRIND_LIB} \
+ --valgrind-lib=${VALGRIND_LIBEXECDIR} \
--yocto-ptest \
gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
- 2>&1|tee ${LOG}
+ 2>&1|tee -a ${LOG}
cd ${VALGRIND_LIB}/ptest && \
./tests/post_regtest_checks $(pwd) \
@@ -55,6 +63,11 @@ for i in `cat remove-for-all`; do
mv $i.IGNORE $i.vgtest;
done
+echo "Restore flaky and other non-deterministic tests"
+for i in `cat taskset_nondeterministic_tests`; do
+ mv $i.IGNORE $i.vgtest;
+done
+
echo "Failed test details..."
failed_tests=`grep FAIL: ${LOG} | awk '{print $2}'`
for test in $failed_tests; do
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch b/poky/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch
index eea671da0..bde1241dc 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/s390x_vec_op_t.patch
@@ -1,3 +1,8 @@
+From 8154d38bac5cdb3675cfdaf562ab9da01988b263 Mon Sep 17 00:00:00 2001
+From: Yi Fan Yu <yifan.yu@windriver.com>
+Date: Wed, 17 Mar 2021 12:16:31 -0400
+Subject: [PATCH 19/20] remove s390x_vec_op_t
+
s390x_vec_op_t is not needed anywhere, only elements of enum are accessed
removing it ensures that valgrind can be built with -fno-common option
@@ -6,14 +11,25 @@ ld: ../../VEX/libvex-amd64-linux.a(libvex_amd64_linux_a-guest_s390_helpers.o):/u
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
+---
+ VEX/priv/guest_s390_defs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/VEX/priv/guest_s390_defs.h b/VEX/priv/guest_s390_defs.h
+index 9054290..dab8002 100644
--- a/VEX/priv/guest_s390_defs.h
+++ b/VEX/priv/guest_s390_defs.h
-@@ -286,7 +286,7 @@ enum {
- S390_VEC_OP_VFCHE = 18,
- S390_VEC_OP_VFTCI = 19,
- S390_VEC_OP_LAST = 20 // supposed to be the last element in enum
+@@ -284,7 +284,7 @@ typedef enum {
+ S390_VEC_OP_VBPERM,
+ S390_VEC_OP_VMSL,
+ S390_VEC_OP_LAST // supposed to be the last element in enum
-} s390x_vec_op_t;
+};
/* Arguments of s390x_dirtyhelper_vec_op(...) which are packed into one
ULong variable.
+--
+2.29.2
+
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests b/poky/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests
new file mode 100644
index 000000000..e15100ade
--- /dev/null
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests
@@ -0,0 +1,2 @@
+helgrind/tests/hg05_race2
+helgrind/tests/tc09_bad_unlock
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
index 2b1d18557..60b248681 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind_3.16.1.bb
+++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
@@ -18,6 +18,7 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
file://run-ptest \
file://remove-for-aarch64 \
file://remove-for-all \
+ file://taskset_nondeterministic_tests \
file://0004-Fix-out-of-tree-builds.patch \
file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
@@ -42,14 +43,11 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
file://s390x_vec_op_t.patch \
file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \
file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \
- file://0001-drd-Port-to-Fedora-33.patch \
- file://0001-drd-musl-fix.patch \
- file://0001-helgrind-Intercept-libc-functions.patch \
- file://0001-Fix-nlcontrolc.vgtest-hanging-on-newer-glibc-and-or-.patch \
- file://0001-lmw-lswi-and-related-PowerPC-insns-aren-t-allowed-on.patch \
+ file://0001-Add-missing-musl.supp.patch \
+ file://0001-drd-tests-swapcontext-Add-SIGALRM-handler-to-avoid-s.patch \
"
-SRC_URI[md5sum] = "d1b153f1ab17cf1f311705e7a83ef589"
-SRC_URI[sha256sum] = "c91f3a2f7b02db0f3bc99479861656154d241d2fdb265614ba918cc6720a33ca"
+SRC_URI[md5sum] = "afe11b5572c3121a781433b7c0ab741b"
+SRC_URI[sha256sum] = "ad3aec668e813e40f238995f60796d9590eee64a16dff88421430630e69285a2"
UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
@@ -110,7 +108,7 @@ do_configure_prepend () {
}
do_install_append () {
- install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
+ install -m 644 ${B}/default.supp ${D}/${libexecdir}/valgrind/
oe_multilib_header valgrind/config.h
}
@@ -123,9 +121,9 @@ VALGRINDARCH_mipsel = "mips32"
VALGRINDARCH_mips64el = "mips64"
VALGRINDARCH_powerpc = "ppc"
VALGRINDARCH_powerpc64 = "ppc64"
-VALGRINDARCH_powerpc64el = "ppc64le"
+VALGRINDARCH_powerpc64le = "ppc64le"
-INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so"
+INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libexecdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so"
RDEPENDS_${PN} += "perl"
@@ -133,12 +131,13 @@ RDEPENDS_${PN} += "perl"
# redirect functions like strlen.
RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-RDEPENDS_${PN}-ptest += " bash coreutils file \
+RDEPENDS_${PN}-ptest += " bash coreutils curl file \
gdb libgomp \
perl \
perl-module-file-basename perl-module-file-glob perl-module-getopt-long \
- perl-module-overloading \
- procps sed ${PN}-dbg ${PN}-src"
+ perl-module-overloading perl-module-cwd perl-module-ipc-open3 \
+ perl-module-carp perl-module-symbol \
+ procps sed ${PN}-dbg ${PN}-src ${TCLIBC}-src gcc-runtime-dbg"
RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
# One of the tests contains a bogus interpreter path on purpose.
@@ -158,7 +157,7 @@ do_install_ptest() {
#
# The regression tests require scripts and data files that are not
# copied to the build directory. They must be copied from the
- # source directory.
+ # source directory.
saved_dir=$PWD
for parent_dir in ${S} ${B} ; do
cd $parent_dir
@@ -189,6 +188,7 @@ do_install_ptest() {
cp ${B}/config.h ${D}${PTEST_PATH}
install -D ${WORKDIR}/remove-for-aarch64 ${D}${PTEST_PATH}
install -D ${WORKDIR}/remove-for-all ${D}${PTEST_PATH}
+ install -D ${WORKDIR}/taskset_nondeterministic_tests ${D}${PTEST_PATH}
# Add an executable need by none/tests/bigcode
mkdir ${D}${PTEST_PATH}/perf
@@ -222,14 +222,22 @@ do_install_ptest() {
sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann1.vgtest
sed -i s:\.\./\.\./callgrind/callgrind_annotate:${bindir}/callgrind_annotate: ${D}${PTEST_PATH}/callgrind/tests/ann2.vgtest
+ # point the expanded @abs_top_builddir@ of the host to PTEST_PATH
+ sed -i s:${S}:${PTEST_PATH}:g \
+ ${D}${PTEST_PATH}/memcheck/tests/linux/debuginfod-check.vgtest
+
# handle multilib
sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
+ sed -i s:@libexecdir@:${libexecdir}:g ${D}${PTEST_PATH}/run-ptest
sed -i s:@bindir@:${bindir}:g ${D}${PTEST_PATH}/run-ptest
# This test fails on the host as well, using both 3.15 and git master (as of Jan 24 2020)
# https://bugs.kde.org/show_bug.cgi?id=402833
rm ${D}${PTEST_PATH}/memcheck/tests/overlap.vgtest
+ # This is known failure see https://bugs.kde.org/show_bug.cgi?id=435732
+ rm ${D}${PTEST_PATH}/memcheck/tests/leak_cpp_interior.vgtest
+
# As the binary isn't stripped or debug-splitted, the source file isn't fetched
# via dwarfsrcfiles either, so it needs to be installed manually.
mkdir -p ${D}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/${BP}/none/tests/
@@ -238,7 +246,7 @@ do_install_ptest() {
# avoid stripping some generated binaries otherwise some of the tests will fail
# run-strip-reloc.sh, run-strip-strmerge.sh and so on will fail
-INHIBIT_PACKAGE_STRIP_FILES = "\
+INHIBIT_PACKAGE_STRIP_FILES += "\
${PKGD}${PTEST_PATH}/none/tests/tls \
${PKGD}${PTEST_PATH}/none/tests/tls.so \
${PKGD}${PTEST_PATH}/none/tests/tls2.so \