poky: subtree update:9d1b332292..2834c2f853
Alex Stewart (3):
opkg-utils: upgrade to version 0.4.5
opkg: upgrade to version 0.4.5
opkg: add QA check for openssl feed verification
Alexander Kanavin (37):
virglrenderer: explicitly depend on libgbm
elfutils: update 0.183 -> 0.185
libcap: update 2.49 -> 2.50
perl: split perl-cross into its own recipe
perl-cross: 1.3.5 -> 1.3.6
perl: update 5.32.1 -> 5.34.0
libgcrypt: upgrade 1.9.2 -> 1.9.3
erofs-utils: correct upstream version check
m4: correct ptest failures
ovmf: update 2021.02 -> 2021.05
apt: update 2.2.3 -> 2.2.4
util-linux: update 2.36.2 -> 2.37
cross-canadian: correct the location of pkg-config files
nettle: update 3.7.2 -> 3.7.3
glib-2.0: update 2.68.2 -> 2.68.3
meson: upgrade 0.58.0 -> 0.58.1
ell: upgrade 0.40 -> 0.41
erofs-utils: upgrade 1.2.1 -> 1.3
grub: upgrade 2.04+2.06~rc1 -> 2.06
gptfdisk: upgrade 1.0.7 -> 1.0.8
connman: update 1.39 -> 1.40
libksba: upgrade 1.5.1 -> 1.6.0
libnss-mdns: upgrade 0.15 -> 0.15.1
libwpe: upgrade 1.10.0 -> 1.10.1
puzzles: upgrade to latest revision
rng-tools: upgrade 6.12 -> 6.13
stress-ng: upgrade 0.12.09 -> 0.12.10
python3-magic: upgrade 0.4.23 -> 0.4.24
sudo: upgrade 1.9.7 -> 1.9.7p1
wpebackend-fdo: upgrade 1.8.4 -> 1.10.0
xkeyboard-config: upgrade 2.32 -> 2.33
bitbake.conf: enable debuginfod in native/nativesdk
gdb-cross: enable debuginfod
util-linux: backport a patch to address mkswap hangs
selftest: do not hardcode /tmp/sdk
glibc: do not enable memory tagging on aarch64 just yet
mesa: enable gallium intel drivers when building for x86
Alexandre Belloni (1):
runqemu: time the copy to tmpfs
Alexey Brodkin (3):
gcc: Fixes for ARC
gdb: Add native GDB support for ARC
gcc: Apply multilib fix to ARC as well
Alistair Francis (3):
recipes-bsp/opensbi: Disable FW_PIC
recipes-bsp/u-boot: Allow deploying the u-boot DTB
recipes-bsp/opensbi: Add support for specifying a device tree
Anders Wallin (1):
coreutils: remove NOSTAT_LEAF_OPTIMIZATION
Andrea Adami (1):
kernel.bbclass: fix do_sizecheck() comparison
Andreas Müller (19):
mesa: upgrade 21.1.1 -> 21.1.2
systemd: Add more ugly casts to fix build with musl
alsa-lib: upgrade 1.2.4 -> 1.2.5
alsa-plugins: upgrade 1.2.2 -> 1.2.5
alsa-tools: upgrade 1.2.2 -> 1.2.5
alsa-topology-conf: upgrade 1.2.4 -> 1.2.5
alsa-ucm-conf: upgrade 1.2.4 -> 1.2.5
alsa-utils(-scripts): upgrade 1.2.4 -> 1.2.5
libinput: upgrade 1.17.3 -> 1.18.0
xf86-input-libinput: upgrade 0.30.0 -> 1.0.1
epiphany: upgrade 40.1 -> 40.2
vala: upgrade 0.52.3 -> 0.52.4
p11-kit: upgrade 0.23.22 -> 0.23.24
xorgproto: upgrade 2021.4.99.1 -> 2021.4.99.2
mpg123: 1.27.2 -> 1.28.0
libx11: upgrade 1.7.1 -> 1.7.2
libx11: remove CPPFLAGS_FOR_BUILD += "-D_GNU_SOURCE"
libpcap: upgrade 1.10.0 -> 1.10.1
mesa: upgrade 21.1.2 -> 21.1.3
Bruce Ashfield (10):
linux-yocto/5.10: update to v5.10.42
linux-yocto/5.10: temporarily revert aufs
linux-yocto-dev: base AUTOREV on specified version
linux-yocto/5.4: update to v5.4.124
linux-yocto/5.10: restore aufs
linux-yocto/5.10: update to v5.10.43
linux-yocto/5.4: update to v5.4.125
linux-yocto/5.10: cgroup1: fix leaked context root causing sporadic NULL deref in LTP
btrfs-tools: include linux/const.h to fix build with 5.12+ headers
bsps/5.10: update to v5.10.43
Changqing Li (1):
libjpeg-turbo: fix do_compile error on arm
Chris Laplante (1):
bitbake: build: warn on setting noexec/nostamp/fakeroot flag to any value besides '1'
Daniel Wagenknecht (5):
ref-manual: variables: update examples refering to DEPLOY_DIR_IMAGE
ref-manual: variables: document IMGDEPLOYDIR
ref-manual: migration-2.2: add note about IMGDEPLOYDIR
ref-manual: variables: fixup example in IMAGE_CMD
ref-manual: variables: fixup class reference in IMAGE_MANIFEST
Joe Slater (1):
tcf-agent: change license to EPL/EDL
Joshua Watt (2):
classes/buildhistory: Add option to strip path prefix
classes/reproducible_build: Use atomic rename for SDE file
Justin Bronder (1):
populate_sdk_ext: copy BBMULTICONFIG files
Kai Kang (1):
valgrind: fix a typo
Khem Raj (14):
harfbuzz: Fix unused-variable warning
arch-armv4: Allow -march=armv4
ffmpeg: Link in libatomic on riscv32
libssp-nonshared: Use a different implementation for __stack_chk_fail
qemuriscv: Enable 4 core emulation
gcompat: Add recipe
musl: Do not package glibc loader
musl: Set UPSTREAM_CHECK_COMMITS
Revert "libgcc-initial: Do not build fp128 to decimal ppc functions"
qemu: Provide float128 via hwcaps2 on ppc64le
linuxloader: Be aware of riscv32 ldso
linuxloader.bbclass: Add entry for ppc64 LE glibc loader
gcompat: Create symlinks to glibc ldso locations
sdk: Enable do_populate_sdk with multilibs
Luca Boccassi (1):
systemd: install new sysext tool via systemd-extra-utils
Marcus Comstedt (1):
conf/machine-sdk: Add ppc64 SDK machine
Matt Spencer (1):
systemd-conf: Prevent systemd-network from managing veth interfaces
Michael Halstead (1):
releases: update to include 3.1.8
Michael Opdenacker (12):
bitbake: docs: Add BB_HASHSERVE definition to glossary
bitbake: doc: bitbake-user-manual: fix erroneous statement in glossary intro
manuals: fix epub export warnings
ref-manual: move migration guides to separate document
releases: clarify supported and outdated releases
releases: put release number after "Release Series"
sdk-manual: fix broken references
migration guides: remove index reference to BB_SETSCENE_VERIFY_FUNCTION2
manuals: fix issues related to trailing dots
sdk-manual: add missing quoting around "devtool upgrade"
sdk-manual: fix wrong word
sdk-manual: add missing index references
Ming Liu (2):
u-boot-tools: fix a mkimage signature issue
uboot-sign.bbclass: fix some install commands
Mingli Yu (2):
sysstat: make the service start automatically
boost: fix wrong type for mutex in regex v5
Nicolas Dechesne (3):
index: remove the link/section to 'mega manual' from main page
index: remove links to releases manual and index
index: split releases manuals and indexes into two sections in the tree
Paul Barker (2):
bitbake: asyncrpc: Add ping method
bitbake: asyncrpc: Reduce verbosity
Quentin Schulz (6):
docs: ref-manual: migration-3.0: remove reference to non-existing BB_SETSCENE_VERIFY_FUNCTION2
docs: ref-manual: variables: add missing links to terms glossary
bitbake: doc: user-manual: remove mentions to BBVERSIONS
bitbake: doc: user-manual: ref-manual: remove mentions to BB_SETSCENE_VERIFY_FUNCTION2
documentation: Makefile: turn warnings into errors by default
docs: replace ``FOO`` by :term:`FOO` where possible
Richard Purdie (11):
lttng-tools: upgrade 2.12.3 -> 2.12.4
qemurunner: Try to ensure mmap'd libs are paged in
qemurunner: Increase startup timeout 120 -> 300
build-appliance-image: Update to master head revision
test-manual: add initial reproducible builds documentation
test-manual: Add initial YP Compatible documentation
README: Tweak as the website isn't really new now
README: Move to using markdown as the format
perf: Use python3targetconfig to ensure we use target libraries
ltp: Reinstate 'hanging' tests for evaluation
README.poky: Formatting and content cleanup
Richard Weinberger (1):
Document erofs filesystem targets
Robert P. J. Day (2):
ref-manual: add SRCTREECOVEREDTASKS to variable glossary
ref-manual: add glossary entry for NON_MULTILIB_RECIPES
Ross Burton (11):
mx: remove from Openembedded Core
core-image-weston: remove Clutter examples
Remove Clutter and Cogl
oeqa: remove Clutter usage
meta-poky: remove clutter references
Remove Clutter references
gcc: enable branch protection by standard
image_types: add zsync conversions
avahi: apply fix for CVE-2021-3468
qemu: fix virtio vhost-user-gpu CVEs
gcc: replace gdb helper install revert with the upstream fix
Sakib Sajal (3):
oeqa/core/target/qemu.py: display contents of dumped files
oe-time-dd-test.sh: improve output formatting
oe-time-dd-test.sh: add iostat command
Saul Wold (1):
qemurunner: add second qmp port
Scott Weaver (1):
bitbake: fetch2: add check for empty SRC_URI hash string
Tim Orling (8):
maintainers.inc: update email address
python3-scons: upgrade 3.1.2 -> 4.1.0; simplify
python3-hypothesis: upgrade 6.13.7 -> 6.13.14
at-spi2-core: upgrade 2.40.1 -> 2.40.2
python3-importlib-metadata: upgrade 4.4.0 -> 4.5.0
python3-manifest: add statistics subpackage
python3-hypothesis: upgrade 6.13.14 -> 6.14.0
python3: skip tests requiring tools-sdk
Tony Battersby (1):
glibc: fix path to place zdump in the tzcode package
Tony Tascioglu (3):
valgrind: Improve non-deterministic ptest reliability
valgrind: remove buggy ptest from arm64
valgrind: Actually install list of non-deterministic ptests
hongxu (1):
nativesdk-libdnf: fix installed and not shipped files
wangmy (21):
cmake: upgrade 3.20.2 -> 3.20.3
mtools: upgrade 4.0.27 -> 4.0.29
python3-magic: upgrade 0.4.22 -> 0.4.23
less: upgrade 586 -> 589
python3-libarchive-c: upgrade 3.0 -> 3.1
diffoscope: upgrade 175 -> 177
dtc: upgrade 1.6.0 -> 1.6.1
git: upgrade 2.31.1 -> 2.32.0
gnutls: upgrade 3.7.1 -> 3.7.2
go: upgrade 1.16.4 -> 1.16.5
less: upgrade 589 -> 590
ethtool: upgrade 5.10 -> 5.12
m4: upgrade 1.4.18 -> 1.4.19
alsa-lib: upgrade 1.2.5 -> 1.2.5.1
alsa-utils: upgrade 1.2.5 -> 1.2.5.1
alsa-topology-conf: upgrade 1.2.5 -> 1.2.5.1
alsa-ucm-conf: upgrade 1.2.5 -> 1.2.5.1
blktrace: upgrade 1.2.0 -> 1.3.0
enchant2: upgrade 2.2.15 -> 2.3.0
librepo: upgrade 1.14.0 -> 1.14.1
createrepo-c: upgrade 0.17.2 -> 0.17.3
zangrc (1):
python3-pycairo: upgrade 1.20.0 -> 1.20.1
zhengruoqin (6):
python3-importlib-metadata: upgrade 4.3.0 -> 4.4.0
libogg: upgrade 1.3.4 -> 1.3.5
liburcu: upgrade 0.12.2 -> 0.13.0
libcomps: upgrade 0.1.16 -> 0.1.17
python3-dbusmock: upgrade 0.23.0 -> 0.23.1
nfs-utils: upgrade 2.5.3 -> 2.5.4
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Iac124e214336beb9cab7fb3b67a6968d4e34d06f
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 a9a8eb6..72713c3 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 5fb6355c7dd00c97fe90e805ace075b6e9b6952d 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-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 34d0c4b..1517b47 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 76f8386cac7f13688b386686e0b1fc4b1b574f53 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_2.2.3.bb b/poky/meta/recipes-devtools/apt/apt_2.2.4.bb
similarity index 97%
rename from poky/meta/recipes-devtools/apt/apt_2.2.3.bb
rename to poky/meta/recipes-devtools/apt/apt_2.2.4.bb
index fe00fb0..f120111 100644
--- a/poky/meta/recipes-devtools/apt/apt_2.2.3.bb
+++ b/poky/meta/recipes-devtools/apt/apt_2.2.4.bb
@@ -26,7 +26,7 @@
file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \
"
-SRC_URI[sha256sum] = "2880474bc08c79f103cd30d24a9c30c78b480c65076e466d24df93b9fa05ab27"
+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
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 0000000..d718888
--- /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.12.1.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb
index 3fc959b..d0c9cf2 100644
--- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb
+++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb
@@ -18,6 +18,7 @@
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"
diff --git a/poky/meta/recipes-devtools/cmake/cmake-native_3.20.2.bb b/poky/meta/recipes-devtools/cmake/cmake-native_3.20.3.bb
similarity index 100%
rename from poky/meta/recipes-devtools/cmake/cmake-native_3.20.2.bb
rename to poky/meta/recipes-devtools/cmake/cmake-native_3.20.3.bb
diff --git a/poky/meta/recipes-devtools/cmake/cmake.inc b/poky/meta/recipes-devtools/cmake/cmake.inc
index be43760..0987c01 100644
--- a/poky/meta/recipes-devtools/cmake/cmake.inc
+++ b/poky/meta/recipes-devtools/cmake/cmake.inc
@@ -21,7 +21,7 @@
file://0004-Fail-silently-if-system-Qt-installation-is-broken.patch \
"
-SRC_URI[sha256sum] = "aecf6ecb975179eb3bb6a4a50cae192d41e92b9372b02300f9e8f1d5f559544e"
+SRC_URI[sha256sum] = "4d008ac3461e271fcfac26a05936f77fc7ab64402156fb371d41284851a651b8"
UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
diff --git a/poky/meta/recipes-devtools/cmake/cmake_3.20.2.bb b/poky/meta/recipes-devtools/cmake/cmake_3.20.3.bb
similarity index 100%
rename from poky/meta/recipes-devtools/cmake/cmake_3.20.2.bb
rename to 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 4b84457..b63fe53 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
@@ -5,21 +5,24 @@
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 ecc262d..a86514c 100644
+index a31b14d..01fd8ca 100644
--- a/src/python/CMakeLists.txt
+++ b/src/python/CMakeLists.txt
@@ -14,7 +14,7 @@ if (NOT SKBUILD)
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.2.bb b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.3.bb
similarity index 96%
rename from poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.2.bb
rename to poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.3.bb
index 76bdd69..481c4bf 100644
--- a/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.2.bb
+++ b/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.17.3.bb
@@ -8,7 +8,7 @@
file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
"
-SRCREV = "8eff6ed99f5fd0ba844cb8513963435caab5fd3c"
+SRCREV = "8196982f0974c268898a5550d61b374bd58103e2"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.183.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb
similarity index 97%
rename from poky/meta/recipes-devtools/elfutils/elfutils_0.183.bb
rename to poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb
index 7aebaf1..b1ffbc1 100644
--- a/poky/meta/recipes-devtools/elfutils/elfutils_0.183.bb
+++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.185.bb
@@ -21,7 +21,6 @@
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 = " \
@@ -30,7 +29,7 @@
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
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 5f82afe..0000000
--- 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
index 5bd6ba9..5b225c5 100644
--- 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
@@ -1,4 +1,4 @@
-From 14dfe84943b8f9e6f504536d8735ef6356210b40 Mon Sep 17 00:00:00 2001
+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
@@ -16,15 +16,34 @@
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
- debuginfod/debuginfod-client.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ 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 de26af5..39e28f2 100644
+index ee7eda2..083ec2c 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
-@@ -229,7 +229,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
+@@ -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;
@@ -33,7 +52,7 @@
return -errno;
/* init max age config file. */
-@@ -237,7 +237,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
+@@ -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;
@@ -42,33 +61,3 @@
return -errno;
return 0;
-@@ -263,7 +263,7 @@ debuginfod_clean_cache(debuginfod_client *c,
- if (interval_file == NULL)
- return -errno;
-
-- int rc = fprintf(interval_file, "%ld", cache_clean_default_interval_s);
-+ int rc = fprintf(interval_file, "%jd", (intmax_t)cache_clean_default_interval_s);
- fclose(interval_file);
-
- if (rc < 0)
-@@ -275,7 +275,7 @@ debuginfod_clean_cache(debuginfod_client *c,
- interval_file = fopen(interval_path, "r");
- if (interval_file)
- {
-- if (fscanf(interval_file, "%ld", &clean_interval) != 1)
-+ if (fscanf(interval_file, "%jd", (intmax_t*)(&clean_interval)) != 1)
- clean_interval = cache_clean_default_interval_s;
- fclose(interval_file);
- }
-@@ -291,7 +291,7 @@ debuginfod_clean_cache(debuginfod_client *c,
- max_unused_file = fopen(max_unused_path, "r");
- if (max_unused_file)
- {
-- if (fscanf(max_unused_file, "%ld", &max_unused_age) != 1)
-+ if (fscanf(max_unused_file, "%jd", (intmax_t*)(&max_unused_age)) != 1)
- max_unused_age = cache_default_max_unused_age_s;
- fclose(max_unused_file);
- }
---
-2.31.1
-
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 b373940..c7360da 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 @@
#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 65593be..2e379cd 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 @@
/* 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 @@
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 @@
/* 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 8e1e970..2fa60c3 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 @@
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 2053626..5cd6fff 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 @@
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.2.1.bb b/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb
similarity index 83%
rename from poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.2.1.bb
rename to poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb
index 6435fea..d07d5c4 100644
--- a/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.2.1.bb
+++ b/poky/meta/recipes-devtools/erofs-utils/erofs-utils_1.3.bb
@@ -4,9 +4,11 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=94fa01670a2a8f2d3ab2de15004e0848"
HOMEPAGE = "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/README"
-SRCREV = "d1f4953edfcf4f51c71ba91586e21fc6ce9f6db9"
+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"
diff --git a/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.7.bb b/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb
similarity index 92%
rename from poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.7.bb
rename to poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.8.bb
index a697b74..16fe540 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 @@
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/gcc/gcc-11.1.inc b/poky/meta/recipes-devtools/gcc/gcc-11.1.inc
index bf29879..c21242a 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-11.1.inc
+++ b/poky/meta/recipes-devtools/gcc/gcc-11.1.inc
@@ -68,7 +68,10 @@
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-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.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] = "4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf"
SRC_URI[backports.sha256sum] = "69274bebd6c069a13443d4af61070e854740a639ec4d66eedf3e80070363587b"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc b/poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
index a64c4ca..dc7f458 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 @@
${@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/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch b/poky/meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch
deleted file mode 100644
index a3e31e4..0000000
--- a/poky/meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-This change breaks installation on baremetal targets, so whilst the cause is
-investigated revert the commit.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 8ec52bd0ba2141ef0bcc6f93e26a23d662b40f78 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@arm.com>
-Date: Wed, 26 May 2021 19:54:29 +0100
-Subject: [PATCH] Revert "libstdc++: Install libstdc++*-gdb.py more robustly
- [PR 99453]"
-
-This reverts commit dbb87d6a9c37c8eca80d77782717a8144515c16d.
----
- libstdc++-v3/python/Makefile.am | 20 ++++++++++++++++----
- libstdc++-v3/python/Makefile.in | 14 ++++++++++++--
- 2 files changed, 28 insertions(+), 6 deletions(-)
-
-diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am
-index 0c2b207b86e..01517a2a522 100644
---- a/libstdc++-v3/python/Makefile.am
-+++ b/libstdc++-v3/python/Makefile.am
-@@ -44,9 +44,21 @@ gdb.py: hook.in Makefile
- install-data-local: gdb.py
- @$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
- ## We want to install gdb.py as SOMETHING-gdb.py. SOMETHING is the
--## full name of the final library. We use the libtool .la file to get
--## the correct name.
-- @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
-- $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
-+## full name of the final library. We want to ignore symlinks, the
-+## .la file, and any previous -gdb.py file. This is inherently
-+## fragile, but there does not seem to be a better option, because
-+## libtool hides the real names from us.
-+ @here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \
-+ for file in libstdc++.*; do \
-+ case $$file in \
-+ *-gdb.py) ;; \
-+ *.la) ;; \
-+ *) if test -h $$file; then \
-+ continue; \
-+ fi; \
-+ libname=$$file;; \
-+ esac; \
-+ done; \
-+ cd $$here; \
- 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..c35dbe55961 100644
---- a/libstdc++-v3/python/Makefile.in
-+++ b/libstdc++-v3/python/Makefile.in
-@@ -607,8 +607,18 @@ gdb.py: hook.in Makefile
-
- install-data-local: gdb.py
- @$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
-- @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
-- $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
-+ @here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \
-+ for file in libstdc++.*; do \
-+ case $$file in \
-+ *-gdb.py) ;; \
-+ *.la) ;; \
-+ *) if test -h $$file; then \
-+ continue; \
-+ fi; \
-+ libname=$$file;; \
-+ esac; \
-+ done; \
-+ cd $$here; \
- 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/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 0000000..d82f533
--- /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/0004-64-bit-multilib-hack.patch b/poky/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch
index 789f573..8184e68 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 28e7c312b1292ca216d4b54ec9f6b7ac055907a8 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 @@
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,11 +30,12 @@
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 241b0ef20b6..a7dadb2d64f 100644
@@ -53,6 +54,22 @@
-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 d288b093522..7b5980a9d21 100644
--- a/gcc/config/i386/t-linux64
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 0000000..37fe95d
--- /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 0000000..9c5a2b8
--- /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 0000000..5f0bf8d
--- /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/libgcc-initial.inc b/poky/meta/recipes-devtools/gcc/libgcc-initial.inc
index f7d8041..06bf224 100644
--- a/poky/meta/recipes-devtools/gcc/libgcc-initial.inc
+++ b/poky/meta/recipes-devtools/gcc/libgcc-initial.inc
@@ -51,8 +51,6 @@
do_configure_append () {
sed -i -e 's#thread_header = .*#thread_header = gthr-single.h#' ${B}/${BPN}/Makefile
- sed -i -e '/^libgcc_tm_defines = $/a fp128_dec_funcs =' ${B}/${BPN}/Makefile
- sed -i -e '/^libgcc_tm_defines = $/a fp128_decstr_funcs =' ${B}/${BPN}/Makefile
}
do_install_append () {
diff --git a/poky/meta/recipes-devtools/gdb/gdb-10.2.inc b/poky/meta/recipes-devtools/gdb/gdb-10.2.inc
index 0a7df54..0d27507 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-10.2.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-10.2.inc
@@ -15,5 +15,9 @@
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] = "aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29"
diff --git a/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index c9daf25..edb05b6 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 @@
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.inc b/poky/meta/recipes-devtools/gdb/gdb-cross.inc
index ebe329f..f8a113d 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -5,9 +5,10 @@
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/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 0000000..6a98b65
--- /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 0000000..f699a58
--- /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 0000000..a725606
--- /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 0000000..31cf0b0
--- /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 = ®s;
++ 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, ®s, 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 = ®s;
++ 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/git/git_2.31.1.bb b/poky/meta/recipes-devtools/git/git_2.31.1.bb
deleted file mode 100644
index 6bfa1f7..0000000
--- a/poky/meta/recipes-devtools/git/git_2.31.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require git.inc
-
-EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
- ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
- "
-EXTRA_OEMAKE += "NO_GETTEXT=1"
-
-SRC_URI[tarball.sha256sum] = "46d37c229e9d786510e0c53b60065704ce92d5aedc16f2c5111e3ed35093bfa7"
-SRC_URI[manpages.sha256sum] = "d330498aaaea6928b0abbbbb896f6f605efd8d35f23cbbb2de38c87a737d4543"
diff --git a/poky/meta/recipes-devtools/git/git_2.32.0.bb b/poky/meta/recipes-devtools/git/git_2.32.0.bb
new file mode 100644
index 0000000..f45737b
--- /dev/null
+++ b/poky/meta/recipes-devtools/git/git_2.32.0.bb
@@ -0,0 +1,9 @@
+require git.inc
+
+EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
+ ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
+ "
+EXTRA_OEMAKE += "NO_GETTEXT=1"
+
+SRC_URI[tarball.sha256sum] = "6038f06d396ba9dab2eee541c7db6e7f9f847f181ec62f3d8441893f8c469398"
+SRC_URI[manpages.sha256sum] = "b5533c40ea1688231c0e2df51cc0d1c0272e17fe78a45ba6e60cb8f61fa4a53c"
diff --git a/poky/meta/recipes-devtools/go/go-1.16.4.inc b/poky/meta/recipes-devtools/go/go-1.16.5.inc
similarity index 88%
rename from poky/meta/recipes-devtools/go/go-1.16.4.inc
rename to poky/meta/recipes-devtools/go/go-1.16.5.inc
index 71c17de..bd928e4 100644
--- a/poky/meta/recipes-devtools/go/go-1.16.4.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.4"
+PV = "1.16.5"
FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
@@ -17,4 +17,4 @@
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] = "ae4f6b6e2a1677d31817984655a762074b5356da50fb58722b99104870d43503"
+SRC_URI[main.sha256sum] = "7bfa7e5908c7cc9e75da5ddf3066d7cbcf3fd9fa51945851325eebc17f50ba80"
diff --git a/poky/meta/recipes-devtools/go/go-binary-native_1.16.4.bb b/poky/meta/recipes-devtools/go/go-binary-native_1.16.5.bb
similarity index 83%
rename from poky/meta/recipes-devtools/go/go-binary-native_1.16.4.bb
rename to poky/meta/recipes-devtools/go/go-binary-native_1.16.5.bb
index 8c046e8..b3e2b6a 100644
--- a/poky/meta/recipes-devtools/go/go-binary-native_1.16.4.bb
+++ b/poky/meta/recipes-devtools/go/go-binary-native_1.16.5.bb
@@ -8,8 +8,8 @@
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] = "7154e88f5a8047aad4b80ebace58a059e36e7e2e4eb3b383127a28c711b4ff59"
-SRC_URI[go_linux_arm64.sha256sum] = "8b18eb05ddda2652d69ab1b1dd1f40dd731799f43c6a58b512ad01ae5b5bba21"
+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-cross-canadian_1.16.4.bb b/poky/meta/recipes-devtools/go/go-cross-canadian_1.16.5.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-cross-canadian_1.16.4.bb
rename to poky/meta/recipes-devtools/go/go-cross-canadian_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go-cross_1.16.4.bb b/poky/meta/recipes-devtools/go/go-cross_1.16.5.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-cross_1.16.4.bb
rename to poky/meta/recipes-devtools/go/go-cross_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go-crosssdk_1.16.4.bb b/poky/meta/recipes-devtools/go/go-crosssdk_1.16.5.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-crosssdk_1.16.4.bb
rename to poky/meta/recipes-devtools/go/go-crosssdk_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go-native_1.16.4.bb b/poky/meta/recipes-devtools/go/go-native_1.16.5.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-native_1.16.4.bb
rename to poky/meta/recipes-devtools/go/go-native_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go-runtime_1.16.4.bb b/poky/meta/recipes-devtools/go/go-runtime_1.16.5.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-runtime_1.16.4.bb
rename to poky/meta/recipes-devtools/go/go-runtime_1.16.5.bb
diff --git a/poky/meta/recipes-devtools/go/go_1.16.4.bb b/poky/meta/recipes-devtools/go/go_1.16.5.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go_1.16.4.bb
rename to poky/meta/recipes-devtools/go/go_1.16.5.bb
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 3e91026..6cd0528 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 @@
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.16.bb b/poky/meta/recipes-devtools/libcomps/libcomps_0.1.17.bb
similarity index 94%
rename from poky/meta/recipes-devtools/libcomps/libcomps_0.1.16.bb
rename to poky/meta/recipes-devtools/libcomps/libcomps_0.1.17.bb
index 851ec5b..502bc46 100644
--- a/poky/meta/recipes-devtools/libcomps/libcomps_0.1.16.bb
+++ b/poky/meta/recipes-devtools/libcomps/libcomps_0.1.17.bb
@@ -9,7 +9,7 @@
file://0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
"
-SRCREV = "f3289ed1d812648558ab48ade4fae850b375fa65"
+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 0000000..d483dd4
--- /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_0.63.0.bb b/poky/meta/recipes-devtools/libdnf/libdnf_0.63.0.bb
index 79e8865..a26ee55 100644
--- a/poky/meta/recipes-devtools/libdnf/libdnf_0.63.0.bb
+++ b/poky/meta/recipes-devtools/libdnf/libdnf_0.63.0.bb
@@ -12,6 +12,7 @@
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 = "669a5c691acba91693d238d6262ac99a440aa9b3"
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 46ab9a1..2ea50f0 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 @@
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 @@
-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.14.0.bb b/poky/meta/recipes-devtools/librepo/librepo_1.14.1.bb
similarity index 94%
rename from poky/meta/recipes-devtools/librepo/librepo_1.14.0.bb
rename to poky/meta/recipes-devtools/librepo/librepo_1.14.1.bb
index 109b40c..8676452 100644
--- a/poky/meta/recipes-devtools/librepo/librepo_1.14.0.bb
+++ b/poky/meta/recipes-devtools/librepo/librepo_1.14.1.bb
@@ -10,7 +10,7 @@
file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
"
-SRCREV = "88b769eceefc1b151937e6b54d108b48f2177d87"
+SRCREV = "c5fe6b85b47f2e4f7a37cff3f3214205d1b54db5"
S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc b/poky/meta/recipes-devtools/m4/m4-1.4.19.inc
similarity index 79%
rename from poky/meta/recipes-devtools/m4/m4-1.4.18.inc
rename to poky/meta/recipes-devtools/m4/m4-1.4.19.inc
index 6475b02..5f3d592 100644
--- a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
+++ b/poky/meta/recipes-devtools/m4/m4-1.4.19.inc
@@ -4,25 +4,21 @@
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 \
- file://0001-c-stack-stop-using-SIGSTKSZ.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
@@ -50,6 +46,8 @@
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
similarity index 100%
rename from poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb
rename to 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 ba1a4ba..0000000
--- 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-c-stack-stop-using-SIGSTKSZ.patch b/poky/meta/recipes-devtools/m4/m4/0001-c-stack-stop-using-SIGSTKSZ.patch
deleted file mode 100644
index 883b8a2..0000000
--- a/poky/meta/recipes-devtools/m4/m4/0001-c-stack-stop-using-SIGSTKSZ.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 69238f15129f35eb4756ad8e2004e0d7907cb175 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 30 Apr 2021 17:40:36 -0700
-Subject: [PATCH] c-stack: stop using SIGSTKSZ
-
-This patch is required with glibc 2.34+
-based on gnulib [1]
-
-[1] https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=f9e2b20a12a230efa30f1d479563ae07d276a94b
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/c-stack.c | 22 +++++++++++++---------
- 1 file changed, 13 insertions(+), 9 deletions(-)
-
-diff --git a/lib/c-stack.c b/lib/c-stack.c
-index 5353c08..863f764 100644
---- a/lib/c-stack.c
-+++ b/lib/c-stack.c
-@@ -51,13 +51,14 @@
- typedef struct sigaltstack stack_t;
- #endif
- #ifndef SIGSTKSZ
--# define SIGSTKSZ 16384
--#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
-+#define get_sigstksz() (16384)
-+#elif HAVE_LIBSIGSEGV
- /* libsigsegv 2.6 through 2.8 have a bug where some architectures use
- more than the Linux default of an 8k alternate stack when deciding
- if a fault was caused by stack overflow. */
--# undef SIGSTKSZ
--# define SIGSTKSZ 16384
-+#define get_sigstksz() ((SIGSTKSZ) < 16384 ? 16384 : (SIGSTKSZ))
-+#else
-+#define get_sigstksz() ((SIGSTKSZ))
- #endif
-
- #include <stdlib.h>
-@@ -131,7 +132,8 @@ die (int signo)
- /* Storage for the alternate signal stack. */
- static union
- {
-- char buffer[SIGSTKSZ];
-+ /* allocate buffer with size from get_sigstksz() */
-+ char *buffer;
-
- /* These other members are for proper alignment. There's no
- standard way to guarantee stack alignment, but this seems enough
-@@ -203,10 +205,11 @@ c_stack_action (void (*action) (int))
- program_error_message = _("program error");
- stack_overflow_message = _("stack overflow");
-
-+ alternate_signal_stack.buffer = malloc(get_sigstksz());
- /* Always install the overflow handler. */
- if (stackoverflow_install_handler (overflow_handler,
- alternate_signal_stack.buffer,
-- sizeof alternate_signal_stack.buffer))
-+ get_sigstksz()))
- {
- errno = ENOTSUP;
- return -1;
-@@ -279,14 +282,15 @@ c_stack_action (void (*action) (int))
- stack_t st;
- struct sigaction act;
- st.ss_flags = 0;
-+ alternate_signal_stack.buffer = malloc(get_sigstksz());
- # if SIGALTSTACK_SS_REVERSED
- /* Irix mistakenly treats ss_sp as the upper bound, rather than
- lower bound, of the alternate stack. */
-- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ - sizeof (void *);
-- st.ss_size = sizeof alternate_signal_stack.buffer - sizeof (void *);
-+ st.ss_sp = alternate_signal_stack.buffer + get_sigstksz() - sizeof (void *);
-+ st.ss_size = get_sigstksz() - sizeof (void *);
- # else
- st.ss_sp = alternate_signal_stack.buffer;
-- st.ss_size = sizeof alternate_signal_stack.buffer;
-+ st.ss_size = get_sigstksz();
- # endif
- r = sigaltstack (&st, NULL);
- if (r != 0)
---
-2.31.1
-
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 11508ee..0000000
--- 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 71edf59..39fcd91 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 @@
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 c10bcbf..0000000
--- 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
similarity index 100%
rename from poky/meta/recipes-devtools/m4/m4_1.4.18.bb
rename to 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 f603814..7ddfccf 100644
--- a/poky/meta/recipes-devtools/meson/meson.inc
+++ b/poky/meta/recipes-devtools/meson/meson.inc
@@ -16,9 +16,8 @@
file://gi-target-dep.patch \
file://0001-Make-CPU-family-warnings-fatal.patch \
file://0002-Support-building-allarch-recipes-again.patch \
- file://4e312c19e693a69b0650ce6c8a8903163c959996.patch \
"
-SRC_URI[sha256sum] = "f4820df0bc969c99019fd4af8ca5f136ee94c63d8a5ad67e7eb73bdbc9182fdd"
+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/4e312c19e693a69b0650ce6c8a8903163c959996.patch b/poky/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
deleted file mode 100644
index 76daf01..0000000
--- a/poky/meta/recipes-devtools/meson/meson/4e312c19e693a69b0650ce6c8a8903163c959996.patch
+++ /dev/null
@@ -1,412 +0,0 @@
-From 4e312c19e693a69b0650ce6c8a8903163c959996 Mon Sep 17 00:00:00 2001
-From: Xavier Claessens <xavier.claessens@collabora.com>
-Date: Tue, 11 May 2021 09:18:47 -0400
-Subject: [PATCH] gnome: Fix gtkdoc generation
-
-install_scripts used to replace @BUILD_ROOT@ and @SOURCE_ROOT@ but it
-was not documented and got removed in Meson 0.58.0. gnome.gtkdoc() was
-relying on that behaviour, but it has always been broken in the case the
-source or build directory contains spaces.
-
-Fix this by changing get_include_args() to substitue paths directly
-which will then get escaped correctly.
-
-Add a unit test that builds GObject documentation which is where this
-issue has been spotted.
-
-Fixes: #8744
-Upstream-Status: Backport
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- mesonbuild/modules/__init__.py | 54 +++++++++----------
- mesonbuild/modules/gnome.py | 15 +++---
- mesonbuild/modules/hotdoc.py | 3 +-
- mesonbuild/modules/qt.py | 4 +-
- mesonbuild/modules/windows.py | 5 +-
- .../10 gtk-doc/doc/foobar1/foobar-docs.sgml | 2 +-
- .../doc/foobar1/foobar-sections.txt | 16 ++++++
- .../10 gtk-doc/doc/foobar1/foobar.types | 4 ++
- .../10 gtk-doc/doc/foobar1/meson.build | 6 ++-
- test cases/frameworks/10 gtk-doc/foo.c | 30 +++++++++++
- .../frameworks/10 gtk-doc/include/foo.h | 18 +++++++
- test cases/frameworks/10 gtk-doc/meson.build | 12 +++++
- test cases/frameworks/10 gtk-doc/test.json | 4 +-
- 13 files changed, 127 insertions(+), 46 deletions(-)
- create mode 100644 test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
- create mode 100644 test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
- create mode 100644 test cases/frameworks/10 gtk-doc/foo.c
-
-diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
-index ddb5e3e6cf3..c0970294c34 100644
---- a/mesonbuild/modules/__init__.py
-+++ b/mesonbuild/modules/__init__.py
-@@ -56,6 +56,33 @@ def __init__(self, interpreter: 'Interpreter') -> None:
- self.target_machine = interpreter.builtin['target_machine'].held_object
- self.current_node = interpreter.current_node
-
-+ def get_include_args(self, include_dirs, prefix='-I'):
-+ if not include_dirs:
-+ return []
-+
-+ srcdir = self.environment.get_source_dir()
-+ builddir = self.environment.get_build_dir()
-+
-+ dirs_str = []
-+ for dirs in unholder(include_dirs):
-+ if isinstance(dirs, str):
-+ dirs_str += [f'{prefix}{dirs}']
-+ continue
-+
-+ # Should be build.IncludeDirs object.
-+ basedir = dirs.get_curdir()
-+ for d in dirs.get_incdirs():
-+ expdir = os.path.join(basedir, d)
-+ srctreedir = os.path.join(srcdir, expdir)
-+ buildtreedir = os.path.join(builddir, expdir)
-+ dirs_str += [f'{prefix}{buildtreedir}',
-+ f'{prefix}{srctreedir}']
-+ for d in dirs.get_extra_build_dirs():
-+ dirs_str += [f'{prefix}{d}']
-+
-+ return dirs_str
-+
-+
- class ModuleObject:
- """Base class for all objects returned by modules
- """
-@@ -71,33 +98,6 @@ def __init__(self, interpreter: T.Optional['Interpreter'] = None) -> None:
- class ExtensionModule(ModuleObject):
- pass
-
--def get_include_args(include_dirs, prefix='-I'):
-- '''
-- Expand include arguments to refer to the source and build dirs
-- by using @SOURCE_ROOT@ and @BUILD_ROOT@ for later substitution
-- '''
-- if not include_dirs:
-- return []
--
-- dirs_str = []
-- for dirs in unholder(include_dirs):
-- if isinstance(dirs, str):
-- dirs_str += [f'{prefix}{dirs}']
-- continue
--
-- # Should be build.IncludeDirs object.
-- basedir = dirs.get_curdir()
-- for d in dirs.get_incdirs():
-- expdir = os.path.join(basedir, d)
-- srctreedir = os.path.join('@SOURCE_ROOT@', expdir)
-- buildtreedir = os.path.join('@BUILD_ROOT@', expdir)
-- dirs_str += [f'{prefix}{buildtreedir}',
-- f'{prefix}{srctreedir}']
-- for d in dirs.get_extra_build_dirs():
-- dirs_str += [f'{prefix}{d}']
--
-- return dirs_str
--
- def is_module_library(fname):
- '''
- Check if the file is a library-like file generated by a module-specific
-diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
-index d0b053d4f76..c91cda66f8b 100644
---- a/mesonbuild/modules/gnome.py
-+++ b/mesonbuild/modules/gnome.py
-@@ -26,7 +26,6 @@
- from .. import mesonlib
- from .. import interpreter
- from . import GResourceTarget, GResourceHeaderTarget, GirTarget, TypelibTarget, VapiTarget
--from . import get_include_args
- from . import ExtensionModule
- from . import ModuleReturnValue
- from ..mesonlib import (
-@@ -394,7 +393,7 @@ def _get_dependencies_flags(self, deps, state, depends, include_rpath=False,
- gi_includes.update([girdir])
- if isinstance(dep, InternalDependency):
- cflags.update(dep.get_compile_args())
-- cflags.update(get_include_args(dep.include_directories))
-+ cflags.update(state.get_include_args(dep.include_directories))
- for lib in unholder(dep.libraries):
- if isinstance(lib, build.SharedLibrary):
- internal_ldflags.update(self._get_link_args(state, lib, depends, include_rpath))
-@@ -443,7 +442,7 @@ def _get_dependencies_flags(self, deps, state, depends, include_rpath=False,
- else:
- external_ldflags.update([lib])
- elif isinstance(dep, (build.StaticLibrary, build.SharedLibrary)):
-- cflags.update(get_include_args(dep.get_include_dirs()))
-+ cflags.update(state.get_include_args(dep.get_include_dirs()))
- depends.append(dep)
- else:
- mlog.log(f'dependency {dep!r} not handled to build gir files')
-@@ -853,7 +852,7 @@ def generate_gir(self, state, args, kwargs):
- scan_command += self._scan_header(kwargs)
- scan_command += self._scan_extra_args(kwargs)
- scan_command += ['-I' + srcdir, '-I' + builddir]
-- scan_command += get_include_args(girtargets_inc_dirs)
-+ scan_command += state.get_include_args(girtargets_inc_dirs)
- scan_command += ['--filelist=' + self._make_gir_filelist(state, srcdir, ns, nsversion, girtargets, libsources)]
- scan_command += self._scan_link_withs(state, depends, kwargs)
- scan_command += self._scan_include(state, depends, gir_inc_dirs, kwargs)
-@@ -863,8 +862,8 @@ def generate_gir(self, state, args, kwargs):
- scan_command += ['--cflags-begin']
- scan_command += cflags
- scan_command += ['--cflags-end']
-- scan_command += get_include_args(inc_dirs)
-- scan_command += get_include_args(list(gi_includes) + gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
-+ scan_command += state.get_include_args(inc_dirs)
-+ scan_command += state.get_include_args(list(gi_includes) + gir_inc_dirs + inc_dirs, prefix='--add-include-path=')
- scan_command += list(internal_ldflags)
- scan_command += self._scan_gir_targets(state, girtargets)
- scan_command += self._scan_langs(state, [lc[0] for lc in langs_compilers])
-@@ -886,7 +885,7 @@ def generate_gir(self, state, args, kwargs):
-
- typelib_output = f'{ns}-{nsversion}.typelib'
- typelib_cmd = [gicompiler, scan_target, '--output', '@OUTPUT@']
-- typelib_cmd += get_include_args(gir_inc_dirs, prefix='--includedir=')
-+ typelib_cmd += state.get_include_args(gir_inc_dirs, prefix='--includedir=')
-
- for incdir in typelib_includes:
- typelib_cmd += ["--includedir=" + incdir]
-@@ -1127,7 +1126,7 @@ def _get_build_args(self, kwargs, state, depends):
- 'Gir include dirs should be include_directories().')
-
- cflags.extend(deps_cflags)
-- cflags.extend(get_include_args(inc_dirs))
-+ cflags.extend(state.get_include_args(inc_dirs))
- ldflags = []
- ldflags.extend(internal_ldflags)
- ldflags.extend(external_ldflags)
-diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py
-index bf8cd229c0d..89a5d938ea7 100644
---- a/mesonbuild/modules/hotdoc.py
-+++ b/mesonbuild/modules/hotdoc.py
-@@ -22,7 +22,6 @@
- from mesonbuild.coredata import MesonException
- from . import ModuleReturnValue
- from . import ExtensionModule
--from . import get_include_args
- from ..dependencies import Dependency, InternalDependency
- from ..interpreterbase import FeatureNew, InvalidArguments, noPosargs, noKwargs
- from ..interpreter import CustomTargetHolder
-@@ -191,7 +190,7 @@ def process_dependencies(self, deps):
- for dep in mesonlib.listify(ensure_list(deps)):
- dep = getattr(dep, "held_object", dep)
- if isinstance(dep, InternalDependency):
-- inc_args = get_include_args(dep.include_directories)
-+ inc_args = self.state.get_include_args(dep.include_directories)
- cflags.update([self.replace_dirs_in_string(x)
- for x in inc_args])
- cflags.update(self.process_dependencies(dep.libraries))
-diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
-index b7389bd59af..1bf0099d1df 100644
---- a/mesonbuild/modules/qt.py
-+++ b/mesonbuild/modules/qt.py
-@@ -23,7 +23,7 @@
- from ..mesonlib import MesonException, extract_as_list, File, unholder, version_compare
- from ..dependencies import Dependency
- import xml.etree.ElementTree as ET
--from . import ModuleReturnValue, get_include_args, ExtensionModule
-+from . import ModuleReturnValue, ExtensionModule
- from ..interpreterbase import noPosargs, permittedKwargs, FeatureNew, FeatureNewKwargs
- from ..interpreter import extract_required_kwarg
- from ..programs import NonExistingExternalProgram
-@@ -239,7 +239,7 @@ def preprocess(self, state, args, kwargs):
- ui_gen = build.Generator([self.uic], ui_kwargs)
- ui_output = ui_gen.process_files(f'Qt{self.qt_version} ui', ui_files, state)
- sources.append(ui_output)
-- inc = get_include_args(include_dirs=include_directories)
-+ inc = state.get_include_args(include_dirs=include_directories)
- compile_args = []
- for dep in unholder(dependencies):
- if isinstance(dep, Dependency):
-diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py
-index d7a86380885..c4fdc196681 100644
---- a/mesonbuild/modules/windows.py
-+++ b/mesonbuild/modules/windows.py
-@@ -19,7 +19,6 @@
- from .. import mlog
- from .. import mesonlib, build
- from ..mesonlib import MachineChoice, MesonException, extract_as_list, unholder
--from . import get_include_args
- from . import ModuleReturnValue
- from . import ExtensionModule
- from ..interpreter import CustomTargetHolder
-@@ -83,12 +82,12 @@ def compile_resources(self, state, args, kwargs):
- wrc_depends = extract_as_list(kwargs, 'depends', pop = True)
- for d in wrc_depends:
- if isinstance(d, CustomTargetHolder):
-- extra_args += get_include_args([d.outdir_include()])
-+ extra_args += state.get_include_args([d.outdir_include()])
- inc_dirs = extract_as_list(kwargs, 'include_directories', pop = True)
- for incd in inc_dirs:
- if not isinstance(incd.held_object, (str, build.IncludeDirs)):
- raise MesonException('Resource include dirs should be include_directories().')
-- extra_args += get_include_args(inc_dirs)
-+ extra_args += state.get_include_args(inc_dirs)
-
- rescomp, rescomp_type = self._find_resource_compiler(state)
- if rescomp_type == ResourceCompilerType.rc:
-diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
-index 95f73efdf45..6ccd087dc18 100644
---- a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
-+++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml
-@@ -35,7 +35,7 @@
- </partintro>
- <xi:include href="xml/foo.xml"/>
- <xi:include href="../../include/bar.xml"/>
-- <xi:include href="xml/foo-version.xml"/>
-+ <xi:include href="xml/version.xml"/>
- </reference>
-
- </book>
-diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
-new file mode 100644
-index 00000000000..d14c8dab010
---- /dev/null
-+++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
-@@ -0,0 +1,16 @@
-+<SECTION>
-+<FILE>foo</FILE>
-+<TITLE>FooObj</TITLE>
-+FooObj
-+FooObjClass
-+foo_do_something
-+</SECTION>
-+
-+<SECTION>
-+<FILE>version</FILE>
-+<TITLE>version</TITLE>
-+FOO_MAJOR_VERSION
-+FOO_MINOR_VERSION
-+FOO_MICRO_VERSION
-+</SECTION>
-+
-diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
-new file mode 100644
-index 00000000000..0a9c046f3ed
---- /dev/null
-+++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types
-@@ -0,0 +1,4 @@
-+% This include is useless it's a regression test for https://github.com/mesonbuild/meson/issues/8744
-+#include <foo.h>
-+
-+foo_obj_get_type
-diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
-index 149c6e956aa..f4b3724dbae 100644
---- a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
-+++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build
-@@ -1,5 +1,9 @@
- gnome.gtkdoc('foobar',
-- src_dir : inc,
-+ src_dir : [inc, '.'],
- main_sgml : 'foobar-docs.sgml',
- content_files : [docbook, version_xml],
-+ dependencies: foo_dep,
-+ # Manually written types file for regression test:
-+ # https://github.com/mesonbuild/meson/issues/8744
-+ gobject_typesfile: 'foobar.types',
- install : true)
-diff --git a/test cases/frameworks/10 gtk-doc/foo.c b/test cases/frameworks/10 gtk-doc/foo.c
-new file mode 100644
-index 00000000000..36c0639ec08
---- /dev/null
-+++ b/test cases/frameworks/10 gtk-doc/foo.c
-@@ -0,0 +1,30 @@
-+#include <foo.h>
-+
-+
-+struct _FooObj {
-+ GObject parent;
-+ int dummy;
-+};
-+
-+G_DEFINE_TYPE(FooObj, foo_obj, G_TYPE_OBJECT)
-+
-+static void foo_obj_init (FooObj *self)
-+{
-+}
-+
-+static void foo_obj_class_init (FooObjClass *klass)
-+{
-+}
-+
-+/**
-+ * foo_do_something:
-+ * @self: self
-+ *
-+ * Useless function.
-+ *
-+ * Returns: 0.
-+ */
-+int foo_do_something(FooObj *self)
-+{
-+ return 0;
-+}
-diff --git a/test cases/frameworks/10 gtk-doc/include/foo.h b/test cases/frameworks/10 gtk-doc/include/foo.h
-index 7b8946b6a86..510f3d1ecb5 100644
---- a/test cases/frameworks/10 gtk-doc/include/foo.h
-+++ b/test cases/frameworks/10 gtk-doc/include/foo.h
-@@ -1,5 +1,7 @@
- #pragma once
-
-+#include <glib-object.h>
-+
- /**
- * FooIndecision:
- * @FOO_MAYBE: Something maybe
-@@ -13,3 +15,19 @@ typedef enum {
- FOO_POSSIBLY,
- } FooIndecision;
-
-+/**
-+ * FooObjClass:
-+ *
-+ * The class
-+ */
-+
-+/**
-+ * FooObj:
-+ *
-+ * The instance
-+ */
-+
-+#define FOO_TYPE_OBJ foo_obj_get_type()
-+G_DECLARE_FINAL_TYPE(FooObj, foo_obj, FOO, OBJ, GObject)
-+
-+int foo_do_something(FooObj *self);
-diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build
-index 5c22ad0afa4..292980fafa7 100644
---- a/test cases/frameworks/10 gtk-doc/meson.build
-+++ b/test cases/frameworks/10 gtk-doc/meson.build
-@@ -24,4 +24,16 @@ if gtkdoc_ver.version_compare('<1.26')
- error('MESON_SKIP_TEST gtk-doc test requires gtkdoc >= 1.26.')
- endif
-
-+gobject = dependency('gobject-2.0')
-+
-+libfoo = library('foo', 'foo.c',
-+ include_directories: inc,
-+ dependencies: gobject,
-+)
-+
-+foo_dep = declare_dependency(
-+ link_with: libfoo,
-+ include_directories: inc,
-+)
-+
- subdir('doc')
-diff --git a/test cases/frameworks/10 gtk-doc/test.json b/test cases/frameworks/10 gtk-doc/test.json
-index c44126cc741..03ad0595817 100644
---- a/test cases/frameworks/10 gtk-doc/test.json
-+++ b/test cases/frameworks/10 gtk-doc/test.json
-@@ -4,8 +4,8 @@
- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/BAR.html"},
- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.devhelp2"},
- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.html"},
-- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar-foo.html"},
-- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar-foo-version.html"},
-+ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/FooObj.html"},
-+ {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foo-version.html"},
- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/home.png"},
- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/index.html"},
- {"type": "file", "file": "usr/share/gtk-doc/html/foobar/left.png"},
diff --git a/poky/meta/recipes-devtools/meson/meson_0.58.0.bb b/poky/meta/recipes-devtools/meson/meson_0.58.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/meson/meson_0.58.0.bb
rename to poky/meta/recipes-devtools/meson/meson_0.58.1.bb
diff --git a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
similarity index 100%
rename from poky/meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb
rename to poky/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
diff --git a/poky/meta/recipes-devtools/mtools/mtools_4.0.27.bb b/poky/meta/recipes-devtools/mtools/mtools_4.0.29.bb
similarity index 93%
rename from poky/meta/recipes-devtools/mtools/mtools_4.0.27.bb
rename to poky/meta/recipes-devtools/mtools/mtools_4.0.29.bb
index c6fa02e..38de1dd 100644
--- a/poky/meta/recipes-devtools/mtools/mtools_4.0.27.bb
+++ b/poky/meta/recipes-devtools/mtools/mtools_4.0.29.bb
@@ -24,7 +24,7 @@
glibc-gconv-ibm866 \
glibc-gconv-ibm869 \
"
-SRC_URI[sha256sum] = "9c88c8d9244e54768e40b92c005e61ec4e084ea7c070df9184caf1a6408838b3"
+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
similarity index 94%
rename from poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb
rename to poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.5.bb
index ce299d6..93d2911 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 @@
"
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 33b7280..0000000
--- 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 4578fa3..0000000
--- 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
similarity index 79%
rename from poky/meta/recipes-devtools/opkg/opkg_0.4.4.bb
rename to poky/meta/recipes-devtools/opkg/opkg_0.4.5.bb
index 9eca61b..56d6211 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 @@
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 @@
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/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 0000000..744e4e0
--- /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
similarity index 100%
rename from poky/meta/recipes-devtools/perl/files/0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch
rename to 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
similarity index 100%
rename from poky/meta/recipes-devtools/perl/files/0001-configure_tool.sh-do-not-quote-the-argument-to-comma.patch
rename to 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
similarity index 100%
rename from poky/meta/recipes-devtools/perl/files/0001-perl-cross-add-LDFLAGS-when-linking-libperl.patch
rename to 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 0000000..9321724
--- /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 0000000..e9bf752
--- /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 0000000..b77bbd1
--- /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 ccdd52a..aa85cce 100644
--- a/poky/meta/recipes-devtools/perl/files/determinism.patch
+++ b/poky/meta/recipes-devtools/perl/files/determinism.patch
@@ -21,19 +21,6 @@
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 @@
{
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/perl_5.32.1.bb b/poky/meta/recipes-devtools/perl/perl_5.34.0.bb
similarity index 95%
rename from poky/meta/recipes-devtools/perl/perl_5.32.1.bb
rename to poky/meta/recipes-devtools/perl/perl_5.34.0.bb
index b28040c..7935a58 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 @@
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 @@
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 @@
# 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/python/python3-dbusmock_0.23.0.bb b/poky/meta/recipes-devtools/python/python3-dbusmock_0.23.1.bb
similarity index 82%
rename from poky/meta/recipes-devtools/python/python3-dbusmock_0.23.0.bb
rename to poky/meta/recipes-devtools/python/python3-dbusmock_0.23.1.bb
index 80990d8..b5fa186 100644
--- a/poky/meta/recipes-devtools/python/python3-dbusmock_0.23.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-dbusmock_0.23.1.bb
@@ -4,7 +4,7 @@
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02"
-SRC_URI[sha256sum] = "8c0b873a3f23869b416b51deeec39b3d5ab4c9875b705fc90ae917e4969c2574"
+SRC_URI[sha256sum] = "b5c36a9c9935d1867cf79d8666b08ad906660e6d4d967e9fded4361ad7eef54f"
PYPI_PACKAGE = "python-dbusmock"
diff --git a/poky/meta/recipes-devtools/python/python3-hypothesis_6.13.7.bb b/poky/meta/recipes-devtools/python/python3-hypothesis_6.13.7.bb
deleted file mode 100644
index 7688ff6..0000000
--- a/poky/meta/recipes-devtools/python/python3-hypothesis_6.13.7.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "A library for property-based testing"
-HOMEPAGE = "https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python"
-LICENSE = "MPL-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4ee62c16ebd0f4f99d906f36b7de8c3c"
-
-PYPI_PACKAGE = "hypothesis"
-
-inherit pypi setuptools3
-
-SRC_URI[sha256sum] = "262bb8cee0293ad06c453e78cf89bddcb613b91f82ea5587f3787611ee62861b"
-
-RDEPENDS_${PN} += "python3-attrs python3-core python3-sortedcontainers"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-hypothesis_6.14.0.bb b/poky/meta/recipes-devtools/python/python3-hypothesis_6.14.0.bb
new file mode 100644
index 0000000..89071b2
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-hypothesis_6.14.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "A library for property-based testing"
+HOMEPAGE = "https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python"
+LICENSE = "MPL-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4ee62c16ebd0f4f99d906f36b7de8c3c"
+
+PYPI_PACKAGE = "hypothesis"
+
+inherit pypi setuptools3
+
+SRC_URI[sha256sum] = "9bdee01ae260329b16117e9b0229a839b4a77747a985922653f595bd2a6a541a"
+
+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_4.3.0.bb b/poky/meta/recipes-devtools/python/python3-importlib-metadata_4.5.0.bb
similarity index 87%
rename from poky/meta/recipes-devtools/python/python3-importlib-metadata_4.3.0.bb
rename to poky/meta/recipes-devtools/python/python3-importlib-metadata_4.5.0.bb
index f4ac3c4..7c15678 100644
--- a/poky/meta/recipes-devtools/python/python3-importlib-metadata_4.3.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-importlib-metadata_4.5.0.bb
@@ -8,7 +8,7 @@
PYPI_PACKAGE = "importlib_metadata"
UPSTREAM_CHECK_REGEX = "/importlib-metadata/(?P<pver>(\d+[\.\-_]*)+)/"
-SRC_URI[sha256sum] = "c4646abbce80191bb548636f846e353ff1edc46a06bc536ea0a60d53211dc690"
+SRC_URI[sha256sum] = "b142cc1dd1342f31ff04bb7d022492b09920cb64fed867cd3ea6f80fe3ebd139"
S = "${WORKDIR}/importlib_metadata-${PV}"
diff --git a/poky/meta/recipes-devtools/python/python3-libarchive-c_3.0.bb b/poky/meta/recipes-devtools/python/python3-libarchive-c_3.1.bb
similarity index 75%
rename from poky/meta/recipes-devtools/python/python3-libarchive-c_3.0.bb
rename to poky/meta/recipes-devtools/python/python3-libarchive-c_3.1.bb
index d291955..d8f7862 100644
--- a/poky/meta/recipes-devtools/python/python3-libarchive-c_3.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-libarchive-c_3.1.bb
@@ -9,13 +9,14 @@
inherit pypi setuptools3
-SRC_URI[md5sum] = "920885f5910aa8245e30896996e0415b"
-SRC_URI[sha256sum] = "6f12fa9cf0e44579e5f45bbf11aa455a930fbfdb13ea0ce3c3dfe7b9b9a452ba"
+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
similarity index 87%
rename from poky/meta/recipes-devtools/python/python3-magic_0.4.22.bb
rename to poky/meta/recipes-devtools/python/python3-magic_0.4.24.bb
index b828927..a54bf24 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 @@
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-pycairo_1.20.0.bb b/poky/meta/recipes-devtools/python/python3-pycairo_1.20.1.bb
similarity index 84%
rename from poky/meta/recipes-devtools/python/python3-pycairo_1.20.0.bb
rename to poky/meta/recipes-devtools/python/python3-pycairo_1.20.1.bb
index 8987b7a..d169a3c 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 @@
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-scons-native_3.1.2.bb b/poky/meta/recipes-devtools/python/python3-scons-native_4.1.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/python/python3-scons-native_3.1.2.bb
rename to 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 0000000..ff212b8
--- /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 1212213..0000000
--- 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 0000000..5894a5e
--- /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/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 0000000..7d684b3
--- /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/python3-manifest.json b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
index 615dc3a..d65cf49 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.5.bb b/poky/meta/recipes-devtools/python/python3_3.9.5.bb
index f4002f2..1717ff7 100644
--- a/poky/meta/recipes-devtools/python/python3_3.9.5.bb
+++ b/poky/meta/recipes-devtools/python/python3_3.9.5.bb
@@ -31,6 +31,7 @@
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 = " \
diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc
index 0cbd663..6674936 100644
--- a/poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu.inc
@@ -29,6 +29,14 @@
file://determinism.patch \
file://0001-tests-meson.build-use-relative-path-to-refer-to-file.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"
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 0000000..11b6e3c
--- /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-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 0000000..981c237
--- /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 0000000..a9aee47
--- /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-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 0000000..1718486
--- /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-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 0000000..9fc2faf
--- /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 0000000..e70f3c0
--- /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-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 0000000..5efb87c
--- /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-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 0000000..33e6a66
--- /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/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 0000000..ed73808
--- /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 854269a..87369c4 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 @@
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/vala/vala_0.52.3.bb b/poky/meta/recipes-devtools/vala/vala_0.52.3.bb
deleted file mode 100644
index 133dc9e..0000000
--- a/poky/meta/recipes-devtools/vala/vala_0.52.3.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += " file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch"
-
-SRC_URI[sha256sum] = "037ea1a92bf0f1ab04a71b52a01d50aca1945ad1017b6189d9614f84f5c9b2d9"
diff --git a/poky/meta/recipes-devtools/vala/vala_0.52.4.bb b/poky/meta/recipes-devtools/vala/vala_0.52.4.bb
new file mode 100644
index 0000000..8e2869d
--- /dev/null
+++ b/poky/meta/recipes-devtools/vala/vala_0.52.4.bb
@@ -0,0 +1,5 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch"
+
+SRC_URI[sha256sum] = "ecde520e5160e659ee699f8b1cdc96065edbd44bbd08eb48ef5f2506751fdf31"
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64 b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
index a3a0c6e..b4fc8af 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/remove-for-aarch64
@@ -235,3 +235,4 @@
memcheck/tests/wrapmallocstatic
memcheck/tests/writev1
memcheck/tests/xml1
+memcheck/tests/linux/stack_changes
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest b/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
index 60d2432..caeae84 100755
--- a/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
+++ b/poky/meta/recipes-devtools/valgrind/valgrind/run-ptest
@@ -32,12 +32,19 @@
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_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) \
@@ -56,6 +63,11 @@
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/taskset_nondeterministic_tests b/poky/meta/recipes-devtools/valgrind/valgrind/taskset_nondeterministic_tests
new file mode 100644
index 0000000..e15100a
--- /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.17.0.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
index d0c60d0..60b2486 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
+++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
@@ -18,6 +18,7 @@
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 \
@@ -120,7 +121,7 @@
VALGRINDARCH_mips64el = "mips64"
VALGRINDARCH_powerpc = "ppc"
VALGRINDARCH_powerpc64 = "ppc64"
-VALGRINDARCH_powerpc64el = "ppc64le"
+VALGRINDARCH_powerpc64le = "ppc64le"
INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libexecdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so"
@@ -187,6 +188,7 @@
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